/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Root Variables */
:root {
  --primary: #007acc;
  --primary-dark: #005fa3;
  --background-light: #f0f8ff;
  --background-dark: #121212;
  --text-light: #ffffff;
  --text-dark: #000000;
  --accent-correct: #4CAF50;
  --accent-wrong: #f44336;
  --progress-bg: #d0e6f7;
  --link-color: #88cfff;
}

/* Theme Variables */
[data-theme="light"] {
  --bg-color: var(--background-light);
  --text-color: var(--text-dark);
}

[data-theme="dark"] {
  --bg-color: var(--background-dark);
  --text-color: var(--text-light);
}

/* Global Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s, color 0.3s;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  position: relative;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo a {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* Theme Toggle Button */
.theme-toggle {
  margin-left: 1rem;
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1001;
}

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

/* Hamburger to X Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  flex-direction: column;
  background: var(--primary-dark);
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 999;
  text-align: center;
  padding: 0;
  transition: max-height 0.5s ease;
}

.mobile-menu a {
  padding: 1rem;
  text-decoration: none;
  color: #fff;
  font-size: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu.active {
  max-height: 300px;
  padding: 1rem 0;
}

/* Banner + Page Header */
.banner {
  display: inline-block;
  background: #007acc;
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: bold;
  margin: 2rem auto 1rem auto;
  font-size: 1rem;
  text-align: center;
}

.page-header {
  text-align: center;
  margin: 0 auto 2rem auto;
  padding: 0 1rem;
  max-width: 800px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--text-color);
  opacity: 0.8;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: #fff;
}

/* Resources Grid + Cards */
.resources-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 1rem;
}

.resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.5s ease;
  will-change: transform;
  perspective: 1000px;
}

.resource-card:hover {
  transform: translateY(-8px) rotateY(3deg) rotateX(3deg);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.resource-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.resource-card:hover .resource-icon {
  color: #ffd700;
  transform: scale(1.2);
}

/* Gradients for Card Types */
.type-printable {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
}
.type-digital {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}
.type-safety {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
}
.type-weather {
  background: linear-gradient(135deg, #43cea2, #185a9d);
}
.type-metar {
  background: linear-gradient(135deg, #7b4397, #dc2430);
}
.type-atc {
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
}
.type-volmet {
  background: linear-gradient(135deg, #56ccf2, #2f80ed);
}
.type-acronyms {
  background: linear-gradient(135deg, #654ea3, #eaafc8);
}
.type-games {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
}

/* Quiz / Weather Game Custom Styles */
.quiz-container {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1rem;
  text-align: center;
}

.question {
  background: var(--primary-dark);
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.options {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.option-btn {
  padding: 1rem;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.option-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.option-btn.correct {
  background: var(--accent-correct);
}

.option-btn.wrong {
  background: var(--accent-wrong);
}

.progress-bar {
  height: 20px;
  width: 100%;
  background-color: var(--progress-bg);
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

.result {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0;
}

.help-section {
  margin: 2rem auto;
  padding: 1rem;
  background: rgba(0, 122, 204, 0.1);
  border-left: 5px solid var(--primary-dark);
  border-radius: 10px;
  text-align: left;
}

/* Fireworks animation */
.firework {
  position: fixed;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ff0, #f00, #0f0, #00f);
  border-radius: 50%;
  animation: explode 1.5s linear forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes explode {
  0% {
    transform: scale(0) translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: scale(3) translate(-50px, -50px);
    opacity: 0;
  }
}

/* Badge style */
.badge {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(45deg, gold, orange);
  color: #000;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 50px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Responsive Options Grid */
@media (min-width: 600px) {
  .options {
    grid-template-columns: 1fr 1fr;
  }
}
.option-btn {
  padding: 1rem;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, opacity 0.3s;
}

/* Pulse Animation for Click */
.pulse {
  animation: pulseGrow 0.3s ease;
}

@keyframes pulseGrow {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.option-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.option-btn.correct {
  background: var(--accent-correct);
}

.option-btn.wrong {
  background: var(--accent-wrong);
}
.progress {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.4s ease; /* <-- Animate progress fill */
}