/* Sky Pilot - Enhanced Flight Simulator Styles */

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

#game-canvas {
    max-width: 100%;
    max-height: 100%;
}

/* ========================= */
/* MAIN MENU SCREEN          */
/* ========================= */

.main-menu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0d1b2a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.menu-title {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(111, 66, 193, 0.8), 0 0 60px rgba(111, 66, 193, 0.4);
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.menu-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.menu-btn {
    padding: 18px 60px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    min-width: 280px;
}

.menu-btn.primary {
    background: linear-gradient(135deg, #20c997, #17a881);
    color: #fff;
    box-shadow: 0 4px 20px rgba(32, 201, 151, 0.4);
}

.menu-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(32, 201, 151, 0.6);
}

.menu-btn.secondary {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: #fff;
    box-shadow: 0 4px 20px rgba(111, 66, 193, 0.4);
}

.menu-btn.secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(111, 66, 193, 0.6);
}

.menu-btn.tertiary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.menu-btn.tertiary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.menu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.menu-stats {
    display: flex;
    gap: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.menu-stat {
    text-align: center;
}

.menu-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #20c997;
    display: block;
}

.menu-stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================= */
/* MISSION SELECT SCREEN     */
/* ========================= */

.mission-select {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    padding: 40px;
    z-index: 300;
    overflow-y: auto;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.screen-header h2 {
    color: #fff;
    font-size: 2rem;
    margin: 0;
}

.back-btn {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mission-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mission-card:hover {
    transform: translateY(-5px);
    border-color: #6f42c1;
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.3);
}

.mission-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.mission-card.locked:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.mission-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.mission-name {
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.mission-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.mission-reward {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffc107;
    font-size: 0.9rem;
}

.mission-difficulty {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.mission-difficulty.easy {
    background: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.mission-difficulty.medium {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.mission-difficulty.hard {
    background: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.lock-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.lock-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ========================= */
/* HANGAR (AIRCRAFT SELECT)  */
/* ========================= */

.hangar-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    padding: 40px;
    z-index: 300;
    overflow-y: auto;
}

.aircraft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.aircraft-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.aircraft-card:hover:not(.locked) {
    transform: translateY(-5px);
    border-color: #20c997;
    box-shadow: 0 10px 30px rgba(32, 201, 151, 0.3);
}

.aircraft-card.selected {
    border-color: #20c997;
    background: rgba(32, 201, 151, 0.1);
}

.aircraft-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.aircraft-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 4rem;
}

.aircraft-name {
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.aircraft-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.aircraft-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.stat-bar {
    width: 80px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #20c997, #17a881);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.aircraft-unlock-level {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    background: rgba(111, 66, 193, 0.3);
    border-radius: 20px;
    color: #6f42c1;
    font-size: 0.75rem;
    font-weight: bold;
}

.select-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #20c997, #17a881);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-btn:hover {
    transform: translateY(-2px);
}

.select-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    transform: none;
}

/* ========================= */
/* ACHIEVEMENTS SCREEN       */
/* ========================= */

.achievements-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    padding: 40px;
    z-index: 300;
    overflow-y: auto;
}

.achievement-summary {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.summary-stat {
    text-align: center;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffc107;
}

.summary-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.achievement-card.unlocked {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.achievement-card.unlocked .achievement-icon {
    filter: none;
}

.achievement-icon {
    font-size: 3rem;
    filter: grayscale(100%);
    opacity: 0.5;
}

.achievement-card.unlocked .achievement-icon {
    filter: none;
    opacity: 1;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.achievement-xp {
    color: #ffc107;
    font-size: 0.9rem;
    font-weight: bold;
}

.achievement-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.achievement-status.locked {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.achievement-status.unlocked {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* ========================= */
/* ENHANCED HUD              */
/* ========================= */

.flight-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    z-index: 50;
}

.hud-left, .hud-center, .hud-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hud-center {
    align-items: center;
}

.hud-right {
    align-items: flex-end;
}

.hud-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hud-value {
    font-size: 20px;
    font-weight: bold;
}

.hud-label {
    font-size: 10px;
    color: #0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Score display */
.score-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.score-label {
    font-size: 0.7rem;
    color: rgba(255, 193, 7, 0.7);
    text-transform: uppercase;
}

/* Combo display */
.combo-display {
    padding: 5px 15px;
    background: rgba(220, 53, 69, 0.3);
    border-radius: 20px;
    border: 2px solid #dc3545;
    animation: pulse-combo 0.5s ease infinite;
}

.combo-display.hidden {
    display: none;
}

@keyframes pulse-combo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.combo-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #dc3545;
}

.combo-label {
    font-size: 0.7rem;
    color: rgba(220, 53, 69, 0.8);
}

/* Level/XP display */
.level-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 15px rgba(111, 66, 193, 0.5);
}

.xp-bar-container {
    width: 120px;
}

.xp-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #6f42c1, #9b59b6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.xp-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 3px;
}

/* Attitude Indicator (Artificial Horizon) */
.attitude-indicator {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #333;
    overflow: hidden;
    background: linear-gradient(to bottom, #4a9eff 50%, #8B4513 50%);
    z-index: 40;
    opacity: 0.8;
}

.attitude-indicator .horizon-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    transform-origin: center;
}

.attitude-indicator .wings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 4px;
    background: #ffc107;
}

.attitude-indicator .center-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #ffc107;
    border-radius: 50%;
}

/* Altimeter */
.altimeter {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px;
    z-index: 50;
}

.altimeter h4 {
    color: #0f0;
    font-size: 10px;
    margin: 0 0 5px 0;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.altimeter .scale {
    height: 150px;
    background: linear-gradient(to bottom, #4a9eff, #87CEEB);
    border-radius: 5px;
    position: relative;
}

.altimeter .marker {
    position: absolute;
    left: -5px;
    width: calc(100% + 10px);
    height: 3px;
    background: #ffc107;
}

.altimeter .value {
    text-align: center;
    color: #0f0;
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Speedometer */
.speedometer {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px;
    z-index: 50;
}

.speedometer h4 {
    color: #0f0;
    font-size: 10px;
    margin: 0 0 5px 0;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.speedometer .scale {
    height: 150px;
    background: linear-gradient(to bottom, #dc3545, #ffc107, #28a745);
    border-radius: 5px;
    position: relative;
}

.speedometer .marker {
    position: absolute;
    left: -5px;
    width: calc(100% + 10px);
    height: 3px;
    background: #fff;
}

.speedometer .value {
    text-align: center;
    color: #0f0;
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Throttle control */
.throttle-control {
    position: absolute;
    left: 120px;
    bottom: 20px;
    width: 30px;
    height: 150px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 5px;
    z-index: 50;
}

.throttle-control h4 {
    color: #0f0;
    font-size: 8px;
    text-align: center;
    margin: 5px 0;
    font-family: 'Courier New', monospace;
}

.throttle-slider {
    height: 120px;
    margin: 0 5px;
    background: linear-gradient(to bottom, #dc3545, #ffc107, #28a745);
    border-radius: 3px;
    position: relative;
}

.throttle-handle {
    position: absolute;
    left: -3px;
    width: calc(100% + 6px);
    height: 10px;
    background: #fff;
    border-radius: 2px;
    cursor: pointer;
}

/* Compass */
.compass {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 30px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 5px;
    overflow: hidden;
    z-index: 50;
}

.compass-strip {
    display: flex;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: nowrap;
}

.compass-marker {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffc107;
}

/* Mission info panel */
.mission-panel {
    position: absolute;
    top: 110px;
    right: 20px;
    width: 200px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px;
    z-index: 50;
}

.mission-panel h4 {
    color: #ffc107;
    font-size: 13px;
    margin: 0 0 12px 0;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mission-panel .objective {
    color: #0f0;
    font-size: 12px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.mission-panel .progress-text {
    color: #17a2b8;
    font-size: 11px;
    margin-top: 10px;
}

.mission-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.mission-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #20c997, #17a881);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Challenge timer panel */
.challenge-panel {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 180px;
    background: rgba(220, 53, 69, 0.9);
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 15px;
    z-index: 60;
    animation: slide-in-left 0.3s ease;
}

@keyframes slide-in-left {
    from { transform: translateY(-50%) translateX(-100%); opacity: 0; }
    to { transform: translateY(-50%) translateX(0); opacity: 1; }
}

.challenge-panel h4 {
    color: #fff;
    font-size: 12px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.challenge-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

.challenge-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

.challenge-reward {
    color: #ffc107;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
}

/* Controls help */
.controls-help {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 25px;
    border-radius: 10px;
    color: #aaa;
    font-size: 11px;
    z-index: 50;
    text-align: center;
}

.controls-help kbd {
    background: #333;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    margin: 0 3px;
    font-family: 'Courier New', monospace;
}

/* Warning lights */
.warning-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 50;
}

.warning-light {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-align: center;
    opacity: 0.3;
}

.warning-light.active {
    opacity: 1;
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.warning-light.stall {
    background: #dc3545;
    color: #fff;
}

.warning-light.terrain {
    background: #ffc107;
    color: #000;
}

.warning-light.fuel {
    background: #fd7e14;
    color: #fff;
}

/* ========================= */
/* NOTIFICATIONS             */
/* ========================= */

.notification-container {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    pointer-events: none;
}

.notification {
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: bold;
    animation: notification-pop 0.3s ease, notification-fade 0.5s ease 2.5s forwards;
    text-align: center;
}

@keyframes notification-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes notification-fade {
    to { opacity: 0; transform: translateY(-20px); }
}

.notification.achievement {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.5);
}

.notification.achievement::before {
    content: '🏆 ';
}

.notification.level-up {
    background: linear-gradient(135deg, #6f42c1, #9b59b6);
    color: #fff;
    box-shadow: 0 0 30px rgba(111, 66, 193, 0.5);
}

.notification.level-up::before {
    content: '⬆️ ';
}

.notification.challenge-complete {
    background: linear-gradient(135deg, #20c997, #17a881);
    color: #fff;
    box-shadow: 0 0 30px rgba(32, 201, 151, 0.5);
}

.notification.challenge-complete::before {
    content: '✓ ';
}

.notification.points {
    background: rgba(0, 0, 0, 0.8);
    color: #ffc107;
    font-size: 1.5rem;
}

/* ========================= */
/* RESULT OVERLAYS           */
/* ========================= */

.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-overlay.success {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.2), rgba(0, 0, 0, 0.9));
}

.result-overlay.failure {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(0, 0, 0, 0.9));
}

.result-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.result-overlay.success .result-title {
    color: #20c997;
    text-shadow: 0 0 30px rgba(32, 201, 151, 0.5);
}

.result-overlay.failure .result-title {
    color: #dc3545;
    text-shadow: 0 0 30px rgba(220, 53, 69, 0.5);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.result-stat {
    text-align: center;
}

.result-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #ffc107;
}

.result-stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-xp {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px 30px;
    background: rgba(111, 66, 193, 0.2);
    border-radius: 30px;
}

.result-xp-icon {
    font-size: 1.5rem;
}

.result-xp-text {
    font-size: 1.3rem;
    color: #9b59b6;
    font-weight: bold;
}

.result-buttons {
    display: flex;
    gap: 20px;
}

.result-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-btn.primary {
    background: linear-gradient(135deg, #20c997, #17a881);
    color: #fff;
}

.result-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(32, 201, 151, 0.4);
}

.result-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.result-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ========================= */
/* MINIMAP                   */
/* ========================= */

.minimap {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 50%;
    overflow: hidden;
    z-index: 50;
}

.minimap-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.minimap-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid #20c997;
}

.minimap-waypoint {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffc107;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.minimap-waypoint.active {
    animation: minimap-pulse 1s ease infinite;
}

@keyframes minimap-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

/* ========================= */
/* PAUSE MENU                */
/* ========================= */

.pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 250;
}

.pause-title {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ========================= */
/* LOADING SCREEN            */
/* ========================= */

.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 400;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #20c997;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.loading-tip {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    margin-top: 30px;
    max-width: 400px;
    text-align: center;
}

/* ========================= */
/* TUTORIAL OVERLAY          */
/* ========================= */

.tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 280;
}

.tutorial-box {
    background: rgba(22, 33, 62, 0.98);
    border: 2px solid #6f42c1;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
}

.tutorial-box h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.tutorial-box p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 25px;
}

.tutorial-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.tutorial-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.tutorial-control kbd {
    background: #6f42c1;
    padding: 5px 12px;
    border-radius: 5px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.tutorial-control span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.tutorial-btn {
    padding: 15px 50px;
    background: linear-gradient(135deg, #20c997, #17a881);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(32, 201, 151, 0.4);
}

/* ========================= */
/* RESPONSIVE ADJUSTMENTS    */
/* ========================= */

@media (max-width: 768px) {
    .menu-title {
        font-size: 2.5rem;
    }

    .menu-btn {
        padding: 14px 40px;
        font-size: 1rem;
        min-width: 220px;
    }

    .mission-grid,
    .aircraft-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .flight-hud {
        padding: 10px 15px;
        font-size: 12px;
    }

    .hud-value {
        font-size: 16px;
    }

    .attitude-indicator {
        width: 100px;
        height: 100px;
    }

    .altimeter,
    .speedometer {
        width: 60px;
        height: 150px;
    }

    .minimap {
        width: 100px;
        height: 100px;
    }

    .tutorial-controls {
        grid-template-columns: 1fr;
    }
}

/* Hidden class */
.hidden {
    display: none !important;
}
