/* ==========================================================================
   Yonox Games — Official Design System & Stylesheet
   ========================================================================== */

:root {
  /* Core Color Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #161f33;
  --bg-glass: rgba(17, 24, 39, 0.85);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #ff5722;

  --primary: #ff5722;
  --primary-hover: #f4511e;
  --primary-color: #ff5722;
  --secondary: #7c3aed;
  --accent: #ff9800;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --telegram-color: #0088cc;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
  --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.2) 100%);
  --gradient-hero: linear-gradient(135deg, #111827 0%, #0b0f19 50%, #1e1b4b 100%);
  --gradient-telegram: linear-gradient(135deg, #0088cc 0%, #00b4d8 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 87, 34, 0.35);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Top 18+ Warning Banner
   ========================================================================== */
.age-warning-bar {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 0.4rem 0;
  text-align: center;
}

.age-warning-bar span {
  background: #DC2626;
  color: #FFF;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.4rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.brand-logo img {
  height: 38px;
  width: auto;
  border-radius: 6px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-search {
  position: relative;
  flex: 1;
  max-width: 260px;
}

.nav-search input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.nav-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.nav-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Telegram Button */
.btn-telegram {
  background: var(--gradient-telegram);
  color: #FFF !important;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 12px rgba(0, 136, 204, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.btn-telegram:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 136, 204, 0.5);
  color: #FFF !important;
}

/* Mobile Toggle Hamburger Button */
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 42px;
  height: 38px;
  min-width: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #FFF;
}

/* Mobile Navigation Drawer */
.mobile-drawer {
  display: none;
  background: #0b1020;
  border-bottom: 2px solid #6366f1;
  padding: 1.25rem 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 999999;
}

.mobile-drawer.is-open {
  display: block;
  animation: slideDownNav 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: #1e293b;
  border: 1px solid #334155;
  transition: all var(--transition-fast);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: var(--gradient-primary);
  color: #ffffff !important;
  border-color: transparent;
}

/* ==========================================================================
   Buttons, Badges & UI Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #FFF;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
  color: #FFF;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.game-badge {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c084fc;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.rating-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.age-pill {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ==========================================================================
   Hero Section Banner & Page Sections
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #1e1b4b 100%);
  padding: 3.5rem 0 3rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

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

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.hero-desc strong {
  color: #ffffff;
  font-weight: 700;
}

.section {
  padding: 3.5rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Games Grid
   ========================================================================== */
.grid-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 87, 34, 0.3);
}

.game-card-media {
  position: relative;
  width: 100%;
  height: 155px;
  overflow: hidden;
  background: #000;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-header {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.game-icon-thumb {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.game-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.game-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.game-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Game Detail Layout
   ========================================================================== */
.game-detail-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 2rem;
}

.game-header-flex {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ==========================================================================
   Legal & Policy Pages Layout
   ========================================================================== */
.legal-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2rem;
  align-items: start;
}

.legal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 85px;
}

.legal-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.legal-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legal-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.legal-nav-link:hover {
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary);
  border-color: rgba(255, 87, 34, 0.2);
}

.legal-nav-link.active {
  background: var(--gradient-primary);
  color: #FFFFFF !important;
  font-weight: 700;
  border-color: transparent;
}

.legal-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  color: var(--text-main);
  line-height: 1.8;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
}

.legal-content-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.legal-content-card ul, 
.legal-content-card ol {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
.footer {
  background: #080c14;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
  .nav-links,
  .nav-search {
    display: none !important;
  }
  
  .mobile-toggle {
    display: inline-flex !important;
  }

  .brand-logo {
    font-size: 1.35rem;
  }

  .brand-logo img {
    height: 32px;
  }

  .navbar-inner {
    gap: 0.5rem;
  }

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

  .age-warning-bar {
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    line-height: 1.3;
  }

  /* Game Detail Responsive */
  .game-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .game-header-flex {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1.25rem !important;
  }

  .game-header-flex > div {
    width: 100% !important;
  }

  /* Legal Pages Responsive */
  .legal-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .legal-sidebar {
    position: static !important;
    width: 100% !important;
    order: 2;
  }

  .legal-content-card {
    order: 1;
    padding: 1.5rem 1.15rem !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.92rem !important;
  }

  .legal-nav-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .grid-games {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

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

  .grid-games {
    grid-template-columns: 1fr !important;
  }

  .legal-content-card {
    padding: 1.25rem 1rem !important;
  }
}
