/* Expressive-Glass Design System: Fluid Liquid Glass meets Material 3 Expressive */

:root {
  --bg-primary: #0f1117;
  --bg-surface: rgba(22, 27, 38, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f3f8;
  --text-secondary: #9aa5b8;
  --text-muted: #626e82;
  --accent-primary: #6366f1;
  --accent-secondary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --glow-1: rgba(99, 102, 241, 0.25);
  --glow-2: rgba(236, 72, 153, 0.2);
  --glow-3: rgba(168, 85, 247, 0.2);
  --card-radius: 20px;
  --badge-bg: rgba(99, 102, 241, 0.15);
  --badge-border: rgba(99, 102, 241, 0.35);
  --badge-text: #a5b4fc;
  --code-bg: rgba(10, 12, 18, 0.85);
  --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.35);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --border-glass: rgba(15, 23, 42, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-primary: #4f46e5;
  --accent-secondary: #db2777;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
  --glow-1: rgba(99, 102, 241, 0.15);
  --glow-2: rgba(236, 72, 153, 0.12);
  --glow-3: rgba(168, 85, 247, 0.12);
  --badge-bg: rgba(79, 70, 229, 0.1);
  --badge-border: rgba(79, 70, 229, 0.25);
  --badge-text: #4338ca;
  --code-bg: #f1f5f9;
  --shadow-glass: 0 16px 40px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient glow blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  animation: float 14s infinite alternate ease-in-out;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: -100px;
  background: var(--glow-1);
}

.glow-2 {
  width: 600px;
  height: 600px;
  bottom: 50px;
  right: -150px;
  background: var(--glow-2);
  animation-delay: -5s;
}

.glow-3 {
  width: 400px;
  height: 400px;
  top: 40%;
  left: 50%;
  background: var(--glow-3);
  animation-delay: -9s;
}

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

/* Glassmorphism navigation */
.navbar-glass {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.badge-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
}

/* Search bar */
.search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-box input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
}

.search-dropdown.hidden {
  display: none;
}

.search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-glass);
  transition: background 0.2s ease;
}

.search-item:hover {
  background: var(--bg-glass);
}

.search-item-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.search-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-btn.active {
  color: var(--accent-primary);
  background: var(--badge-bg);
}

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

.btn-icon {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-icon:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

/* Tester Banner */
.tester-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(236, 72, 153, 0.15));
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 20px;
  font-size: 0.85rem;
}

.banner-content {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.banner-badge {
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.banner-link {
  color: #f59e0b;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Main Container & Tab Panels */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

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

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

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

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

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

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 740px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 30px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Clone Box */
.clone-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--code-bg);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glass);
}

.clone-prompt {
  color: var(--accent-secondary);
  font-weight: 700;
}

.btn-copy {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  padding: 28px;
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

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

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

.large-card {
  margin-bottom: 24px;
}

.content-header {
  margin-bottom: 30px;
}

.content-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

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

/* Code blocks */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  margin: 16px 0;
  overflow: hidden;
}

.code-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

pre {
  padding: 16px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Tester Status Box */
.tester-status-box {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

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

.status-dot.green { background: #10b981; }
.status-dot.orange { background: #f59e0b; }

.badge-alert {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
}

/* Docs Reader Layout */
.docs-browser {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.docs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-link {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.doc-link:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.doc-link.active {
  background: var(--badge-bg);
  color: var(--accent-primary);
  border-color: var(--badge-border);
}

.docs-content {
  min-height: 400px;
}

.docs-content h1, .docs-content h2, .docs-content h3 {
  margin-bottom: 12px;
  font-weight: 700;
}

.docs-content p, .docs-content ul, .docs-content ol {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.docs-content ul, .docs-content ol {
  padding-left: 20px;
}

/* Creator Card */
.creator-card {
  padding: 36px;
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.creator-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.creator-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

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

.tag {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.creator-bio {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent-primary);
  padding-left: 16px;
  margin-bottom: 24px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.project-pill {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px;
}

.project-pill strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.project-pill span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.social-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  transition: var(--transition);
}

.social-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.social-btn.youtube:hover { background: #ef4444; color: #fff; border-color: #ef4444; }
.social-btn.github:hover { background: #24292e; color: #fff; border-color: #24292e; }
.social-btn.reddit:hover { background: #ff4500; color: #fff; border-color: #ff4500; }
.social-btn.instagram:hover { background: #e1306c; color: #fff; border-color: #e1306c; }

/* Footer */
.footer-glass {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  padding: 24px;
  position: relative;
  z-index: 1;
}

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

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

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

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

/* Responsive */
@media (max-width: 860px) {
  .hero-title { font-size: 2.5rem; }
  .nav-links { display: none; }
  .docs-browser { grid-template-columns: 1fr; }
}
