/* Reset & Base Variables */
:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-hover: rgba(24, 32, 50, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 163, 127, 0.4);
  
  --emerald: #10a37f;
  --emerald-glow: rgba(16, 163, 127, 0.35);
  --cyan: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.35);
  --purple: #7928ca;
  --purple-glow: rgba(121, 40, 202, 0.35);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Blur Orbs */
.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.25;
  animation: floatOrb 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.orb-1 {
  top: -10%;
  left: 20%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--emerald), transparent 70%);
}

.orb-2 {
  top: 40%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  animation-delay: -7s;
}

.orb-3 {
  bottom: -10%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  animation-delay: -14s;
}

.grid-overlay {
  position: absolute;
  inset: 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: 60px 60px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -60px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Typography Utilities */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--emerald) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px var(--emerald-glow));
  transition: transform var(--transition-fast);
}

.brand-img-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 16px var(--emerald-glow), 0 0 8px var(--cyan-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brand-img-icon-sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 12px var(--emerald-glow);
}

.brand:hover .brand-img-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 24px rgba(16, 163, 127, 0.7);
}

.chatgpt-svg {
  width: 32px;
  height: 32px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-accent {
  color: var(--emerald);
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);

}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 163, 127, 0.1);
  border: 1px solid rgba(16, 163, 127, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 163, 127, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: 10rem 1.5rem 6rem;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-container {
  max-width: 900px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  background: rgba(18, 24, 38, 0.5);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 1.5rem 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.stat-card {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  background: linear-gradient(135deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

/* Common Section Layout */
.terminal-section, .tools-section, .news-section, .playground-section {
  padding: 5rem 1.5rem;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--emerald);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ==========================================================================
   TERMINAL WINDOW COMPONENT (5 LANGUAGES)
   ========================================================================== */
.terminal-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(16, 163, 127, 0.1);
  transition: border-color var(--transition-normal);
}

.terminal-window:hover {
  border-color: rgba(16, 163, 127, 0.3);
}

.terminal-header {
  background: rgba(18, 24, 38, 0.9);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.terminal-controls {
  display: flex;
  gap: 0.45rem;
}

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

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

.terminal-tabs {
  display: flex;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.term-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.term-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.term-tab.active {
  background: rgba(16, 163, 127, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 163, 127, 0.4);
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-term-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-term-action:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.btn-run {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #fff;
  border: none;
  box-shadow: 0 0 12px var(--emerald-glow);
}

.btn-run:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(16, 163, 127, 0.6);
}

/* Terminal Body & Code View */
.terminal-body {
  display: flex;
  flex-direction: column;
}

.code-container {
  display: flex;
  padding: 1.5rem;
  background: #0b0e14;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
  height: 440px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.line-numbers {
  padding-right: 1.25rem;
  color: var(--text-dim);
  user-select: none;
  text-align: right;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  margin-right: 1.25rem;
}

.line-numbers span {
  display: block;
}

pre {
  margin: 0;
  flex: 1;
}

code {
  font-family: var(--font-mono);
  color: #e2e8f0;
}

/* Code Syntax Highlighting colors */
.token-keyword { color: #ff79c6; font-weight: 600; }
.token-string { color: #f1fa8c; }
.token-function { color: #50fa7b; }
.token-comment { color: #6272a4; font-style: italic; }
.token-number { color: #bd93f9; }
.token-operator { color: #ff79c6; }

/* Console Output Simulator */
.terminal-console {
  background: #05070a;
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.console-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

.status-pulse {
  width: 7px;
  height: 7px;
  background-color: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
}

.console-meta {
  display: flex;
  gap: 0.5rem;
}

.meta-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.console-body {
  color: #34d399;
  min-height: 110px;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.console-prompt {
  color: var(--text-dim);
}

/* ==========================================================================
   GLOW SPOTLIGHT BUBBLE CARDS GRID (TRANSLUCENT BUBBLE EFFECT)
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(16, 163, 127, 0.2), rgba(0, 242, 254, 0.15));
  border-color: var(--emerald);
  color: #ffffff;
  box-shadow: 0 0 15px var(--emerald-glow);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 1.75rem;
}

/* Translucent Glowing Bubble Card */
.glow-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
}

/* Cursor Mouse Radial Glow "Bubble" Overlay */
.glow-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -1000px);
  left: var(--mouse-x, -1000px);
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(16, 163, 127, 0.35) 0%, rgba(0, 242, 254, 0.2) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.glow-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: radial-gradient(280px circle at var(--mouse-x, -1000px) var(--mouse-y, -1000px), rgba(52, 211, 153, 0.6), transparent 80%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.glow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.glow-card:hover::before,
.glow-card:hover::after {
  opacity: 1;
}

.glow-card-content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(16px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-emerald { color: var(--emerald); border-color: rgba(16, 163, 127, 0.3); }
.icon-cyan { color: var(--cyan); border-color: rgba(0, 242, 254, 0.3); }
.icon-purple { color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }

.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.card-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform var(--transition-fast);
}

.glow-card:hover .card-link {
  transform: translateX(4px);
}

/* ==========================================================================
   NEWS CARDS SECTION
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.75rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.1);
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.news-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.badge-emerald { background: rgba(16, 163, 127, 0.15); color: #34d399; }
.badge-cyan { background: rgba(0, 242, 254, 0.15); color: #38bdf8; }
.badge-purple { background: rgba(121, 40, 202, 0.15); color: #c084fc; }

.news-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.news-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.news-read-more {
  color: var(--emerald);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================================================
   PLAYGROUND SANDBOX SECTION
   ========================================================================== */
.playground-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.playground-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.playground-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.12em;
}

.playground-title {
  font-size: 1.8rem;
  font-weight: 800;
}

.model-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.model-selector-wrapper label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.styled-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 15px var(--emerald-glow);
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.half { flex: 1; }

input[type="range"] {
  accent-color: var(--emerald);
  cursor: pointer;
}

.playground-output {
  background: #06080d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.output-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.output-tokens {
  color: var(--cyan);
}

.output-screen {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
  min-height: 250px;
  white-space: pre-wrap;
  overflow-y: auto;
}

.placeholder-text {
  color: var(--text-dim);
  font-style: italic;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #040508;
  border-top: 1px solid var(--border-color);
  padding: 5rem 1.5rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

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

.chatgpt-svg-sm {
  width: 28px;
  height: 28px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--emerald);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #34d399;
}

.status-ping {
  width: 6px;
  height: 6px;
  background-color: #34d399;
  border-radius: 50%;
}

/* Anchor offset for fixed navbar + burger button base styles */
section[id] { scroll-margin-top: 70px; }
html { -webkit-text-size-adjust: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   RESPONSIVE — TABLET / PHONE
   ========================================================================== */
@media (max-width: 768px) {
  /* Navbar + burger menu */
  .nav-container { padding: 0.7rem 1rem; }
  .nav-toggle { display: flex; }
  .status-indicator { display: none; }
  .nav-actions { gap: 0.6rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    background: rgba(7, 9, 14, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.9rem 0.25rem; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .nav-link.active::after { display: none; }

  /* Hero */
  .hero-section { padding: 6.5rem 1rem 3rem; }
  .hero-badge { font-size: 0.74rem; text-align: center; margin-bottom: 1.25rem; }
  .hero-title { font-size: 2.1rem; }
  .hero-subtitle { font-size: 1rem; margin-bottom: 1.75rem; }
  .hero-cta { flex-direction: column; width: 100%; gap: 0.75rem; margin-bottom: 2.5rem; }
  .hero-cta .btn { width: 100%; }
  .hero-stats { flex-direction: column; gap: 1.25rem; width: 100%; padding: 1.25rem; }
  .stat-divider { width: 60px; height: 1px; }

  /* Sections */
  .terminal-section, .tools-section, .news-section, .playground-section { padding: 3rem 1rem; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: 1.7rem; }
  .section-subtitle { font-size: 0.95rem; }

  /* Terminal */
  .terminal-header { flex-wrap: wrap; gap: 0.65rem; padding: 0.7rem 0.85rem; }
  .terminal-controls { order: 1; }
  .terminal-actions { order: 2; margin-left: auto; gap: 0.5rem; }
  .terminal-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .terminal-tabs::-webkit-scrollbar { display: none; }
  .term-tab { flex: 0 0 auto; white-space: nowrap; padding: 0.5rem 0.75rem; }
  .btn-term-action { padding: 0.5rem 0.75rem; }

  /* --- Terminal fits the phone screen: no sideways scrolling, full height in one view --- */
  .terminal-section { padding: 1.5rem 0.5rem 3rem; }
  .terminal-section .section-header { margin-bottom: 1rem; padding: 0 0.5rem; }
  .terminal-section .section-subtitle { display: none; }

  .terminal-window {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 84px);
    height: calc(100dvh - 84px);
    min-height: 440px;
    max-height: 780px;
    scroll-margin-top: 72px;
  }
  .terminal-header { flex: 0 0 auto; }
  .terminal-body { flex: 1 1 0; min-height: 0; }
  .code-container {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    padding: 0.75rem;
    font-size: 0.72rem;
    line-height: 1.55;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .line-numbers { display: none; }
  .code-container pre { min-width: 0; width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  .code-container code { white-space: pre-wrap; overflow-wrap: anywhere; }

  .terminal-console { flex: 0 0 auto; padding: 0.55rem 0.8rem 0.7rem; font-size: 0.72rem; }
  .console-header { margin-bottom: 0.4rem; padding-bottom: 0.4rem; }
  .console-meta { display: none; }
  .console-body { min-height: 60px; max-height: 92px; }

  /* Grids / cards */
  .tools-grid, .news-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .filter-bar { margin-top: 1.5rem; }
  .filter-btn { padding: 0.5rem 0.85rem; }
  .news-card { padding: 1.4rem; }

  /* Playground */
  .playground-box { padding: 1.25rem; }
  .playground-header { flex-direction: column; align-items: flex-start; }
  .playground-title { font-size: 1.4rem; }
  .model-selector-wrapper { width: 100%; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .styled-select { width: 100%; }
  .form-row { flex-direction: column; align-items: stretch; gap: 0; }
  .output-screen { min-height: 180px; font-size: 0.8rem; }
  /* 16px prevents iOS from zooming into fields on focus */
  textarea, .styled-select { font-size: 16px; }

  /* Footer */
  .footer { padding: 3rem 1rem 1.5rem; }
  .footer-container { gap: 2rem; margin-bottom: 2.5rem; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom-container { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .nav-actions .btn { display: none; }
  .brand-name { font-size: 1.1rem; }
  .hero-title { font-size: 1.85rem; }
  .section-title { font-size: 1.5rem; }
  .code-container { font-size: 0.68rem; }
  .term-tab { padding: 0.45rem 0.65rem; font-size: 0.78rem; }
  .footer-links-grid { grid-template-columns: 1fr; }
}
