:root {
  --bg: #05070b; --card: #0c1218; --border: #1a2530;
  --text: #e8eef5; --muted: #8a9bb0; --accent: #3d9eff;
  --light: #3dd68c; --med: #5b9bd5; --heavy: #c77dff;
  --int: #ff6b6b; --atk: #f0a030;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, #0a1a30 0%, transparent 50%),
                    radial-gradient(ellipse 60% 40% at 100% 100%, #081018 0%, transparent 50%);
  min-height: 100vh;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(61,158,255,0.015) 2px, rgba(61,158,255,0.015) 4px);
  pointer-events: none;
  z-index: 1;
  animation: scan 8s linear infinite;
}
@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}
header, main, footer { position: relative; z-index: 2; }
header {
  background: rgba(5,8,12,0.92); border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
}
header h1, .hero h2 { font-family: "Orbitron", system-ui, sans-serif; font-size: 1.4rem; letter-spacing: 0.18em; font-weight: 800; background: linear-gradient(180deg, #e8eef5 0%, #c0d0e0 25%, #7eb8ff 55%, #3d9eff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
nav { display: flex; gap: 1.1rem; margin-top: 0.5rem; font-size: 0.85rem; flex-wrap: wrap; }
nav a { color: var(--accent); text-decoration: none; }
nav a:hover, nav a.active { text-decoration: underline; color: #fff; }
.hero { text-align: center; padding: 3.5rem 1.5rem 2.5rem; }
.hero h2 { font-size: 2.4rem; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }
main { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
h2.sec { font-size: 1.35rem; margin-bottom: 0.9rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
h3 { margin: 0.8rem 0 0.4rem; font-size: 1.05rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.15rem 1.25rem; margin-bottom: 0.85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.plane { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; border-left: 3px solid var(--muted); }
.plane.light { border-left-color: var(--light); }
.plane.med { border-left-color: var(--med); }
.plane.heavy { border-left-color: var(--heavy); }
.plane.int { border-left-color: var(--int); }
.plane.atk { border-left-color: var(--atk); }
.plane h3 { font-size: 0.98rem; margin-bottom: 0.15rem; }
.meta { color: var(--muted); font-size: 0.78rem; margin-bottom: 0.4rem; }
.pro { color: var(--light); font-size: 0.82rem; }
.con { color: var(--atk); font-size: 0.82rem; }
ul { padding-left: 1.15rem; }
li { margin-bottom: 0.3rem; }
.note { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }
a.ext { color: var(--accent); }
.tag { display: inline-block; font-size: 0.68rem; padding: 0.08rem 0.35rem; border-radius: 3px; margin-right: 0.25rem; background: #15202c; color: var(--muted); }
button, input, select { padding: 0.45rem 0.7rem; background: #0e1620; color: var(--text); border: 1px solid #243040; border-radius: 5px; cursor: pointer; font-size: 0.85rem; }
button:hover { border-color: var(--accent); }
.hero-img { width:100%; max-height:300px; object-fit:cover; border-radius:12px; margin-bottom:1.5rem; border:1px solid var(--border); }
.section-graphic { width:100%; max-height:320px; object-fit:contain; margin-bottom:1rem; border-radius:8px; }
header img { height:48px; width:auto; }
footer { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.tool-box { background: #0a1018; border: 1px solid #243040; border-radius: 8px; padding: 1rem; margin-top: 0.6rem; }
#output { min-height: 1.2em; margin-top: 0.5rem; color: var(--accent); }

/* Animations */
.card, .plane {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.plane.light:hover { border-left-color: var(--light); box-shadow: 0 8px 24px rgba(61, 214, 140, 0.18); }
.plane.med:hover { border-left-color: var(--med); box-shadow: 0 8px 24px rgba(91, 155, 213, 0.18); }
.plane.heavy:hover { border-left-color: var(--heavy); box-shadow: 0 8px 24px rgba(199, 125, 255, 0.18); }
.plane.int:hover { border-left-color: var(--int); box-shadow: 0 8px 24px rgba(255, 107, 107, 0.18); }
.plane.atk:hover { border-left-color: var(--atk); box-shadow: 0 8px 24px rgba(240, 160, 48, 0.18); }
.filter-bar { margin: 1rem 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-bar button { font-size: 0.8rem; }
.filter-bar button.active { border-color: var(--accent); color: #fff; }
@media print {
  header, nav, footer, .filter-bar, .section-graphic, .hero-img { display: none; }
  body { background: #fff; color: #000; }
  .card, .plane { border: 1px solid #ccc; break-inside: avoid; }
}
.section-graphic, .hero-img {
  animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
nav a {
  transition: color 0.2s ease;
}

/* Tablet */
@media (max-width: 900px) {
  main { padding: 1.25rem 1rem 2.5rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero h2 { font-size: 2rem; }
  header { padding: 0.9rem 1rem; }
  nav { gap: 0.9rem; }
}

/* Mobile */
@media (max-width: 600px) {
  header { padding: 0.75rem 0.85rem; }
  header h1 { font-size: 1.15rem; }
  header img { height: 40px; }
  nav { gap: 0.7rem; font-size: 0.8rem; }
  .hero { padding: 2rem 0.75rem 1.5rem; }
  .hero h2 { font-size: 1.7rem; }
  .hero p { font-size: 0.95rem; }
  main { padding: 1rem 0.75rem 2rem; }
  .card { padding: 1rem; }
  .grid { grid-template-columns: 1fr; }
  .section-graphic { max-height: 140px; }
  .hero-img { max-height: 200px; }
  button, input, select { padding: 0.5rem 0.65rem; font-size: 0.9rem; }
}
/* Stronger animations */
body::before {
  background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(61,158,255,0.04) 1px, rgba(61,158,255,0.04) 3px);
  animation: scan 4s linear infinite;
  opacity: 0.7;
}
@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(6px); }
}
.section-graphic, .hero-img {
  animation: fadeIn 0.8s ease-out, pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(61, 158, 255, 0.15); }
  50% { box-shadow: 0 0 24px rgba(61, 158, 255, 0.35); }
}
.card, .plane {
  animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
header h1, .hero h2 {
  animation: titlePulse 3s ease-in-out infinite;
}
@keyframes titlePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

/* Radar / minimap background */
body::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, transparent 30%, rgba(61,158,255,0.03) 31%, transparent 32%),
    radial-gradient(circle, transparent 50%, rgba(61,158,255,0.04) 51%, transparent 52%),
    radial-gradient(circle, transparent 70%, rgba(61,158,255,0.05) 71%, transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: radarSpin 20s linear infinite;
  opacity: 0.6;
}
@keyframes radarSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
header, main, footer { position: relative; z-index: 2; }

/* Pop animations */
body::before {
  background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(61,158,255,0.08) 1px, rgba(61,158,255,0.08) 3px);
  animation: scan 2.5s linear infinite;
  opacity: 0.85;
}
body::after {
  background:
    radial-gradient(circle, transparent 28%, rgba(61,158,255,0.08) 29%, transparent 30%),
    radial-gradient(circle, transparent 48%, rgba(61,158,255,0.10) 49%, transparent 50%),
    radial-gradient(circle, transparent 68%, rgba(61,158,255,0.12) 69%, transparent 70%);
  animation: radarSpin 12s linear infinite;
  opacity: 0.85;
}
.section-graphic, .hero-img {
  animation: fadeIn 0.6s ease-out, pulseGlow 2.5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(61, 158, 255, 0.25); }
  50% { box-shadow: 0 0 36px rgba(61, 158, 255, 0.55); }
}
header h1, .hero h2 {
  animation: titlePulse 2s ease-in-out infinite;
}
@keyframes titlePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* Extra effects */
nav a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent);
  transform: translateY(-1px);
}
button {
  transition: all 0.2s ease;
}
button:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61, 158, 255, 0.3);
}
.card, .plane {
  position: relative;
  overflow: hidden;
}
.card::after, .plane::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(61,158,255,0.08), transparent);
  transition: left 0.6s ease;
}
.card:hover::after, .plane:hover::after {
  left: 100%;
}
header {
  box-shadow: 0 2px 20px rgba(61, 158, 255, 0.15);
  animation: headerGlow 4s ease-in-out infinite;
}
@keyframes headerGlow {
  0%, 100% { box-shadow: 0 2px 20px rgba(61, 158, 255, 0.15); }
  50% { box-shadow: 0 2px 28px rgba(61, 158, 255, 0.28); }
}

/* Bright animations for dark background */
body::before {
  background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(100,180,255,0.12) 1px, rgba(100,180,255,0.12) 3px);
  animation: scan 2s linear infinite;
  opacity: 0.9;
}
body::after {
  background:
    radial-gradient(circle, transparent 26%, rgba(100,180,255,0.14) 27%, transparent 28%),
    radial-gradient(circle, transparent 46%, rgba(100,180,255,0.16) 47%, transparent 48%),
    radial-gradient(circle, transparent 66%, rgba(100,180,255,0.18) 67%, transparent 68%);
  animation: radarSpin 10s linear infinite;
  opacity: 0.9;
}
.section-graphic, .hero-img {
  animation: fadeIn 0.6s ease-out, pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(100, 180, 255, 0.35); }
  50% { box-shadow: 0 0 40px rgba(100, 180, 255, 0.7); }
}
header h1, .hero h2 {
  animation: titlePulse 1.8s ease-in-out infinite;
}
@keyframes titlePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}
.card:hover, .plane:hover {
  box-shadow: 0 8px 28px rgba(100, 180, 255, 0.25);
}
nav a.active {
  text-shadow: 0 0 10px var(--accent);
}
