/* ============================================================
   GLOBAL.CSS — Shared styles for all pages
   GameGuides Network
   ============================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Bebas+Neue&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* ── CSS VARIABLES ── */
:root {
  /* Core palette */
  --black:        #080808;
  --dark-0:       #0D0D0D;
  --dark-1:       #141414;
  --dark-2:       #1C1C1C;
  --dark-3:       #242424;
  --dark-4:       #2E2E2E;

  /* Accent */
  --gold:         #D4A843;
  --gold-light:   #F0C96A;
  --gold-dim:     #8A6820;
  --gold-glow:    rgba(212, 168, 67, 0.15);

  /* Text */
  --text:         #E8E0D0;
  --text-dim:     #887A66;
  --text-muted:   #4A4035;

  /* Status colors */
  --green:        #4A8C5C;
  --red:          #8C2D2D;
  --blue:         #2D5A8C;

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-ui:      'Rajdhani', sans-serif;
  --font-body:    'Source Serif 4', Georgia, serif;

  /* Spacing scale */
  --sp-xs:   0.375rem;
  --sp-sm:   0.75rem;
  --sp-md:   1.5rem;
  --sp-lg:   3rem;
  --sp-xl:   6rem;

  /* Layout */
  --max-w:   1280px;
  --nav-h:   60px;

  /* Transitions */
  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── GRAIN TEXTURE ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9000;
  mix-blend-mode: overlay;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-1); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── NAVIGATION ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 8000;
  background: rgba(8, 8, 8, 0.96);
  border-bottom: 1px solid rgba(212, 168, 67, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
  transition: border-color 0.3s var(--ease);
}

.site-nav.scrolled {
  border-bottom-color: rgba(212, 168, 67, 0.25);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand-icon {
  width: 28px;
  height: 28px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--black);
  font-weight: 900;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1;
}

.nav-brand-name span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.4rem 0.875rem;
  border-radius: 2px;
  transition: all 0.2s var(--ease);
  position: relative;
}

.nav-link:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

.nav-link.active {
  color: var(--gold);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 1px;
  background: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-search-btn {
  width: 34px; height: 34px;
  border-radius: 2px;
  border: 1px solid rgba(212, 168, 67, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: all 0.2s var(--ease);
}

.nav-search-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-glow);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--dark-1);
  border-top: 1px solid rgba(212, 168, 67, 0.1);
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── SHARED UTILITY CLASSES ── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--black);
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212, 168, 67, 0.4);
}

.btn-outline:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Section labels */
.label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

/* Dividers */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: var(--sp-lg) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,67,0.3), transparent);
}

.divider-mark {
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Container */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  border: 1px solid currentColor;
}

.badge-new {
  color: var(--gold);
  border-color: rgba(212, 168, 67, 0.4);
  background: rgba(212, 168, 67, 0.08);
}

.badge-genre {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(212, 168, 67, 0.15); }
}

/* Responsive nav collapse */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .site-nav { padding: 0 1.25rem; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
