/* ============================================================
   PLAYNEXUE.XYZ — Light Game Portal Theme
   Design reference: html5games.com style
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #f5f5f7;
  --bg-white: #ffffff;
  --bg-hover: #f0f0f2;
  --border: #e5e5ea;
  --border-light: #f0f0f2;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-white: #ffffff;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent2: #f59e0b;
  --badge-new: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.16);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1240px;
  --header-h: 60px;
  --bottom-nav-h: 60px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul, ol { list-style: none; }

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

@media (min-width: 768px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  gap: 12px;
  position: relative;
}

.header-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  min-width: 80px;
}

.header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

/* Header nav (desktop) */
.header-nav {
  display: none;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav::-webkit-scrollbar { display: none; }

.header-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--accent);
  background: rgba(79, 70, 229, 0.06);
}

/* Header search */
.header-search {
  flex-shrink: 0;
  position: relative;
}

.header-search input {
  width: 220px;
  height: 38px;
  padding: 0 14px 0 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: var(--bg-white);
}

.header-search input::placeholder { color: var(--text-tertiary); }

.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 14px;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .logo {
    position: static;
    transform: none;
  }
  .header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .header-start {
    flex: 0 0 auto;
    min-width: auto;
  }
  .header-nav {
    display: flex;
    flex: 1 1 auto;
    margin: 0 8px;
  }
  .header-end {
    flex: 0 0 auto;
    min-width: auto;
  }
  .header-search input { width: 220px; }
}

@media (max-width: 1023px) {
  .header-search { display: none; }
}

/* Menu button (mobile) */
.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 44px;
}

.menu-btn-icon { font-size: 22px; line-height: 1; }

@media (min-width: 1024px) {
  .menu-btn { display: none; }
}

/* Mobile search toggle */
.mobile-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg);
  font-size: 18px;
  color: var(--text-secondary);
}

@media (min-width: 1024px) {
  .mobile-search-toggle { display: none; }
}

/* ---------- Mobile Drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.drawer-overlay.active { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  max-width: 85vw;
  z-index: 1501;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer.active { transform: translateX(0); }

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

.drawer-close {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg);
  font-size: 18px;
  color: var(--text-secondary);
}

.drawer-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-section-title {
  padding: 12px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.drawer-nav-item:hover,
.drawer-nav-item.active {
  color: var(--accent);
  background: rgba(79, 70, 229, 0.06);
}

/* ---------- Mobile Search Overlay ---------- */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-search-overlay.active { transform: translateY(0); }

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-search-overlay input {
  flex: 1;
  height: 46px;
  padding: 0 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--text);
  outline: none;
}

.mobile-search-overlay input:focus { border-color: var(--accent); }

.mobile-search-close {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg);
  font-size: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.mobile-search-results {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  transition: background var(--transition);
}

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

.mobile-search-item img {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg);
}

.mobile-search-item-info { min-width: 0; }

.mobile-search-item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-search-item-cat {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 40px 0 32px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  gap: 24px;
}

.hero-text {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Hero category cards */
.hero-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.hero-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.hero-cat-card:hover {
  background: var(--bg-white);
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.hero-cat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(79, 70, 229, 0.08);
}

.hero-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.hero-cat-count {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

@media (max-width: 480px) {
  .hero-cats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-cat-card { padding: 18px 10px; }
  .hero-cat-icon { width: 40px; height: 40px; font-size: 20px; }
}

@media (min-width: 768px) {
  .hero { padding: 48px 0 40px; }
}

@media (min-width: 1024px) {
  .hero { padding: 56px 0 48px; }
}

/* ---------- Sections ---------- */
.section {
  padding: 36px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.section-title {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: gap var(--transition);
}

.section-link:hover { gap: 8px; }

/* ---------- Spotlight ---------- */

/* ---------- Game Card ---------- */
.game-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border);
}

/* Card image area - 16:9 ratio */
.game-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-img-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-img-bg { transform: scale(1.05); }

.game-card-icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background: var(--bg-white);
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-icon { transform: scale(1.08); }

.game-card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
}

.game-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--badge-new);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.game-card-body {
  padding: 12px;
  flex: 1;
}

.game-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.game-card-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Horizontal Strip ---------- */
.horizontal-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.horizontal-strip::-webkit-scrollbar { display: none; }

.horizontal-strip .game-card {
  flex-shrink: 0;
  width: 170px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .horizontal-strip .game-card { width: 210px; }
}

/* ---------- Game Grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 520px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1400px) {
  .game-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Category Pills ---------- */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 4px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar { display: none; }

.category-pill {
  flex-shrink: 0;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}

.category-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- Load More ---------- */
.load-more-wrap {
  text-align: center;
  padding: 32px 0 8px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 36px;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 2px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

.footer-brand .logo { margin-bottom: 8px; }

.footer-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.7;
  max-width: 360px;
}

.footer-links-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer { padding: 48px 0 36px; }
}

/* ---------- Bottom Nav (Mobile) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--bottom-nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 500;
  min-width: 48px;
  transition: all var(--transition);
}

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

.bottom-nav-item-icon {
  font-size: 20px;
  line-height: 1;
}

@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

@media (max-width: 767px) {
  body { padding-bottom: var(--bottom-nav-h); }
}

/* ============================================================
   GAME DETAIL PAGE
   ============================================================ */

.game-detail {
  padding-top: 16px;
  padding-bottom: 24px;
  background: var(--bg-white);
}

.game-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg);
  transition: all var(--transition);
}

.game-back:hover { color: var(--accent); }

.game-player-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.game-player-wrap iframe {
  width: 100%;
  height: 500px;
  display: block;
  border: none;
}

.game-player-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 40px;
  text-align: center;
  flex-direction: column;
  background: var(--bg);
}

.game-player-fallback.show { display: flex; }

.game-player-fallback-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.game-player-fallback-text {
  font-size: 14px;
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  .game-player-wrap iframe { height: 300px; }
}

@media (max-width: 480px) {
  .game-player-wrap iframe { height: 220px; }
}

/* Game Info */
.game-info {
  display: grid;
  gap: 20px;
}

.game-info-main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.game-info-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}

.game-info-header { flex: 1; min-width: 0; }

.game-info-name {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.game-info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.game-info-tag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.game-info-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-info-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 13px;
  color: var(--text-secondary);
}

.game-info-stat strong {
  color: var(--text);
  font-weight: 600;
}

.game-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 16px;
}

.game-desc h2, .game-desc h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
}

.game-desc strong { color: var(--text); }
.game-desc ul { list-style: disc; padding-left: 20px; margin: 8px 0; }
.game-desc li { margin-bottom: 6px; }

@media (min-width: 768px) {
  .game-info { grid-template-columns: 1fr 220px; }
}

/* Related Games */
.related-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}

.related-strip::-webkit-scrollbar { display: none; }

.related-strip .game-card {
  flex-shrink: 0;
  width: 160px;
}

@media (min-width: 768px) {
  .related-strip .game-card { width: 190px; }
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */

.category-page {
  padding-top: 16px;
  padding-bottom: 24px;
  background: var(--bg-white);
}

.category-header {
  margin-bottom: 24px;
}

.category-title {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.category-count {
  font-size: 14px;
  color: var(--text-tertiary);
}

.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 520px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1400px) { .category-grid { grid-template-columns: repeat(5, 1fr); } }

/* ============================================================
   STATIC PAGES
   ============================================================ */

.static-page {
  padding-top: 32px;
  padding-bottom: 60px;
  min-height: 100vh;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.static-page-center {
  text-align: center;
  max-width: 500px;
  margin: auto;
}

.error-code {
  font-size: clamp(80px, 15vw, 140px);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}

.error-title {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.error-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}

.error-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Static Content */
.static-content {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.static-content h1 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.static-content .updated {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
}

.static-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}

.static-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}

.static-content ul, .static-content ol {
  padding-left: 20px;
  margin: 10px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.static-content li { margin-bottom: 6px; }

/* ---------- Search Dropdown ---------- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 2000;
  box-shadow: var(--shadow-xl);
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

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

.search-dropdown-item img {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg);
}

.search-dropdown-item-info { min-width: 0; flex: 1; }

.search-dropdown-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-item-cat {
  font-size: 11px;
  color: var(--text-tertiary);
}

.search-dropdown-item-rating {
  font-size: 12px;
  color: var(--accent2);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.4s ease forwards; }
.fade-in-d2 { animation-delay: 0.15s; }
.fade-in-d3 { animation-delay: 0.25s; }
.fade-in-d4 { animation-delay: 0.35s; }

/* Skeleton loading */
.shimmer {
  background: linear-gradient(90deg, var(--bg) 25%, var(--bg-hover) 50%, var(--bg) 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; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.2;
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .section { padding: 24px 0; }
}
