/* ═══════════════════════════════════════════════════════════
   Mimoza Search — Premium Niche Search Engine
   Bilişim, SEO, AEO, GEO, Dijital Pazarlama, IT & CS
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables / Design Tokens ──────────────────────── */
:root {
  /* Colors */
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --secondary: #EC4899;
  --secondary-light: #F472B6;
  --accent: #06B6D4;
  --accent-light: #22D3EE;

  --bg-deep: #06060F;
  --bg-base: #0A0A1B;
  --bg-surface: #111128;
  --bg-surface-2: #1A1A3E;
  --bg-surface-3: #222255;
  --bg-card: rgba(26, 26, 62, 0.6);
  --bg-glass: rgba(17, 17, 40, 0.65);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-accent: #A78BFA;

  --border-subtle: rgba(124, 58, 237, 0.15);
  --border-hover: rgba(124, 58, 237, 0.4);
  --border-glass: rgba(255, 255, 255, 0.08);

  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --gradient-accent: linear-gradient(135deg, #06B6D4 0%, #7C3AED 100%);
  --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EC4899 100%);
  --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.12) 0%, transparent 50%),
                 radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.08) 0%, transparent 50%),
                 radial-gradient(ellipse at 50% 80%, rgba(6,182,212,0.06) 0%, transparent 50%);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.3);
  --shadow-glow-pink: 0 0 30px rgba(236,72,153,0.2);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

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

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--secondary-light);
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input {
  font-family: var(--font-primary);
  outline: none;
  border: none;
}

ul, ol {
  list-style: none;
}

/* ── Background Ambient ─────────────────────────────────── */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--gradient-bg);
  pointer-events: none;
}

.bg-ambient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(124,58,237,0.04) 0%, transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(236,72,153,0.03) 0%, transparent 40%);
  animation: ambientDrift 30s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, 3%) scale(1.05); }
}

/* Grid pattern overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── Layout Container ───────────────────────────────────── */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(6, 6, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--duration-normal) var(--ease-out);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

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

.header-search {
  flex: 1;
  max-width: 560px;
  display: none;
}

.header-search.visible {
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(124,58,237,0.4);
  color: #fff;
}

/* ── Hero / Landing Section ─────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) 0;
  min-height: calc(100vh - 70px);
  transition: all var(--duration-slow) var(--ease-out);
}

.hero.compact {
  min-height: auto;
  padding: var(--space-sm) 0;
}

.hero.compact .hero-badge,
.hero.compact .hero-subtitle,
.hero.compact .hero-title,
.hero.compact .trending,
.hero.compact .search-wrapper {
  display: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: var(--space-xl);
  animation: fadeSlideUp 0.6s var(--ease-out) both;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(6,182,212,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(6,182,212,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  animation: fadeSlideUp 0.6s var(--ease-out) 0.1s both;
}

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

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-2xl);
  animation: fadeSlideUp 0.6s var(--ease-out) 0.2s both;
  line-height: 1.7;
}

/* ── Search Box ─────────────────────────────────────────── */
.search-wrapper {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  animation: fadeSlideUp 0.6s var(--ease-out) 0.3s both;
  position: relative;
  z-index: 10;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 6px;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-md);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transform: translateY(-2px);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 1.2rem;
}

.search-input {
  flex: 1;
  height: 48px;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 400;
  padding: 0 var(--space-sm);
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--duration-fast);
  flex-shrink: 0;
  margin-right: 4px;
}

.search-clear.visible {
  display: flex;
}

.search-clear:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  height: 44px;
  padding: 0 24px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: calc(var(--radius-xl) - 4px);
  transition: all var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(124,58,237,0.3);
}

.search-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.search-btn:active {
  transform: scale(0.98);
}

/* Header search variant */
.header-search .search-box {
  padding: 4px;
  border-radius: var(--radius-lg);
}

.header-search .search-icon {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.header-search .search-input {
  height: 36px;
  font-size: 0.9rem;
}

.header-search .search-btn {
  height: 32px;
  padding: 0 16px;
  font-size: 0.8rem;
  border-radius: calc(var(--radius-lg) - 4px);
}

/* ── Autocomplete Dropdown ──────────────────────────────── */
.autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.autocomplete.visible {
  display: block;
  animation: dropdownOpen 0.25s var(--ease-out);
}

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

.autocomplete-header {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-glass);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: background var(--duration-fast);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-primary);
}

.autocomplete-item .ac-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}

.autocomplete-item .ac-text {
  flex: 1;
}

.autocomplete-item .ac-text mark {
  background: transparent;
  color: var(--primary-light);
  font-weight: 600;
}

.autocomplete-item .ac-category {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary-light);
  font-weight: 500;
}

/* ── Category Tabs ──────────────────────────────────────── */
.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  animation: fadeSlideUp 0.6s var(--ease-out) 0.4s both;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.category-chip:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.category-chip.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.category-chip .chip-icon {
  font-size: 0.95rem;
}

/* ── Trending Section ───────────────────────────────────── */
.trending {
  margin-top: var(--space-2xl);
  text-align: center;
  animation: fadeSlideUp 0.6s var(--ease-out) 0.5s both;
}

.trending-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.trending-title::before,
.trending-title::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--border-subtle);
}

.trending-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.trending-tag {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.trending-tag:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.25);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.trending-tag .trend-icon {
  margin-right: 4px;
  font-size: 0.75rem;
}

/* ── Results Section ────────────────────────────────────── */
.results-section {
  display: none;
  padding-bottom: var(--space-3xl);
}

.results-section.visible {
  display: block;
  animation: fadeIn 0.4s var(--ease-out);
}

.results-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  align-items: start;
}

/* Results header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-glass);
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.results-count strong {
  color: var(--text-primary);
  font-weight: 600;
}

.results-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Result card */
.result-card {
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
  animation: fadeSlideUp 0.4s var(--ease-out) both;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.result-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 20px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}

.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.2s; }
.result-card:nth-child(5) { animation-delay: 0.25s; }

.result-source {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.result-favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--bg-surface-2);
  object-fit: contain;
}

.result-domain {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.result-category-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-light);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
  transition: color var(--duration-fast);
  display: block;
}

.result-title:hover {
  color: var(--secondary-light);
}

.result-snippet {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.result-url {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  color: var(--accent);
  word-break: break-all;
  opacity: 0.8;
}

/* Mimoza Bilişim result highlight */
.result-card.mimoza-result {
  border-color: rgba(124, 58, 237, 0.3);
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(236,72,153,0.04));
}

.result-card.mimoza-result::before {
  content: '⭐ Mimoza Bilişim';
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary-light);
  background: rgba(124, 58, 237, 0.15);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Related searches */
.related-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.related-item:last-child {
  border-bottom: none;
}

.related-item:hover {
  color: var(--primary-light);
}

.related-item .ri-icon {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Mimoza CTA sidebar */
.sidebar-cta {
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(236,72,153,0.08));
  border-color: rgba(124, 58, 237, 0.2);
}

.cta-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.cta-services {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.cta-service {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.cta-service:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
  text-align: center;
}

.cta-btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,58,237,0.25);
}

.cta-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  color: #fff;
}

.cta-btn-secondary {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.2);
}

.cta-btn-secondary:hover {
  background: rgba(37, 211, 102, 0.2);
  color: #25D366;
  transform: translateY(-1px);
}

/* Search history sidebar */
.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration-fast);
}

.history-item:hover {
  color: var(--primary-light);
}

.history-item .hi-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-clear {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--duration-fast);
  margin-top: var(--space-sm);
}

.history-clear:hover {
  color: var(--secondary);
}

/* ── Loading State ──────────────────────────────────────── */
.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) 0;
}

.loading.visible {
  display: flex;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--border-glass);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-md);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── No Results ─────────────────────────────────────────── */
.no-results {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) 0;
  text-align: center;
}

.no-results.visible {
  display: flex;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.no-results-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.no-results-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 400px;
}

/* ── Demo Banner ────────────────────────────────────────── */
.demo-banner {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-lg);
  background: linear-gradient(90deg, rgba(245,158,11,0.1), rgba(236,72,153,0.1));
  border-bottom: 1px solid rgba(245,158,11,0.2);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  justify-content: center;
}

.demo-banner.visible {
  display: flex;
}

.demo-banner strong {
  color: #F59E0B;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
}

.page-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-brand {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-brand a {
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

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

.footer-powered {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Skeleton loading for cards */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-2) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-card {
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

.skeleton-line {
  height: 14px;
  margin-bottom: var(--space-sm);
  border-radius: 4px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 100%; }
.skeleton-title { height: 20px; width: 85%; margin-bottom: var(--space-md); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface-3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .results-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .search-btn .btn-text {
    display: none;
  }

  .search-btn {
    padding: 0 14px;
    width: 44px;
  }

  .categories {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .categories::-webkit-scrollbar {
    display: none;
  }

  .header-nav .nav-link {
    display: none;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .result-card {
    padding: var(--space-md);
  }

  .trending-tags {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-badge {
    font-size: 0.72rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.88rem;
  }

  .nav-cta {
    font-size: 0.72rem;
    padding: 6px 12px;
  }
}

/* ── Utility ────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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