/* ============================================================
   Design System - Apple / Linear / Vercel Aesthetic
   ============================================================ */

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

:root {
  /* Dark theme (default) */
  --bg-0: #0a0a0f;
  --bg-1: #111118;
  --bg-2: #1a1a24;
  --bg-3: #22222e;
  --bg-glass: rgba(17, 17, 24, 0.72);
  --bg-glass-hover: rgba(26, 26, 36, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-0: #fafafa;
  --text-1: #e4e4e7;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --blur: blur(20px);
  --blur-heavy: blur(40px);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --container-max: 1200px;
  --header-h: 64px;
}

[data-theme="light"] {
  --bg-0: #ffffff;
  --bg-1: #f8f9fa;
  --bg-2: #f0f1f3;
  --bg-3: #e4e5e9;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-hover: rgba(248, 249, 250, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text-0: #09090b;
  --text-1: #18181b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-light); }

img, video { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: inherit; font-size: inherit; color: inherit;
  border: none; outline: none; background: none;
}

button { cursor: pointer; }

::selection { background: var(--accent); color: white; }

/* --- Layout --- */
.container {
  width: 100%; max-width: var(--container-max);
  margin: 0 auto; padding: 0 24px;
}

.page-content {
  min-height: calc(100vh - var(--header-h) - 200px);
  padding-top: 32px; padding-bottom: 64px;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base), border-color var(--transition-base);
}

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

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--text-0);
  text-decoration: none; letter-spacing: -0.02em;
}

.logo-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: 800;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-0); background: var(--bg-3);
}

.nav-link.active { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all var(--transition-fast);
  background: transparent;
}

.btn-icon:hover { color: var(--text-0); background: var(--bg-3); }

.btn-icon svg { width: 18px; height: 18px; fill: currentColor; }

.lang-select {
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--bg-3); color: var(--text-2);
  border: 1px solid var(--border); font-size: 13px;
  transition: all var(--transition-fast); cursor: pointer;
}

.lang-select:hover { border-color: var(--border-hover); color: var(--text-0); }

/* Mobile menu */
.mobile-menu-btn { display: none; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .nav-links {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-glass); backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border); padding: 12px 24px;
    flex-direction: column; gap: 4px;
    animation: slideDown 0.2s ease;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 16px; width: 100%; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap; user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white; box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px); box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:active { transform: translateY(0); }

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

.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-glass-hover); }

.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--text-0); background: var(--bg-3); }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* --- Cards --- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

/* --- Input --- */
.input-group { display: flex; gap: 12px; width: 100%; }

.input {
  flex: 1; height: 52px; padding: 0 20px;
  background: var(--bg-2); color: var(--text-0);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 15px; transition: all var(--transition-fast);
}

.input::placeholder { color: var(--text-3); }

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

@media (max-width: 640px) {
  .input-group { flex-direction: column; }
  .input { height: 48px; }
}

/* --- Player --- */
.player-wrapper {
  position: relative; width: 100%;
  background: #000; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.player-wrapper video {
  width: 100%; height: 100%; display: block;
  object-fit: contain; background: #000;
}

.player-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.player-wrapper:hover .player-overlay { opacity: 1; }

.player-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  display: flex; align-items: center; gap: 12px;
  opacity: 0; transform: translateY(4px);
  transition: all var(--transition-base);
}

.player-wrapper:hover .player-controls,
.player-controls.visible {
  opacity: 1; transform: translateY(0);
}

.player-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; background: none; border: none;
  transition: all var(--transition-fast); cursor: pointer;
}

.player-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.1); }
.player-btn svg { width: 20px; height: 20px; fill: currentColor; }

.progress-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,0.2);
  border-radius: 2px; cursor: pointer; position: relative;
  transition: height var(--transition-fast);
}

.progress-bar:hover { height: 6px; }

.progress-fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  position: relative; transition: width 100ms linear;
}

.progress-fill::after {
  content: ''; position: absolute; right: -5px; top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px; height: 12px; border-radius: 50%;
  background: white; box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.progress-bar:hover .progress-fill::after { transform: translateY(-50%) scale(1); }

.time-display {
  font-size: 12px; color: rgba(255,255,255,0.8);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  font-family: var(--font-mono);
}

.volume-group { display: flex; align-items: center; gap: 4px; }

.volume-slider {
  width: 0; overflow: hidden; transition: width var(--transition-base);
}

.volume-group:hover .volume-slider { width: 80px; }

.volume-slider input[type="range"] {
  width: 80px; height: 4px; appearance: none;
  background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: white; cursor: pointer;
}

.speed-select {
  padding: 4px 8px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1); color: white;
  border: 1px solid rgba(255,255,255,0.2); font-size: 12px;
  cursor: pointer; font-family: var(--font-mono);
}

.speed-select option { background: var(--bg-1); color: var(--text-0); }

.quality-select {
  padding: 4px 8px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1); color: white;
  border: 1px solid rgba(255,255,255,0.2); font-size: 12px;
  cursor: pointer; font-family: var(--font-mono);
}

.quality-select option { background: var(--bg-1); color: var(--text-0); }

/* Player skeleton */
.player-skeleton {
  position: absolute; inset: 0;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}

.skeleton-pulse {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--bg-3); animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

/* Player error */
.player-error {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: var(--bg-2); color: var(--text-2); text-align: center; padding: 24px;
}

.player-error svg { width: 48px; height: 48px; fill: var(--error); opacity: 0.6; }

/* --- Hero Section --- */
.hero {
  text-align: center; padding: 48px 0 32px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-0) 0%, var(--accent-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-2); max-width: 600px; margin: 0 auto 32px;
}

/* --- History Tags --- */
.history-section { margin-bottom: 24px; }

.history-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3); margin-bottom: 10px;
}

.history-header svg { width: 14px; height: 14px; fill: currentColor; }

.history-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.history-tag {
  padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-2); cursor: pointer;
  transition: all var(--transition-fast);
  max-width: 220px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

.history-tag:hover {
  background: var(--accent); border-color: var(--accent);
  color: white; transform: translateY(-1px);
}

/* --- Ad Slots --- */
.ad-slot {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  position: relative;
}

.ad-slot::before {
  content: 'Advertisement'; position: absolute; top: 4px; left: 8px;
  font-size: 10px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-slot-leaderboard { min-height: 90px; margin-bottom: 24px; }
.ad-slot-rectangle { min-height: 250px; width: 300px; }
.ad-slot-mobile-sticky {
  position: fixed; bottom: 0; left: 0; right: 0;
  min-height: 60px; z-index: 90; border-radius: 0;
  transform: translateY(100%); transition: transform var(--transition-slow);
}

.ad-slot-mobile-sticky.visible { transform: translateY(0); }

.ad-dismiss {
  position: absolute; top: 2px; right: 8px;
  font-size: 16px; color: var(--text-3); cursor: pointer;
  background: none; border: none; padding: 4px;
}

.ad-skeleton {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-2) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
  .ad-slot-rectangle { width: 100%; min-height: 200px; }
}

/* --- Section Titles --- */
.section-title {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 8px; color: var(--text-0);
}

.section-desc {
  font-size: 15px; color: var(--text-2); margin-bottom: 24px;
}

/* --- Grid Layouts --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --- Blog --- */
.blog-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition-base); cursor: pointer;
}

.blog-card:hover {
  border-color: var(--border-hover); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-card-body { padding: 20px; }

.blog-card-category {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-full); font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--accent-glow); color: var(--accent-light);
  margin-bottom: 10px;
}

.blog-card-title {
  font-size: 17px; font-weight: 700; line-height: 1.3;
  margin-bottom: 8px; color: var(--text-0);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.blog-card-excerpt {
  font-size: 14px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 12px;
}

.blog-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-3);
}

.blog-card-meta span { display: flex; align-items: center; gap: 4px; }

/* Article page */
.article-container {
  display: grid; grid-template-columns: 1fr 260px; gap: 40px;
  max-width: 1000px; margin: 0 auto;
}

@media (max-width: 1024px) {
  .article-container { grid-template-columns: 1fr; }
  .article-toc { display: none; }
}

.article-body { min-width: 0; }

.article-body h1 {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.2; margin-bottom: 16px; color: var(--text-0);
}

.article-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 14px; color: var(--text-3); margin-bottom: 32px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}

.article-content { line-height: 1.8; color: var(--text-1); }

.article-content h2 {
  font-size: 1.5rem; font-weight: 700; margin: 40px 0 16px;
  color: var(--text-0); letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 1.2rem; font-weight: 600; margin: 32px 0 12px;
  color: var(--text-0);
}

.article-content p { margin-bottom: 16px; }

.article-content code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--bg-3); padding: 2px 6px; border-radius: 4px;
}

.article-content pre {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  overflow-x: auto; margin-bottom: 20px;
}

.article-content pre code {
  background: none; padding: 0; font-size: 13px; line-height: 1.6;
}

.article-content ul, .article-content ol {
  padding-left: 24px; margin-bottom: 16px;
}

.article-content li { margin-bottom: 8px; }

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px; margin: 20px 0;
  background: var(--bg-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2); font-style: italic;
}

.article-content img {
  border-radius: var(--radius-md); margin: 20px 0;
}

/* Table of Contents */
.article-toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
}

.toc-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 12px;
}

.toc-list { list-style: none; }

.toc-link {
  display: block; padding: 6px 0 6px 16px;
  font-size: 13px; color: var(--text-3);
  border-left: 2px solid var(--border);
  transition: all var(--transition-fast);
}

.toc-link:hover, .toc-link.active {
  color: var(--accent); border-color: var(--accent);
}

.toc-link.depth-3 { padding-left: 32px; font-size: 12px; }

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 8px; overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.open { border-color: var(--accent); }

.faq-question {
  width: 100%; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--text-0);
  background: var(--bg-2); cursor: pointer;
  transition: background var(--transition-fast);
}

.faq-question:hover { background: var(--bg-3); }

.faq-question svg {
  width: 16px; height: 16px; fill: var(--text-3);
  transition: transform var(--transition-base);
}

.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-answer-inner {
  padding: 0 20px 16px; font-size: 14px;
  color: var(--text-2); line-height: 1.7;
}

/* --- Tools Grid --- */
.tool-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all var(--transition-base); cursor: pointer;
  text-decoration: none; color: inherit; display: block;
}

.tool-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.tool-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-glow), var(--bg-3));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 24px;
}

.tool-name {
  font-size: 16px; font-weight: 700; color: var(--text-0);
  margin-bottom: 6px;
}

.tool-desc {
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3); margin-bottom: 24px;
}

.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px; margin-top: 64px;
}

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

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

.footer-brand { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.footer-brand .logo { margin-bottom: 12px; }

.footer-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 16px;
}

.footer-links { list-style: none; }

.footer-link {
  display: block; padding: 4px 0; font-size: 14px;
  color: var(--text-2); transition: color var(--transition-fast);
}

.footer-link:hover { color: var(--accent); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-3);
}

@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* --- Contact Form --- */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text-1); margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg-2); color: var(--text-0);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 15px; transition: all var(--transition-fast);
}

.form-textarea { min-height: 120px; resize: vertical; font-family: inherit; }

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --- Info/Content Sections --- */
.info-section {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  margin-top: 48px;
}

.info-section h2 {
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 16px; color: var(--text-0);
}

.info-section p {
  color: var(--text-2); line-height: 1.8; margin-bottom: 12px;
  font-size: 15px;
}

/* --- Error Alert --- */
.alert {
  padding: 14px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; margin-bottom: 20px;
  display: none; animation: slideDown 0.3s ease;
}

.alert-error {
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
  border: 1px solid rgba(239,68,68,0.3); color: var(--error);
}

.alert-success {
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(34,197,94,0.05));
  border: 1px solid rgba(34,197,94,0.3); color: var(--success);
}

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

/* --- Tag/Badge --- */
.tag {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-full); font-size: 12px;
  font-weight: 500; background: var(--bg-3); color: var(--text-2);
}

.tag-accent { background: var(--accent-glow); color: var(--accent-light); }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 90%; max-width: 640px;
  max-height: 85vh; overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-spring);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 18px; font-weight: 700; color: var(--text-0); }
.modal-close { color: var(--text-3); font-size: 24px; cursor: pointer; }

.modal-body { padding: 24px; }

/* --- Code Block --- */
.code-block {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  position: relative; margin-bottom: 16px;
}

.code-block code {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-1); display: block;
  white-space: pre-wrap; word-break: break-all;
}

.code-copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  background: var(--bg-3); color: var(--text-2);
  font-size: 12px; cursor: pointer;
  transition: all var(--transition-fast);
}

.code-copy-btn:hover { background: var(--accent); color: white; }

/* --- Divider --- */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* --- Page Transitions --- */
.page-enter { animation: pageEnter 0.3s ease forwards; }

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

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* --- Utility --- */
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-3); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
