/* ============================================
   Super Hub — Premium Unified Dashboard Styles
   ============================================ */

/* ─── CSS Custom Properties (Design Tokens) ──── */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(22, 22, 35, 0.7);
  --bg-card-hover: rgba(30, 30, 50, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6b6b82;
  --text-muted: #4a4a60;
  --text-100: #f0f0f5;
  --text-200: #c8c8da;
  --text-300: #a0a0b8;
  --text-400: #6b6b82;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #a78bfa;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-glow-strong: rgba(99, 102, 241, 0.3);
  
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(99, 102, 241, 0.3);
  
  --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.02));
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(99, 102, 241, 0.25);
  
  /* Transitions */
  --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);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ─── Animated Background ────────────────────── */
.bg-animation {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%; filter: blur(100px);
  opacity: 0.4; animation: float 20s infinite ease-in-out;
}
.bg-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(99,102,241,0.2), transparent); top: -200px; left: -100px; }
.bg-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(139,92,246,0.15), transparent); top: 40%; right: -150px; animation-delay: -5s; animation-duration: 25s; }
.bg-orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(59,130,246,0.12), transparent); bottom: -100px; left: 30%; animation-delay: -10s; animation-duration: 30s; }
.bg-orb-4 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(167,139,250,0.1), transparent); top: 20%; left: 50%; animation-delay: -15s; animation-duration: 22s; }

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

.bg-grid {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ─── Header ─────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-base);
}
.header.scrolled { background: rgba(10, 10, 15, 0.95); box-shadow: var(--shadow-lg); }
.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: var(--space-sm) var(--space-xl);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
}

/* Logo */
.logo { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; }
.logo-icon { display: flex; align-items: center; transition: var(--transition-base); }
.logo:hover .logo-icon { transform: rotate(-5deg) scale(1.05); }
.logo-text { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.5px; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-badge { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; background: var(--gradient-subtle); border: 1px solid var(--border-accent); border-radius: var(--radius-full); color: var(--accent-tertiary); font-family: var(--font-mono); }

/* Main Nav Tabs */
.main-nav { display: flex; gap: 4px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 4px; }
.nav-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; background: transparent; border: none;
  border-radius: var(--radius-full); color: var(--text-tertiary);
  font-size: var(--text-sm); font-family: var(--font-sans); font-weight: 500;
  cursor: pointer; transition: var(--transition-base); white-space: nowrap;
}
.nav-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-tab.active { color: white; background: var(--accent-primary); box-shadow: 0 2px 12px rgba(99,102,241,0.3); }
.nav-tab .nav-icon { font-size: 14px; }
.nav-count { font-size: 10px; font-family: var(--font-mono); padding: 1px 6px; background: rgba(255,255,255,0.1); border-radius: var(--radius-full); }
.nav-tab.active .nav-count { background: rgba(255,255,255,0.2); }

/* Header Stats */
.header-stats { display: flex; gap: var(--space-sm); }
.stat-pill { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: var(--text-sm); transition: var(--transition-base); }
.stat-pill:hover { background: var(--bg-glass-hover); border-color: var(--border-hover); }
.github-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: var(--transition-base);
  text-decoration: none;
  cursor: pointer;
}
.github-link:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: var(--accent-tertiary);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

.stat-icon { font-size: 14px; }
.stat-value { font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); }
.stat-label { color: var(--text-tertiary); font-size: var(--text-xs); }

/* ─── View Containers ────────────────────────── */
.view-container { position: relative; z-index: 1; }

/* ─── Hero Section ───────────────────────────── */
.hero, .widgets-hero, .playground-hero {
  position: relative; z-index: 1;
  padding: 120px var(--space-xl) var(--space-2xl);
  text-align: center;
}
.widgets-hero, .playground-hero { padding-top: 110px; padding-bottom: var(--space-xl); }
.hero-content { max-width: 800px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: var(--space-sm); padding: 8px 20px; background: var(--gradient-subtle); border: 1px solid var(--border-accent); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500; color: var(--accent-tertiary); margin-bottom: var(--space-lg); animation: fadeInDown 0.6s ease-out; }
.hero-title { font-size: var(--text-4xl); font-weight: 900; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: var(--space-lg); animation: fadeInUp 0.6s ease-out 0.1s both; }
.gradient-text { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: var(--text-lg); color: var(--text-secondary); max-width: 600px; margin: 0 auto var(--space-xl); line-height: 1.7; animation: fadeInUp 0.6s ease-out 0.2s both; }

/* ─── Search ─────────────────────────────────── */
.search-container { animation: fadeInUp 0.6s ease-out 0.3s both; }
.search-box { position: relative; max-width: 640px; margin: 0 auto var(--space-md); }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); transition: var(--transition-base); }
.search-box:focus-within .search-icon { color: var(--accent-primary); }
#search-input { width: 100%; padding: 16px 20px 16px 52px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-primary); font-size: var(--text-base); font-family: var(--font-sans); outline: none; transition: var(--transition-base); }
#search-input::placeholder { color: var(--text-muted); }
#search-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-glow); background: var(--bg-card-hover); }
.search-shortcut { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; }
.search-shortcut kbd { padding: 3px 8px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 6px; font-size: var(--text-xs); font-family: var(--font-mono); color: var(--text-tertiary); }
.search-filters { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; }

/* ─── Filter Buttons ─────────────────────────── */
.filter-btn { padding: 8px 18px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-secondary); font-size: var(--text-sm); font-family: var(--font-sans); font-weight: 500; cursor: pointer; transition: var(--transition-base); }
.filter-btn:hover { background: var(--bg-glass-hover); border-color: var(--border-hover); color: var(--text-primary); }
.filter-btn.active { background: var(--accent-glow); border-color: var(--accent-primary); color: var(--accent-tertiary); }

/* ─── Category Navigation ────────────────────── */
.category-nav { position: sticky; top: 60px; z-index: 50; background: rgba(10,10,15,0.85); backdrop-filter: blur(16px) saturate(180%); border-bottom: 1px solid var(--border); padding: var(--space-sm) 0; }
.category-nav-inner { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-xl); display: flex; gap: var(--space-sm); overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.category-nav-inner::-webkit-scrollbar { display: none; }
.cat-btn { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-full); color: var(--text-tertiary); font-size: var(--text-sm); font-family: var(--font-sans); font-weight: 500; cursor: pointer; transition: var(--transition-base); white-space: nowrap; }
.cat-btn:hover { color: var(--text-primary); background: var(--bg-glass); border-color: var(--border); }
.cat-btn.active { color: var(--accent-tertiary); background: var(--accent-glow); border-color: var(--border-accent); }
.cat-btn .cat-count { font-size: var(--text-xs); font-family: var(--font-mono); padding: 1px 7px; background: rgba(255,255,255,0.06); border-radius: var(--radius-full); color: var(--text-muted); transition: var(--transition-base); }
.cat-btn.active .cat-count { background: rgba(99,102,241,0.2); color: var(--accent-tertiary); }

/* ─── Main Content ───────────────────────────── */
.main-content { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: var(--space-lg) var(--space-xl) var(--space-3xl); }
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.results-count { font-size: var(--text-sm); color: var(--text-tertiary); font-weight: 500; }
.view-toggle { display: flex; gap: 4px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.view-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: transparent; border: none; border-radius: 6px; color: var(--text-tertiary); cursor: pointer; transition: var(--transition-base); }
.view-btn:hover { color: var(--text-primary); }
.view-btn.active { background: var(--accent-primary); color: white; }

/* ─── API Grid ───────────────────────────────── */
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--space-md); }
.api-grid.list-view { grid-template-columns: 1fr; }

/* ─── API Card ───────────────────────────────── */
.api-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg); cursor: pointer;
  transition: var(--transition-base); overflow: hidden;
  animation: cardFadeIn 0.4s ease-out both;
}
.api-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-main); opacity: 0; transition: var(--transition-base); }
.api-card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.api-card:hover::before { opacity: 1; }
.api-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); }
.api-card-title-group { flex: 1; min-width: 0; }
.api-card-category { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--text-tertiary); font-weight: 500; margin-bottom: 6px; }
.api-card-name { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; line-height: 1.3; }
.api-card-auth { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600; font-family: var(--font-mono); letter-spacing: 0.3px; text-transform: uppercase; }
.api-card-auth.auth-none { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.api-card-auth.auth-key { background: rgba(245,158,11,0.1); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.api-card-description { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-md); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.api-card-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.api-card-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.api-tag { font-size: 11px; padding: 3px 8px; background: rgba(255,255,255,0.04); border-radius: var(--radius-full); color: var(--text-muted); font-weight: 500; transition: var(--transition-fast); }
.api-card:hover .api-tag { background: rgba(255,255,255,0.08); color: var(--text-tertiary); }
.api-card-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--accent-glow); border: 1px solid var(--border-accent); border-radius: var(--radius-full); color: var(--accent-tertiary); font-size: var(--text-xs); font-weight: 600; text-decoration: none; transition: var(--transition-base); white-space: nowrap; }
.api-card-link:hover { background: var(--accent-primary); color: white; transform: scale(1.05); }
.api-card-link svg { width: 12px; height: 12px; }
.api-card-widget-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600; background: rgba(99,102,241,0.1); color: var(--accent-tertiary); border: 1px solid rgba(99,102,241,0.2); cursor: pointer; transition: var(--transition-base); margin-left: 6px; }
.api-card-widget-badge:hover { background: var(--accent-primary); color: white; }

/* List View */
.api-grid.list-view .api-card { padding: var(--space-md) var(--space-lg); }
.api-grid.list-view .api-card-header { margin-bottom: var(--space-sm); }
.api-grid.list-view .api-card-description { -webkit-line-clamp: 2; margin-bottom: var(--space-sm); }

/* No Results */
.no-results { text-align: center; padding: var(--space-3xl) var(--space-xl); }
.no-results-icon { font-size: 64px; margin-bottom: var(--space-lg); opacity: 0.5; }
.no-results h3 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-sm); color: var(--text-primary); }
.no-results p { color: var(--text-tertiary); font-size: var(--text-base); }

/* ═══════════════════════════════════════════════
   WIDGETS VIEW
   ═══════════════════════════════════════════════ */

/* Section Nav */
.section-nav { position: sticky; top: 60px; z-index: 50; background: rgba(10,10,15,0.85); backdrop-filter: blur(16px) saturate(180%); border-bottom: 1px solid var(--border); padding: var(--space-sm) 0; }
.section-nav-inner { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-xl); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-btn { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-full); color: var(--text-tertiary); font-size: var(--text-sm); font-family: var(--font-sans); font-weight: 500; cursor: pointer; transition: var(--transition-base); white-space: nowrap; }
.section-btn:hover { color: var(--text-primary); background: var(--bg-glass); border-color: var(--border); }
.section-btn.active { color: white; border-color: transparent; }

/* Widget Grid */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--space-lg); }
.widget-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition-base);
  animation: cardFadeIn 0.4s ease-out both;
}
.widget-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.widget-card-header {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--gradient-subtle); border-bottom: 1px solid var(--border);
}
.widget-card-icon { font-size: 24px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: var(--radius-sm); }
.widget-card-title { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); }
.widget-card-desc { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: 2px; }
.widget-card-body { padding: var(--space-lg); min-height: 180px; }

/* Widget Internal Styles */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: var(--text-sm); font-family: var(--font-sans); font-weight: 600; cursor: pointer; transition: var(--transition-base); }
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover { background: var(--accent-secondary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.btn-secondary { background: var(--bg-glass); color: var(--text-secondary); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-glass-hover); color: var(--text-primary); border-color: var(--border-hover); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.input-field { padding: 8px 14px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: var(--text-sm); font-family: var(--font-sans); outline: none; transition: var(--transition-base); }
.input-field:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-glow); }
.input-field::placeholder { color: var(--text-muted); }
.input-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.input-group .input-field { flex: 1; min-width: 100px; }

/* Loading / Error / Empty */
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; color: var(--text-tertiary); font-size: var(--text-sm); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { text-align: center; padding: 20px; color: var(--red); font-size: var(--text-sm); }
.empty-state { text-align: center; padding: 24px; color: var(--text-tertiary); }
.empty-state .es-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.5; }

/* Widget result elements */
.result-image { width: 100%; border-radius: var(--radius-sm); object-fit: cover; }
.quote-block { background: var(--bg-tertiary); border-left: 3px solid var(--accent-primary); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--text-sm); color: var(--text-200); line-height: 1.7; font-style: italic; }
.meta { font-size: var(--text-xs); color: var(--text-400); }
.result-card { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.result-card h4 { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.result-card .meta, .result-card p { font-size: var(--text-xs); color: var(--text-400); }
.result-grid { display: grid; gap: 10px; }
.result-stat { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.stat-val { font-size: var(--text-lg); font-weight: 800; color: var(--text-primary); }
.result-stat .stat-label { font-size: var(--text-xs); color: var(--text-400); margin-top: 4px; }
.result-list { display: flex; flex-direction: column; gap: 8px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.badge-green { background: rgba(34,197,94,0.1); color: #4ade80; }
.badge-red { background: rgba(239,68,68,0.1); color: #f87171; }
.badge-blue { background: rgba(59,130,246,0.1); color: #60a5fa; }
.badge-purple { background: rgba(139,92,246,0.1); color: #a78bfa; }
.badge-yellow { background: rgba(245,158,11,0.1); color: #fbbf24; }

/* Weather widget */
.weather-current { display: flex; align-items: center; gap: 20px; justify-content: center; margin-bottom: 16px; }
.weather-temp { font-size: 48px; font-weight: 900; color: var(--text-primary); }
.weather-meta { font-size: var(--text-xs); color: var(--text-400); margin-top: 4px; }
.weather-forecast { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.weather-day { flex-shrink: 0; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; text-align: center; min-width: 60px; }
.wd-day { font-size: 11px; font-weight: 600; color: var(--text-400); margin-bottom: 4px; }
.wd-icon { font-size: 20px; margin-bottom: 4px; }
.wd-temp { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.wd-low { font-size: 11px; color: var(--text-muted); }

/* Country */
.country-flag { font-size: 48px; margin-bottom: 8px; }
.country-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.country-detail { background: var(--bg-tertiary); padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.cd-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 2px; }
.cd-value { font-size: var(--text-sm); font-weight: 600; color: var(--text-200); }

/* Crypto */
.crypto-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.crypto-table th { text-align: left; padding: 8px; color: var(--text-400); font-size: 11px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.crypto-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.crypto-name { display: flex; align-items: center; gap: 8px; }
.crypto-name img { width: 24px; height: 24px; border-radius: 50%; }
.crypto-symbol { text-transform: uppercase; color: var(--text-400); font-size: 11px; margin-left: 4px; }
.price-up { color: #4ade80 !important; }
.price-down { color: #f87171 !important; }

/* Pokemon */
.poke-display { display: flex; gap: 20px; align-items: flex-start; }
.poke-img-wrap { flex-shrink: 0; width: 140px; height: 140px; background: var(--bg-tertiary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.poke-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.poke-info { flex: 1; }
.poke-name { font-size: var(--text-lg); font-weight: 800; text-transform: capitalize; margin-bottom: 8px; }
.poke-types { display: flex; gap: 6px; margin-bottom: 8px; }
.poke-type { padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.poke-stats { display: flex; flex-direction: column; gap: 4px; }
.poke-stat { display: flex; align-items: center; gap: 6px; }
.poke-stat-name { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-400); width: 40px; }
.poke-stat-bar { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.poke-stat-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.poke-stat-val { font-size: 11px; font-weight: 700; color: var(--text-300); width: 28px; text-align: right; font-family: var(--font-mono); }

/* Trivia */
.trivia-score { display: flex; gap: 8px; margin-bottom: 14px; }
.trivia-option { display: block; width: 100%; text-align: left; padding: 10px 14px; margin: 6px 0; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-200); font-size: var(--text-sm); font-family: var(--font-sans); cursor: pointer; transition: var(--transition-base); }
.trivia-option:hover:not(:disabled) { background: var(--bg-glass-hover); border-color: var(--border-hover); }
.trivia-option.correct { background: rgba(34,197,94,0.15); border-color: #22c55e; color: #4ade80; }
.trivia-option.wrong { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #f87171; }
.trivia-option:disabled { cursor: default; opacity: 0.7; }

/* Cards */
.playing-card { display: inline-block; margin: 4px; }
.playing-card img { height: 90px; border-radius: 4px; }
.cards-hand { display: flex; flex-wrap: wrap; gap: 4px; }

/* News / List items */
.news-item { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: var(--transition-base); color: var(--text-primary); }
.news-item:hover { background: var(--bg-glass-hover); border-color: var(--border-hover); }
.news-item img { width: 60px; height: 45px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.news-item h4 { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.news-item p { font-size: 11px; color: var(--text-400); }

/* Recipe */
.recipe-display { display: flex; gap: 16px; align-items: flex-start; }
.recipe-img { width: 140px; height: 140px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }
.recipe-info { flex: 1; }
.recipe-title { font-size: var(--text-lg); font-weight: 800; margin-bottom: 6px; }
.recipe-cat { display: flex; gap: 6px; margin-bottom: 8px; }
.recipe-ingredients { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.recipe-ing { font-size: 11px; padding: 2px 8px; background: rgba(255,255,255,0.04); border-radius: var(--radius-full); color: var(--text-400); }
.recipe-instructions { font-size: var(--text-xs); color: var(--text-400); line-height: 1.6; max-height: 80px; overflow: hidden; }

/* Book */
.book-result { display: flex; gap: 12px; align-items: flex-start; padding: 10px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.book-cover { width: 45px; height: 65px; border-radius: 3px; object-fit: cover; flex-shrink: 0; background: var(--bg-glass); }
.book-info h4 { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.book-author { font-size: 12px; color: var(--text-300); }
.book-year { font-size: 11px; color: var(--text-400); }

/* Dictionary */
.dict-word { font-size: var(--text-2xl); font-weight: 900; color: var(--text-primary); }
.dict-phonetic { font-size: var(--text-sm); color: var(--accent-tertiary); font-family: var(--font-mono); margin-bottom: 14px; }
.dict-meaning { margin-bottom: 12px; }
.dict-pos { font-size: var(--text-xs); font-weight: 700; color: var(--accent-primary); text-transform: uppercase; margin-bottom: 4px; }
.dict-def { font-size: var(--text-sm); color: var(--text-200); margin-bottom: 4px; padding-left: 12px; border-left: 2px solid var(--border); }
.dict-example { font-size: var(--text-xs); color: var(--text-400); font-style: italic; padding-left: 14px; margin-bottom: 6px; }

/* Art */
.art-display { display: flex; flex-direction: column; gap: 12px; }
.art-image { width: 100%; max-height: 250px; object-fit: contain; border-radius: var(--radius-sm); background: var(--bg-tertiary); }
.art-info { }
.art-title { font-size: var(--text-base); font-weight: 700; }
.art-artist { font-size: var(--text-sm); color: var(--text-300); margin-bottom: 6px; }
.art-meta { font-size: var(--text-xs); color: var(--text-400); }

/* Avatar */
.avatar-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.avatar-item img { width: 100%; border-radius: var(--radius-sm); background: var(--bg-tertiary); }

/* Word Cloud */
.word-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.word-tag { padding: 4px 12px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: var(--text-sm); color: var(--text-300); transition: var(--transition-fast); }
.word-tag:hover { background: var(--accent-glow); color: var(--accent-tertiary); border-color: var(--border-accent); }

/* SpaceX */
.launch-display { display: flex; gap: 16px; align-items: flex-start; }
.launch-patch { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.launch-info h4 { font-size: var(--text-lg); font-weight: 800; margin-bottom: 4px; }
.launch-date { font-size: var(--text-xs); color: var(--text-400); margin-bottom: 6px; }
.launch-detail { font-size: var(--text-xs); color: var(--text-300); line-height: 1.6; }

/* Earthquake */
.quake-item { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; }
.quake-mag { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: var(--text-base); border-radius: var(--radius-sm); flex-shrink: 0; }
.quake-mag.low { background: rgba(34,197,94,0.15); color: #4ade80; }
.quake-mag.mid { background: rgba(245,158,11,0.15); color: #fbbf24; }
.quake-mag.high { background: rgba(239,68,68,0.15); color: #f87171; }
.quake-mag.extreme { background: rgba(239,68,68,0.3); color: #fca5a5; }
.quake-info h4 { font-size: var(--text-sm); font-weight: 600; }
.quake-info p { font-size: 11px; color: var(--text-400); }

/* Name analyzer */
.analyze-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.analyze-card { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.ac-emoji { font-size: 28px; margin-bottom: 4px; }
.ac-value { font-size: var(--text-lg); font-weight: 800; color: var(--text-primary); }
.ac-label { font-size: var(--text-xs); color: var(--text-400); margin-top: 2px; }

/* User profile */
.user-profile { display: flex; gap: 16px; align-items: center; }
.user-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-primary); }
.user-details h4 { font-size: var(--text-base); font-weight: 700; }
.user-details p, .user-email { font-size: var(--text-xs); color: var(--text-400); }

/* QR */
.qr-display { text-align: center; }
.qr-image img { border-radius: var(--radius-sm); background: white; padding: 8px; }

/* ═══════════════════════════════════════════════
   PLAYGROUND VIEW
   ═══════════════════════════════════════════════ */
.playground-content { padding-top: 0; }
.playground-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-xl); }
.playground-request { padding: var(--space-lg); border-bottom: 1px solid var(--border); }
.playground-row { display: flex; gap: 8px; margin-bottom: var(--space-md); }
.pg-method { max-width: 110px; font-weight: 700; font-family: var(--font-mono); }
.pg-url { flex: 1; font-family: var(--font-mono); font-size: var(--text-sm); }
.pg-send { white-space: nowrap; }
.playground-tabs { display: flex; gap: 4px; margin-bottom: var(--space-sm); }
.pg-tab { padding: 6px 16px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--text-tertiary); font-size: var(--text-sm); font-family: var(--font-sans); font-weight: 500; cursor: pointer; transition: var(--transition-base); border-bottom: none; }
.pg-tab:hover { color: var(--text-primary); }
.pg-tab.active { background: var(--bg-tertiary); color: var(--accent-tertiary); border-color: var(--border-accent); }
.pg-textarea { width: 100%; font-family: var(--font-mono); font-size: var(--text-sm); resize: vertical; min-height: 60px; }
.playground-response { padding: var(--space-lg); background: var(--bg-secondary); }
.pg-response-bar { display: flex; gap: var(--space-md); margin-bottom: var(--space-md); font-size: var(--text-sm); }
.pg-status { font-weight: 700; font-family: var(--font-mono); }
.pg-status.ok { color: #4ade80; }
.pg-status.err { color: #f87171; }
.pg-time, .pg-size { color: var(--text-tertiary); font-family: var(--font-mono); font-size: var(--text-xs); }
.pg-response-body { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-md); color: var(--text-200); font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.6; max-height: 500px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* Quick Links */
.pg-quick-links h3 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-md); color: var(--text-primary); }
.pg-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-sm); }
.pg-quick-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition-base); }
.pg-quick-card:hover { background: var(--bg-card-hover); border-color: var(--border-accent); transform: translateY(-2px); }
.pg-quick-card .pg-qi { font-size: 20px; }
.pg-quick-card .pg-qn { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.pg-quick-card .pg-qu { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* ─── Scroll to Top ──────────────────────────── */
.scroll-top { position: fixed; bottom: 32px; right: 32px; z-index: 100; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--accent-primary); border: none; border-radius: var(--radius-full); color: white; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(20px); transition: var(--transition-base); box-shadow: var(--shadow-glow-strong); }
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--accent-secondary); transform: translateY(-4px); }

/* ─── Footer ─────────────────────────────────── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: var(--space-2xl) var(--space-xl); text-align: center; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer p { color: var(--text-tertiary); font-size: var(--text-sm); }
.footer-sub { margin-top: var(--space-sm); font-size: var(--text-xs) !important; color: var(--text-muted) !important; }

/* ─── Animations ─────────────────────────────── */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardFadeIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .hero-title { font-size: var(--text-3xl); }
  .api-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .widget-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-stats { display: none; }
  .header-inner { padding: var(--space-sm) var(--space-md); flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; justify-content: center; margin-top: 6px; }
  .hero, .widgets-hero, .playground-hero { padding: 130px var(--space-md) var(--space-xl); }
  .hero-title { font-size: var(--text-2xl); letter-spacing: -1px; }
  .hero-subtitle { font-size: var(--text-base); }
  .search-shortcut { display: none; }
  .category-nav-inner, .section-nav-inner { padding: 0 var(--space-md); }
  .main-content { padding: var(--space-md); }
  .api-grid { grid-template-columns: 1fr; }
  .scroll-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
  .playground-row { flex-direction: column; }
  .pg-method { max-width: 100%; }
  .poke-display { flex-direction: column; align-items: center; text-align: center; }
  .recipe-display, .launch-display, .user-profile { flex-direction: column; align-items: center; text-align: center; }
  .country-details { grid-template-columns: 1fr; }
  .analyze-results { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .search-filters { gap: 6px; }
  .filter-btn { padding: 6px 12px; font-size: var(--text-xs); }
  .api-card { padding: var(--space-md); }
  .api-card-footer { flex-direction: column; align-items: flex-start; }
  .nav-tab span:not(.nav-icon) { display: none; }
  .nav-count { display: none; }
}
