/* Web-site Design Tokens & Styling - TranslateAgent */

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

:root {
  /* Color Palette */
  --bg-primary: #050508;
  --bg-secondary: #0a0a10;
  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  
  --accent-start: #00f2fe;     /* Electric Cyan */
  --accent-end: #8b5cf6;       /* Deep Violet */
  --accent-glow: rgba(0, 242, 254, 0.12);
  --accent-glow-strong: rgba(0, 242, 254, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(0, 242, 254, 0.2);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', Courier, monospace;

  /* Layout */
  --nav-height: 76px;
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
  line-height: 1.6;
}

/* Scroll Snap Container styling */
.scroll-container {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scroll-container::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.scroll-container {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Section base styles */
.scroll-container section,
.scroll-container footer {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px;
  width: 100%;
}

/* Section with higher content needs min-height but doesn't restrict overflow */
section#features, section#quickstart {
  height: auto;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Background Gradients */
.glow-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-start);
  top: 10%;
  left: -10%;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-end);
  bottom: 10%;
  right: -10%;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-start) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo img {
  border-radius: 8px;
  box-shadow: 0 0 15px var(--accent-glow);
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s, text-shadow 0.3s;
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  transition: width 0.3s ease;
}

.nav-links a.active {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Hamburger Menu button */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* --- Hero Section --- */
#hero {
  background: radial-gradient(circle at center, rgba(13, 13, 21, 0.5) 0%, var(--bg-primary) 100%);
  text-align: center;
}

.hero-logo-large {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 35px var(--accent-glow-strong);
  margin-bottom: 24px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.badges-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.badges-container img {
  height: 20px;
}

#hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-start) 75%, var(--accent-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glow-text 10s ease-in-out infinite alternate;
}

#hero p.hero-subtitle {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--text-secondary);
}

.cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #050508;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow-strong);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* --- Section Layouts --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-start);
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* --- Core Advantages --- */
#advantages {
  background-color: var(--bg-secondary);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.advantage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.advantage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.advantage-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.advantage-card:hover::before {
  opacity: 1;
}

.card-icon-container {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.05);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--accent-start);
}

.advantage-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.advantage-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Features Interactivity --- */
.features-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(16px);
}

.feature-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--accent-start);
  background: rgba(0, 242, 254, 0.06);
  border-color: var(--border-accent);
}

.feature-panel {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.feature-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 24px;
}

.panel-header h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Platform Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.comparison-table th, .comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background-color: rgba(255, 255, 255, 0.015);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td.center, .comparison-table th.center {
  text-align: center;
}

.comparison-table .badge-check {
  color: var(--accent-start);
  font-weight: bold;
}

.comparison-table .badge-warn {
  color: #fbbf24;
}

.comparison-table .badge-cross {
  color: var(--text-muted);
}

.comparison-note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.01);
  padding: 16px;
  border-left: 3px solid var(--accent-end);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Sequence Diagram & Accordion Styles */
.sequence-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.diagram-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flow-chart {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.flow-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-start);
  color: #050508;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.flow-step-text {
  flex-grow: 1;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.accordion-header {
  background: var(--bg-card);
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: var(--bg-card-hover);
}

.accordion-icon {
  transition: transform 0.3s ease;
  color: var(--accent-start);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

/* CLI Table Styles */
.cli-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.cli-table th, .cli-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.cli-table th {
  background-color: rgba(255, 255, 255, 0.01);
  font-weight: 600;
}

.cli-flag {
  font-family: var(--font-mono);
  color: var(--accent-start);
  background: rgba(0, 242, 254, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Quickstart Section --- */
#quickstart {
  background-color: var(--bg-secondary);
}

.quickstart-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.install-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.install-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.install-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #050508;
  border: none;
}

.install-panel {
  display: none;
}

.install-panel.active {
  display: block;
}

/* Terminal & Code Blocks styling */
.terminal-block {
  background: #06060a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  margin-bottom: 20px;
}

.terminal-header {
  background: #0f0f18;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #f59e0b; }
.terminal-dot.green { background-color: #10b981; }

.terminal-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.terminal-body {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
  line-height: 1.5;
}

.terminal-body pre {
  margin: 0;
}

/* Syntax Highlight Colors (custom CSS based, no external dependency) */
.syntax-keyword { color: #f43f5e; } /* keywords */
.syntax-string { color: #10b981; }  /* strings */
.syntax-comment { color: #64748b; font-style: italic; } /* comments */
.syntax-number { color: #fbbf24; }  /* numbers */
.syntax-fn { color: #60a5fa; }      /* function calls */
.syntax-type { color: #c084fc; }    /* types */

/* Steps UI */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-item {
  display: flex;
  gap: 20px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.05);
  border: 1px solid var(--border-accent);
  color: var(--accent-start);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-details h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-details p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Scroll indicators & footer */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  animation: bounce 2s infinite;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  z-index: 5;
}

.scroll-indicator:hover { opacity: 1; }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

section:last-of-type .scroll-indicator,
footer .scroll-indicator {
  display: none;
}

/* Custom Electric Cyan Loading Spinner Demo */
.loading-demo-wrapper {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(0,0,0,0.15);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  width: max-content;
}

.cyan-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 242, 254, 0.1);
  border-top: 2px solid var(--accent-start);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-text {
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--accent-start);
}

/* --- Footer --- */
footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  padding: 60px 24px !important;
  min-height: auto !important;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-start);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animation on Scroll classes (Intersection Observer triggers) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-layout {
    grid-template-columns: 1fr;
  }
  
  .feature-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  
  .tab-btn {
    white-space: nowrap;
  }
  
  .quickstart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  nav {
    background: rgba(5, 5, 8, 0.95);
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    gap: 40px;
    z-index: 999;
  }
  
  .nav-links.mobile-open {
    display: flex;
  }
  
  .hamburger {
    display: block;
  }
  
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  
  #hero h1 {
    font-size: 2.5rem;
  }
  
  .sequence-container {
    grid-template-columns: 1fr;
  }
  
  .cta-group {
    flex-direction: column;
    padding: 0 20px;
  }
}

/* Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .scroll-container {
    scroll-snap-type: none;
  }
}
