:root {
  --bg-primary: #10151D;
  --bg-surface: #1A2430;
  --bg-secondary-surface: #263342;
  --color-emergency-red: #D7263D;
  --color-rescue-orange: #F97316;
  --color-safety-yellow: #FACC15;
  --color-command-blue: #2563EB;
  --color-steel-grey: #5B6777;
  --color-concrete-silver: #AEB8C5;
  --color-glass-white: #E8EDF4;
  --text-primary: #F8FAFC;
  --text-secondary: #D5DEE8;
  --text-muted: #97A4B3;
  --gradient-accent: linear-gradient(135deg, #D7263D, #F97316);
  --gradient-secondary: linear-gradient(135deg, #2563EB, #FACC15);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.25s ease-in-out;
}

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

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  display: block;
  border-radius: 12px;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { color: var(--text-secondary); margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.875rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), opacity var(--transition-fast), box-shadow var(--transition-fast);
}
.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(215, 38, 61, 0.2);
}
.btn-secondary {
  background: var(--bg-secondary-surface);
  color: var(--text-primary);
  border: 1px solid var(--color-steel-grey);
}
.btn-text {
  color: var(--color-rescue-orange);
  font-weight: 600;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-text:hover {
  color: var(--color-safety-yellow);
  transform: translateX(4px);
}

/* Emergency Broadcast */
.broadcast-bar {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: 8px 0;
  text-align: center;
  border-bottom: 1px solid var(--color-steel-grey);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.broadcast-link {
  color: var(--color-rescue-orange);
  font-weight: 600;
}

/* Floating Command Header */
.header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 0 24px 32px;
}
.header-inner {
  background: rgba(26, 36, 48, 0.95);
  border: 1px solid var(--color-emergency-red);
  border-radius: 16px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(16, 21, 29, 0.5);
}
.logo-emblem {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-emblem svg {
  width: 44px;
  height: 44px;
}
.logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.logo-domain {
  color: var(--color-safety-yellow);
  font-weight: 600;
  font-size: 0.85em;
  margin-left: 2px;
}
.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--color-rescue-orange);
}

/* Mission Briefing */
.mission-briefing {
  padding: 40px 0;
}
.briefing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.briefing-content h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}
.briefing-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}
.briefing-visual {
  position: relative;
}
.briefing-visual img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--color-steel-grey);
  box-shadow: 0 20px 40px rgba(16, 21, 29, 0.8);
}
.floating-panels {
  position: absolute;
  bottom: -20px;
  left: -20px;
  display: flex;
  gap: 12px;
}
.panel {
  background: var(--bg-secondary-surface);
  border: 1px solid var(--color-steel-grey);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(16, 21, 29, 0.6);
}
.panel svg {
  width: 16px;
  height: 16px;
  color: var(--color-command-blue);
}

/* Rescue Operations */
.rescue-operations {
  padding: 48px 0;
  border-top: 1px solid rgba(91, 103, 119, 0.2);
  border-bottom: 1px solid rgba(91, 103, 119, 0.2);
  background: var(--bg-surface);
}
.operations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.operation-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.operation-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-secondary-surface);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-steel-grey);
  color: var(--color-command-blue);
}
.operation-pillar h4 {
  font-size: 1.1rem;
}

/* Fire Command Center (Game) */
.fire-command-center {
  padding: 80px 0;
  text-align: center;
}
.center-heading {
  margin-bottom: 40px;
}
.game-console {
  max-width: 1020px;
  margin: 0 auto;
  border-radius: 30px;
  background: var(--bg-primary);
  border: 4px solid var(--color-steel-grey);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.5);
  padding: 12px;
  position: relative;
}
.game-console::before {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border: 1px solid var(--color-emergency-red);
  border-radius: 34px;
  pointer-events: none;
}
.console-accents {
  position: absolute;
  top: 50%;
  left: -10px;
  right: -10px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}
.accent-light {
  width: 4px;
  height: 40px;
  background: var(--color-command-blue);
  box-shadow: 0 0 10px var(--color-command-blue);
  border-radius: 4px;
}
.game-inner {
  border-radius: 20px;
  border: 2px solid var(--color-emergency-red);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  position: relative;
}
.game-inner iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.game-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

/* Equipment Division */
.equipment-division {
  padding: 64px 0;
  background: var(--bg-surface);
}
.equipment-header {
  text-align: center;
  margin-bottom: 48px;
}
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.equipment-card {
  background: var(--bg-primary);
  border: 1px solid var(--color-steel-grey);
  border-radius: 12px;
  padding: 24px;
  transition: transform var(--transition-fast);
}
.equipment-card:hover {
  transform: translateY(-4px);
}
.equipment-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}
.tech-icon-wrapper {
  width: 100%;
  height: 200px;
  background: var(--bg-secondary-surface);
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(91, 103, 119, 0.3);
}
.tech-icon-wrapper svg {
  width: 64px;
  height: 64px;
  color: var(--color-rescue-orange);
}

/* Mission Timeline */
.mission-timeline {
  padding: 80px 0;
  text-align: center;
}
.timeline-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 900px;
  margin: 48px auto 0;
}
.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-steel-grey);
  z-index: 1;
  transform: translateY(-50%);
}
.timeline-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-emergency-red), var(--color-rescue-orange));
  box-shadow: 0 0 10px rgba(215, 38, 61, 0.5);
  opacity: 0.6;
}
.timeline-step {
  position: relative;
  z-index: 2;
  background: var(--bg-primary);
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-command-blue);
  box-shadow: 0 0 15px var(--color-command-blue);
  border: 3px solid var(--bg-primary);
}
.timeline-step span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Operations Hub */
.operations-hub {
  padding: 80px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--color-steel-grey);
}
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.hub-info h2 {
  font-size: 2.5rem;
}
.support-email {
  font-size: 1.25rem;
  color: var(--color-rescue-orange);
  font-family: monospace;
  margin: 24px 0;
  display: inline-block;
}
.mini-faq {
  margin-top: 32px;
}
.faq-item {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-steel-grey);
  padding-bottom: 16px;
}
.faq-item h4 {
  margin-bottom: 8px;
  color: var(--color-concrete-silver);
}
.hub-form {
  background: var(--bg-secondary-surface);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--color-steel-grey);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--color-steel-grey);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-command-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Command Footer */
.footer {
  background: var(--bg-primary);
  padding: 64px 0 24px;
  border-top: 2px solid var(--color-emergency-red);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--color-concrete-silver);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  border-top: 1px solid var(--color-steel-grey);
  padding-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-bottom svg {
  width: 32px;
  height: 32px;
  fill: var(--color-emergency-red);
}
.footer-legal {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 800px;
}
.footer-address {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: normal;
  text-align: center;
}

/* Cookie Popup */
.cookie-popup {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 340px;
  background: var(--bg-secondary-surface);
  border: 1px solid var(--color-emergency-red);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(16, 21, 29, 0.9);
  z-index: 9999;
  display: none;
}
.cookie-popup.show {
  display: block;
  animation: slideUp 0.3s ease-out;
}
.cookie-popup h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.cookie-popup p {
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.cookie-actions {
  display: flex;
  gap: 12px;
}
.cookie-actions .btn {
  flex: 1;
  padding: 8px;
  font-size: 0.85rem;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Subpage Layout */
.subpage-header {
  padding: 80px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--color-steel-grey);
  background: var(--bg-surface);
}
.subpage-content {
  padding: 64px 0;
  max-width: 800px;
  margin: 0 auto;
}
.subpage-content h2 {
  margin-top: 32px;
  color: var(--color-concrete-silver);
}
.subpage-content p {
  margin-bottom: 16px;
}
.return-home {
  margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 992px) {
  .briefing-grid, .hub-grid {
    grid-template-columns: 1fr;
  }
  .operations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .equipment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  h1 { font-size: 2.5rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .header-inner { justify-content: space-between; }
  .equipment-grid { grid-template-columns: 1fr; }
  .timeline-container { flex-direction: column; gap: 32px; margin-top: 24px; }
  .timeline-line { width: 2px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); }
  .timeline-step { background: transparent; }
  .step-dot { margin-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}