/* ==========================================================================
   SimuFPV Design System & Shared Styles
   Dark sci-fi / glassmorphism theme (Emerald & Sky Cyan accents)
   ========================================================================== */

:root {
    --bg-dark: #022c22;
    --bg-surface: rgba(1, 29, 22, 0.88);
    --bg-surface-elevated: rgba(2, 44, 34, 0.85);
    --bg-card: rgba(15, 23, 42, 0.8);
    
    --border-subtle: rgba(52, 211, 153, 0.25);
    --border-accent: rgba(52, 211, 153, 0.45);
    --border-cyan: rgba(56, 189, 248, 0.4);

    --text-main: #ecfdf5;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-highlight: #f0fdf4;

    --accent-emerald: #10b981;
    --accent-emerald-light: #34d399;
    --accent-emerald-bright: #6ee7b7;
    --accent-cyan: #38bdf8;

    --glow-emerald: 0 0 15px rgba(16, 185, 129, 0.4);
    --glow-cyan: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Reset de base & Typographie */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at 50% 15%, #0f172a 0%, #022c22 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Layouts & Conteneurs (index & config)
   -------------------------------------------------------------------------- */
.simu-page-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.simu-container {
    max-width: 760px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.simu-container-sm {
    max-width: 540px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

/* Header & Titres */
.simu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    padding: 12px 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.simu-header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-emerald-light);
    letter-spacing: 0.5px;
}

.hero-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-emerald-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.hero-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Boutons & Éléments interactifs
   -------------------------------------------------------------------------- */
.btn-nav {
    text-decoration: none;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-cyan);
    color: var(--accent-cyan);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-nav:hover {
    border-color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.15);
}

.btn-wizard {
    background: var(--accent-emerald);
    color: #022c22;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
    transition: transform 0.15s, background 0.15s;
}

.btn-wizard:hover {
    background: var(--accent-emerald-light);
    transform: scale(1.03);
}

.btn-action-sm {
    background: transparent;
    border: 1px solid var(--border-accent);
    color: #a7f3d0;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-action-sm:hover {
    background: rgba(52, 211, 153, 0.15);
    border-color: var(--accent-emerald-light);
}

/* --------------------------------------------------------------------------
   Cartes & Widgets
   -------------------------------------------------------------------------- */
.card-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-cyan);
    border-radius: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}

.card-menu:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
    box-shadow: 0 14px 30px -6px rgba(56, 189, 248, 0.3);
}

.card-menu.secondary {
    border-color: var(--border-subtle);
}

.card-menu.secondary:hover {
    border-color: var(--accent-emerald-light);
    box-shadow: 0 14px 30px -6px rgba(52, 211, 153, 0.3);
}

.card-img {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-text {
    text-align: left;
    flex-grow: 1;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.arrow {
    font-size: 1.4rem;
    color: var(--accent-cyan);
    font-weight: bold;
    padding: 0 4px;
    transition: transform 0.2s ease;
}

.card-menu:hover .arrow {
    transform: translateX(4px);
}

.secondary .arrow {
    color: var(--accent-emerald-light);
}

.footer-muted {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 6px;
}

/* Banner Wizard */
.wizard-card {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.4) 0%, rgba(2, 44, 34, 0.85) 100%);
    border: 2px solid var(--accent-emerald);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}

.wizard-card h2 {
    font-size: 1.3rem;
    color: var(--text-highlight);
    margin-bottom: 4px;
}

.wizard-card p {
    font-size: 0.88rem;
    color: #a7f3d0;
}

/* Device Status Bar */
.device-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid transparent;
}

/* Grille des Axes & jauges */
.axes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .axes-grid { grid-template-columns: 1fr 1fr; }
}

.axis-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.axis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.axis-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-highlight);
}

.axis-channel {
    font-size: 0.8rem;
    color: var(--accent-emerald-light);
    font-family: monospace;
}

.meter-track {
    position: relative;
    width: 100%;
    height: 12px;
    background: rgba(2, 44, 34, 0.9);
    border: 1px solid var(--border-accent);
    border-radius: 9999px;
    overflow: hidden;
}

.meter-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.meter-fill {
    position: absolute;
    height: 100%;
    background: var(--accent-emerald);
    border-radius: 9999px;
    transition: width 0.05s linear, left 0.05s linear;
}

.axis-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.card-active {
    border-color: var(--accent-emerald-light) !important;
    background: rgba(6, 78, 59, 0.8) !important;
}

/* Modal Wizard Calibration */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: #022c22;
    border: 2px solid var(--accent-emerald-light);
    border-radius: 22px;
    max-width: 540px;
    width: 100%;
    padding: 26px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 0 50px rgba(52, 211, 153, 0.35);
    animation: popInScale 0.2s ease-out;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-emerald-light);
}

.modal-instruction {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 600;
}

.timer-badge {
    font-size: 0.9rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.timer-waiting {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #fbbf24;
}

.timer-ready {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald-bright);
    animation: pulseGlow 1s infinite alternate;
}

.timer-done {
    background: var(--accent-emerald);
    color: #022c22;
}

/* Visual Sticks (Dual config modal) */
.sticks-vis-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 12px;
    background: rgba(1, 20, 15, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    width: 100%;
}

.stick-unit-vis {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stick-unit-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stick-disc {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #064e3b 40%, #022c22 100%);
    border: 2px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stick-active-target .stick-disc {
    border-color: var(--accent-emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.6);
}

.stick-active-target .stick-unit-label {
    color: var(--accent-emerald-light);
}

.crosshair-h {
    position: absolute;
    top: 50%;
    left: 15%;
    width: 70%;
    height: 1px;
    background: var(--border-subtle);
}

.crosshair-v {
    position: absolute;
    left: 50%;
    top: 15%;
    height: 70%;
    width: 1px;
    background: var(--border-subtle);
}

.stick-knob-vis {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-emerald-light) 0%, #059669 100%);
    border: 2px solid #a7f3d0;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-box-vis {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--accent-emerald-light);
    font-weight: 800;
    font-size: 0.9rem;
}

.modal-progress {
    font-size: 0.82rem;
    color: var(--accent-emerald-bright);
    font-weight: 700;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #059669;
    color: var(--text-main);
    border: 1.5px solid var(--accent-emerald-light);
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

/* --------------------------------------------------------------------------
   Simulateur 3D & HUD OSD (/simufpv/simu)
   -------------------------------------------------------------------------- */
body.simu-app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #022c22;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#viewport-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

#viewport-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.hud-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(2, 44, 34, 0.92) 0%, rgba(2, 44, 34, 0.65) 80%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-accent);
    z-index: 20;
    pointer-events: auto;
}

.hud-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: var(--text-highlight);
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.badge-acro {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(220, 38, 38, 0.25);
    border: 1px solid #ef4444;
    color: #fca5a5;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.badge-mode {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.25);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald-bright);
    font-weight: 800;
}

/* OSD Telemetrie FPV */
.osd-spd {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(2, 44, 34, 0.6);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-accent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 15;
    pointer-events: none;
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-emerald-light);
    text-shadow: 1px 1px 2px #000, 0 0 8px rgba(52, 211, 153, 0.6);
}

.osd-gates {
    position: absolute;
    top: 64px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(2, 44, 34, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-accent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 15;
    pointer-events: none;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-emerald-light);
    text-shadow: 1px 1px 2px #000, 0 0 8px rgba(52, 211, 153, 0.6);
}

/* Réticule & Horizon OSD */
.crosshair-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

.crosshair-center::before, .crosshair-center::after {
    content: '';
    position: absolute;
    background: rgba(52, 211, 153, 0.85);
    box-shadow: 0 0 6px var(--accent-emerald);
}

.crosshair-center::before {
    top: 17px; left: 0; width: 36px; height: 2px;
}

.crosshair-center::after {
    left: 17px; top: 0; width: 2px; height: 36px;
}

.crosshair-dot {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald-bright);
    box-shadow: 0 0 8px var(--accent-emerald-light);
}

#horizon-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 2px;
    background: var(--border-accent);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
    pointer-events: none;
    z-index: 8;
    transform-origin: center center;
}

/* Boutons Actions HUD */
.hud-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hud-btn {
    background: rgba(6, 78, 59, 0.85);
    border: 1px solid var(--border-accent);
    color: var(--text-highlight);
    padding: 7px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.hud-btn:active {
    background: var(--accent-emerald);
    color: #022c22;
    transform: scale(0.95);
}

.hud-btn:hover {
    background: var(--accent-emerald);
    color: #022c22;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.hud-btn-icon {
    padding: 7px 10px;
    font-size: 1.05rem;
    line-height: 1;
    justify-content: center;
    min-width: 36px;
}

/* Alertes & Notifications Simu */
#hud-crash-alert {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.88);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.12rem;
    border: 2px solid #f87171;
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.8);
    display: none;
    z-index: 30;
    animation: popIn 0.2s ease;
    text-align: center;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
}

#hud-ring-notice {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 150, 105, 0.88);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    border: 2px solid var(--accent-emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.8);
    display: none;
    z-index: 30;
    animation: popIn 0.2s ease;
}

/* Joysticks tactiles Mode 2 */
.sticks-overlay {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 25;
    pointer-events: none;
}

.stick-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.stick-label {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--accent-emerald-bright);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    background: rgba(2, 44, 34, 0.75);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-accent);
}

.stick-base {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 78, 59, 0.55) 0%, rgba(2, 44, 34, 0.9) 100%);
    border: 2.5px solid rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.6);
    position: relative;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stick-cross {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stick-cross::before {
    content: '';
    position: absolute;
    top: 50%; left: 10%; width: 80%; height: 1px;
    background: var(--border-subtle);
}

.stick-cross::after {
    content: '';
    position: absolute;
    left: 50%; top: 10%; height: 80%; width: 1px;
    background: var(--border-subtle);
}

.stick-knob {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-emerald-light) 0%, #059669 100%);
    border: 2px solid #a7f3d0;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5);
    position: absolute;
    pointer-events: none;
    transition: transform 0.04s ease-out;
}

#stick-left-knob {
    transform: translate(0px, 45px); /* Gaz à 0 par défaut */
}

/* Aide touches Desktop */
.desktop-help {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: #a7f3d0;
    background: rgba(2, 44, 34, 0.85);
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid var(--border-accent);
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* Media Queries Simu */
@media (max-width: 768px) {
    .desktop-help { display: none; }
    .hud-bar { padding: 0 8px; height: 50px; }
    .hud-logo { font-size: 0.88rem; gap: 5px; }
    .badge-acro, .badge-mode { font-size: 0.65rem; padding: 2px 5px; }
    .hud-actions { gap: 5px; }
    .hud-btn { padding: 6px 9px; font-size: 0.78rem; border-radius: 8px; }
    .osd-spd { bottom: 16px; font-size: 0.88rem; padding: 4px 10px; }
    .osd-gates { top: 56px; right: 8px; font-size: 0.85rem; padding: 4px 8px; }
    .sticks-overlay { padding: 0 10px; bottom: 14px; }
    .stick-base { width: 125px; height: 125px; }
    .stick-knob { width: 48px; height: 48px; }
}

/* Animations partagées */
@keyframes popIn {
    from { transform: translateX(-50%) scale(0.85); opacity: 0; }
    to { transform: translateX(-50%) scale(1); opacity: 1; }
}

@keyframes popInScale {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
    to { box-shadow: 0 0 25px rgba(16, 185, 129, 0.8); }
}

/* --------------------------------------------------------------------------
   Sélection des Mondes (index.py)
   -------------------------------------------------------------------------- */
.worlds-selection-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.worlds-header-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-emerald-light);
    text-align: left;
    padding-left: 4px;
}

.world-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.world-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-emerald-bright);
    box-shadow: 0 14px 30px -6px rgba(52, 211, 153, 0.35);
}

.world-card.neon-theme {
    border-color: var(--border-cyan);
}

.world-card.neon-theme:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 14px 30px -6px rgba(56, 189, 248, 0.35);
}

.world-card-icon {
    font-size: 2.2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    flex-shrink: 0;
}

.world-subtitle {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.world-diff {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.world-diff.intermediate {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.world-diff.advanced {
    background: rgba(225, 29, 72, 0.2);
    border: 1px solid rgba(225, 29, 72, 0.5);
    color: #fda4af;
}

.world-gates-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 6px;
}

.hud-btn-badge {
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* --------------------------------------------------------------------------
   Rates Panel (Betaflight Actual Rates)
   -------------------------------------------------------------------------- */
.rates-panel {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-cyan);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}

.rates-header-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 1fr;
    background: rgba(56, 189, 248, 0.08);
    border-bottom: 1px solid var(--border-cyan);
    padding: 10px 12px;
    gap: 4px;
}

.rates-col-header {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rates-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 1fr;
    align-items: center;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    padding: 8px 12px;
    gap: 4px;
    transition: background 0.15s ease;
}

.rates-row:last-child {
    border-bottom: none;
}

.rates-row:hover {
    background: rgba(56, 189, 248, 0.04);
}

.rates-axis-label {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.rates-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rate-value {
    min-width: 42px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
}

.rate-value-editable {
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.12s ease, color 0.12s ease;
    padding: 2px 4px;
}

.rate-value-editable:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.rate-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent-cyan);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    line-height: 1;
    padding: 0;
}

.rate-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--accent-cyan);
    transform: scale(1.1);
}

.rate-btn:active {
    transform: scale(0.95);
}
