:root {
  --primary-bg: #0A0A0D;
  --secondary-bg: #141417;
  --card-bg: rgba(255, 255, 255, 0.03);
  --accent-primary: #FF4C4C;
  --accent-secondary: #FF944C;
  --text-primary: #F5F5F5;
  --text-secondary: #9CA3AF;
  
  --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1400px;
  
  --space-desktop: 100px;
  --space-tablet: 70px;
  --space-mobile: 50px;
  
  --glow-shadow: 0 0 20px rgba(255, 76, 76, 0.4);
  --glass-border: 1px solid rgba(255, 76, 76, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 20px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 15px; }

p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-spacing {
  padding: var(--space-desktop) 0;
}

/* Header & Glass Navigation */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 76, 76, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo span {
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(255, 76, 76, 0.6);
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 5px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

/* Mobile Menu Toggle */
.menu-toggle-checkbox {
  display: none;
}

.menu-toggle-label {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle-label span {
  width: 30px;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 35px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--glow-shadow);
  text-align: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 148, 76, 0.6);
  color: #fff;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 13, 0.4), rgba(10, 10, 13, 0.95));
  z-index: 1;
}

.bg-home-hero { background-image: url('images/firefighter-action-night-scene-hero.jpg'); }
.bg-about-hero { background-image: url('images/fire-station-equipment-bg.jpg'); }
.bg-contact-hero { background-image: url('images/emergency-dispatch-glowing-bg.jpg'); }
.bg-legal-hero { background-image: url('images/dark-embers-abstract-bg.jpg'); }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.hero-content h1 {
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-content p {
  color: var(--text-primary);
  font-size: 1.3rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  margin-bottom: 40px;
}

.disclaimer-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Game Section */
.game-section {
  background-color: var(--secondary-bg);
  position: relative;
}

.game-wrapper {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  background: var(--primary-bg);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 76, 76, 0.15);
  border: var(--glass-border);
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 12px;
  background: #000;
}

/* Content Sections */
.text-center { text-align: center; }

.section-header {
  margin-bottom: 50px;
}

.section-header h2 {
  display: inline-block;
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  bottom: -10px;
  left: 25%;
  border-radius: 2px;
}

/* Glass Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.glass-card {
  background: var(--card-bg);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 40px 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 76, 76, 0.1);
  border-color: var(--accent-secondary);
}

.glass-card h3 {
  color: var(--accent-primary);
  font-size: 1.4rem;
}

/* Content Pages Formatting (Legal, About, etc.) */
.content-box {
  background: var(--card-bg);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 50px;
  backdrop-filter: blur(10px);
}

.content-box h2 {
  color: var(--accent-secondary);
  font-size: 1.8rem;
  margin-top: 30px;
}

.content-box ul {
  list-style: disc inside;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.content-box li {
  margin-bottom: 10px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.form-control {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(255, 76, 76, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
.site-footer {
  background-color: var(--primary-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 0 30px;
}

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

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-col p {
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.age-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* Media Queries */
@media (max-width: 1024px) {
  .game-wrapper { width: 95%; }
  .section-spacing { padding: var(--space-tablet) 0; }
}

@media (max-width: 768px) {
  .section-spacing { padding: var(--space-mobile) 0; }
  
  .menu-toggle-label {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 23, 0.95);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 20px 0;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 76, 76, 0.3);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
  }
  
  .menu-toggle-checkbox:checked ~ .nav-menu {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .game-wrapper {
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0;
  }

  .game-frame {
    border-radius: 0;
  }
  
  .content-box {
    padding: 30px 20px;
  }
}