/* ═══════════════════════════════════════════════════
   RomsHub v2 — global.css
   Shared across all pages: reset, scrollbar, navbar, footer
   ═══════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #080c14;
  color: #e2e8f4;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Dot-grid background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 0%, transparent 80%);
}

/* ── Scrollbar ── */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.22);
  border-radius: 999px;
  border: 2px solid #080c14;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.38); }
* { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.3) transparent; }

/* ── CSS Tokens ── */
:root {
  --bg: #080c14;
  --surface: #0f1521;
  --surface-2: #151d2e;
  --border: rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.14);
  --text: #e2e8f4;
  --muted: #64748b;
  --accent: #FFCF59;
  --accent-dim: rgba(255,207,89,.12);
  --accent-glow: rgba(255,207,89,.25);
  --blue: #4f8ef7;
  --radius: 18px;
  --radius-sm: 10px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(8,12,20,.85);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  height: 66px;
  gap: 32px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.brand:hover .brand-icon { transform: rotate(-8deg) scale(1.08); }
.brand-icon svg { width: 100%; height: 100%; }
/* PNG logo: remove black bg via mix-blend-mode, tint golden */
.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.1) sepia(.4) saturate(3) hue-rotate(5deg);
  transition: transform .3s ease;
}
.brand:hover .brand-logo-img { transform: rotate(-8deg) scale(1.08); }

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(226,232,244,.55);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: all .2s ease;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { color: #fff; background: rgba(255,255,255,.07); }
.nav-link--admin {
  margin-left: auto;
  color: rgba(226,232,244,.4);
  font-size: 13px;
}
.nav-link--admin:hover { color: rgba(226,232,244,.7); background: rgba(255,255,255,.04); }
.nav-link--admin svg { opacity: .6; }

/* Platforms dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(226,232,244,.55);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: all .2s ease;
}
.nav-dropdown-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-dropdown-btn[aria-expanded="true"] { background: rgba(255,255,255,.07); color: #fff; }
.nav-caret { transition: transform .2s ease; flex-shrink: 0; }
.nav-dropdown-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: #0f1521;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0,0,0,.5);
  padding: 6px;
  z-index: 500;
  display: none;
}
.nav-dropdown-panel.is-open { display: block; animation: dpFadeIn .18s ease; }
@keyframes dpFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.nav-dp-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(226,232,244,.7);
  font-weight: 500;
  transition: all .15s ease;
  text-decoration: none;
}
.nav-dp-item:hover { background: rgba(255,207,89,.08); color: var(--accent); }
.nav-dropdown-loading, .nav-dropdown-empty {
  padding: 14px;
  font-size: 13px;
  color: rgba(226,232,244,.3);
  text-align: center;
}

/* Search */
.nav-search { position: relative; }
.nav-sbox {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-sicon {
  position: absolute;
  left: 12px;
  color: rgba(226,232,244,.3);
  pointer-events: none;
  display: flex;
}
.nav-sbox input[type="search"] {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #e2e8f4;
  border-radius: 10px;
  padding: 8px 14px 8px 36px;
  width: 210px;
  font-size: 14px;
  transition: all .25s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.nav-sbox input::placeholder { color: rgba(226,232,244,.3); }
.nav-sbox input:focus {
  border-color: rgba(255,207,89,.3);
  background: rgba(255,255,255,.06);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(255,207,89,.07);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 48px 28px 36px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.footer-logo-icon svg { width: 100%; height: 100%; }
.footer-logo-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.1) sepia(.4) saturate(3) hue-rotate(5deg);
}

.footer-brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(100,116,139,.8);
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.footer-links a { color: rgba(226,232,244,.4); transition: color .2s; }
.footer-links a:hover { color: rgba(226,232,244,.8); }

.footer-copy {
  font-size: 12px;
  color: rgba(100,116,139,.5);
  margin-top: 8px;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 768px) {
  .nav-search { display: none; }
  .nav-inner { padding: 0 18px; gap: 16px; }
  .nav-link span { display: none; }
  .brand-name { font-size: 15px; }
}
