:root {
  --bg: #061120;
  --panel: #0d1c31;
  --panel-2: #112744;
  --line: #244061;
  --text: #edf5ff;
  --muted: #9eb5d2;
  --accent: #5dc7ff;
  --accent-2: #7ff0b3;
  --warn: #ffd166;
  --danger: #ff8b8b;
  --success: #7ff0b3;
  --shadow: 0 24px 60px rgba(0,0,0,.28);
  --radius: 24px;
  --font: Inter, system-ui, sans-serif;
}
*{box-sizing:border-box}
body{margin:0;font-family:var(--font);color:var(--text);background:radial-gradient(circle at top, #102846, var(--bg) 46%)}
.app-shell{max-width:1450px;margin:0 auto;padding:24px}
.topbar,.panel-head,.action-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.topbar{margin-bottom:18px}.topbar-right,.mission-meta,.filter-row{display:flex;gap:10px;flex-wrap:wrap}
.eyebrow{margin:0 0 6px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-size:.72rem}
h1,h2,h3,p{margin-top:0} h1{margin-bottom:6px;font-size:2.4rem}
.subtitle,.mission-text{color:var(--muted);max-width:70ch}
.layout{display:grid;grid-template-columns:1.06fr .94fr;gap:18px}
.panel{background:linear-gradient(180deg,var(--panel),var(--panel-2));border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.mission-panel,.diagnostics-panel,.anatomy-panel{grid-column:1/-1}
.pill,.meta-chip,.filter-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.05)}
.pill.muted{color:var(--muted)} .pill.success{color:#0a3320;background:var(--success)}
.primary-btn,.ghost-btn,.install-btn,.anatomy-btn{border:none;border-radius:999px;padding:11px 16px;font-weight:700;cursor:pointer}
.primary-btn{background:linear-gradient(90deg,var(--accent),#9ce1ff);color:#072236}
.ghost-btn,.install-btn,.anatomy-btn,.filter-chip{background:rgba(255,255,255,.05);color:var(--text);border:1px solid var(--line)}
.parts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.part-card,.fault-item,.telemetry-card,.tip-box,.anatomy-item{border:1px solid var(--line);background:rgba(255,255,255,.035);border-radius:18px;padding:14px}
.part-card.active{outline:2px solid var(--accent-2);background:rgba(127,240,179,.08)}
.part-card h4,.anatomy-item h4{margin:0 0 6px}
.part-card p,.fault-item span,.fault-item em,.telemetry-card span,.tip-box p,.anatomy-item p,.anatomy-detail p{color:var(--muted)}
.part-card .install-btn{margin-top:8px;width:100%}.fault-item.good{border-color:rgba(127,240,179,.55);background:rgba(127,240,179,.08)}
.part-card .part-hint{font-size:.85rem;color:var(--accent);font-weight:600}
.sky-scene{position:relative;min-height:320px;overflow:hidden;border-radius:18px;border:1px solid var(--line);background:linear-gradient(180deg,#76d2ff 0%,#c7f0ff 45%,#ebfbff 64%,#86ce79 65%,#5da85f 100%)}
.sun{position:absolute;width:82px;height:82px;border-radius:50%;background:#ffe075;top:20px;right:32px;box-shadow:0 0 30px rgba(255,224,117,.72)}
.cloud{position:absolute;background:rgba(255,255,255,.92);border-radius:999px}.cloud::before,.cloud::after{content:'';position:absolute;background:inherit;border-radius:50%}
.cloud-a{width:130px;height:36px;left:36px;top:48px}.cloud-a::before{width:44px;height:44px;left:18px;top:-15px}.cloud-a::after{width:56px;height:56px;right:18px;top:-22px}
.cloud-b{width:100px;height:30px;right:200px;top:106px}.cloud-b::before{width:36px;height:36px;left:12px;top:-12px}.cloud-b::after{width:48px;height:48px;right:8px;top:-19px}
.mountain{position:absolute;bottom:35%;width:0;height:0;border-left:120px solid transparent;border-right:120px solid transparent;border-bottom:170px solid #91a8bd;opacity:.5}.mountain-a{left:68px}.mountain-b{right:92px;border-bottom-color:#7a93ab}
.plane{position:absolute;left:48%;top:56%;transform:translate(-50%,-50%);width:390px;height:170px}.plane-shadow{position:absolute;width:220px;height:28px;left:82px;bottom:8px;background:rgba(0,0,0,.16);filter:blur(7px);border-radius:50%}
.fuselage{position:absolute;width:236px;height:54px;left:80px;top:58px;background:linear-gradient(180deg,#f5fbff,#d8ebff);border:2px solid #8db4d6;border-radius:48px 88px 60px 34px}
.nose{position:absolute;width:48px;height:32px;left:300px;top:69px;background:linear-gradient(180deg,#f3f9ff,#d8ebff);border:2px solid #8db4d6;border-left:none;border-radius:0 30px 30px 0}
.cockpit{position:absolute;width:58px;height:30px;left:220px;top:52px;background:linear-gradient(180deg,#88b8e1,#4e7ea8);border-radius:30px 30px 8px 8px}
.stripe{position:absolute;width:170px;height:8px;left:116px;top:86px;background:linear-gradient(90deg,#49c7ff,#7ff0b3);border-radius:999px}
.wing{position:absolute;width:132px;height:18px;top:83px;background:linear-gradient(180deg,#f3fbff,#d4e7f7);border:2px solid #8db4d6}.wing.left{left:32px;transform:rotate(-11deg);border-radius:18px 8px 8px 18px}.wing.right{right:46px;transform:rotate(11deg);border-radius:8px 18px 18px 8px}
.tail-v{position:absolute;width:24px;height:56px;left:78px;top:23px;background:linear-gradient(180deg,#f5fbff,#d8ebff);border:2px solid #8db4d6;border-radius:12px 12px 0 0}
.tail-h{position:absolute;width:74px;height:12px;left:35px;top:62px;background:linear-gradient(180deg,#f5fbff,#d8ebff);border:2px solid #8db4d6;border-radius:12px}
.engine{position:absolute;width:52px;height:42px;left:306px;top:60px;background:linear-gradient(180deg,#ffbf95,#ec7c45);border:2px solid #c76734;border-radius:18px}
.propeller{position:absolute;width:58px;height:58px;left:334px;top:52px}.propeller::before,.propeller::after{content:'';position:absolute;left:25px;top:0;width:8px;height:58px;background:#334759;border-radius:999px}.propeller::after{transform:rotate(90deg)}
.jet{position:absolute;width:54px;height:24px;left:286px;top:91px;background:linear-gradient(180deg,#cbd8e8,#9db2c7);border:2px solid #7b95ab;border-radius:14px}
.gear{position:absolute;width:8px;height:28px;background:#475f79;top:107px}.gear::after{content:'';position:absolute;width:22px;height:22px;left:-7px;bottom:-8px;border-radius:50%;background:#22303d;border:3px solid #91a5b8}.gear.nose{left:246px}.gear.left{left:125px}.gear.right{left:196px}
.cargo-box{position:absolute;width:42px;height:24px;left:138px;top:74px;background:#d39a4a;border:2px solid #9d6b29;border-radius:6px}
.radar{position:absolute;width:22px;height:22px;left:208px;top:37px;border-radius:50%;border:3px solid #55d3ff}.radar::after{content:'';position:absolute;left:7px;top:16px;width:4px;height:10px;background:#55d3ff}
.hidden{display:none}.telemetry{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}.telemetry-card{display:flex;flex-direction:column;gap:4px;text-align:center}.telemetry-card strong{font-size:1.45rem}
.diagnostics-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:16px}.fault-list{list-style:none;padding:0;margin:0;display:grid;gap:12px}.fault-item{display:flex;flex-direction:column;gap:6px}
.mentor-box,.mini-lesson{min-height:120px;border:1px solid var(--line);border-radius:18px;padding:16px;background:rgba(255,255,255,.04)}.tip-box{margin-top:12px}
.anatomy-shell{display:grid;grid-template-columns:.92fr 1.08fr;gap:16px}.anatomy-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}.anatomy-item.active{outline:2px solid var(--accent)}.anatomy-item .anatomy-btn{margin-top:8px;width:100%}.anatomy-detail{border:1px solid var(--line);border-radius:18px;padding:18px;background:rgba(255,255,255,.035)}.filter-chip.active{background:rgba(93,199,255,.14);outline:1px solid var(--accent)}

/* ===== ANIMATED MODE SELECTOR FOR KIDS ===== */
.mode-selector {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  position: relative;
  overflow: hidden;
}

.mode-selector::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: rgba(93, 199, 255, 0.1);
  border-radius: 50%;
  animation: float 4s ease-in-out infinite;
}

.mode-selector::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 80px;
  height: 80px;
  background: rgba(127, 240, 179, 0.1);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite alternate;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.mode-selector h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-selector h3::before {
  content: '🎮';
  font-size: 1.2rem;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.mode-card {
  padding: 20px 16px;
  border: 2px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: rgba(93, 199, 255, 0.08);
  box-shadow: 0 8px 24px rgba(93, 199, 255, 0.15);
}

.mode-card.active {
  border-color: var(--accent-2);
  background: rgba(127, 240, 179, 0.12);
  box-shadow: 0 8px 24px rgba(127, 240, 179, 0.2);
  transform: translateY(-2px);
}

.mode-card.active::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--accent-2);
  color: #0a3320;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.mode-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.mode-card:hover .mode-icon {
  transform: scale(1.1) rotate(5deg);
}

.mode-card.active .mode-icon {
  transform: scale(1.15);
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1.15); }
  50% { transform: scale(1.25); }
}

.mode-card[data-mode="training"] .mode-icon {
  background: linear-gradient(135deg, #7ff0b3, #5dc7ff);
}

.mode-card[data-mode="budget"] .mode-icon {
  background: linear-gradient(135deg, #ffd166, #ff8b8b);
}

.mode-card[data-mode="mission"] .mode-icon {
  background: linear-gradient(135deg, #ff8b8b, #ffd166);
}

.mode-card h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.05rem;
}

.mode-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.mode-difficulty {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 10px;
}

.difficulty-star {
  width: 12px;
  height: 12px;
  background: var(--line);
  border-radius: 50%;
  transition: background 0.3s ease;
}

.mode-card[data-mode="training"] .difficulty-star:nth-child(1) {
  background: var(--accent-2);
}

.mode-card[data-mode="budget"] .difficulty-star:nth-child(-n+2) {
  background: var(--warn);
}

.mode-card[data-mode="mission"] .difficulty-star {
  background: var(--danger);
}

.mode-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(93, 199, 255, 0.14);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mode-card[data-mode="training"] .mode-tag {
  background: rgba(127, 240, 179, 0.2);
  color: var(--accent-2);
}

.mode-card[data-mode="budget"] .mode-tag {
  background: rgba(255, 209, 102, 0.2);
  color: var(--warn);
}

.mode-card[data-mode="mission"] .mode-tag {
  background: rgba(255, 139, 139, 0.2);
  color: var(--danger);
}

.mode-explanation {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px dashed var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  position: relative;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mode-explanation::before {
  content: '💡';
  margin-right: 8px;
  font-size: 1.1rem;
}

.mode-explanation strong {
  color: var(--accent-2);
}

/* ===== REQUIRED PART HIGHLIGHTING ===== */
.part-card { position: relative; transition: all 0.25s ease; }
.part-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(93,199,255,.12); border-color: var(--accent); }
.part-card.required { border: 2px solid var(--warn); background: rgba(255,209,102,.08); animation: requiredPulse 1.8s ease-in-out infinite; }
.part-card.useful-fit { border: 2px solid var(--accent-2); background: rgba(127,240,179,.07); }
.part-card.required::before {
  content: 'REQUIRED';
  position: absolute; top: -10px; left: 14px;
  background: var(--warn); color: #3a2a00;
  font-size: .64rem; font-weight: 800; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(255,209,102,.35);
}
.part-card.useful-fit::before {
  content: 'GOOD FIT';
  position: absolute; top: -10px; left: 14px;
  background: var(--accent-2); color: #0a3320;
  font-size: .64rem; font-weight: 800; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 999px;
}
@keyframes requiredPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,209,102,0); }
  50% { box-shadow: 0 0 0 6px rgba(255,209,102,.12); }
}
.part-card.active { transform: translateY(-2px) scale(1.01); }

/* ===== MISSION PANEL TRANSITION ===== */
.mission-panel { animation: fadeUp 0.4s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.meta-chip { transition: transform .2s ease; }
.meta-chip:hover { transform: translateY(-2px); }

/* ===== AIRCRAFT LIVERY (visual differences per mission type) ===== */
.plane.livery-cargo .stripe { background: linear-gradient(90deg,#f5a623,#d97b0a); }
.plane.livery-cargo .fuselage { border-color: #d97b0a; }
.plane.livery-rescue .stripe { background: linear-gradient(90deg,#ff5c5c,#c81f1f); }
.plane.livery-rescue .fuselage { border-color: #c81f1f; }
.plane.livery-rescue::after {
  content: '+';
  position: absolute; left: 178px; top: 44px;
  width: 22px; height: 22px; border-radius: 6px;
  background: #ff5c5c; color: #fff; font-weight: 900;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.plane.livery-passenger .stripe { background: linear-gradient(90deg,#4aa8ff,#8fd0ff); }
.plane.livery-passenger .cockpit { background: linear-gradient(180deg,#bfe3ff,#5a94c9); }
.plane.livery-long_range .fuselage { width: 260px; }
.plane.livery-long_range .stripe { width: 190px; background: linear-gradient(90deg,#7ff0b3,#4ad1e0); }
.plane.livery-training .stripe { background: linear-gradient(90deg,#5dc7ff,#7ff0b3); }
.plane.livery-survey .stripe { background: linear-gradient(90deg,#c98bff,#5dc7ff); }
.plane.livery-survey .radar { border-color: #c98bff; }

.mission-type-tag {
  position: absolute; top: 6px; right: 10px;
  padding: 5px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  z-index: 5;
}

/* ===== ANATOMY: ICON CARDS + CAROUSEL ===== */
.anatomy-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}
.anatomy-list::-webkit-scrollbar { height: 8px; }
.anatomy-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.anatomy-item {
  flex: 0 0 168px;
  scroll-snap-align: start;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.anatomy-shell { min-width: 0; }
.anatomy-list {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.anatomy-item { min-width: 168px; }
.anatomy-item:hover { transform: translateY(-4px); border-color: var(--accent); }
.anatomy-item.active {
  border-color: var(--accent-2);
  background: rgba(127,240,179,.1);
  box-shadow: 0 10px 26px rgba(127,240,179,.18);
  transform: translateY(-2px) scale(1.02);
}
.anatomy-icon {
  width: 54px; height: 54px; margin: 0 auto 10px;
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform .3s ease;
}
.anatomy-item:hover .anatomy-icon { transform: scale(1.1) rotate(-4deg); }
.anatomy-item.active .anatomy-icon { animation: bounce 0.6s ease; }
.anatomy-detail { animation: fadeUp 0.35s ease; }
.anatomy-detail .anatomy-icon-big {
  width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ===== BUTTON + STATUS POLISH ===== */
.primary-btn { position: relative; overflow: hidden; }
.primary-btn:active::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,.35); border-radius: inherit;
  animation: rippleFade .5s ease;
}
@keyframes rippleFade { from { opacity: 1; } to { opacity: 0; } }
.pill.success { animation: starGlow 2.2s ease-in-out infinite; }
@keyframes starGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(127,240,179,0); }
  50% { box-shadow: 0 0 14px rgba(127,240,179,.55); }
}

@media (max-width: 1040px){
  .layout,.diagnostics-grid,.anatomy-shell{grid-template-columns:1fr}
  .telemetry{grid-template-columns:1fr 1fr 1fr}
  .plane{transform:translate(-50%,-50%) scale(.86)}
}

@media (max-width: 720px){
  .parts-grid,.anatomy-list{grid-template-columns:1fr}
  .telemetry{grid-template-columns:1fr}
  .topbar,.panel-head,.action-row{flex-direction:column;align-items:flex-start}
  .mode-cards{grid-template-columns:1fr}
}

/* ===== REALISTIC FLIGHT ANIMATIONS ===== */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rumble {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
}

@keyframes takeoff {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  15% { transform: translate(-50%, -52%) rotate(-2deg); }
  30% { transform: translate(-50%, -50%) rotate(1deg); }
  50% { transform: translate(-50%, -65%) rotate(-4deg); }
  75% { transform: translate(-50%, -80%) rotate(-6deg); }
  100% { transform: translate(-50%, -90%) rotate(-8deg); }
}

@keyframes shadowShrink {
  0% { opacity: 0.16; transform: scale(1); }
  50% { opacity: 0.08; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(0.3); }
}

@keyframes cloudScrollLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(-200%); }
}

@keyframes cloudScrollRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(200%); }
}

@keyframes mountainParallax {
  from { transform: translateX(0); }
  to { transform: translateX(-100px); }
}

@keyframes speedLine {
  0% { opacity: 0; transform: translateX(100%) scaleX(0); }
  20% { opacity: 1; transform: translateX(50%) scaleX(1); }
  80% { opacity: 1; transform: translateX(-50%) scaleX(1); }
  100% { opacity: 0; transform: translateX(-100%) scaleX(0); }
}

@keyframes exhaust {
  0% { opacity: 0; transform: translateX(0) scale(0.5); }
  50% { opacity: 1; transform: translateX(10px) scale(1); }
  100% { opacity: 0; transform: translateX(30px) scale(1.5); }
}

@keyframes gearTuck {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); opacity: 0.3; }
}

@keyframes particleBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0); }
}

@keyframes planeFloat {
  0%, 100% { transform: translate(-50%, -90%) rotate(-8deg); }
  50% { transform: translate(-50%, -88%) rotate(-7deg); }
}

@keyframes pulse {
  from { transform: scale(0.8); opacity: 0.3; }
  to { transform: scale(1.2); opacity: 0.6; }
}

@keyframes flyBy {
  0% { transform: translateX(0) scale(0.8); }
  100% { transform: translateX(450px) scale(0.8); }
}

.sky-scene {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2d5aa0 0%, #5d9be8 25%, #8bc5f5 45%, #b8dff5 65%, #a8d89a 70%, #7ac06a 85%, #5da85f 100%);
}

.sky-scene::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.4)'/%3E%3Ccircle cx='60' cy='15' r='1.5' fill='rgba(255,255,255,0.3)'/%3E%3Ccircle cx='80' cy='40' r='1' fill='rgba(255,255,255,0.5)'/%3E%3Ccircle cx='40' cy='60' r='1.5' fill='rgba(255,255,255,0.3)'/%3E%3Ccircle cx='10' cy='80' r='1' fill='rgba(255,255,255,0.4)'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.bird {
  position: absolute;
  opacity: 0.6;
  animation: flyBy 8s linear infinite;
}
.bird::before, .bird::after {
  content: '';
  position: absolute;
  width: 8px; height: 3px;
  background: #333;
  border-radius: 50%;
}
.bird::before { transform: rotate(-20deg); left: 0; }
.bird::after { transform: rotate(20deg); left: 6px; }
.bird-1 { top: 60px; left: -20px; animation-delay: 0s; }
.bird-2 { top: 80px; left: -40px; animation-delay: 3s; }

.speed-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  border-radius: 999px;
  opacity: 0;
}

.jet-exhaust {
  position: absolute;
  width: 20px; height: 6px;
  background: linear-gradient(90deg, rgba(255,180,100,0.8), rgba(255,100,50,0.4));
  border-radius: 50%;
  opacity: 0;
}

.engine-glow {
  position: absolute;
  width: 60px; height: 60px;
  left: 302px; top: 52px;
  background: radial-gradient(circle, rgba(255,180,100,0.3), transparent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.engine-glow.active {
  opacity: 1;
  animation: pulse 0.5s ease-in-out infinite alternate;
}

.ground-road {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(180deg, #6ab85a, #5a9a4a);
  border-top: 3px solid rgba(255,255,255,0.2);
}

.runway {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.runway-dash {
  width: 30px; height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 999px;
}

.plane.flying {
  animation: takeoff 2s ease-out forwards;
}

.plane.flying .plane-shadow {
  animation: shadowShrink 2s ease-out forwards;
}

.plane.floating {
  animation: planeFloat 3s ease-in-out infinite;
}

.plane.flying .gear,
.plane.floating .gear {
  animation: gearTuck 0.5s ease forwards;
}

.sky-scene.flying .cloud {
  animation: cloudScrollLeft 6s linear infinite;
}

.sky-scene.flying .cloud-b {
  animation: cloudScrollRight 8s linear infinite;
}

.sky-scene.flying .mountain {
  animation: mountainParallax 10s linear infinite;
}

.confetti {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 2px;
  opacity: 0;
}

.confetti.burst {
  animation: particleBurst 1s ease-out forwards;
}

.propeller.active::before {
  animation: spin 0.08s linear infinite;
}

@media (max-width: 1040px){
  .layout,.diagnostics-grid,.anatomy-shell{grid-template-columns:1fr}
  .telemetry{grid-template-columns:1fr 1fr 1fr}
  .plane{transform:translate(-50%,-50%) scale(.86)}
}
/* ===== NEON WIREFRAME ANATOMY (CAR ANATOMY STYLE) ===== */
.interactive-anatomy-board {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1120; /* Deep dark background to make neon pop */
  border: 2px solid #1e293b;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.anatomy-base-img {
  width: 100%;
  display: block;
}

/* Base style for the interactive wireframe groups */
.svg-part {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The neon glow effect on hover */
.svg-part:hover {
  /* Uses currentColor to inherit the specific stroke color of each part */
  filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 0 24px currentColor) brightness(1.3);
  transform: scale(1.02);
  transform-origin: center;
}

/* Make the text label brighter on hover */
.svg-part text {
  transition: all 0.3s ease;
  opacity: 0.8;
}

.svg-part:hover text {
  opacity: 1;
  font-weight: 900;
}

/* Optional pulsing animation for idle state to draw attention */
@keyframes neonPulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
  100% { opacity: 0.8; }
}

.svg-part {
  animation: neonPulse 4s infinite alternate;
}

/* ===== FLOATING HOVER TOOLTIP ===== */
.anatomy-tooltip {
  position: absolute;
  background: rgba(11, 17, 32, 0.95);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  pointer-events: none; /* Prevents the tooltip from blocking clicks */
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(93, 199, 255, 0.2);
  max-width: 320px; /* Increased from 260px to fit the function explanation better */
}

.anatomy-tooltip h4 {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 1.1rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
}

.anatomy-tooltip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ===== BUTTON CLOUD ===== */
.btn-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px 0;
}

.part-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.part-pill:hover {
  background: rgba(93, 199, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.part-pill.active {
  background: rgba(250, 204, 21, 0.15); /* Yellow tint */
  border: 2px solid #facc15; /* Yellow border */
  color: #facc15;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
}

/* ===== DASHED DETAIL BOX ===== */
.detail-box {
  border: 2px dashed #facc15;
  border-radius: 16px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  animation: fadeUp 0.3s ease;
}

.detail-box h3 {
  color: #facc15;
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-box p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text);
}

.detail-extra {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.anatomy-shell { min-width: 0; }
.anatomy-list {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.anatomy-item { min-width: 168px; }

