﻿/* -----------------------------------------
   GLOBAL THEME COLORS
------------------------------------------ */
:root {
    --green: #0b6b3a;
    --gold: #d4af37;
    --cream: #f7f3e9;
    --deepblue: #1b2a41;
    --textdark: #1b2a41;
    --mint: #e8f5e9;
    --lightgold: #fff4cc;
}

/* -----------------------------------------
   GLOBAL RESET
------------------------------------------ */
/* Smooth theme transitions */
.theme-toggle span,
nav a,
h1, h2, h3, h4,
.game-card h3 {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

body,
nav,
.card,
.game-card,
footer,
a {
  transition: background-color 0.35s ease, 
              color 0.35s ease, 
              border-color 0.35s ease,
              box-shadow 0.35s ease;
}

body {
    margin: 0;
    font-family: "Poppins", Arial, sans-serif;
    background: var(--cream);
    color: var(--textdark);
}

/* -----------------------------------------
   NAVIGATION — CLEAN, FIXED, RESPONSIVE
------------------------------------------ */

/* Sticky Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--deepblue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Container */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
}

/* Logo */
.logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--gold);
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  gap: 20px;
}

.desktop-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.desktop-nav a:hover {
  color: var(--gold);
}

/* Hamburger (hidden on desktop) */
.menu-toggle {
  font-size: 28px;
  cursor: pointer;
  color: white;
  display: none;
}

/* Mobile Menu (hidden by default) */
/* Mobile Menu — slide from right */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -260px; /* hidden off-screen */
  width: 260px;
  height: 100vh;
  background: var(--deepblue);
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  transition: right 0.3s ease;
  z-index: 9998;
}

.mobile-menu a {
  padding: 16px 25px;
  text-decoration: none;
  color: white;
  font-size: 18px;
}

.mobile-menu a:hover {
  background: rgba(255,255,255,0.1);
}

/* When open */
.mobile-menu.open {
  right: 0;
}
/* MOBILE RULES */
@media (max-width: 768px) {
  .desktop-nav {
    display: none; /* hide desktop nav */
  }
  .menu-toggle {
    display: block; /* show hamburger */
  }
}



/* -----------------------------------------
   HERO SECTIONS
------------------------------------------ */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--cream);
    background-image: url('https://i.imgur.com/8vQ5w7U.png'); /* geometric pattern */
    background-size: 400px;
    background-repeat: repeat;
    border-bottom: 4px solid var(--gold);
}
.hero h1 {
    font-size: 38px;
    color: var(--green);
    margin-bottom: 10px;
}
.hero h2 {
    font-size: 20px;
    color: var(--deepblue);
}
.hero p {
    font-size: 18px;
    color: var(--green);
    max-width: 600px;
    margin: auto;
    margin-top: 10px;
}

/* HERO BUTTONS */
.hero .btn {
    padding: 12px 22px;
    margin: 10px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    border: 2px solid var(--green);
    background: var(--green);
    color: white;
}
.hero .btn.alt {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--deepblue);
}
.hero .btn:hover {
    opacity: 0.85;
}

/* -----------------------------------------
   SECTION TITLES
------------------------------------------ */
.section-title {
    text-align: center;
    font-size: 28px;
    margin-top: 50px;
    color: var(--green);
}

/* -----------------------------------------
   GRID LAYOUTS (Categories, Games, etc.)
------------------------------------------ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 30px 20px;
    max-width: 1000px;
    margin: auto;
}

/* -----------------------------------------
   CARDS (Categories, Games)
------------------------------------------ */
.game-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 300px;
}
.card, .game-card {
    background: white;
    border: 2px solid var(--green);
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    font-weight: 600;
    color: var(--textdark);
    cursor: pointer;
    transition: 0.2s;
    font-size: 18px;
}
.card:hover, .game-card:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* GAME CARD BUTTON */
.game-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 18px;
    background: var(--green);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
}
.game-card a:hover {
    opacity: 0.85;
}

/* -----------------------------------------
   FILTER BUTTONS (Games Hub)
------------------------------------------ */
.filters {
    text-align: center;
    margin: 30px 0 10px;
}
.filters button {
    padding: 10px 18px;
    margin: 5px;
    border-radius: 6px;
    border: 2px solid var(--green);
    background: white;
    cursor: pointer;
    font-size: 15px;
}
.filters button:hover {
    background: var(--green);
    color: white;
}

/* -----------------------------------------
   FOOTER
------------------------------------------ */
footer {
    background: var(--deepblue);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 4px solid var(--gold);
}

@media (max-width: 768px) {
  .hero {
    background-image: url('/assets/img/games-hero-mobile.png');
  }
}

/* Hamburger base */
.menu-toggle {
  width: 30px;
  height: 22px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: 0.3s ease;
}

/* When menu is open, animate into X */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Show hamburger only on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
}

/* Dark overlay behind menu */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9997;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 25px;
}
m
.mobile-menu .icon {
  font-size: 22px;
}

/* desktop nav */
.desktop-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.desktop-nav .icon {
  font-size: 20px;
  display: inline-block;
}
.desktop-nav a:hover .icon {
  color: var(--gold);
}

/* mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -260px;
  width: 260px;
  height: 100vh;
  background: var(--deepblue);
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  transition: right 0.3s ease;
  z-index: 9998;

  border: 3px solid #d4af37; /* full gold border */
  box-sizing: border-box;
}

/* dark mode */
/* DARK MODE BASE */
body.dark-mode {
  background-color: #0f0f0f;
  color: #f2f2f2;
}

/* NAVIGATION */
nav.dark-mode {
  background-color: #1a1a1a;
  color: #f2f2f2;
}

nav.dark-mode a {
  color: #90caf9;
}

/* CARDS */
.card.dark-mode,
.game-card.dark-mode {
  background-color: #1c1c1c;
  border-color: #333;
  box-shadow: 0 4px 12px rgba(255,255,255,0.05);
  color: #f2f2f2;
}

/* FOOTER */
footer.dark-mode {
  background-color: #1a1a1a;
  color: #ccc;
}

/* LINKS */
a.dark-mode {
  color: #90caf9;
}
.dark-toggle {
  background: #4CAF50;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin: 10px;
}

/* Floating dark mode toggle */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffffff;
  color: #333;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
  z-index: 9999;
}

body.dark-mode .theme-toggle {
  background: #1f1f1f;
  color: #f5f5f5;
  box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}

.theme-toggle:hover {
  transform: scale(1.08);
}

/* filters */
.game-filters {
  text-align: center;
  margin-bottom: 20px;
}

.game-filters button {
  background: #f1f1f1;
  border: none;
  padding: 10px 16px;
  margin: 5px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background 0.3s ease;
}

.game-filters button.active {
  background: #4CAF50;
  color: white;
}

.tile {
  aspect-ratio: 1 / 1; /* makes each tile a perfect square */
}


/* BREADCRUMBS */
.breadcrumbs {
  font-size: 14px;
  color: #6b7280;
  margin: 15px auto 10px auto;
  max-width: 1100px;
  padding: 0 15px;
}

.breadcrumbs a {
  color: #4b5563;
  text-decoration: none;
}

.breadcrumbs span {
  margin: 0 6px;
  color: #9ca3af;
}

.breadcrumbs .current {
  color: #111827;
  font-weight: 600;
}
/* breadcrumbs */

/* logo */
.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0ea5e9; /* sky blue accent */
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s ease;
}

.logo:hover {
  color: #0284c7; /* deeper blue */
  transform: translateY(-1px);
}

.logo::before {
  content: "🌙";
  font-size: 1.4rem;
  opacity: 0.9;
  transition: 0.25s ease;
}

.logo:hover::before {
  transform: rotate(-10deg) scale(1.1);
}/* logo */

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

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

.brand-icon svg {
  width: 32px;
  height: 32px;
  fill: #d4a017; /* GOLD */
  transition: 0.25s ease;
}

.brand-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: #d4a017; /* GOLD */
  letter-spacing: -0.5px;
  transition: 0.25s ease;
}

.brand-logo:hover .brand-icon svg {
  transform: rotate(6deg) scale(1.08);
}

.brand-logo:hover .brand-text {
  color: #facc15; /* brighter gold on hover */
}

