/* ==========================================================================
   AntiWeb Studio - Core Design System & Stylesheet (index.css)
   Inspired by modern dev tool aesthetics (OpenCode, Linear, Vercel, Raycast)
   ========================================================================== */

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

:root {
  /* Color Palette - Curated Midnight & Glassmorphism */
  --bg-root: #090a0f;
  --bg-surface: #10121a;
  --bg-surface-elevated: #161824;
  --bg-card: rgba(20, 22, 34, 0.6);
  --bg-card-hover: rgba(28, 31, 48, 0.8);
  
  /* Accent Colors */
  --accent-cyan: #2dd4bf;
  --accent-cyan-glow: rgba(45, 212, 191, 0.25);
  --accent-orange: #fab283;
  --accent-orange-glow: rgba(250, 178, 131, 0.25);
  --accent-purple: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #2dd4bf 0%, #fab283 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(45, 212, 191, 0.15) 0%, rgba(250, 178, 131, 0.15) 100%);

  /* Text & Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #2dd4bf;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(45, 212, 191, 0.4);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Spacing */
  --max-width: 1200px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.8);
  --shadow-glow-cyan: 0 0 40px rgba(45, 212, 191, 0.15);
  --shadow-glow-orange: 0 0 40px rgba(250, 178, 131, 0.15);
}

/* --- Base Reset --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: 
    radial-gradient(circle at 15% 15%, rgba(45, 212, 191, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(250, 178, 131, 0.06) 0%, transparent 45%),
    var(--bg-root);
  background-attachment: fixed;
  position: relative;
}

/* Subtle background grid pattern */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* --- Typography --- */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

ul {
  list-style: none;
}

/* --- Layout Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

/* --- Navigation Header --- */
.navbar {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-root);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: var(--accent-cyan);
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.15);
  animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(45, 212, 191, 0.15); }
  50% { box-shadow: 0 0 25px rgba(45, 212, 191, 0.35); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  max-width: 900px;
  margin: 0 auto 24px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
  font-weight: 400;
}

/* --- Interactive Command Box --- */
.install-box-wrapper {
  max-width: 540px;
  margin: 0 auto 40px;
}

.install-box {
  background: #14151e;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md), 0 0 30px rgba(45, 212, 191, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.install-box:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-md), 0 0 40px rgba(45, 212, 191, 0.2);
}

.command-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.command-prompt {
  color: var(--accent-cyan);
  font-weight: 700;
  user-select: none;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}

.copy-btn.copied {
  background: #22c55e;
  color: #000;
  border-color: #22c55e;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Interactive Studio UI Mockup --- */
.mockup-section {
  padding: 20px 0 100px;
}

.studio-mockup {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(0, 0, 0, 0.8);
  position: relative;
}

.mockup-header {
  background: #14151e;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.mockup-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mockup-body {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  min-height: 480px;
  background: #0d0e14;
}

@media (max-width: 900px) {
  .mockup-body {
    grid-template-columns: 1fr;
  }
}

/* Chat Pane (Left) */
.pane-left {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  background: rgba(16, 18, 26, 0.6);
}

.pane-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.model-selector-badge {
  background: rgba(250, 178, 131, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(250, 178, 131, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.msg-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
}

.msg-user {
  align-self: flex-end;
  background: var(--text-primary);
  color: #000;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.msg-assistant {
  align-self: flex-start;
  background: #181a26;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  padding: 14px;
  border-top: 1px solid var(--border-subtle);
  background: #12141d;
}

.mock-input {
  background: #090a0f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Right Pane (Tabs + Terminal/Review) */
.pane-right {
  display: flex;
  flex-direction: column;
  background: #090a0f;
}

.tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: #12141d;
  padding: 0 12px;
}

.tab-item {
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-item:hover {
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.terminal-switcher {
  background: #14151a;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-btn-group {
  display: flex;
  background: #0e0f12;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.mode-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.mode-btn.active-bash {
  background: rgba(45, 212, 191, 0.2);
  color: var(--accent-cyan);
  border-color: rgba(45, 212, 191, 0.3);
}

.mode-btn.active-cli {
  background: rgba(250, 178, 131, 0.2);
  color: var(--accent-orange);
  border-color: rgba(250, 178, 131, 0.3);
}

.tab-content-area {
  flex: 1;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-y: auto;
}

/* Terminal View */
.term-line {
  margin-bottom: 8px;
  line-height: 1.4;
}

.term-prompt { color: var(--accent-cyan); font-weight: 600; }
.term-cmd { color: #fff; }
.term-out { color: var(--text-secondary); }
.term-success { color: #22c55e; }

/* Review Diff View */
.diff-card {
  background: #13151f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.diff-header {
  padding: 10px 14px;
  background: #181a26;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-name {
  color: var(--accent-orange);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diff-body {
  padding: 12px 14px;
  line-height: 1.6;
}

.diff-add { color: #4ade80; background: rgba(74, 222, 128, 0.1); padding: 2px 6px; border-radius: 4px; display: block; }
.diff-rem { color: #f87171; background: rgba(248, 113, 113, 0.1); padding: 2px 6px; border-radius: 4px; display: block; }

/* --- Section Formatting --- */
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 60px;
}

/* --- How It Works / Guide Section --- */
.guide-section {
  padding: 80px 0;
  background: rgba(16, 18, 26, 0.4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.08);
  position: absolute;
  top: 16px;
  right: 20px;
  line-height: 1;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.step-card:nth-child(2) .step-icon {
  background: rgba(250, 178, 131, 0.1);
  color: var(--accent-orange);
}

.step-card:nth-child(3) .step-icon {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
}

.step-card:nth-child(4) .step-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Bento Features Grid --- */
.features-section {
  padding: 100px 0;
}

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

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  border-color: rgba(45, 212, 191, 0.3);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow-cyan);
}

.bento-span-2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .bento-span-2 {
    grid-column: span 1;
  }
}

.bento-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.bento-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Code Snippet Box --- */
.code-box {
  background: #090a0f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-top: 20px;
  overflow-x: auto;
}

.code-box .comment { color: var(--text-muted); }
.code-box .cmd { color: var(--accent-cyan); font-weight: 600; }

/* --- Footer --- */
.footer {
  padding: 60px 0;
  border-top: 1px solid var(--border-subtle);
  background: #07080c;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

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