img { max-width: 100%; height: auto; display: block; }

/* === CSS RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Theme: Dark - Jewel Tones (Emerald/Sapphire) */
  --bg: #0f1a0f; /* Deep Emerald Dark Background */
  --bg-alt: #1a0f1a; /* Deep Sapphire Dark Background */
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #10b981; /* Emerald Accent */
  --accent-alt: #3b82f6; /* Sapphire Accent */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-glass: 0 8px 32px 0 rgba(0,0,0,0.3);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-heading: 'Righteous', cursive;
  --font-body: 'Poppins', sans-serif;
}

body, html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-alt);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* === STRUCTURAL BASELINES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

section {
  padding: 80px 0;
  position: relative;
}

/* Section Backgrounds (Flat solid color blocks) */
.section-emerald { background-color: #0f1a0f; }
.section-sapphire { background-color: #0d1117; }
.section-obsidian { background-color: #050505; }

/* Section Dividers (SVG Wave Shapes) */
.divider {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.divider-top { top: 0; transform: rotate(180deg); }
.divider-bottom { bottom: 0; }
.divider svg {
  position: relative;
  display: block;
  width: calc(130% + 1.3px);
  height: 60px;
}
.divider .shape-fill { fill: #0f1a0f; } /* Matches emerald */
.section-sapphire .divider .shape-fill { fill: #0d1117; }

/* Offset Grid Layout */
.offset-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 768px) {
  .offset-row:nth-child(even) { transform: translateX(60px); }
  .offset-row:nth-child(odd) { transform: translateX(-60px); }
}

/* === NAVIGATION === */
/* Floating Pill Nav (Top) */
.pill-nav-container {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.pill-nav {
  background: rgba(15, 26, 15, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 10px 30px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: var(--shadow-glass);
}

.pill-nav a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.pill-nav a.active, .pill-nav a:hover {
  color: var(--accent);
}

/* Bottom Navigation Bar (Persistent Mobile-style) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: #050505;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1001;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  gap: 4px;
}

.bottom-nav-item i {
  font-size: 1.4rem;
}

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

/* Content padding for bottom nav */
main {
  padding-bottom: 90px;
}

/* === HERO SECTION === */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, #0f1a0f, #1a0f1a, #0d1117);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-content {
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  margin-bottom: 24px;
  color: #fff;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  box-shadow: 0 0 15px var(--accent);
}

/* === CATALOG GRID & CARDS === */
.catalog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--glass-bg);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.filter-tabs {
  display: flex;
  gap: 12px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.sort-select {
  background: #050505;
  color: #fff;
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 8px;
  outline: none;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.game-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
  position: relative;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: var(--accent);
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

/* Duotone Effect */
.card-img-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--bg), var(--accent));
  mix-blend-mode: multiply;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.game-card:hover .card-img-wrapper::after {
  opacity: 0.3;
}

.card-content {
  padding: 24px;
}

.card-tag {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* === BUTTONS === */
.btn-primary {
  background: var(--accent);
  color: #000;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
  filter: brightness(1.1);
}

.cta-full {
  width: 100%;
  background: var(--accent-alt);
  padding: 80px 0;
  text-align: center;
}

/* === TESTIMONIALS (Before/After) === */
.testimonial-card {
  background: var(--glass-bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}

.metrics-grid {
  display: flex;
  gap: 30px;
  margin-bottom: 24px;
  background: rgba(0,0,0,0.2);
  padding: 20px;
  border-radius: var(--radius-md);
}

.metric {
  flex: 1;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent);
}

/* === VIDEO SECTION === */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #000;
  cursor: pointer;
  transition: transform 0.3s;
}

.play-btn:hover {
  transform: scale(1.1);
}

/* === FOOTER (Card Grid Style) === */
footer {
  background: #050505;
  padding: 80px 0 120px 0; /* Extra bottom padding for nav */
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.footer-card {
  background: var(--glass-bg);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid var(--glass-border);
}

.social-icons a:hover {
  background: var(--accent);
  color: #000;
}

/* Newsletter Input */
.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.newsletter-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  outline: none;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .pill-nav-container { display: none; }
  .offset-row { transform: none !important; }
  section { padding: 60px 0; }
  .catalog-grid { grid-template-columns: 1fr; }
  .metrics-grid { flex-direction: column; }
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 100px 0 20px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumbs a:hover { color: var(--accent); }

/* Sidebar Inner Pages */
.inner-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
}

@media (max-width: 1024px) {
  .inner-page-layout { grid-template-columns: 1fr; }
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--glass-bg);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: 30px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
