/* 
   Internal Link Architect PRO - n8n Inspired Design
   Archetype: Modern SaaS / Light Mode
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
  /* n8n Inspired Color Palette */
  --bg: #fcfcfc;
  --surface: #ffffff;
  --surface-hover: #f7f7f7;
  --accent: #ff6d5a;
  /* n8n Orange */
  --accent-hover: #e65a4a;
  --accent-muted: rgba(255, 109, 90, 0.1);
  --secondary: #2c3e50;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #666666;
  --error: #e74c3c;
  --success: #2ecc71;

  /* Spacing Grid (8px) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  /* Radius */
  --radius: 12px;
  --radius-sm: 8px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Shadow */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 2px 2px, #e0e0e0 1px, transparent 0);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Typography */
h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--secondary);
  margin-bottom: var(--space-3);
}

h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--secondary);
}

p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 60ch;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  padding: var(--space-12) 0 var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin-bottom: var(--space-8);
  animation: fadeIn 0.8s ease-out;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--secondary);
  box-shadow: var(--shadow);
}

.badge-beta {
  color: var(--accent);
  background: white;
  border: 1px solid var(--accent);
}

/* Tool Console */
.tool-console {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-info {
  margin-top: 24px;
}

.trust-badge {
  font-size: 14px;
  opacity: 0.6;
}

.input-group {
  margin-bottom: var(--space-3);
  text-align: left;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
}

input[type="url"] {
  width: 100%;
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: all 0.2s ease;
}

input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-muted);
}

/* Slider */
.slider-container {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-val {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 2px 10px;
  border-radius: 4px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  appearance: none;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border: 4px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

/* Button */
.btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 109, 90, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--border);
  margin-top: 16px;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  box-shadow: var(--shadow);
}

/* Features */
.info-section {
  padding: var(--space-8) 0;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.feature-card {
  background: white;
  border: 1px solid var(--border);
  padding: var(--space-4);
  border-radius: 12px;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.feature-card i {
  color: var(--accent);
  background: var(--accent-muted);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--secondary);
}

/* FAQ */
.faq-container {
  max-width: 800px;
  margin: var(--space-6) auto 0;
  text-align: left;
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  border-radius: 10px;
}

.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '→';
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(90deg);
}

.faq-content {
  padding: 0 20px 20px;
  font-size: 15px;
  color: var(--text-muted);
}

/* Results */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-card span[id^="stat"] {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.output-container {
  background: #1a1a1a;
  color: #fff;
  padding: 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
}

/* Footer */
footer {
  padding: var(--space-8) 0;
  background: white;
  border-top: 1px solid var(--border);
  margin-top: var(--space-12);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-right {
  display: flex;
  gap: var(--space-4);
  font-size: 13px;
  font-weight: 600;
}

.built-by {
  margin-top: 4px;
  font-size: 13px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--secondary);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.processing {
  display: none;
  margin-top: 20px;
}

.processing.active {
  display: block;
}

.results {
  display: none;
}

.results.active {
  display: block;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Extra n8n elements */
.badge-tech {
  background: var(--secondary);
  color: white;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 36px;
  }

  .tool-console {
    padding: var(--space-4);
  }
}