/* ==========================================================================
   Gökyüzü Çarpım Tablosu - Master Design System & Stylesheet
   ========================================================================== */

:root {
    /* Core Typography - 100% Turkish Latin-Ext Support */
    --font-heading: 'Outfit', 'Nunito', 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Outfit', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Default Theme Tokens (Boy Theme Default) */
    --bg-gradient: linear-gradient(135deg, #1A2980 0%, #26D0CE 100%);
    --sky-top: #0f2027;
    --sky-bottom: #203a43;
    --accent-color: #00d2ff;
    --accent-hover: #00a8cc;
    --panel-bg: rgba(255, 255, 255, 0.15);
    --panel-border: rgba(255, 255, 255, 0.25);
    --text-color: #ffffff;
    --text-muted: #d0e7ff;
    
    /* Utility Colors */
    --gold: #FFD700;
    --gold-dark: #FFA500;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(0, 210, 255, 0.4);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* 👧 Kız Pilot Tema Değişiklikleri */
body.theme-girl {
    --bg-gradient: linear-gradient(135deg, #A88BEB 0%, #F8CEEC 100%);
    --sky-top: #4a2c5a;
    --sky-bottom: #8e44ad;
    --accent-color: #ff6b81;
    --accent-hover: #ee5253;
    --panel-bg: rgba(255, 255, 255, 0.22);
    --panel-border: rgba(255, 255, 255, 0.35);
    --shadow-glow: 0 0 20px rgba(255, 107, 129, 0.5);
}

/* ⚪ Uzay / Diğer Karakter Tema Değişiklikleri */
body.theme-other {
    --bg-gradient: linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%);
    --sky-top: #050b14;
    --sky-bottom: #162447;
    --accent-color: #f1c40f;
    --accent-hover: #f39c12;
    --panel-bg: rgba(20, 30, 55, 0.4);
    --panel-border: rgba(241, 196, 15, 0.3);
}

/* Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar,
#app-container::-webkit-scrollbar,
::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   Header Navbar
   ========================================================================== */

#main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    font-size: 2rem;
    animation: floatPlane 3s ease-in-out infinite;
}

@keyframes floatPlane {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(4deg); }
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.version-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.25);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    margin-left: 6px;
    vertical-align: middle;
}

.game-v-badge {
    margin-left: 0;
}

.brand-text .sub-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Profile Badge in Header */
.profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid var(--panel-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.badge-info {
    display: flex;
    flex-direction: column;
}

.badge-info .user-name {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
}

.badge-info .user-grade {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Stat Pill */
.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.gold-pill {
    color: var(--gold);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Icon Buttons */
.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.admin-btn {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border: none;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

/* ==========================================================================
   Screen Router Views
   ========================================================================== */

#main-content {
    flex: 1;
    display: flex;
    position: relative;
    width: 100%;
}

.screen-view {
    display: none;
    width: 100%;
    min-height: calc(100vh - 65px);
    padding: 24px;
}

.screen-view.active {
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Containers */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   SCREEN 1: Welcome & Auth Screen
   ========================================================================== */

#screen-welcome {
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    min-height: calc(100vh - 65px);
    box-sizing: border-box;
    overflow-y: auto;
}

.hero-card {
    max-width: 480px;
    width: 100%;
    padding: 14px 20px;
    text-align: center;
    border: 1.5px solid rgba(0, 210, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 210, 255, 0.25);
    margin: auto;
    box-sizing: border-box;
}

.cloud-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.hero-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 4px;
    line-height: 1.2;
}

.hero-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 12px;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.auth-form {
    display: none;
    text-align: left;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: border 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.25);
}

.form-group select option {
    background: #203a43;
    color: white;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .col {
    flex: 1;
}

/* Character Selector Component */
.character-selector {
    display: flex;
    gap: 8px;
}

.char-option {
    flex: 1;
    cursor: pointer;
}

.char-option input {
    display: none;
}

.char-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.char-card .avatar {
    font-size: 1.5rem;
}

.char-card .char-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}

.char-option input:checked + .char-card {
    transform: scale(1.06);
    color: #ffffff !important;
}

.char-card.pink { border: 2px solid rgba(255, 107, 129, 0.4); }
.char-card.blue { border: 2px solid rgba(0, 210, 255, 0.4); }
.char-card.gold { border: 2px solid rgba(255, 215, 0, 0.4); }

.char-option input:checked + .char-card.pink {
    background: linear-gradient(135deg, #ff416c, #e11d48) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 16px rgba(255, 65, 108, 0.85), 0 4px 12px rgba(0,0,0,0.5) !important;
}

.char-option input:checked + .char-card.blue {
    background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 198, 255, 0.85), 0 4px 12px rgba(0,0,0,0.5) !important;
}

.char-option input:checked + .char-card.gold {
    background: linear-gradient(135deg, #f39c12, #d35400) !important;
    border-color: #ffd700 !important;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.85), 0 4px 12px rgba(0,0,0,0.5) !important;
}

/* Vibrant Selection Pulse Animation for Level/Table Buttons */
.table-pill-btn.selected-active-pulse,
.preset-btn.selected-active-pulse {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    transform: scale(1.10) !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.95), 0 0 12px rgba(255, 215, 0, 0.85) !important;
    z-index: 10 !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--panel-border);
}

.auth-divider span {
    padding: 0 12px;
}

/* Buttons */
button, .btn, .auth-tab, .char-option, .welcome-lang-box, .welcome-theme-btn, .welcome-howtoplay-btn, .close-btn {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer !important;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #00d2ff, #0083b0);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid var(--panel-border);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 14px;
}

/* ==========================================================================
   SCREEN 2: Lobby Screen
   ========================================================================== */

#screen-lobby {
    max-width: 1100px;
    margin: 0 auto;
    gap: 24px;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 36px;
}

.welcome-user .greeting {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.welcome-user h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.1;
    margin: 4px 0;
}

.difficulty-tag {
    display: inline-block;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
}

.clickable-tag {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-tag:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,210,255,0.4);
}

.lobby-stats {
    display: flex;
    gap: 20px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    min-width: 100px;
}

.stat-icon {
    font-size: 1.4rem;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lobby-section-title h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.mode-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.mode-card {
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.mode-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.mode-card.highlight {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.mode-card h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.mode-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex: 1;
}

/* ==========================================================================
   SCREEN 3: Game Flight Arena & HUD
   ========================================================================== */

#screen-game {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    background: #080d1a !important; /* Deep dark aerospace backdrop for PC Web widescreen outer sides */
}

#game-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    display: block !important;
}

#game-hud {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    gap: 4px;
    max-width: 760px;
    margin: 0 auto;
    background: transparent;
    pointer-events: none;
}

#game-hud * {
    pointer-events: auto;
}

/* UNIFIED MASTER TOP HUD CONTAINER (Single Row on PC, Multi-Row on Mobile) */
.hud-top-bar-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    flex-wrap: nowrap;
    background: rgba(15, 23, 42, 0.96); /* Solid dark backdrop so descending objects don't show behind */
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 4px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65), 0 0 15px rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99990 !important;
    box-sizing: border-box;
}

/* Unified 1-Line Top HUD Bar (v1.3.9) */
.hud-top-unified-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 860px !important;
    margin: 0 auto !important;
    padding: 3px 8px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

.hud-profile-pill {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
    border-radius: 18px !important;
    padding: 2px 8px !important;
    min-height: 26px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.hud-profile-pill:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #00d2ff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.4) !important;
}

.hud-profile-pill .hud-profile-avatar {
    font-size: 1.05rem !important;
    line-height: 1 !important;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)) !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.hud-profile-pill .hud-profile-name {
    font-family: var(--font-heading) !important;
    font-size: 0.80rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    max-width: 140px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hud-profile-pill .hud-grade-pill {
    display: none !important;
}

/* Center Stats (Score & Gold) */
.hud-stats-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex: 1 !important;
}

.hud-stats-center .hud-stat-pill {
    background: rgba(15, 23, 42, 0.82) !important;
    border: 1.5px solid rgba(255, 215, 0, 0.45) !important;
    padding: 3px 10px !important;
    border-radius: 16px !important;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    color: #ffd700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    white-space: nowrap !important;
}

.hud-stats-center .hud-stat-pill.gold-pill {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.hud-stats-center .hud-stat-pill.gold-pill:hover {
    border-color: #ffd700 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.45) !important;
}

/* Right HUD Actions (Pause & Cockpit) */
.hud-actions-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.hud-action-pill-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    border-radius: 18px !important;
    font-family: var(--font-heading) !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    cursor: pointer !important;
    border: 1.5px solid transparent !important;
    transition: all 0.18s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.hud-action-pill-btn.btn-pause {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(185, 28, 28, 0.95)) !important;
    border-color: rgba(254, 202, 202, 0.6) !important;
    color: #ffffff !important;
}

.hud-action-pill-btn.btn-pause:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    transform: scale(1.04) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
}

.hud-action-pill-btn.btn-cockpit {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.5) !important;
}

.hud-action-pill-btn.btn-cockpit:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border-color: #7dd3fc !important;
    transform: scale(1.04) !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.7) !important;
}

.hud-action-pill-btn.btn-speed {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.45)) !important;
    border: 1.5px solid #f59e0b !important;
    color: #fef08a !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35) !important;
}

.hud-action-pill-btn.btn-speed:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #fef08a !important;
    color: #0f172a !important;
    transform: scale(1.04) !important;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.7) !important;
}

.hud-pilot-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}

.hud-action-pill-btn.hud-pilot-logout-btn,
.hud-pilot-logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(185, 28, 28, 0.6)) !important;
    border: 1.5px solid rgba(248, 113, 113, 0.75) !important;
    color: #fee2e2 !important;
    padding: 0 8px !important;
    height: 28px !important;
    border-radius: 12px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    user-select: none !important;
}

.hud-action-pill-btn.hud-pilot-logout-btn:hover,
.hud-pilot-logout-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #fca5a5 !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
}

.hud-action-pill-btn.hud-pilot-logout-btn:active,
.hud-pilot-logout-btn:active {
    transform: scale(0.95) !important;
}

.hud-pilot-logout-btn .hud-logout-icon {
    font-size: 0.75rem !important;
    line-height: 1 !important;
}

.hud-pilot-logout-btn .hud-logout-label {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #fee2e2 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

/* Ultra-Slim Tally Bar */
.tally-box-card.tally-box-slim {
    padding: 3px 8px !important;
    border-radius: 14px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    max-width: 860px !important;
    margin: 0 auto !important;
}

.tally-clean-layout {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.tally-mini-toggle {
    flex-shrink: 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06)) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.tally-mini-toggle:hover {
    background: var(--accent-color) !important;
    color: #0f172a !important;
    border-color: #ffffff !important;
    transform: scale(1.03) !important;
}

.tally-clean-layout .tally-dots-container {
    flex: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
}

.hud-stat-pill {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    padding: 3px 10px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hud-fuel-pill {
    display: flex;
    align-items: center;
}

/* LEFT-SIDE QUICK FLIGHT EXIT BUTTON (Above Fuel Gauge) */
/* LEFT-SIDE QUICK FLIGHT EXIT BUTTON (Android Native App Only) */
.side-flight-exit-btn {
    display: none !important; /* Hidden on PC Web and Mobile Web by default */
    position: absolute;
    left: 4px;
    top: calc(33% - 66px);
    transform: translateY(-50%);
    z-index: 75;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.95));
    border: 1.5px solid rgba(254, 202, 202, 0.8);
    border-radius: 10px;
    padding: 3px 2px;
    width: 22px;
    min-height: 28px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.52rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(239, 68, 68, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.15s ease;
    line-height: 1;
    text-align: center;
    user-select: none;
}

/* Show Exit Button ONLY in Native Android APK */
body.is-native-android .side-flight-exit-btn,
.is-native-android .side-flight-exit-btn {
    display: flex !important;
}

.side-flight-exit-btn:hover, .side-flight-exit-btn:active {
    transform: translateY(-50%) scale(1.1);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.9);
    border-color: #ffffff;
}

.side-flight-exit-btn .exit-btn-icon {
    font-size: 0.78rem;
    line-height: 1;
}

.side-flight-exit-btn .exit-btn-label {
    letter-spacing: -0.2px;
}

/* LEFT-SIDE VERTICAL FUEL GAUGE (Extended from top of HUD to bottom of Tally) */
.side-vertical-fuel-gauge {
    display: flex !important; /* Always visible */
    position: absolute;
    left: max(8px, calc(50% - 410px));
    top: 130px !important;
    height: 90px !important;
    transform: none !important;
    z-index: 65;
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid rgba(0, 210, 255, 0.45);
    border-radius: 12px;
    padding: 4px 2px;
    width: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), 0 0 10px rgba(0, 210, 255, 0.25), inset 0 0 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    pointer-events: none;
    user-select: none;
    box-sizing: border-box;
}

.side-fuel-icon {
    font-size: 0.78rem;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
    line-height: 1;
}

.side-fuel-track {
    width: 8px;
    height: 100% !important;
    flex: 1;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin: 2px 0;
}

.side-fuel-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #ff4e50 0%, #ffd700 35%, #00e676 100%);
    border-radius: 3px;
    transition: height 0.25s ease, background 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.8);
}

.side-fuel-label {
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    line-height: 1;
}

/* TRANSPARENT SCREEN PAUSE OVERLAY */
.game-paused-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(8, 14, 26, 0.5) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 85 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: opacity 0.2s ease !important;
}

.game-paused-overlay.hidden {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.pause-center-badge {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(13, 19, 31, 0.92) !important;
    border: 2px solid rgba(255, 215, 0, 0.8) !important;
    border-radius: 22px !important;
    padding: 18px 32px !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 24px rgba(255, 215, 0, 0.45) !important;
    animation: pausePulse 2.2s infinite ease-in-out !important;
    text-align: center !important;
}

.pause-big-icon {
    font-size: 2.6rem !important;
    margin-bottom: 4px !important;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9)) !important;
    line-height: 1 !important;
}

.pause-text {
    font-family: var(--font-heading) !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: #ffd700 !important;
    letter-spacing: 2px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
}

.pause-subtext {
    font-size: 0.72rem !important;
    color: #cbd5e1 !important;
    margin-top: 6px !important;
    font-weight: 600 !important;
}

@keyframes pausePulse {
    0%, 100% {
        transform: scale(1);
        border-color: rgba(255, 215, 0, 0.7);
        box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 215, 0, 0.35);
    }
    50% {
        transform: scale(1.03);
        border-color: rgba(255, 215, 0, 1);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 32px rgba(255, 215, 0, 0.65);
    }
}

/* FULL-WIDTH BOTTOM SCREEN FUEL GAUGE BAR - PERMANENTLY REMOVED */
#bottom-full-fuel-bar {
    display: none !important; /* Removed as requested */
}

#bottom-fuel-fill {
    height: 100% !important;
    width: 100%;
    background: linear-gradient(90deg, #ff4e50, #f9d423, #00e676) !important;
    transition: width 0.2s ease, background 0.3s ease !important;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.85) !important;
}

/* LOW FUEL WARNING BLINK ANIMATION */
.low-fuel-blink {
    animation: fuelBlinkPulse 0.4s infinite alternate !important;
}

@keyframes fuelBlinkPulse {
    0% {
        opacity: 1;
        filter: drop-shadow(0 0 16px #ff0000);
    }
    100% {
        opacity: 0.25;
        filter: drop-shadow(0 0 2px #ff0000);
    }
}

.fuel-label {
    position: absolute;
    top: -20px;
    right: 12px;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95);
    letter-spacing: 0.6px;
}

/* ACTIVE QUESTION BANNER (Positioned UNDER Tally Bar) */
.hud-question-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.96));
    border: 2.5px solid #facc15;
    border-radius: 24px;
    padding: 4px 22px;
    box-shadow: 0 0 22px rgba(250, 204, 21, 0.5), 0 6px 16px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 4px auto 0 auto;
    width: fit-content;
    max-width: 92%;
    z-index: 10 !important; /* Low z-index so top dropdown menus pop ON TOP */
    backdrop-filter: blur(10px);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Send active question banner to background when ANY top dropdown menu is open */
body.dropdown-open .hud-question-banner {
    z-index: 1 !important;
    opacity: 0.25 !important;
    filter: blur(2px) !important;
    pointer-events: none !important;
}

body.dropdown-open .tally-box-card {
    opacity: 0.35 !important;
    pointer-events: none !important;
}

.hud-question-banner .q-badge {
    font-size: 0.8rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
}

.hud-question-banner .q-text,
#hud-question {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 12px rgba(250, 204, 21, 0.4);
    letter-spacing: 1px;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    display: inline-block !important;
}

/* ACTION BUTTONS BAR SITTING DIRECTLY ABOVE THE TALLY BAR */
.tally-actions-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 2px 0 3px 0;
}

.hud-action-pill {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    flex: 1 1 0px;
    min-width: 0;
    text-align: center;
}

.hud-action-pill:hover, .hud-action-pill:active {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    transform: scale(1.04);
}

/* ==========================================================================
   UNIFIED IN-FLIGHT HUD STRIP (Left: Toggles Stacked, Center: Question, Right: 3-Row Tally)
   ========================================================================== */
.hud-flight-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 760px !important;
    margin: 4px auto 0 auto !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
    z-index: 20 !important;
    position: relative !important;
}

/* Left: Duraklat and Kokpit stacked vertically (Replacing Gizle & Karma Sor) */
.hud-strip-left-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 86px !important;
    flex-shrink: 0 !important;
}

.hud-strip-btn {
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(0, 210, 255, 0.4) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    padding: 2px 5px !important;
    height: 24px !important;
    line-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.15s ease !important;
}

.hud-strip-btn .pause-label,
.hud-strip-btn .btn-cockpit-label {
    display: inline-block !important;
    white-space: nowrap !important;
}

.hud-strip-btn.btn-pause {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(185, 28, 28, 0.96)) !important;
    border: 1.5px solid rgba(254, 202, 202, 0.7) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45) !important;
}

.hud-strip-btn.btn-pause:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.7) !important;
    transform: scale(1.03) !important;
}

.hud-strip-btn.btn-pause.btn-success-pill {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border-color: #86efac !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6) !important;
}

.hud-strip-btn.btn-cockpit {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.45) !important;
}

.hud-strip-btn.btn-cockpit:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border-color: #7dd3fc !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.7) !important;
    transform: scale(1.03) !important;
}

/* Center: Active Question Banner (Right where the tally used to be) */
.hud-strip-center-question {
    flex: 1 !important;
    min-width: 0 !important;
    height: 52px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 100, 0.90)) !important;
    border: 2px solid #facc15 !important;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.4), 0 4px 14px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 8px !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(8px) !important;
}

.hud-strip-center-question .q-badge {
    font-family: var(--font-heading) !important;
    font-size: 0.60rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    letter-spacing: 0.6px !important;
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    padding: 1px 8px !important;
    border-radius: 8px !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
}

.hud-strip-center-question .q-text,
.hud-strip-center-question #hud-question {
    font-family: var(--font-heading) !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 10px rgba(250, 204, 21, 0.4) !important;
    letter-spacing: 0.5px !important;
    line-height: 1.15 !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    display: inline-block !important;
    margin: 0 !important;
}

/* Right: 3-Row 1-Column Vertical Tally Sheet */
.hud-strip-right-tally {
    width: 86px !important;
    flex-shrink: 0 !important;
    height: 52px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(0, 210, 255, 0.45) !important;
    border-radius: 10px !important;
    padding: 2px !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.tally-3row-col-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    height: 48px !important;
    max-height: 48px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.tally-3row-col-container::-webkit-scrollbar {
    display: none !important;
}

.tally-3row-col-container .single-line-tally-card {
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    padding: 0 3px !important;
    font-size: 0.64rem !important;
    border-radius: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.tally-3row-col-container .single-line-tally-card .tally-pill-text {
    font-size: 0.62rem !important;
    line-height: 14px !important;
}

/* ÇETELE KUTUSU & ENTEGRE ÜST EYLEM BUTONLARI (Fallback) */
.hud-progress-dots-row {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 2px;
    box-sizing: border-box;
}

.tally-box-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    box-sizing: border-box;
}

/* En Üstteki Entegre Eylem Butonları Barı (Gizle, Karma Sor, Seviye Değiştir, Rapor İndir) */
.tally-inner-header-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px 6px;
    background: rgba(30, 41, 59, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    width: 100%;
}

.tally-btn-pill {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 10px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 4px 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* TALLY BODY LAYOUT WITH SIDE BUTTONS */
.tally-body-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    padding: 4px 6px;
    box-sizing: border-box;
}

.tally-side-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    justify-content: center;
}

.tally-flank-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.tally-flank-btn:hover {
    background: var(--accent-color);
    color: #0f172a;
    transform: scale(1.04);
}

.tally-flank-btn.btn-danger-pill {
    background: rgba(231, 76, 60, 0.75) !important;
    border-color: #ef4444 !important;
}

.tally-flank-btn.btn-danger-pill:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.tally-dots-container {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important; /* 5 Columns on PC Web -> Exactly 2 Rows for 10 Questions */
    grid-auto-rows: min-content !important;
    flex: 1 !important;
    min-width: 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important; /* STRICT 2 ROWS VISIBLE */
    gap: 3px 5px !important;
    align-items: center !important;
    justify-content: center !important;
    justify-items: center !important;
    background: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-gutter: stable !important;
    scrollbar-width: thin !important;
    scrollbar-color: #ffd700 rgba(8, 12, 22, 0.95) !important;
    box-sizing: border-box !important;
    border: none !important;
    border-right: 1.5px solid rgba(0, 210, 255, 0.45) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 2px 4px !important;
    margin: 0 auto !important;
}

/* Custom Prominent Glowing Gold Vertical Scrollbar (Always Visible) */
.tally-dots-container::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
    -webkit-appearance: none !important;
}

.tally-dots-container::-webkit-scrollbar-track {
    background: rgba(8, 12, 22, 0.95) !important;
    border-radius: 6px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    display: block !important;
}

.tally-dots-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffd700, #ff8c00) !important;
    border-radius: 6px !important;
    border: 1.5px solid #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.95) !important;
    display: block !important;
    min-height: 18px !important;
    cursor: pointer !important;
}

.tally-dots-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #0072ff) !important;
    box-shadow: 0 0 14px rgba(0, 229, 255, 1) !important;
}

.single-line-tally-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    padding: 2px 4px !important;
    font-family: var(--font-heading);
    font-size: 0.70rem;
    font-weight: 800;
    color: #ffffff;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
    width: 100% !important;
    max-width: 105px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.single-line-tally-card .tally-pill-text {
    color: #f8fafc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.single-line-tally-card.active-current {
    background: rgba(255, 215, 0, 0.35);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.85);
    transform: scale(1.03);
}
.single-line-tally-card.active-current .tally-pill-text {
    color: #ffd700;
}

.single-line-tally-card.correct {
    background: rgba(46, 204, 113, 0.35);
    border-color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}
.single-line-tally-card.correct .tally-pill-text {
    color: #2ecc71;
}

.single-line-tally-card.wrong {
    background: rgba(231, 76, 60, 0.35);
    border-color: #e74c3c;
}
.single-line-tally-card.wrong .tally-pill-text {
    color: #ff6b6b;
}

.tally-toggle-btn {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    border: 1.5px solid #ffffff;
    color: #000000;
    font-weight: 900;
    font-size: 0.76rem;
    padding: 3px 9px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.tally-top-drawer {
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 10px 14px;
    margin-top: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    max-height: 280px;
    overflow-y: auto;
    z-index: 60;
}

.tally-top-drawer.hidden {
    display: none !important;
}

/* END-GAME CLEAR REASON BANNER (Fuel Depleted / Level Complete) */
.endgame-reason-banner {
    padding: 10px 16px;
    border-radius: 16px;
    margin: 10px 0 14px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.95));
    border: 2px solid #ffd700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.endgame-reason-banner.reason-fuel {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(153, 27, 27, 0.95));
    border-color: #ff4d4d;
}

.endgame-reason-banner.reason-complete {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(4, 120, 87, 0.95));
    border-color: #10b981;
}

.reason-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 2px;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
}

/* 1X - 10X MULTIPLICATION TABLES TALLY GRID IN REPORT */
.table-grid-10x {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .table-grid-10x {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .table-grid-10x {
        grid-template-columns: 1fr;
    }
}

.table-card-10x {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    page-break-inside: avoid;
}

.table-card-header {
    color: #ffffff;
    font-weight: 900;
    font-size: 1rem;
    text-align: center;
    padding: 6px 4px;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.table-card-body {
    padding: 4px 6px;
    background: #fafafa;
}

.eq-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
}

.eq-row:last-child {
    border-bottom: none;
}

.eq-row.eq-neutral {
    color: #475569;
}

.eq-row.eq-correct {
    color: #15803d !important;
    background: #f0fdf4 !important;
    font-weight: 800 !important;
}

.eq-row.eq-correct .eq-text {
    text-decoration: none !important;
    color: #15803d !important;
}

.eq-row.eq-correct .eq-icon {
    color: #16a34a !important;
    font-weight: 900 !important;
    font-size: 1.15rem !important;
    display: inline-block !important;
    visibility: visible !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", Arial, sans-serif !important;
}

.eq-row.eq-wrong {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    font-weight: 800 !important;
}

.eq-row.eq-wrong .eq-text {
    color: #dc2626 !important;
}

.eq-row.eq-wrong .eq-icon {
    color: #ef4444 !important;
    font-weight: 900 !important;
    font-size: 1.15rem !important;
    display: inline-block !important;
    visibility: visible !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", Arial, sans-serif !important;
}

/* FLIGHT REPORT IN-APP MODAL STYLES */
#modal-flight-report {
    z-index: 3000 !important;
}

.flight-report-modal {
    max-width: 920px !important;
    width: 95% !important;
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    background: #ffffff !important;
    color: #0f172a !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    border-bottom: 2px solid #00d2ff;
}

.report-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #ffffff;
    color: #0f172a;
    -webkit-overflow-scrolling: touch;
}

.report-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 10px 14px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
}

.report-modal-footer .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffeaa7;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 4px;
}

.close-drawer-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 0.85rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
}

.drawer-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.drawer-select-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.78rem;
    color: #ffffff;
}

.drawer-select-pill select {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffd700;
    font-weight: 800;
    font-size: 0.78rem;
    border-radius: 8px;
    padding: 2px 4px;
    outline: none;
    cursor: pointer;
}

.action-pill-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-pill-btn.btn-accent {
    background: var(--accent-color);
    border-color: #ffffff;
}

.action-pill-btn.btn-gold {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    border-color: #ffffff;
}

.tally-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 132px; /* Tam 4 satır görünecek şekilde ayarlandı */
    overflow-y: auto;
    padding: 2px 4px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 6px;
    scrollbar-width: thin;
    scrollbar-color: #00d2ff rgba(15, 23, 42, 0.6);
}

.tally-vertical-list::-webkit-scrollbar {
    width: 6px;
}

.tally-vertical-list::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 6px;
}

.tally-vertical-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d2ff, #0072ff);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tally-pill-item-vertical {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    transition: all 0.15s ease;
}

.tally-pill-item-vertical.correct {
    background: rgba(46, 204, 113, 0.25);
    border-color: rgba(46, 204, 113, 0.8);
    color: #2ecc71;
}

.tally-pill-item-vertical.wrong {
    background: rgba(231, 76, 60, 0.25);
    border-color: rgba(231, 76, 60, 0.8);
    color: #ff6b6b;
}

.tally-pill-item-vertical.active-current {
    background: rgba(255, 215, 0, 0.25);
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.tally-status-badge {
    font-size: 0.74rem;
    font-weight: 800;
}

/* Quick Settings Modal Styling */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.setting-row label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.setting-row select {
    flex: 1;
    max-width: 180px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    color: white;
    font-weight: 700;
}

.settings-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.combo-box {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.5), rgba(255, 215, 0, 0.6));
    border-color: var(--gold);
    animation: pulseCombo 1s infinite alternate;
}

.speed-box {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.7), rgba(243, 156, 18, 0.8));
    border: 1.5px solid #f39c12;
    padding: 3px 8px;
    border-radius: 12px;
    gap: 4px;
}

#hud-speed-select {
    background: rgba(0, 0, 0, 0.5);
    color: var(--gold);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 2px 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    outline: none;
    cursor: pointer;
}

#hud-speed-select option {
    background: #1a2980;
    color: white;
}

.speed-lbl {
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffeaa7;
}

.speed-val {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
}

@keyframes pulseCombo {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

#hud-combo-count {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.combo-lbl {
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
}

.hud-speed-pill {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 140, 0, 0.45));
    border: 1.5px solid #ffd700;
    color: #ffd700;
    cursor: pointer;
    user-select: none;
    padding: 3px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 12px;
}

.hud-speed-dropdown {
    background: transparent;
    border: none;
    color: #ffd700;
    font-weight: 900;
    font-size: 0.92rem;
    outline: none;
    cursor: pointer;
}

.hud-speed-dropdown option {
    background: #0f172a;
    color: #ffd700;
    font-weight: 800;
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fuel-bar-wrapper {
    width: 120px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#hud-fuel-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #f39c12, #e74c3c);
    transition: width 0.3s ease;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 5;
    display: block;
    touch-action: none;
}

/* Mobile Touch Control D-Pad Buttons (REMOVED as requested by user) */
#mobile-controls {
    display: none !important;
}

.ctrl-row {
    display: contents !important;
}

.ctrl-btn {
    position: absolute !important;
    pointer-events: auto !important;
    width: 76px !important;
    height: 76px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #00d2ff 0%, #0072ff 100%) !important;
    border: 3.5px solid #ffffff !important;
    color: #ffffff !important;
    font-size: 2.3rem !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 22px rgba(0, 210, 255, 0.95) !important;
    transition: transform 0.1s ease, background 0.1s ease !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6) !important;
}

.ctrl-btn:active, .ctrl-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.95) !important;
    transform: scale(0.92) !important;
}

/* Ergonomic 2-Column Mobile Touch Controls (Original 76px Size) */
/* Left Column: DOWN (▼) above LEFT (◄) */
#btn-ctrl-down {
    left: 12px !important;
    bottom: 145px !important;
    width: 76px !important;
    height: 76px !important;
    font-size: 2.3rem !important;
    border-width: 3.5px !important;
    transform: none !important;
}

#btn-ctrl-down:active, #btn-ctrl-down.active {
    transform: scale(0.92) !important;
}

#btn-ctrl-left {
    left: 12px !important;
    bottom: 55px !important;
    width: 76px !important;
    height: 76px !important;
    font-size: 2.3rem !important;
    border-width: 3.5px !important;
}

/* Right Column: UP (▲) above RIGHT (►) */
#btn-ctrl-up {
    right: 12px !important;
    bottom: 145px !important;
    width: 76px !important;
    height: 76px !important;
    font-size: 2.3rem !important;
    border-width: 3.5px !important;
    transform: none !important;
}

#btn-ctrl-up:active, #btn-ctrl-up.active {
    transform: scale(0.92) !important;
}

#btn-ctrl-right {
    right: 12px !important;
    bottom: 55px !important;
    width: 76px !important;
    height: 76px !important;
    font-size: 2.3rem !important;
    border-width: 3.5px !important;
}

/* Visual Help Bar for Grade 1 */
.visual-help-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--panel-border);
    z-index: 20;
}

.visual-group {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 10px;
}

.visual-item {
    font-size: 1.2rem;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
}

.modal-overlay.active {
    display: flex !important;
}

#modal-leaderboard {
    z-index: 10000005 !important;
}

.modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Compact Scrollbar-Free Selection Modal */
.compact-modal {
    max-width: 580px;
    max-height: 95vh;
    overflow: hidden !important;
    padding: 20px 24px;
}

.compact-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* 1'ler - 10'lar Pills Grid */
.tables-pills-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.table-pill-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 10px 4px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-pill-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,210,255,0.4);
}

/* 🏆 100% Completed Table Pill Button Styling (Gold Gradient with Glowing Trophy Pulse) */
.table-pill-btn.completed {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
    border: 2px solid #ffeaa7 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.55), 0 0 12px rgba(255, 234, 167, 0.75) !important;
    animation: goldTrophyPulse 2.2s infinite alternate ease-in-out;
}

.table-pill-btn.completed:hover {
    transform: translateY(-3px) scale(1.06) !important;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.8), 0 0 18px rgba(255, 234, 167, 0.95) !important;
}

/* 🏆 Custom Number Selection Completed Glow */
.num-toggle-btn.table-completed {
    border-color: #ffd700 !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.75), 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

@keyframes goldTrophyPulse {
    0% {
        box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45), 0 0 8px rgba(255, 234, 167, 0.5);
        border-color: #ffeaa7;
    }
    100% {
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.85), 0 0 16px rgba(255, 234, 167, 0.95);
        border-color: #ffffff;
    }
}

/* Karma Presets Grid */
.karma-presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.preset-btn {
    padding: 10px 8px;
    border-radius: 10px;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preset-btn.p-blue { background: linear-gradient(135deg, #00d2ff, #0083b0); }
.preset-btn.p-teal { background: linear-gradient(135deg, #059669, #10b981); }
.preset-btn.p-orange { background: linear-gradient(135deg, #f39c12, #e67e22); }
.preset-btn.p-red { background: linear-gradient(135deg, #e11d48, #be123c); }
.preset-btn.p-purple {
    background: linear-gradient(135deg, #a88beb, #8e44ad);
    grid-column: span 2;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Custom Karma Selector Box */
.custom-karma-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-karma-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.selected-badge {
    background: var(--gold);
    color: #1a2980;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
}

.numbers-toggle-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}

/* Deselected / Off State -> Vibrant Red Gradient with X */
.num-toggle-btn {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border: 1.5px solid #f87171;
    color: #ffffff;
    padding: 7px 0;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.num-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(220, 38, 38, 0.55);
}

/* 🟢 Active / Selected Numbers -> Vibrant Emerald Green with Glow and Checkmark */
.num-toggle-btn.active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border-color: #34d399 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45), 0 0 10px rgba(52, 211, 153, 0.65) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.mini-tick, .mini-cross {
    font-size: 0.72rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

.start-karma-btn {
    padding: 10px;
    font-size: 0.95rem;
    margin-top: 4px;
}

.admin-modal-wide {
    max-width: 950px;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 12px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

/* Tables Grid Selection Modal */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.table-select-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-select-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.table-select-btn.active-range {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    grid-column: span 2;
}

/* Shop Modal */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px 4px;
}

.shop-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease;
    cursor: pointer;
    user-select: none;
}

.shop-card:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
}

.shop-card.equipped {
    border: 2px solid #10b981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.9)) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
}

.shop-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(2, 132, 199, 0.6);
    color: #e0f2fe;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    text-transform: uppercase;
}

.item-preview-box {
    width: 72px;
    height: 72px;
    margin-top: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.6));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.shop-card:hover .item-preview-box {
    transform: scale(1.08);
}

.vehicle-svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.shop-card h4 {
    font-family: var(--font-heading);
    font-size: 0.90rem;
    margin-bottom: 4px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.item-stats {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 6px;
}

.stat-tag {
    font-size: 0.68rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 5px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-card .item-price {
    color: #ffd700;
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 8px;
}

/* Mobile Web & Android Shop Modal */
@media (max-width: 768px) {
    #modal-shop .modal-content {
        max-width: 95% !important;
        width: 95% !important;
        max-height: 88vh !important;
        padding: 12px 10px !important;
        border-radius: 16px !important;
    }

    #modal-shop .modal-header {
        padding: 4px 6px 8px 6px !important;
        margin-bottom: 6px !important;
    }

    #modal-shop .modal-header h3 {
        font-size: 1rem !important;
    }

    #modal-shop .gold-display {
        font-size: 0.8rem !important;
        padding: 2px 8px !important;
    }

    #modal-shop .modal-body {
        padding: 0 !important;
    }

    .shop-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        max-height: 64vh !important;
    }

    .shop-card {
        padding: 8px 6px !important;
        border-radius: 12px !important;
    }

    .shop-card-badge {
        font-size: 0.58rem !important;
        padding: 1px 4px !important;
    }

    .shop-card .item-preview {
        font-size: 2rem !important;
        margin-top: 6px !important;
        margin-bottom: 2px !important;
    }

    .shop-card h4 {
        font-size: 0.76rem !important;
        margin-bottom: 1px !important;
    }

    .shop-card .item-price {
        font-size: 0.74rem !important;
        margin-bottom: 5px !important;
    }

    .shop-card button {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
        font-weight: 800 !important;
        border-radius: 8px !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   COCKPIT MODAL STYLING (v1.3.10 - Responsive & Mobile-Optimized)
   ========================================================================== */
.cockpit-modal-card {
    max-width: 480px !important;
    width: 95% !important;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.98)) !important;
    border: 2px solid rgba(0, 210, 255, 0.55) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 210, 255, 0.3) !important;
    border-radius: 16px !important;
    padding: 10px 12px !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.cockpit-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid rgba(0, 210, 255, 0.3) !important;
    padding-bottom: 6px !important;
    margin-bottom: 8px !important;
}

.cockpit-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.cockpit-header-icon {
    font-size: 1.35rem !important;
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.8)) !important;
    line-height: 1 !important;
}

.cockpit-title-wrap h3 {
    font-family: var(--font-heading) !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #38bdf8 !important;
    letter-spacing: 0.3px !important;
    margin: 0 !important;
}

/* Pilot Card */
.cockpit-pilot-card {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 12px !important;
    padding: 5px 10px !important;
    margin-bottom: 8px !important;
}

.cockpit-pilot-avatar {
    font-size: 1.7rem !important;
    line-height: 1 !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4)) !important;
}

.cockpit-pilot-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.cockpit-pilot-name {
    font-family: var(--font-heading) !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cockpit-pilot-grade {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

.cockpit-pilot-stats {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.cockpit-stat-badge {
    background: rgba(0, 0, 0, 0.45) !important;
    padding: 2px 7px !important;
    border-radius: 8px !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.cockpit-stat-badge.gold-badge {
    border: 1px solid rgba(255, 215, 0, 0.4) !important;
    color: #ffd700 !important;
}

.cockpit-stat-badge.score-badge {
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
}

.cockpit-profile-edit-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 7px !important;
    color: #ffffff !important;
    padding: 4px 7px !important;
    font-size: 0.80rem !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.cockpit-profile-edit-btn:hover {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
}

/* Quick Settings Strip */
.cockpit-quick-settings {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1.35fr !important;
    gap: 5px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
}

.cockpit-setting-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
}

.cockpit-setting-label {
    font-size: 0.62rem !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cockpit-toggle-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    padding: 4px 4px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cockpit-toggle-btn:hover {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
}

.cockpit-speed-selector {
    display: flex !important;
    gap: 2px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.cockpit-speed-selector .speed-chip {
    flex: 1 !important;
    min-width: 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 5px !important;
    color: #ffffff !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    padding: 4px 1px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.15s ease !important;
}

.cockpit-speed-selector .speed-chip.active,
.cockpit-speed-selector .speed-chip:hover {
    background: #f59e0b !important;
    color: #0f172a !important;
    border-color: #fde047 !important;
}

/* 8-Tile Cockpit Grid (Tek İkon & Tam Sığma) */
.cockpit-tiles-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
}

.cockpit-tile {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9)) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 10px !important;
    padding: 6px 8px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    text-align: left !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
    min-width: 0 !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
}

.cockpit-tile:hover {
    transform: translateY(-1px) scale(1.01) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 5px 14px rgba(0, 210, 255, 0.3) !important;
    background: linear-gradient(135deg, rgba(30, 58, 100, 0.95), rgba(15, 23, 42, 0.95)) !important;
}

.cockpit-tile .tile-icon {
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    width: 26px !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cockpit-flag-img {
    width: 22px !important;
    height: 15px !important;
    border-radius: 3px !important;
    object-fit: cover !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    display: block !important;
}

.cockpit-tile .tile-content {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
}

.cockpit-tile .tile-title {
    font-family: var(--font-heading) !important;
    font-size: 0.80rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cockpit-tile .tile-desc {
    font-size: 0.64rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cockpit-tile.tile-level { border-left: 3.5px solid #3b82f6 !important; }
.cockpit-tile.tile-multiplayer { border-left: 3.5px solid #ec4899 !important; }
.cockpit-tile.tile-report { border-left: 3.5px solid #10b981 !important; }
.cockpit-tile.tile-shop { border-left: 3.5px solid #f59e0b !important; }
.cockpit-tile.tile-leaderboard { border-left: 3.5px solid #eab308 !important; }
.cockpit-tile.tile-theme { border-left: 3.5px solid #a855f7 !important; }
.cockpit-tile.tile-lang { border-left: 3.5px solid #06b6d4 !important; }
.cockpit-tile.tile-profile { border-left: 3.5px solid #14b8a6 !important; }

/* Cockpit Footer */
.cockpit-modal-footer {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding-top: 8px !important;
}

.cockpit-footer-btn {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    font-family: var(--font-heading) !important;
    font-size: 0.80rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    border: 1.5px solid transparent !important;
}

.cockpit-footer-btn.btn-resume {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #6ee7b7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

.cockpit-footer-btn.btn-resume:hover {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    transform: translateY(-1px) !important;
}

.cockpit-footer-btn.btn-exit-lobby {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
}

.cockpit-footer-btn.btn-exit-lobby:hover {
    background: rgba(239, 68, 68, 0.85) !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

/* Mobile Web Responsive Optimization (<= 480px) */
@media (max-width: 480px) {
    .cockpit-modal-card {
        width: 96% !important;
        max-width: 430px !important;
        padding: 8px 8px !important;
        border-radius: 14px !important;
        max-height: 96vh !important;
    }
    .cockpit-modal-header {
        padding-bottom: 4px !important;
        margin-bottom: 6px !important;
    }
    .cockpit-header-icon {
        font-size: 1.25rem !important;
    }
    .cockpit-title-wrap h3 {
        font-size: 1.02rem !important;
    }
    .cockpit-pilot-card {
        padding: 4px 6px !important;
        margin-bottom: 6px !important;
        gap: 6px !important;
    }
    .cockpit-pilot-avatar {
        font-size: 1.45rem !important;
    }
    .cockpit-pilot-name {
        font-size: 0.88rem !important;
    }
    .cockpit-pilot-grade {
        font-size: 0.68rem !important;
    }
    .cockpit-stat-badge {
        padding: 1px 5px !important;
        font-size: 0.70rem !important;
    }
    .cockpit-quick-settings {
        padding: 4px 6px !important;
        margin-bottom: 6px !important;
        gap: 4px !important;
        grid-template-columns: 1fr 0.9fr 1.3fr !important;
    }
    .cockpit-setting-label {
        font-size: 0.58rem !important;
    }
    .cockpit-toggle-btn {
        font-size: 0.68rem !important;
        padding: 3px 2px !important;
    }
    .cockpit-speed-selector .speed-chip {
        font-size: 0.64rem !important;
        padding: 3px 0 !important;
    }
    .cockpit-tiles-grid {
        gap: 5px !important;
        margin-bottom: 6px !important;
    }
    .cockpit-tile {
        padding: 5px 6px !important;
        gap: 5px !important;
        min-height: 42px !important;
        border-radius: 8px !important;
    }
    .cockpit-tile .tile-icon {
        font-size: 1.15rem !important;
        width: 22px !important;
    }
    .cockpit-tile .tile-title {
        font-size: 0.74rem !important;
    }
    .cockpit-tile .tile-desc {
        font-size: 0.60rem !important;
    }
    .cockpit-modal-footer {
        padding-top: 6px !important;
        gap: 6px !important;
    }
    .cockpit-footer-btn {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 8px !important;
    }
}

/* Leaderboard Modal */
.leaderboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.lb-tab {
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.lb-tab.active {
    background: var(--accent-color);
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.lb-table th, .lb-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lb-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Admin Dashboard Modal */
/* Professional Master Admin & Teacher Authentication Card */
.admin-login-card {
    max-width: 440px;
    margin: 15px auto 25px auto;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98));
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 20px;
    padding: 30px 28px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.admin-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #ec4899);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 22px;
}

.admin-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 68px;
    height: 68px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.8));
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 50%;
    margin-bottom: 12px;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.admin-badge-icon .shield-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.6));
}

.admin-badge-icon .key-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 1.1rem;
    background: #0f172a;
    border-radius: 50%;
    padding: 2px;
    border: 1px solid #38bdf8;
}

.admin-login-header h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 6px 0;
    letter-spacing: 0.3px;
}

.admin-subtext {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

.admin-pro-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.admin-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-input-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-input-group label .input-icon {
    font-size: 0.95rem;
}

.admin-input-group .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.92rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.admin-input-group input:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.pass-wrapper input {
    padding-right: 42px;
}

.btn-toggle-eye {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-toggle-eye:hover {
    opacity: 1;
}

/* Captcha Visual Styling */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-display-box {
    flex: 1;
    height: 44px;
    background: repeating-linear-gradient(
        45deg,
        rgba(15, 23, 42, 0.9),
        rgba(15, 23, 42, 0.9) 10px,
        rgba(30, 41, 59, 0.9) 10px,
        rgba(30, 41, 59, 0.9) 20px
    );
    border: 1.5px dashed rgba(56, 189, 248, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    letter-spacing: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 900;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.captcha-display-box::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    top: 50%;
    left: -10%;
    transform: rotate(-6deg);
    pointer-events: none;
}

.captcha-char {
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    font-style: italic;
}

.btn-refresh-captcha {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 10px;
    padding: 0 14px;
    height: 44px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-refresh-captcha:hover {
    background: rgba(56, 189, 248, 0.3);
    border-color: #38bdf8;
    transform: scale(1.02);
}

/* Error Message Alert */
.admin-error-msg {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake-anim {
    animation: shakeAlert 0.45s ease-in-out;
}

/* Submit Button */
.btn-admin-login {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: 1.5px solid #38bdf8;
    padding: 12px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-admin-login:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.6);
    transform: translateY(-2px);
}

.admin-login-footer-hint {
    text-align: center;
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.admin-login-footer-hint strong {
    color: #94a3b8;
}

.admin-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 10px;
}

.admin-tab {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.admin-tab.active {
    background: var(--accent-color);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th, .admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.admin-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
}

/* ADMIN ANALYTICS DASHBOARD STYLES */
.analytics-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .analytics-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .analytics-cards-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.analytics-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}

.analytics-card.today-card { border-top: 4px solid #38bdf8; }
.analytics-card.week-card { border-top: 4px solid #10b981; }
.analytics-card.month-card { border-top: 4px solid #f59e0b; }
.analytics-card.year-card { border-top: 4px solid #a855f7; }

.analytics-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.analytics-card-header .icon {
    font-size: 1.2rem;
}

.analytics-card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #f8fafc;
}

.analytics-stat-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat-box {
    text-align: center;
    flex: 1;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.1;
}

.stat-value.text-unique {
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.stat-value.text-total {
    color: #34d399;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.student-report-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 24px;
    border-radius: 16px;
    margin-top: 16px;
}

.student-report-card h3 {
    color: #1a2980;
    margin-bottom: 4px;
}

.weakness-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.weakness-tag {
    background: #ffeded;
    color: #d63031;
    border: 1px solid #ff7675;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.matrix-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 8px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar-fill {
    height: 100%;
    background: #2ecc71;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Print Stylesheet for A4 Single-Page Student Reports
   ========================================================================== */
@page {
    size: A4 portrait;
    margin: 8mm 10mm;
}

@media print {
    body, html {
        background: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    }

    /* Hide background elements, headers, HUD, overlays but keep #main-content container visible */
    #main-header, .screen-view, .no-print,
    .modal-overlay:not(#modal-flight-report):not(#modal-race-podium), #game-hud, canvas, #game-canvas {
        display: none !important;
    }

    #main-content {
        display: block !important;
        position: static !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Force modal-race-podium visible and non-modal when printing */
    #modal-race-podium.active {
        display: block !important;
        position: static !important;
        background: #ffffff !important;
        color: #0f172a !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 99999 !important;
    }

    #modal-race-podium.active * {
        visibility: visible !important;
    }

    #modal-race-podium.active .tourney-report-panel {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        background: #ffffff !important;
        color: #0f172a !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #modal-race-podium.active .tourney-report-header,
    #modal-race-podium.active .tourney-report-footer,
    #modal-race-podium.active .no-print-bar {
        display: none !important;
    }

    #modal-race-podium.active .tourney-report-body {
        padding: 0 !important;
        background: #ffffff !important;
        overflow: visible !important;
        max-height: none !important;
        display: block !important;
    }

    #modal-race-podium.active .podium-motivation-banner {
        background: #f8fafc !important;
        border: 2px solid #cbd5e1 !important;
        color: #0f172a !important;
        box-shadow: none !important;
    }

    #modal-race-podium.active .podium-motivation-banner * {
        color: #0f172a !important;
    }

    #modal-race-podium.active .tourney-stats-grid .stat-box {
        background: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
        box-shadow: none !important;
    }

    #modal-race-podium.active .stat-box .stat-label {
        color: #64748b !important;
    }

    #modal-race-podium.active .stat-box .stat-value {
        color: #0f172a !important;
    }

    #modal-race-podium.active .tourney-leader-section {
        background: #ffffff !important;
        border: 1.5px solid #e2e8f0 !important;
    }

    #modal-race-podium.active .tl-section-title {
        color: #0f172a !important;
        border-bottom: 1.5px solid #e2e8f0 !important;
    }

    #modal-race-podium.active .tourney-leader-row {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
    }

    #modal-race-podium.active .tourney-leader-row.current-player-row {
        background: #f0fdf4 !important;
        border: 2px solid #86efac !important;
    }

    #modal-race-podium.active .tl-name,
    #modal-race-podium.active .tl-score,
    #modal-race-podium.active .tl-correct,
    #modal-race-podium.active .tl-time {
        color: #0f172a !important;
    }

    /* Force modal-flight-report visible and non-modal */
    #modal-flight-report {
        display: block !important;
        position: static !important;
        background: #ffffff !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 99999 !important;
    }

    #modal-flight-report * {
        visibility: visible !important;
    }

    #modal-flight-report .flight-report-modal {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        background: #ffffff !important;
        color: #0f172a !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .report-modal-header, .report-modal-footer {
        display: none !important;
    }

    .report-modal-body {
        padding: 0 !important;
        background: #ffffff !important;
        overflow: visible !important;
        max-height: none !important;
        display: block !important;
    }

    #in-app-report-container {
        padding: 0 !important;
        margin: 0 !important;
        color: #0f172a !important;
    }

    /* Compact Header for A4 */
    #in-app-report-container .header {
        text-align: center !important;
        border-bottom: 2px solid #0284c7 !important;
        padding-bottom: 4px !important;
        margin-bottom: 8px !important;
    }

    #in-app-report-container .header h1 {
        font-size: 16px !important;
        margin: 0 0 2px 0 !important;
        color: #0f172a !important;
    }

    #in-app-report-container .header p {
        font-size: 10px !important;
        color: #64748b !important;
        margin: 0 !important;
    }

    /* Praise banner */
    #in-app-report-container [style*="linear-gradient(135deg, #10b981"] {
        padding: 6px 10px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
        margin-bottom: 8px !important;
    }

    /* 4 Stat Cards in 1 Horizontal Row */
    #in-app-report-container .grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
    }

    #in-app-report-container .card {
        flex: 1 1 22% !important;
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        padding: 5px 8px !important;
    }

    #in-app-report-container .card h3 {
        font-size: 9px !important;
        margin: 0 0 2px 0 !important;
        color: #0284c7 !important;
    }

    #in-app-report-container .card .val {
        font-size: 12px !important;
        font-weight: bold !important;
        color: #0f172a !important;
    }

    #in-app-report-container h3[style*="border-bottom"] {
        font-size: 11px !important;
        margin-top: 8px !important;
        margin-bottom: 6px !important;
        padding-bottom: 2px !important;
    }

    /* 5 COLUMNS x 2 ROWS GRID FOR 10 TABLES -> PERFECT 1-PAGE A4 FIT */
    #in-app-report-container .table-grid-10x {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 5px !important;
        margin-top: 6px !important;
        margin-bottom: 6px !important;
    }

    #in-app-report-container .table-card-10x {
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        background: #ffffff !important;
        page-break-inside: avoid !important;
    }

    #in-app-report-container .table-card-header {
        font-size: 10px !important;
        font-weight: 800 !important;
        padding: 2px 4px !important;
        text-align: center !important;
    }

    #in-app-report-container .table-card-body {
        padding: 2px !important;
    }

    #in-app-report-container .eq-row {
        padding: 1px 3px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        border-bottom: 1px dotted #e2e8f0 !important;
    }

    #in-app-report-container .eq-row .eq-icon {
        font-size: 9px !important;
    }

    #in-app-report-container .footer {
        font-size: 9px !important;
        margin-top: 6px !important;
        padding-top: 4px !important;
        border-top: 1px solid #e2e8f0 !important;
    }
}

/* ==========================================================================
   In-Game Question Tally Sidebar (Left Panel)
   ========================================================================== */
.tally-sidebar {
    position: absolute;
    top: 85px;
    left: 15px;
    width: 180px;
    max-height: calc(100vh - 100px);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 10px;
    z-index: 20;
    overflow-y: auto !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.tally-sidebar::-webkit-scrollbar {
    width: 5px;
}
.tally-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.tally-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .tally-sidebar {
        top: auto;
        bottom: 85px;
        left: 8px;
        width: 135px;
        max-height: calc(100vh - 160px);
        padding: 6px;
    }
}

.tally-top-btns {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    margin-bottom: 6px;
}

.tally-level-btn {
    flex: 1;
    background: linear-gradient(135deg, #00d2ff, #0083b0);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 210, 255, 0.3);
}

.tally-pdf-btn {
    flex: 1;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.tally-level-btn:hover, .tally-pdf-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.15);
}

.tally-title-bar {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--gold);
    text-align: center;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.tally-toggle-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid var(--panel-border);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tally-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.tally-order-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--panel-border);
    color: white;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tally-order-toggle-btn:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.tally-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden !important;
}

.tally-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tally-item.correct {
    border-left: 4px solid #2ecc71;
    background: rgba(46, 204, 113, 0.2);
}

.tally-item.wrong {
    border-left: 4px solid #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

.tally-item.pending {
    opacity: 0.65;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.tally-item.active-current {
    opacity: 1.0;
    border-left: 4px solid var(--gold);
    background: rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    animation: activeTallyPulse 1.2s infinite alternate;
}

@keyframes activeTallyPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.03); }
}

.tally-mark {
    font-weight: 800;
    font-size: 1rem;
}

.tally-mark.tick {
    color: #2ecc71;
}

.tally-mark.cross {
    color: #e74c3c;
}

/* ==========================================================================
   Lobby Action Buttons & How To Play Guide Cards
   ========================================================================== */
.lobby-action-btns {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.howtoplay-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 10px 14px;
}

.guide-card h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--gold);
    margin-bottom: 4px;
}

.guide-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 2px 0;
}

/* ==========================================================================
   Professional Top-Left Game Logo & Title Badge
   ========================================================================== */
.hud-game-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.4), rgba(30, 41, 59, 0.75));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(56, 189, 248, 0.55);
    border-radius: 20px;
    padding: 4px 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), 0 0 14px rgba(2, 132, 199, 0.35);
    transition: all 0.22s ease;
    user-select: none;
    line-height: 1;
}

.hud-game-brand-pill:hover {
    transform: scale(1.03);
    border-color: #38bdf8;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.65), rgba(3, 105, 161, 0.85));
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
}

.hud-brand-icon {
    font-size: 1.15rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: planeFloat 2.5s infinite ease-in-out alternate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@keyframes planeFloat {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-2px) rotate(4deg); }
}

.hud-brand-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 210, 255, 0.6);
    white-space: nowrap;
    line-height: 1;
}

/* ==========================================================================
   Top Action Buttons Bar & Centered Pill Buttons
   ========================================================================== */
.tally-actions-header-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
    padding: 3px 0 4px 0;
    width: 100%;
}

.hud-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.9));
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 5px 14px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.hud-action-pill:hover {
    transform: scale(1.04);
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.35), rgba(0, 131, 176, 0.45));
    border-color: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
    color: #ffffff;
}

.hud-action-pill span, .hud-action-pill * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==========================================================================
   SUPER PROFESSIONAL MOBILE GAME LAYOUT & SCREEN ADAPTATION
   ========================================================================== */

/* In Game Mode: Main Header & Arena layout with tight 3px gap (matching kokpit-duraklat gap) */
body.game-active {
    overflow: hidden !important;
    height: 100vh !important;
    max-height: 100vh !important;
}

body.game-active #app-container {
    overflow: hidden !important;
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

body.game-active #main-header {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: max(4px, env(safe-area-inset-top, 4px)) 8px 3px 8px !important;
    background: rgba(10, 15, 30, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    z-index: 105 !important;
    height: auto !important;
    min-height: 24px !important;
    margin: 0 !important;
    overflow: hidden !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
}

body.game-active #main-header .brand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
}

body.game-active #main-header .brand-logo {
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

body.game-active #main-header .brand-text h1 {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    line-height: 1 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

body.game-active #main-header .version-badge {
    font-size: 0.60rem !important;
    padding: 0 4px !important;
    margin-left: 2px !important;
    border-radius: 8px !important;
    line-height: 1.2 !important;
}

body.game-active #main-header .sub-title,
body.game-active #main-header .header-actions,
body.game-active .header-actions,
body.game-active #user-profile-badge,
body.game-active #header-logout-btn {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

body.game-active #main-content {
    padding: 0 !important;
    margin: 0 !important;
    flex: 1 !important;
    display: flex !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
}

body.game-active #screen-game {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 100;
    flex: 1 !important;
}

/* Position Game HUD with exact 3px gap below the header frame (matching kokpit-duraklat gap) */
body.game-active #game-hud {
    top: 3px !important;
    padding-top: 0 !important;
}

body.game-active .hud-top-bar-container {
    margin-top: 0 !important;
}

/* Floating Tally Toggle Pill Button */
.tally-toggle-pill {
    position: absolute;
    top: 65px;
    left: 12px;
    z-index: 35;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    border: 1px.5px solid rgba(255, 255, 255, 0.4);
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 210, 255, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tally-toggle-pill:hover {
    transform: scale(1.05);
    background: rgba(0, 210, 255, 0.4);
    color: white;
}

.tally-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Mobile Specific Optimizations (width <= 768px) */
@media (max-width: 768px) {
    .tally-close-btn {
        display: flex;
    }

    .tally-title-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Collapsible Tally Sidebar on Mobile */
    .tally-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 240px !important;
        max-height: 100vh !important;
        border-radius: 0 16px 16px 0 !important;
        z-index: 90 !important;
        transform: translateX(-105%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
        background: rgba(15, 23, 42, 0.92) !important;
    }

    .tally-sidebar.open {
        transform: translateX(0) !important;
    }

    /* Compact Top Game HUD */
    #game-hud {
        top: 8px !important;
        left: 8px !important;
        right: 8px !important;
    }

    .hud-box {
        padding: 4px 8px !important;
        border-radius: 10px !important;
        font-size: 0.75rem !important;
    }

    .hud-left {
        gap: 4px !important;
    }

    .speed-box, .theme-box, .combo-box {
        padding: 3px 6px !important;
    }

    .speed-lbl {
        font-size: 0.6rem !important;
    }

    #hud-speed-select, #hud-theme-select {
        font-size: 0.75rem !important;
        padding: 1px 4px !important;
    }

    /* Question Box: Sleek & Compact so clouds have maximum screen area */
    .hud-center {
        top: 6px !important;
    }

    .question-box {
        padding: 4px 14px !important;
        border-radius: 12px !important;
        border-width: 1.5px !important;
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.6) !important;
    }

/* Top Left Game HUD Clickable User Profile Pill */
.hud-profile-pill {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
    border-radius: 18px !important;
    padding: 2px 8px !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.hud-profile-pill:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #00d2ff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.4) !important;
}

.hud-profile-top-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    line-height: 1.1;
}

.hud-profile-avatar {
    font-size: 1.05rem !important;
    line-height: 1 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.hud-profile-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.hud-profile-sub-username,
.hud-profile-name {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 110px !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Student Profile Modal Tab Sections */
.prof-tab-content {
    display: block;
}
.prof-tab-content.hidden {
    display: none !important;
}

    .question-lbl {
        font-size: 0.55rem !important;
        letter-spacing: 0.8px !important;
    }

    .question-text {
        font-size: 1.3rem !important;
    }

    /* Compact Fuel & Score */
    .fuel-bar-wrapper {
        width: 65px !important;
        height: 8px !important;
    }

    .hud-right {
        gap: 4px !important;
    }

    .hud-lbl {
        font-size: 0.6rem !important;
    }

    .hud-val {
        font-size: 0.9rem !important;
    }

    /* Floating Touch Controls */
    #mobile-controls {
        bottom: 12px !important;
        right: 12px !important;
        gap: 4px !important;
        opacity: 0.75;
    }

    .ctrl-btn {
        width: 46px !important;
        height: 46px !important;
        font-size: 1.2rem !important;
        border-width: 1.5px !important;
    }
}

@media (max-width: 480px) {
    .speed-lbl {
        display: none !important;
    }
    .hud-box.speed-box, .hud-box.theme-box {
        padding: 2px 4px !important;
    }
    .hud-box.combo-box {
        display: none !important;
    }
    .question-box {
        padding: 3px 10px !important;
    }
    .question-text {
        font-size: 1.15rem !important;
    }
}

/* Site-Wide Mobile Responsiveness Enhancements (Header, Welcome, Lobby) */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    #main-header {
        padding: max(8px, env(safe-area-inset-top, 8px)) 12px 8px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .brand {
        gap: 8px;
    }

    .brand-logo {
        font-size: 1.5rem;
    }

    .brand-text h1 {
        font-size: 1.15rem;
    }

    .brand-text .sub-title {
        display: none;
    }

    .header-actions {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .header-actions::-webkit-scrollbar {
        display: none;
    }

    .icon-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .stat-pill {
        padding: 4px 10px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .profile-badge {
        padding: 4px 10px;
        flex-shrink: 0;
    }

    .badge-info .user-name {
        font-size: 0.8rem;
    }

    .hero-card {
        padding: 16px;
        margin: 0 auto;
        max-width: 100%;
    }

    .hero-header h2 {
        font-size: 1.3rem;
    }

    .hero-header p {
        font-size: 0.82rem;
        margin-bottom: 8px;
    }

    .form-row {
        flex-direction: column;
        gap: 8px;
    }

    .character-selector {
        gap: 6px;
    }

    .char-card {
        padding: 6px;
    }

    .char-card .avatar {
        font-size: 1.2rem;
    }

    .char-card .char-label {
        font-size: 0.7rem;
    }

    /* 3-Row Dedicated Mobile HUD: exact 3px gap below header (matching kokpit-duraklat gap) */
    #game-hud {
        padding: 0 6px 2px 6px !important;
        top: 3px !important;
        left: 0 !important;
        right: 0 !important;
        gap: 3px !important;
    }

    .hud-top-bar-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 3px !important;
        margin-top: 0 !important;
        background: rgba(15, 23, 42, 0.96) !important; /* Solid dark backdrop covering top 2 rows on mobile & android */
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        border-radius: 12px !important;
        padding: 4px 6px !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(10px) !important;
        z-index: 55 !important;
        box-sizing: border-box !important;
    }

    /* Mobile Top Unified HUD Bar (Single Slim Row - v1.3.9) */
    .hud-top-unified-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        width: 100% !important;
        padding: 2px 2px !important;
        box-sizing: border-box !important;
    }

    .hud-profile-pill {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 2px 8px !important;
        gap: 5px !important;
        max-width: 150px !important;
        border-radius: 14px !important;
        flex-shrink: 0 !important;
    }

    .hud-profile-pill .hud-profile-avatar {
        font-size: 0.95rem !important;
        display: inline-block !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
    }

    .hud-profile-pill .hud-profile-name {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 0.74rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        max-width: 95px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    .hud-profile-pill .hud-grade-pill {
        display: none !important;
    }

    .hud-stats-center {
        gap: 4px !important;
    }

    .hud-stats-center .hud-stat-pill {
        padding: 2px 6px !important;
        font-size: 0.74rem !important;
        border-radius: 10px !important;
        gap: 3px !important;
    }

    .hud-actions-right {
        gap: 3px !important;
    }

    .hud-action-pill-btn {
        padding: 3px 6px !important;
        font-size: 0.70rem !important;
        border-radius: 12px !important;
        gap: 2px !important;
    }

    .hud-action-pill-btn .pause-label {
        display: inline-block !important;
        font-size: 0.70rem !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        letter-spacing: 0.2px !important;
    }

    .tally-box-card.tally-box-slim {
        padding: 2px 4px !important;
        border-radius: 10px !important;
    }

    .hud-flight-strip {
        gap: 4px !important;
        padding: 0 4px !important;
    }

    .hud-strip-left-col {
        width: 76px !important;
        gap: 3px !important;
    }

    .hud-strip-btn {
        height: 23px !important;
        font-size: 0.65rem !important;
        padding: 2px 3px !important;
        gap: 2px !important;
    }

    .hud-strip-center-question {
        height: 48px !important;
        padding: 1px 4px !important;
    }

    .hud-strip-center-question .q-badge {
        font-size: 0.55rem !important;
        padding: 1px 6px !important;
    }

    .hud-strip-center-question .q-text,
    .hud-strip-center-question #hud-question {
        font-size: 1.15rem !important;
    }

    .hud-strip-right-tally {
        width: 76px !important;
        height: 48px !important;
    }

    .tally-3row-col-container {
        height: 44px !important;
        max-height: 44px !important;
    }

    .tally-3row-col-container .single-line-tally-card {
        height: 13px !important;
        min-height: 13px !important;
        max-height: 13px !important;
        padding: 0 2px !important;
    }

    .tally-3row-col-container .single-line-tally-card .tally-pill-text {
        font-size: 0.58rem !important;
        line-height: 13px !important;
    }

    .tally-mini-toggle {
        font-size: 0.68rem !important;
        padding: 3px 5px !important;
        border-radius: 8px !important;
    }

    /* Show Left-Side Quick Exit Button on Native Android */
    body.is-native-android .side-flight-exit-btn,
    .is-native-android .side-flight-exit-btn {
        display: flex !important;
        left: 3px !important;
        top: 62px !important;
        transform: none !important;
    }

    /* Show Left-Side Vertical Fuel Gauge safely beside question banner on Mobile (Original Compact Size) */
    .side-vertical-fuel-gauge {
        display: flex !important;
        left: 5px !important;
        top: 128px !important;
        height: auto !important;
        width: 18px !important;
        padding: 3px 2px !important;
        border-radius: 14px !important;
        transform: none !important;
        pointer-events: none !important;
    }

    .side-vertical-fuel-gauge .side-fuel-icon {
        font-size: 0.75rem !important;
    }

    .side-vertical-fuel-gauge .side-fuel-track {
        width: 7px !important;
        height: 75px !important;
        flex: none !important;
        margin: 0 !important;
        border-radius: 4px !important;
    }

    .side-vertical-fuel-gauge .side-fuel-label {
        font-size: 0.58rem !important;
    }

    /* Show Right-Side Vertical Race Progress & Ranking Tracker aligned with Fuel Gauge on Mobile */
    .side-race-tracker {
        display: flex !important;
        right: 5px !important;
        left: auto !important;
        top: 128px !important;
        height: auto !important;
        width: 26px !important;
        padding: 3px 2px !important;
        border-radius: 14px !important;
        transform: none !important;
        box-sizing: border-box !important;
        z-index: 65 !important;
    }

    .side-race-tracker .race-tracker-track {
        width: 6px !important;
        height: 75px !important;
        flex: none !important;
        margin: 2px 0 !important;
    }

    .side-race-tracker .race-tracker-flag,
    .side-race-tracker .race-tracker-start {
        font-size: 0.75rem !important;
    }

    .side-race-tracker .race-tracker-plane .tracker-icon {
        font-size: 0.85rem !important;
    }

    .side-race-tracker .race-tracker-tooltip {
        right: 28px !important;
        left: auto !important;
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
        white-space: nowrap !important;
    }

    /* Hide redundant bottom horizontal bar on mobile so screen is clean */
    #bottom-full-fuel-bar {
        display: none !important;
    }

    /* Çetele Kartı & Entegre Butonlar */
    .tally-box-card {
        max-width: 100% !important;
    }
    .tally-inner-header-bar {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 3px !important;
        padding: 3px 4px !important;
    }

    .tally-body-layout {
        gap: 3px !important;
        padding: 3px 2px !important;
    }

    .tally-flank-btn {
        padding: 4px 6px !important;
        font-size: 0.72rem !important;
        font-weight: 800 !important;
        border-radius: 8px !important;
        gap: 2px !important;
        white-space: nowrap !important;
    }

    .hud-row-header-simple {
        justify-content: center !important;
    }

    .tally-btn-pill {
        font-size: 0.66rem !important;
        font-weight: 800 !important;
        padding: 3px 2px !important;
        border-radius: 8px !important;
        line-height: 1 !important;
    }

    .tally-dots-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2 Columns on Mobile Phone */
        flex: 1 !important;
        min-width: 0 !important;
        height: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important; /* STRICT MAXIMUM 2 ROWS VISIBLE ON MOBILE */
        padding: 2px 4px !important;
        gap: 2px 4px !important;
        border-right: 1px solid rgba(0, 210, 255, 0.35) !important;
        overflow-y: auto !important;
    }

    .hud-question-banner {
        padding: 3px 16px !important;
        margin: 3px auto 0 auto !important;
        max-width: calc(100% - 50px) !important;
        border-radius: 18px !important;
        gap: 8px !important;
    }

    .hud-question-banner .q-badge {
        font-size: 0.72rem !important;
        padding: 2px 8px !important;
    }

    .hud-question-banner .q-text {
        font-size: 1.3rem !important;
        font-weight: 900 !important;
    }
}

/* Mobile Flight Report Modal & 10x Table Grid Optimizations */
@media (max-width: 600px) {
    #modal-flight-report {
        padding: 6px !important;
    }

    .flight-report-modal {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 94vh !important;
        border-radius: 14px !important;
    }

    .report-modal-header {
        padding: 8px 12px !important;
    }

    .report-modal-header h3 {
        font-size: 0.95rem !important;
    }

    .report-modal-body {
        padding: 10px !important;
    }

    .report-modal-footer {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 8px !important;
    }

    .report-modal-footer .btn-secondary {
        grid-column: span 2 !important;
    }

    .report-modal-footer .btn {
        padding: 10px 4px !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .poster-container {
        padding: 8px 6px !important;
        border-width: 1.5px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .report-header-banner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
        padding: 8px 10px !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    .report-header-banner > div:last-child {
        text-align: left !important;
        width: 100% !important;
        border-top: 1px dashed #cbd5e1 !important;
        padding-top: 6px !important;
    }

    .report-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    .report-substats-strip {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px 8px !important;
        text-align: left !important;
        padding: 6px 8px !important;
        box-sizing: border-box !important;
    }

    .flight-tally-grid {
        grid-template-columns: 1fr !important;
    }

    .table-grid-10x {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

/* ==========================================================================
   Language Selector Dropdown Styles (Matching User's Screenshot Exactly)
   ========================================================================== */

/* ==========================================================================
   Language Selector Dropdown Styles (Sleek, Compact & Aesthetic Design)
   ========================================================================== */

.lang-dropdown-container {
    position: relative;
    display: inline-block;
    z-index: 1050;
}

.lang-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 5px 12px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lang-selector-btn:hover,
.lang-selector-btn.open {
    background: rgba(30, 41, 59, 0.95);
    border-color: #06b6d4;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.lang-selector-btn .arrow-down {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.lang-selector-btn.open .arrow-down {
    transform: rotate(180deg);
}

/* Dropdown Menu Card Floating directly underneath button */
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    max-width: 92vw;
    background: rgba(13, 19, 31, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(0, 210, 255, 0.35);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 210, 255, 0.2);
    z-index: 99999;
    transition: opacity 0.15s ease;
    box-sizing: border-box;
}

.lang-dropdown-menu.hidden {
    display: none !important;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 2px;
    box-sizing: border-box;
}

.lang-grid::-webkit-scrollbar {
    width: 4px;
}

.lang-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.4);
    border-radius: 4px;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.lang-item:hover {
    background: rgba(0, 210, 255, 0.2);
    color: #ffffff;
    border-color: #00d2ff;
    transform: translateY(-1px);
}

.lang-item.active {
    background: rgba(6, 182, 212, 0.3);
    border-color: #06b6d4;
    color: #38bdf8;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

.lang-item .flag-img {
    width: 16px;
    height: 11px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.flag-img-btn {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    vertical-align: middle;
}

.flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.lang-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

/* AESTHETIC COMPACT SPEED DROPDOWN */
.speed-dropdown-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 999999 !important;
}

.speed-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.15));
    border: 1.5px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    padding: 3px 8px;
    color: #ffd700;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    line-height: 1;
}

.speed-selector-btn:hover {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    border-color: #ffffff;
    transform: scale(1.05);
}

.speed-selector-btn .arrow-down {
    font-size: 0.55rem;
    transition: transform 0.2s ease;
}

.speed-selector-btn.open .arrow-down {
    transform: rotate(180deg);
}

/* Speed Dropdown Menu Floating Pop-up - Left Aligned to stay on-screen on mobile & web */
.speed-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: auto !important;
    width: 215px !important;
    max-width: 90vw !important;
    background: #0f172a !important;
    border: 2px solid #ffd700 !important;
    border-radius: 14px !important;
    padding: 7px 6px !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.98), 0 0 25px rgba(255, 215, 0, 0.35) !important;
    z-index: 9999999 !important;
    box-sizing: border-box !important;
    transition: opacity 0.15s ease;
}

.hud-actions-right .speed-dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

.speed-dropdown-menu.hidden {
    display: none !important;
}

.speed-dropdown-header {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 5px 6px !important;
    margin-bottom: 6px !important;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.15)) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
}

.speed-header-title {
    font-family: var(--font-heading) !important;
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    color: #ffd700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.speed-options-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    padding-right: 2px !important;
}

.speed-opt-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    background: rgba(30, 41, 59, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 9px !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.speed-opt-badge {
    background: rgba(255, 215, 0, 0.25) !important;
    color: #ffd700 !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    font-weight: 900 !important;
    font-size: 0.76rem !important;
    min-width: 32px !important;
    text-align: center !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
}

.speed-opt-label {
    flex: 1 !important;
    text-align: left !important;
    margin-left: 8px !important;
    color: #f1f5f9 !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
}

.speed-opt-icon {
    font-size: 1.15rem !important;
    margin-left: 4px !important;
}

.speed-opt-item:hover {
    background: rgba(255, 215, 0, 0.25) !important;
    color: #ffffff !important;
    border-color: #ffd700 !important;
    transform: translateX(3px) !important;
}

.speed-opt-item.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 140, 0, 0.3)) !important;
    border-color: #ffd700 !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.45) !important;
}

/* Language Dropdown Menu Floating Pop-up (2-Column Modal Grid Matching Screenshot) */
.lang-dropdown-container {
    position: relative;
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 270px;
    max-width: 92vw;
    background: rgba(10, 16, 28, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(0, 210, 255, 0.55);
    border-radius: 14px;
    padding: 8px 6px 6px 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 210, 255, 0.35);
    z-index: 999999 !important;
    box-sizing: border-box;
    transition: opacity 0.15s ease;
}

.lang-dropdown-menu.hidden {
    display: none !important;
}

.lang-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px 6px 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lang-header-title {
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 0.3px;
}

.lang-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    max-height: 250px;
    overflow-y: auto;
    padding: 2px;
}

.lang-opt-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: rgba(30, 41, 59, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    box-sizing: border-box;
}

.lang-opt-item img,
.flag-img-mini {
    width: 20px !important;
    height: 14px !important;
    max-width: 20px !important;
    max-height: 14px !important;
    border-radius: 2px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.lang-opt-label {
    flex: 1;
    text-align: left;
    color: #ffffff;
    font-size: 0.70rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-opt-item:hover {
    background: rgba(0, 210, 255, 0.25);
    border-color: #00d2ff;
    transform: scale(1.02);
}

.lang-opt-item.active {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.38), rgba(3, 105, 161, 0.45)) !important;
    border: 1.5px solid #00d2ff !important;
    color: #00d2ff !important;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.45);
}

/* 🏆 100% Completed Table Pill Styling (Golden Champion Trophy Theme) */
.tbl-trophy-icon {
    display: none;
    font-size: 0.92rem;
    margin-right: 3px;
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

.table-pill-btn.completed .tbl-trophy-icon {
    display: inline-block !important;
}

.table-pill-btn.completed {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
    border: 2px solid #fde047 !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.6), 0 0 12px rgba(253, 224, 71, 0.75) !important;
    animation: goldTrophyPulse 2.2s infinite alternate ease-in-out !important;
}

.table-pill-btn.completed:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
    border-color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.85), 0 0 18px rgba(253, 224, 71, 0.95) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

.num-toggle-btn.table-completed {
    border-color: #fde047 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.85), 0 0 6px #fde047 !important;
}

/* Leaderboard Active Row Highlight */
.lb-table tr.active-row {
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.3), rgba(56, 189, 248, 0.18)) !important;
    border-left: 4px solid #38bdf8 !important;
}
.lb-table tr.active-row td {
    color: #38bdf8 !important;
    font-weight: 800 !important;
}
.lb-table tr.active-row .lb-user-name {
    color: #38bdf8 !important;
}

/* ==========================================================================
   Professional Gameover & Summary Card Styles
   ========================================================================== */

.gameover-content-card {
    max-width: 500px !important;
    width: 92vw !important;
    padding: 24px 22px !important;
    border-radius: 24px !important;
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(6, 182, 212, 0.18) !important;
}

.completion-stars {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.85));
    margin-bottom: 6px;
}

.endgame-reason-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
    border: 1.5px solid #10b981;
    border-radius: 16px;
    padding: 16px 14px;
    margin: 12px 0 18px 0;
    text-align: center;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.endgame-reason-banner.reason-fuel {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.35));
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.reason-icon {
    font-size: 2.6rem;
    display: block;
    margin: 0 auto 6px auto;
    filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.6));
}

#go-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: #34d399;
    margin: 0 0 4px 0;
    letter-spacing: 0.3px;
}

.reason-fuel #go-title {
    color: #fca5a5;
}

#go-message {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.35;
}

/* 2x2 Stats Summary Grid */
.results-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.res-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: left;
}

.res-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.res-info {
    display: flex;
    flex-direction: column;
}

.res-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.res-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
}

.res-score .res-val { color: #38bdf8; }
.res-gold .res-val { color: #fbbf24; }
.res-accuracy .res-val { color: #34d399; }
.res-combo .res-val { color: #fb923c; }

/* Buttons Layout */
.modal-footer-btns-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-go-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.btn-go-next {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-go-next:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.6);
    transform: translateY(-2px);
}

.btn-go-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.btn-go-restart {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-go-restart:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-2px);
}

.btn-go-report {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #fbbf24;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.btn-go-report:hover {
    background: linear-gradient(135deg, #b45309, #92400e);
    transform: translateY(-2px);
}

.endgame-reason-banner.reason-good {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(3, 105, 161, 0.35));
    border-color: #0284c7;
    box-shadow: 0 0 20px rgba(2, 132, 199, 0.25);
}

.endgame-reason-banner.reason-good #go-title {
    color: #38bdf8;
}

.endgame-reason-banner.reason-practice {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.25), rgba(180, 83, 9, 0.35));
    border-color: #d97706;
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.25);
}

.endgame-reason-banner.reason-practice #go-title {
    color: #fbbf24;
}

.btn-go-retry-wrongs {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #fde047;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
    font-size: 1.02rem;
    animation: pulse-retry 2s infinite ease-in-out;
}

.btn-go-retry-wrongs:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px) scale(1.02);
}

@keyframes pulse-retry {
    0%, 100% {
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 22px rgba(253, 224, 71, 0.75);
    }
}

/* Ensure modal-flight-report displays with high z-index, flexible height and clean scrolling */
#modal-flight-report {
    z-index: 3000 !important;
}

#modal-flight-report .flight-report-modal {
    max-width: 860px !important;
    width: 95vw !important;
    max-height: 90vh !important;
    height: 85vh !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 210, 255, 0.25) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
}

.report-modal-header {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    padding: 14px 20px !important;
    border-bottom: 1.5px solid rgba(0, 210, 255, 0.3) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.report-modal-header h3 {
    color: #00d2ff !important;
    font-family: var(--font-heading) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.report-modal-body {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 20px !important;
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    display: block !important;
    min-height: 300px !important;
}

#in-app-report-container {
    display: block !important;
    width: 100% !important;
    min-height: 250px !important;
    color: #0f172a !important;
}

.report-modal-footer {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    padding: 14px 20px !important;
    border-top: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    flex-shrink: 0 !important;
}

/* Glassmorphic In-App Toast Banner Notification (Replaces native browser alerts) */
.app-toast-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98));
    border: 1.5px solid #00d2ff;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 210, 255, 0.4);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
}

.app-toast-banner.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive 10x Table Report Grid Styling */
.table-grid-10x {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

@media (min-width: 600px) {
    .table-grid-10x {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

.table-card-10x {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    page-break-inside: avoid !important;
}

.table-card-header {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    text-align: center !important;
    padding: 5px 2px !important;
    letter-spacing: 0.5px !important;
}

.table-card-body {
    padding: 4px !important;
}

.eq-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 2.5px 5px !important;
    font-size: 0.76rem !important;
    border-bottom: 1px dotted #e2e8f0 !important;
    white-space: nowrap !important;
}

.eq-row:last-child {
    border-bottom: none !important;
}

.eq-row.eq-neutral {
    color: #334155 !important;
}

.eq-row.eq-correct {
    color: #15803d !important;
    font-weight: 800 !important;
    background: #f0fdf4 !important;
    border-radius: 4px !important;
}

.eq-row.eq-wrong {
    color: #dc2626 !important;
    font-weight: 800 !important;
    background: #fef2f2 !important;
    border-radius: 4px !important;
}

/* Guaranteed 1-Page A4 PDF Layout */
@media print {
    @page {
        size: A4 portrait;
        margin: 4mm 6mm !important;
    }
    body, html {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        height: 100% !important;
        overflow: hidden !important;
    }
    .table-grid-10x {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 4px !important;
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }
    .table-card-10x {
        border-width: 1px !important;
        border-radius: 6px !important;
    }
    .table-card-header {
        font-size: 10px !important;
        padding: 2.5px 2px !important;
    }
    .eq-row {
        padding: 1.2px 3px !important;
        font-size: 9px !important;
    }
}

/* Dedicated Bottom-Right Round Red Fire Button */
.hud-fire-btn {
    position: absolute;
    right: 22px;
    bottom: 105px; /* Positioned higher up above bottom navigation bars */
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757, #dc2626);
    border: 3px solid #ff6b81;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100; /* Must stay beneath modal overlays (z-index 1000+) */
    box-shadow: 0 6px 22px rgba(239, 68, 68, 0.8), 0 0 16px rgba(255, 71, 87, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    transition: transform 0.12s ease, filter 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.hud-fire-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.15);
}

.hud-fire-btn:active {
    transform: scale(0.90);
    filter: brightness(0.9);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.9);
}

.hud-fire-btn .fire-icon {
    font-size: 1.6rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    animation: fire-pulse 1.4s infinite alternate ease-in-out;
}

.hud-fire-btn .fire-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-top: 1px;
}

@keyframes fire-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px #ffeaa7); }
    100% { transform: scale(1.14); filter: drop-shadow(0 0 8px #ff7675); }
}

@media (max-width: 768px) {
    .hud-fire-btn {
        right: 16px;
        bottom: 95px; /* Comfortable thumb height on mobile phones! */
        width: 64px;
        height: 64px;
    }
    .hud-fire-btn .fire-icon {
        font-size: 1.5rem;
    }
    .hud-fire-btn .fire-label {
        font-size: 0.62rem;
    }
}

/* Fire Button must NEVER be visible when any modal window is open */
body.modal-open #hud-fire-btn,
.modal-overlay.active ~ #hud-fire-btn,
.modal-overlay.active ~ * #hud-fire-btn {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Ultra-Professional Responsive Leaderboard Table & Modal Overflow Prevention */
.leaderboard-table-wrapper {
    overflow-x: hidden !important;
    width: 100% !important;
}

.lb-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
}

.lb-user-cell {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.lb-user-details {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
}

.lb-user-name {
    font-weight: 800 !important;
    font-size: 0.90rem !important;
    color: #f8fafc !important;
}

.lb-user-sub {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    margin-top: 1px !important;
}

.you-badge {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    padding: 1px 5px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    margin-left: 4px !important;
}

@media (max-width: 600px) {
    .hide-on-mobile {
        display: none !important;
    }
    .modal-overlay {
        padding: 8px !important;
    }
    .modal-content {
        max-width: 95vw !important;
        width: 95vw !important;
        padding: 16px 10px !important;
        margin: 0 auto !important;
        border-radius: 16px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    .modal-header h3 {
        font-size: 0.95rem !important;
    }
    .lb-tab {
        padding: 6px 4px !important;
        font-size: 0.72rem !important;
    }
    .lb-table th, .lb-table td {
        padding: 8px 4px !important;
        font-size: 0.80rem !important;
    }
}

@media (min-width: 601px) {
    .hide-on-desktop {
        display: none !important;
    }
}

/* Sleek Visual Sky Themes Grid in Theme Modal */
.sky-themes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

@media (max-width: 480px) {
    .sky-themes-grid {
        grid-template-columns: 1fr;
    }
}

.theme-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}

.theme-card-item:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.95);
}

.theme-card-item.active {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(30, 41, 59, 0.95)) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
}

.theme-card-preview {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.day-preview { background: linear-gradient(135deg, #00c6ff, #0072ff); }
.night-preview { background: linear-gradient(135deg, #0b132b, #3a506b); }
.sunset-preview { background: linear-gradient(135deg, #1c2833, #f39c12); }
.space-preview { background: linear-gradient(135deg, #050b14, #6b117b); }
.pink-preview { background: linear-gradient(135deg, #8e44ad, #fd79a8); }

.theme-card-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.theme-card-info .theme-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.92rem;
    color: #ffffff;
}

.theme-card-info .theme-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Real-Time Live HUD Score & Gold Pulsing Animations */
@keyframes scorePulseBonus {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
    50% { transform: scale(1.24); box-shadow: 0 0 22px rgba(255, 215, 0, 0.9); background: rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

@keyframes goldPulseBonus {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
    50% { transform: scale(1.24); box-shadow: 0 0 22px rgba(245, 158, 11, 0.9); background: rgba(245, 158, 11, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes goldPulsePenalty {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
    50% { transform: scale(1.20); box-shadow: 0 0 22px rgba(239, 68, 68, 0.95); background: rgba(239, 68, 68, 0.45); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
}

.score-pulse-bonus {
    animation: scorePulseBonus 0.5s ease-out !important;
}

.gold-pulse-bonus {
    animation: goldPulseBonus 0.5s ease-out !important;
}

.gold-pulse-penalty {
    animation: goldPulsePenalty 0.5s ease-out !important;
}

/* ==========================================================================
   How To Play Visual 6-Card Grid & RTL Layout Styles
   ========================================================================== */
.howtoplay-modal-content {
    max-width: 820px !important;
}

.guide-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    padding: 12px 6px;
}

.guide-cards-grid .guide-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1.5px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    padding: 18px 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.guide-cards-grid .guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #fbbf24);
    opacity: 0.85;
}

.guide-cards-grid .guide-card:hover {
    transform: translateY(-4px);
    border-color: #38bdf8;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
}

.guide-card-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.6));
}

.guide-cards-grid .guide-card h4 {
    font-size: 1.08rem;
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-cards-grid .guide-card p {
    font-size: 0.90rem;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0;
}

/* Right-To-Left (RTL) Layout for Arabic / Hebrew / Persian */
[dir="rtl"], .rtl-mode {
    direction: rtl !important;
    text-align: right !important;
}

[dir="rtl"] .hud-left-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .hud-brand-title {
    max-width: 170px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.82rem !important;
}

/* Ensure Tally Bar structure NEVER gets squished or broken in RTL */
[dir="rtl"] .tally-body-layout,
[dir="rtl"] .tally-inner-header-bar {
    direction: ltr !important;
}

[dir="rtl"] .tally-side-btns,
.tally-side-btns {
    flex-direction: column !important;
    width: 70px !important;
    max-width: 70px !important;
    flex-shrink: 0 !important;
}

[dir="rtl"] .guide-cards-grid .guide-card h4 {
    flex-direction: row-reverse;
}

/* RTL Support for Modern Auth Box */
[dir="rtl"] .arrow-indicator,
.rtl-mode .arrow-indicator {
    display: inline-block !important;
    transform: scaleX(-1) !important;
}

[dir="rtl"] .input-with-icon .field-icon,
.rtl-mode .input-with-icon .field-icon {
    left: auto !important;
    right: 12px !important;
}

[dir="rtl"] .input-with-icon input,
.rtl-mode .input-with-icon input {
    padding: 10px 38px 10px 12px !important;
    text-align: right !important;
}

[dir="rtl"] .auth-mode-header,
.rtl-mode .auth-mode-header {
    text-align: right !important;
}

/* Strict button text bounds & ellipsis to prevent button shifting on language change */
.flank-btn-text, .tally-btn-pill, .hud-brand-title {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline-block;
}

/* Sleek Welcome / Login Screen Quick Actions Bar */
.welcome-quick-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 16px 0 6px 0;
    flex-wrap: wrap;
}

.welcome-lang-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.welcome-lang-box .welcome-lang-icon {
    display: none !important;
}

.welcome-lang-box .flag-img-btn {
    width: 22px !important;
    height: 15px !important;
    object-fit: cover !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
    flex-shrink: 0 !important;
}

.welcome-lang-box #welcome-lang-name,
.welcome-lang-box .lang-name {
    display: inline-block !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    letter-spacing: 0.2px !important;
}

.welcome-lang-box .arrow-down {
    font-size: 0.65rem !important;
    opacity: 0.8 !important;
    margin-left: 2px !important;
    flex-shrink: 0 !important;
}

.welcome-lang-box:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.9);
}

.welcome-howtoplay-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 18px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-howtoplay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.8);
}

#welcome-lang-dropdown-container {
    position: relative;
}

#welcome-lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999 !important;
}

/* Sleek Theme Button on Welcome Landing Page */
.welcome-theme-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 18px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.8);
}

/* Sleek Admin Button on Welcome Landing Page */
.welcome-admin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #475569, #334155);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 18px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(71, 85, 105, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.welcome-admin-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.8);
}

/* Beautiful Theme-Matching Language Dropdown Menu (2-Column Grid) */
.lang-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 5px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    width: 315px !important;
    max-width: 95vw !important;
    background: rgba(10, 16, 28, 0.98) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.6) !important;
    border-radius: 16px !important;
    padding: 8px 6px 6px 6px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 210, 255, 0.35) !important;
    backdrop-filter: blur(16px) !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
}

.lang-dropdown-menu.hidden {
    display: none !important;
}

.lang-dropdown-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 2px 4px 6px 4px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.lang-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    max-height: 260px !important;
    overflow-y: auto !important;
    padding: 2px !important;
    box-sizing: border-box !important;
}

.lang-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 6px !important;
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    user-select: none !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.lang-item span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    flex: 1 !important;
}

.lang-item:hover {
    background: rgba(0, 210, 255, 0.25) !important;
    border-color: #00d2ff !important;
    transform: scale(1.02) !important;
}

.lang-item.active {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.4), rgba(3, 105, 161, 0.5)) !important;
    border: 1.5px solid #00d2ff !important;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.5) !important;
    color: #00d2ff !important;
}

.lang-item .flag-img {
    width: 20px !important;
    height: 14px !important;
    max-width: 20px !important;
    max-height: 14px !important;
    object-fit: cover !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* Dynamic App-Wide Sky Atmosphere Themes on Body & Screen Views */
body[data-app-theme="day"] {
    background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
}

body[data-app-theme="night"] {
    background: linear-gradient(135deg, #0f172a, #1e1b4b) !important;
}

body[data-app-theme="sunset"] {
    background: linear-gradient(135deg, #ea580c, #7c2d12) !important;
}

body[data-app-theme="space"] {
    background: linear-gradient(135deg, #312e81, #581c87) !important;
}

body[data-app-theme="pink"] {
    background: linear-gradient(135deg, #db2777, #9d174d) !important;
}

/* Sleek Top-Floating Toast Banner (Supports Multi-line Centered Toast Text) */
.app-toast-banner {
    position: fixed !important;
    top: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-30px) scale(0.9) !important;
    height: auto !important;
    max-height: 120px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 18px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.4) !important;
    backdrop-filter: blur(16px) !important;
    z-index: 99999999 !important;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease !important;
    white-space: pre-wrap !important; /* Allows \n and automatic 2-line wrapping */
    text-align: center !important;
    line-height: 1.35 !important;
    max-width: 90vw !important;
}

.app-toast-banner.active {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

/* Sleek 2-Column Language Modal (Perfectly Balanced Center-Screen Alignment) */
#modal-lang-select {
    z-index: 9999999;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 20px;
}

.lang-modal-container {
    max-width: 420px !important;
    width: 94% !important;
    background: rgba(15, 23, 42, 0.96) !important;
    border: 2px solid rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.35) !important;
    border-radius: 20px !important;
    padding: 14px 16px !important;
    margin: auto !important;
}

.lang-modal-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Strict 2 columns always! */
    gap: 6px 8px !important;
    padding: 2px 0 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
}

.lang-modal-card {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px !important;
    padding: 7px 8px !important;
    min-width: 0 !important; /* Prevents overflow & column collapse! */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.lang-modal-card * {
    pointer-events: none !important;
}

.lang-modal-card:hover {
    transform: translateY(-2px) !important;
    border-color: #38bdf8 !important;
    background: rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3) !important;
}

.lang-modal-card.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.65), rgba(3, 105, 161, 0.85)) !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.6) !important;
}

.lang-modal-card .flag-img {
    width: 22px !important;
    height: 15px !important;
    object-fit: cover !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    flex-shrink: 0 !important;
}

.lang-modal-card .lang-name {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.lang-modal-card.active .lang-name {
    color: #38bdf8 !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6) !important;
}

/* Enhanced Scrollable "Nasıl Oynanır?" Guide Modal */
.howtoplay-modal-content {
    max-width: 680px !important;
    width: 92% !important;
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.howtoplay-body {
    overflow-y: auto !important;
    max-height: 65vh !important;
    padding-right: 8px !important;
    scrollbar-width: thin !important;
    scrollbar-color: #38bdf8 rgba(15, 23, 42, 0.6) !important;
}

.howtoplay-body::-webkit-scrollbar {
    width: 8px !important;
}

.howtoplay-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 8px !important;
}

.howtoplay-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6) !important;
}

/* Kid-Friendly Celebratory Gameover Modal Layout & Action Buttons */
.gameover-content-card {
    max-width: 520px !important;
    width: 94% !important;
    padding: 20px 16px !important;
}

.modal-footer-btns-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 16px !important;
    width: 100% !important;
}

.btn-go-action {
    border: none !important;
    border-radius: 14px !important;
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.btn-go-action:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

.btn-go-next {
    width: 100% !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 2px solid #6ee7b7 !important;
    color: #ffffff !important;
    font-size: 1.12rem !important;
    padding: 14px 18px !important;
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.55), 0 0 16px rgba(110, 231, 183, 0.7) !important;
    animation: goNextPulse 2.2s infinite alternate ease-in-out !important;
}

@keyframes goNextPulse {
    0% { transform: scale(1); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); }
    100% { transform: scale(1.03); box-shadow: 0 8px 26px rgba(16, 185, 129, 0.85), 0 0 22px rgba(110, 231, 183, 0.95); }
}

.btn-go-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
}

.btn-go-row .btn-go-action {
    flex: 1 1 auto !important;
    padding: 9px 4px !important;
    font-size: 0.74rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    line-height: 1.2 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
}

.btn-go-restart {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #ffffff !important;
}

.btn-go-select-table {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1.5px solid #ffeaa7 !important;
    color: #ffffff !important;
}

.btn-go-report {
    background: linear-gradient(135deg, #475569, #334155) !important;
    border: 1.5px solid #94a3b8 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Play Store App Update Modal Styles
   ========================================================================== */
.update-modal-card {
    max-width: 440px !important;
    background: rgba(15, 23, 42, 0.96) !important;
    border: 2px solid #38bdf8 !important;
    border-radius: 20px !important;
    padding: 24px 20px !important;
    box-shadow: 0 12px 40px rgba(0, 198, 255, 0.35) !important;
    text-align: center;
}

.update-rocket-badge {
    font-size: 2.8rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    animation: pulse 1.8s infinite alternate;
}

.update-modal-header h2 {
    font-family: var(--font-heading, "Fredoka", sans-serif);
    font-size: 1.35rem;
    color: #ffd700;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.update-modal-header p {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.version-comparison-card {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.version-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.version-label {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.version-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.95rem;
}

.current-pill {
    background: #334155;
    color: #94a3b8;
    border: 1px solid #64748b;
}

.new-pill {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: 1px solid #34d399;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.version-divider {
    font-size: 1.2rem;
    color: #38bdf8;
    font-weight: 900;
}

.update-notes-card {
    background: rgba(15, 23, 42, 0.6);
    border-left: 3px solid #38bdf8;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    margin-bottom: 18px;
}

.update-notes-card h4 {
    font-size: 0.82rem;
    color: #38bdf8;
    margin: 0 0 4px 0;
}

.update-notes-text {
    font-size: 0.82rem;
    color: #e2e8f0;
    line-height: 1.45;
}

.update-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pulse-btn {
    animation: btnGlow 2s infinite alternate;
}

@keyframes btnGlow {
    0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.9); }
}

/* HIGH-CONTRAST IN-APP FLIGHT REPORT MODAL STYLES */
#in-app-report-container {
    color: #0f172a !important;
    background: #ffffff !important;
    padding: 8px !important;
}

#in-app-report-container .header h1 {
    color: #0f172a !important;
}

#in-app-report-container .header p {
    color: #64748b !important;
}

#in-app-report-container .card {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
}

#in-app-report-container .card h3 {
    color: #0284c7 !important;
}

#in-app-report-container .card .val {
    color: #0f172a !important;
}

#in-app-report-container .table-card-10x {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
}

#in-app-report-container .table-card-header {
    color: #ffffff !important;
}

#in-app-report-container .table-card-body {
    background: #ffffff !important;
}

.poster-container {
    background: #ffffff !important;
    border: 2.5px dashed #0284c7 !important;
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.08) !important;
}

.eq-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 3px 8px !important;
    font-size: 0.85rem !important;
    border-bottom: 1px dashed #e2e8f0 !important;
}

.eq-row:last-child {
    border-bottom: none !important;
}

.eq-row .eq-text,
.eq-text {
    font-family: 'Fredoka', 'Outfit', 'Nunito', system-ui, sans-serif !important;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
    text-shadow: none !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    display: inline-block !important;
}

#in-app-report-container .eq-row.eq-neutral .eq-text,
.eq-row.eq-neutral .eq-text {
    color: #475569 !important;
    text-shadow: none !important;
}

#in-app-report-container .eq-row.eq-correct,
.eq-row.eq-correct {
    color: #059669 !important;
    background: #ecfdf5 !important;
    font-weight: 800 !important;
}

#in-app-report-container .eq-row.eq-correct .eq-text,
.eq-row.eq-correct .eq-text {
    color: #059669 !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}

#in-app-report-container .eq-row.eq-correct .eq-icon,
.eq-row.eq-correct .eq-icon {
    color: #059669 !important;
    font-weight: 900 !important;
    font-size: 1.15rem !important;
    display: inline-block !important;
    visibility: visible !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", Arial, sans-serif !important;
}

#in-app-report-container .eq-row.eq-wrong,
.eq-row.eq-wrong {
    color: #e11d48 !important;
    background: #fef2f2 !important;
    font-weight: 900 !important;
}

#in-app-report-container .eq-row.eq-wrong .eq-text,
.eq-row.eq-wrong .eq-text {
    color: #e11d48 !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}

#in-app-report-container .eq-row.eq-wrong .eq-icon,
.eq-row.eq-wrong .eq-icon {
    color: #e11d48 !important;
    font-weight: 900 !important;
    font-size: 1.15rem !important;
    display: inline-block !important;
    visibility: visible !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", Arial, sans-serif !important;
}

/* Sleek Glassmorphic Exit Confirmation Modal */
.exit-confirm-modal-card {
    max-width: 440px !important;
    width: 92% !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)) !important;
    border: 2px solid rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(239, 68, 68, 0.35) !important;
    border-radius: 22px !important;
    padding: 24px 20px !important;
    text-align: center !important;
    margin: auto !important;
}

.exit-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.exit-badge-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
    animation: pulse 1.5s infinite alternate;
}

.exit-modal-header h3 {
    color: #ef4444 !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    margin: 0 !important;
    letter-spacing: 0.5px;
}

.exit-modal-header p {
    color: #e2e8f0 !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    margin: 4px 0 0 0 !important;
}

.exit-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.exit-actions-grid .btn {
    padding: 12px 16px !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.logout-confirm-modal-card {
    border-color: rgba(239, 68, 68, 0.75) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(239, 68, 68, 0.4) !important;
}

.logout-badge-icon {
    width: 68px !important;
    height: 68px !important;
    border-radius: 50% !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 2px solid rgba(239, 68, 68, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2.2rem !important;
    margin-bottom: 10px !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.35) !important;
}

.logout-confirm-title {
    color: #f87171 !important;
    font-size: 1.3rem !important;
    font-weight: 900 !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 2px 10px rgba(239, 68, 68, 0.5) !important;
}

.logout-confirm-desc {
    color: #cbd5e1 !important;
    font-size: 0.94rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    max-width: 360px !important;
    text-align: center !important;
}



/* ==========================================================================
   Multiplayer Room, Race Tracker & Victory Podium Styles
   ========================================================================== */

/* Responsive Fit for MP Lobby Modal (Ekrana Sığdırma) */
#modal-multiplayer-lobby .mp-lobby-modal-content {
    max-width: 480px;
    width: 95vw;
    max-height: 94vh;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
}

.mp-lobby-header {
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.mp-lobby-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mp-lobby-hero {
    text-align: center;
    margin-bottom: 2px;
}

.mp-hero-planes {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 3px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.mp-hero-title {
    color: #ffd700;
    margin: 0 0 2px 0;
    font-size: 1rem;
    font-weight: 800;
}

.mp-hero-desc {
    color: #94a3b8;
    font-size: 0.74rem;
    margin: 0;
    line-height: 1.25;
}

.mp-lobby-choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 520px) and (min-height: 600px) {
    .mp-lobby-choice-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

.mp-choice-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid rgba(0, 210, 255, 0.4);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mp-choice-card:hover {
    transform: translateY(-2px);
    border-color: #00d2ff;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.35);
}

.mp-choice-card .choice-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
    line-height: 1;
}

.mp-choice-card .choice-title {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #ffffff;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.mp-choice-card .choice-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.2;
}

.mp-choice-btn {
    margin-top: 6px !important;
    pointer-events: none;
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
}

.mp-join-input-row {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.mp-join-input {
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    border: 1.5px solid #00d2ff;
    padding: 6px 8px;
    border-radius: 8px;
    width: 100%;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.mp-join-btn {
    font-weight: 800 !important;
    white-space: nowrap !important;
    padding: 0 14px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
}

.mp-lobby-footer {
    text-align: center;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.mp-back-btn {
    border-radius: 10px !important;
    font-weight: 700 !important;
    padding: 5px 14px !important;
    font-size: 0.78rem !important;
}

/* Room Banner & Code */
#modal-multiplayer-room .modal-content {
    max-height: 94vh;
    overflow-y: auto;
}

.mp-room-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 2px dashed #00d2ff;
    border-radius: 14px;
    padding: 10px 12px;
    text-align: center;
    margin-bottom: 10px;
}

.mp-room-tag {
    display: inline-block;
    background: rgba(0, 210, 255, 0.2);
    color: #38bdf8;
    font-size: 0.70rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 1px;
}

.mp-room-code {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 3px;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
    margin: 2px 0;
}

.mp-room-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

/* Players Grid in Room */
.mp-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.mp-players-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 14px;
}

.mp-pilot-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 12px;
}

.mp-pilot-chip.host {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.mp-pilot-chip .pilot-badge {
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.9);
    padding: 2px 6px;
    border-radius: 6px;
    color: #38bdf8;
}

.mp-pilot-chip.host .pilot-badge {
    color: #ffd700;
}

.mp-pilot-chip .pilot-avatar {
    font-size: 1.3rem;
}

.mp-pilot-chip .pilot-name {
    font-weight: 800;
    color: #ffffff;
    font-size: 0.92rem;
    flex: 1;
}

.mp-section-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
}

.mp-client-waiting-box {
    text-align: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
}

/* RIGHT-SIDE VERTICAL RACE PROGRESS & RANKING TRACKER */
.side-race-tracker {
    position: absolute;
    right: max(8px, calc(50% - 410px)) !important;
    left: auto !important;
    top: 104px !important;
    height: 90px !important;
    width: 28px !important;
    z-index: 65;
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid rgba(236, 72, 153, 0.65);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), 0 0 12px rgba(236, 72, 153, 0.35);
    backdrop-filter: blur(8px);
    user-select: none;
    box-sizing: border-box;
}

.side-race-tracker.hidden {
    display: none !important;
}

.race-tracker-flag {
    font-size: 0.9rem;
    line-height: 1;
}

.race-tracker-start {
    font-size: 0.85rem;
    line-height: 1;
}

.race-tracker-track {
    position: relative;
    width: 6px;
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin: 4px 0;
}

.race-tracker-plane {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 50%);
    transition: bottom 0.25s ease-out;
    display: flex;
    align-items: center;
    z-index: 2;
}

.race-tracker-plane .tracker-icon {
    font-size: 1rem;
    filter: drop-shadow(0 0 3px #000);
}

.race-tracker-plane.my-plane .tracker-icon {
    filter: drop-shadow(0 0 6px #00d2ff);
}

.race-tracker-plane .race-tracker-name {
    position: absolute;
    right: 22px;
    left: auto;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 3px;
}

.race-tracker-plane.my-plane .race-tracker-name {
    border-color: #38bdf8;
    color: #38bdf8;
    font-weight: 900;
}

.race-tracker-plane .score-pill {
    background: rgba(255, 255, 255, 0.12);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.6rem;
}

.race-tracker-plane.my-plane .race-tracker-name {
    border-color: #00d2ff;
    color: #38bdf8;
}

/* Victory Podium Ranks */
.podium-ranks-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.podium-pilot-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
}

.podium-pilot-card.winner-card {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(30, 41, 59, 0.95));
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25);
}

.podium-pilot-card.current-player {
    outline: 2px solid #00d2ff;
}

.podium-rank {
    font-size: 1.4rem;
    font-weight: 900;
    min-width: 28px;
    text-align: center;
}

.podium-avatar {
    font-size: 1.6rem;
}

.podium-info {
    flex: 1;
}

.podium-name {
    font-weight: 800;
    color: #ffffff;
    font-size: 1rem;
}

.podium-score {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

@keyframes bounce-podium {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.08); }
}

/* ==========================================================================
   ÇOK OYUNCULU ODA HAZIR DURUMU & GERİ SAYIM STİLLERİ
   ========================================================================== */

/* Oda Başlık Hazır Rozeti */
.mp-header-ready-tag {
    font-size: 0.74rem;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.mp-header-ready-tag.ready {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.mp-header-ready-tag.waiting {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid #f59e0b;
}

/* Oyuncu Kartı Hazır Durumu Rozeti */
.mp-status-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: auto;
    white-space: nowrap;
}

.mp-status-pill.status-ready {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.mp-status-pill.status-waiting {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.mp-pilot-chip.inactive {
    opacity: 0.65;
    border-style: dashed;
}

/* ==========================================================================
   EŞZAMANLI YARIŞ GERİ SAYIM OVERLAY (3-2-1 SAYACI)
   ========================================================================== */
.mp-countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.99) 100%);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    animation: fadeInOverlay 0.3s ease-out;
}

.mp-countdown-overlay.hidden {
    display: none !important;
}

@keyframes fadeInOverlay {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.mp-countdown-container {
    text-align: center;
    max-width: 580px;
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.mp-countdown-header {
    margin-bottom: 4px;
}

.mp-countdown-badge {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-weight: 900;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 1.5px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Pilot Kadrosu (VS Ekranı) */
.mp-countdown-lineup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 14px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mp-lineup-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.mp-lineup-card.my-card .lineup-name {
    color: #38bdf8;
    font-weight: 900;
}

.mp-lineup-card .lineup-avatar {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.mp-lineup-card .lineup-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.mp-lineup-card .lineup-role {
    font-size: 0.72rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

.mp-vs-badge {
    font-weight: 900;
    font-size: 1.1rem;
    color: #f43f5e;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}

/* 3D Büyük Sayaç Rakamı */
.mp-countdown-digit {
    font-size: 6.5rem;
    font-weight: 900;
    line-height: 1;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    color: #ffffff;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.6);
    animation: pulseDigit 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulseDigit {
    0% { transform: scale(0.65); opacity: 0.2; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.mp-countdown-digit.step-3 {
    color: #38bdf8;
    text-shadow: 0 0 40px rgba(56, 189, 248, 0.8);
}

.mp-countdown-digit.step-2 {
    color: #fbbf24;
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.8);
}

.mp-countdown-digit.step-1 {
    color: #f87171;
    text-shadow: 0 0 40px rgba(248, 113, 113, 0.8);
}

.mp-countdown-digit.step-go {
    font-size: 4.2rem;
    color: #4ade80;
    text-shadow: 0 0 50px rgba(74, 222, 128, 0.9);
}

.mp-countdown-subtext {
    font-size: 1.15rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

/* MP Pre-Flight Names Announcement Styles */
.mp-names-announcement-banner {
    width: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(56, 189, 248, 0.15);
    text-align: center;
    animation: pulseBannerGlow 2s infinite alternate;
}

@keyframes pulseBannerGlow {
    from { border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2); }
    to { border-color: rgba(251, 191, 36, 0.7); box-shadow: 0 6px 25px rgba(251, 191, 36, 0.35); }
}

.mp-announce-tag {
    font-size: 0.9rem;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mp-announce-names {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 16px rgba(251, 191, 36, 0.6);
    word-break: break-word;
}

.mp-lineup-cards-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}

.mp-countdown-badge.mp-badge-names {
    background: linear-gradient(135deg, #0284c7, #6366f1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.mp-countdown-digit.step-names {
    font-size: 4.8rem;
    animation: pulseDuel 1s infinite alternate;
}

@keyframes pulseDuel {
    0% { transform: scale(0.95); opacity: 0.85; }
    100% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 35px rgba(251, 191, 36, 0.9); }
}

/* ==========================================================================
   BİTİŞ BEKLEME KARTI & RESMİ DERECE RAPORU STİLLERİ
   ========================================================================== */

.tourney-waiting-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;
    margin: 0 auto;
}

.tourney-waiting-hero {
    text-align: center;
    background: rgba(15, 23, 42, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 22px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.tw-hero-icon {
    font-size: 3rem;
    margin-bottom: 6px;
    animation: bounce 2s infinite;
}

.tw-hero-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #00f0ff;
    margin: 0 0 6px 0;
}

.tw-hero-sub {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 6px 0;
}

.tw-hero-desc {
    color: #94a3b8;
    font-size: 0.82rem;
    margin: 0;
}

.tw-hero-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 30px;
    margin-top: 14px;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.tourney-waiting-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px;
}

.tw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.tw-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tourney-waiting-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    padding: 10px 14px;
    gap: 10px;
}

.tourney-waiting-player-row.finished {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.08));
    border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.tourney-waiting-player-row.racing {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px dashed rgba(56, 189, 248, 0.4);
}

.tw-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tw-avatar {
    font-size: 1.4rem;
    background: rgba(0, 0, 0, 0.3);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tw-name {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tw-you-tag {
    font-size: 0.7rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    padding: 1px 6px;
    border-radius: 6px;
}

.tw-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.tw-badge-finished {
    background: #10b981;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.tw-badge-racing {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ==========================================================================
   RESMİ DERECE RAPORU & OLİMPİK PODYUM
   ========================================================================== */

.tourney-report-printable-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Motivasyon & Şampiyonluk Afişi */
.podium-motivation-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.podium-motivation-banner.champ {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(245, 158, 11, 0.18));
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
}

.podium-motivation-banner.silver {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.15), rgba(148, 163, 184, 0.15));
    border-color: #e2e8f0;
}

.podium-motivation-banner.bronze {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    border-color: #f59e0b;
}

/* Olimpik 3'lü Podyum Kürsüsü */
.olympic-podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 16px 0;
    min-height: 190px;
    padding-bottom: 6px;
}

.podium-pedestal {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    position: relative;
}

.podium-pedestal.rank-1 {
    order: 2;
    z-index: 3;
}

.podium-pedestal.rank-2 {
    order: 1;
    z-index: 2;
}

.podium-pedestal.rank-3 {
    order: 3;
    z-index: 1;
}

.pedestal-crown {
    font-size: 1.6rem;
    margin-bottom: -6px;
    animation: bounce 1.8s infinite;
}

.pedestal-avatar {
    font-size: 2rem;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.podium-pedestal.rank-1 .pedestal-avatar {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.pedestal-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    max-width: 95px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.pedestal-score {
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffd700;
    margin-bottom: 6px;
}

.pedestal-column {
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.pedestal-column.gold {
    height: 110px;
    background: linear-gradient(180deg, #ffd700 0%, #d97706 100%);
    border: 2px solid #fef08a;
}

.pedestal-column.silver {
    height: 80px;
    background: linear-gradient(180deg, #cbd5e1 0%, #64748b 100%);
    border: 2px solid #f1f5f9;
}

.pedestal-column.bronze {
    height: 60px;
    background: linear-gradient(180deg, #f59e0b 0%, #92400e 100%);
    border: 2px solid #fed7aa;
}

.pedestal-medal {
    font-size: 1.4rem;
}

.pedestal-num {
    font-weight: 900;
    font-size: 1.3rem;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 4'lü Özet İstatistik Izgarası */
.tourney-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 540px) {
    .tourney-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.74rem;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
}

.stat-value.highlight-gold { color: #ffd700; }
.stat-value.highlight-blue { color: #38bdf8; }
.stat-value.highlight-green { color: #34d399; }

/* Detaylı Sıralama Tablosu */
.tourney-leader-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px;
}

.tl-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    color: #ffd700;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.tl-rows-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tourney-leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 9px 12px;
    gap: 10px;
}

.tourney-leader-row.current-player-row {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(14, 165, 233, 0.08));
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.tl-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tl-rank {
    font-weight: 900;
    font-size: 0.95rem;
    min-width: 36px;
}

.tl-avatar {
    font-size: 1.25rem;
}

.tl-name {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-you {
    font-size: 0.7rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    padding: 1px 6px;
    border-radius: 6px;
}

.tl-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.tl-correct {
    color: #cbd5e1;
    font-weight: 600;
}

.tl-score {
    color: #ffd700;
    font-weight: 800;
}

.tl-time {
    color: #38bdf8;
    font-family: monospace;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
}

/* ==========================================================================
   YAZDIRMA & PDF ÇIKTISI (@media print)
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .no-print-bar,
    .btn,
    .close-btn,
    #main-menu,
    #game-canvas,
    .menu-nav,
    .side-race-tracker {
        display: none !important;
    }

    .modal-overlay {
        position: static !important;
        background: none !important;
    }

    .modal-content {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    .tourney-report-panel {
        background: #ffffff !important;
        color: #000000 !important;
    }
}

.pedestal-column.bronze {
    height: 60px;
    background: linear-gradient(180deg, #f59e0b 0%, #92400e 100%);
    border: 2px solid #fed7aa;
}

.pedestal-medal {
    font-size: 1.4rem;
}

.pedestal-num {
    font-weight: 900;
    font-size: 1.3rem;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 4'lü Özet İstatistik Izgarası */
.tourney-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 540px) {
    .tourney-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.74rem;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
}

.stat-value.highlight-gold { color: #ffd700; }
.stat-value.highlight-blue { color: #38bdf8; }
.stat-value.highlight-green { color: #34d399; }

/* Detaylı Sıralama Tablosu */
.tourney-leader-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px;
}

.tl-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    color: #ffd700;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.tl-rows-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tourney-leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 9px 12px;
    gap: 10px;
}

.tourney-leader-row.current-player-row {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(14, 165, 233, 0.08));
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.tl-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tl-rank {
    font-weight: 900;
    font-size: 0.95rem;
    min-width: 36px;
}

.tl-avatar {
    font-size: 1.25rem;
}

.tl-name {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-you {
    font-size: 0.7rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    padding: 1px 6px;
    border-radius: 6px;
}

.tl-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.tl-correct {
    color: #cbd5e1;
    font-weight: 600;
}

.tl-score {
    color: #ffd700;
    font-weight: 800;
}

.tl-time {
    color: #38bdf8;
    font-family: monospace;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
}

/* ==========================================================================
   YAZDIRMA & PDF ÇIKTISI (@media print)
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .no-print-bar,
    .btn,
    .close-btn,
    #main-menu,
    #game-canvas,
    .menu-nav,
    .side-race-tracker {
        display: none !important;
    }

    .modal-overlay {
        position: static !important;
        background: none !important;
    }

    .modal-content {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    .tourney-report-panel {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .tourney-report-body {
        color: #000000 !important;
    }

    .tl-name, .stat-value, .pedestal-name, .tw-name {
        color: #000000 !important;
    }
}

/* ==========================================================================
   Professional Welcome & Pilot Login Screen Revamp
   ========================================================================== */
#screen-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    box-sizing: border-box;
}

#screen-welcome .hero-card {
    max-width: 460px;
    width: 100%;
    margin: auto;
    padding: 26px 22px 22px 22px;
    text-align: center;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.97) 100%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65), 0 0 35px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

#screen-welcome .hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
    opacity: 0.9;
}

#screen-welcome .cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.12));
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fde68a;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
}

#screen-welcome .hero-header h2 {
    font-family: var(--font-heading);
    font-size: 1.42rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#screen-welcome .hero-header p {
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 1.45;
    margin: 0 0 12px 0;
}

/* Unified 2x2 Toolbar for Welcome Quick Actions */
#screen-welcome .welcome-quick-actions-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin: 12px 0 16px 0 !important;
    width: 100% !important;
}

#screen-welcome .welcome-lang-box,
#screen-welcome .welcome-theme-btn,
#screen-welcome .welcome-howtoplay-btn,
#screen-welcome .welcome-leaderboard-btn,
#screen-welcome .welcome-admin-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    background: linear-gradient(145deg, #1e293b, #0f172a) !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 12px !important;
    padding: 9px 10px !important;
    color: #f8fafc !important;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

#screen-welcome .welcome-lang-box {
    border-color: rgba(56, 189, 248, 0.55) !important;
    color: #e0f2fe !important;
    background: linear-gradient(145deg, rgba(3, 105, 161, 0.25), rgba(15, 23, 42, 0.9)) !important;
}
#screen-welcome .welcome-theme-btn {
    border-color: rgba(192, 132, 252, 0.55) !important;
    color: #f3e8ff !important;
    background: linear-gradient(145deg, rgba(147, 51, 234, 0.25), rgba(15, 23, 42, 0.9)) !important;
}
#screen-welcome .welcome-howtoplay-btn {
    border-color: rgba(251, 113, 133, 0.55) !important;
    color: #ffe4e6 !important;
    background: linear-gradient(145deg, rgba(225, 29, 72, 0.25), rgba(15, 23, 42, 0.9)) !important;
}
#screen-welcome .welcome-leaderboard-btn {
    border-color: rgba(245, 158, 11, 0.55) !important;
    color: #fef3c7 !important;
    background: linear-gradient(145deg, rgba(217, 119, 6, 0.25), rgba(15, 23, 42, 0.9)) !important;
}
#screen-welcome .welcome-admin-btn {
    border-color: rgba(250, 204, 21, 0.55) !important;
    color: #fef08a !important;
    background: linear-gradient(145deg, rgba(202, 138, 4, 0.25), rgba(15, 23, 42, 0.9)) !important;
}

#screen-welcome .welcome-lang-box:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}
#screen-welcome .welcome-theme-btn:hover {
    border-color: #c084fc !important;
    box-shadow: 0 4px 14px rgba(192, 132, 252, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}
#screen-welcome .welcome-howtoplay-btn:hover {
    border-color: #fb7185 !important;
    box-shadow: 0 4px 14px rgba(251, 113, 133, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}
#screen-welcome .welcome-leaderboard-btn:hover {
    border-color: #fbbf24 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}
#screen-welcome .welcome-admin-btn:hover {
    border-color: #facc15 !important;
    box-shadow: 0 4px 14px rgba(250, 204, 21, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

/* ==========================================================================
   Play Mode Selection Modal (Ultra-Professional Gaming UI)
   ========================================================================== */
#modal-play-mode-select .modal-content,
.play-mode-modal-content {
    background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98)) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(56, 189, 248, 0.25) !important;
    border-radius: 24px !important;
    max-width: 580px !important;
    width: 95% !important;
    max-height: 88vh !important;
    max-height: 88dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.6) rgba(15, 23, 42, 0.5) !important;
    padding: 20px 22px !important;
    margin: auto !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(14px) !important;
}

.play-mode-modal-content::-webkit-scrollbar {
    width: 6px;
}
.play-mode-modal-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
}
.play-mode-modal-content::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.6);
    border-radius: 8px;
}
.play-mode-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.9);
}

.play-mode-modal-content .modal-header,
.play-mode-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.play-mode-header-back-btn,
.play-mode-back-circle-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.play-mode-header-back-btn:hover,
.play-mode-back-circle-btn:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
    transform: scale(1.08) !important;
}

.play-mode-header-title {
    font-size: 1.18rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    text-shadow: 0 2px 10px rgba(56, 189, 248, 0.4) !important;
    margin: 0 !important;
    flex: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.play-mode-footer-actions {
    margin-top: 18px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

.play-mode-logout-btn {
    width: 100% !important;
    max-width: 380px !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(185, 28, 28, 0.38)) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.6) !important;
    color: #fee2e2 !important;
    padding: 12px 20px !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25) !important;
    transition: all 0.2s ease !important;
}

.play-mode-logout-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(185, 28, 28, 0.55)) !important;
    border-color: #ef4444 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

.play-mode-modal-body {
    padding: 0 !important;
}

.play-mode-greeting {
    text-align: center;
    margin-bottom: 18px;
}

.play-mode-greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.play-mode-pilot-title {
    color: #f8fafc;
    margin: 0 0 6px 0;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.play-mode-desc-text {
    color: #94a3b8;
    font-size: 0.88rem;
    margin: 0 auto;
    max-width: 440px;
    line-height: 1.4;
}

.play-mode-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.play-mode-card {
    position: relative;
    border-radius: 20px;
    padding: 16px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    user-select: none;
    overflow: hidden;
}

.play-mode-card:hover {
    transform: translateY(-4px);
}

.play-mode-card:active {
    transform: scale(0.98);
}

/* Solo Card Style */
.play-mode-card.solo-card {
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.18) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border: 2px solid rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.25) !important;
}

.play-mode-card.solo-card:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.45) !important;
}

/* Multiplayer Card Style */
.play-mode-card.multi-card {
    background: linear-gradient(160deg, rgba(236, 72, 153, 0.18) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border: 2px solid rgba(244, 114, 182, 0.65) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(236, 72, 153, 0.3) !important;
}

.play-mode-card.multi-card:hover {
    border-color: #f472b6 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(236, 72, 153, 0.5) !important;
}

.card-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mode-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.15);
}

.solo-icon-circle {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(2, 132, 199, 0.2));
    border: 1.5px solid rgba(56, 189, 248, 0.5);
}

.multi-icon-circle {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.35), rgba(219, 39, 119, 0.2));
    border: 1.5px solid rgba(244, 114, 182, 0.55);
}

.card-title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.mode-badge {
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.solo-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.45);
}

.multi-badge {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(244, 63, 94, 0.35));
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.55);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.hot-badge {
    animation: pulseBadge 2s infinite;
}

.mode-title {
    font-family: var(--font-heading, inherit);
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}

.mode-desc {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.35;
    margin-bottom: 12px;
    flex-grow: 1;
    text-align: left;
}

.mode-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.mode-tag {
    border-radius: 8px;
    padding: 3px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.solo-tag {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #bae6fd;
}

.multi-tag {
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.35);
    color: #fbcfe8;
}

.mode-action-btn {
    font-weight: 900 !important;
    font-size: 0.92rem !important;
    padding: 11px 14px !important;
    border-radius: 14px !important;
    width: 100% !important;
    letter-spacing: 0.2px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.solo-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(125, 211, 252, 0.45) !important;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.45) !important;
}

.multi-btn {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(244, 114, 182, 0.5) !important;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.45) !important;
}

/* ==========================================================================
   Mobile & Small Screen Adaptation: Fits gracefully on all screens & devices
   ========================================================================== */
@media (max-width: 600px) {
    #modal-play-mode-select .modal-content,
    .play-mode-modal-content {
        padding: 14px 12px !important;
        width: 95% !important;
        max-height: 92vh !important;
        max-height: 92dvh !important;
        border-radius: 20px !important;
    }

    .play-mode-greeting {
        margin-bottom: 12px !important;
    }

    .play-mode-pilot-title {
        font-size: 1.15rem !important;
        margin-bottom: 3px !important;
    }

    .play-mode-desc-text {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    .play-mode-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .play-mode-card {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    .card-top-row {
        gap: 10px !important;
        margin-bottom: 8px !important;
    }

    .mode-icon-circle {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.5rem !important;
        border-radius: 12px !important;
    }

    .mode-title {
        font-size: 1.05rem !important;
    }

    .mode-desc {
        font-size: 0.77rem !important;
        margin-bottom: 8px !important;
        line-height: 1.32 !important;
    }

    .mode-tags {
        gap: 4px !important;
        margin-bottom: 10px !important;
    }

    .mode-tag {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
    }

    .mode-action-btn {
        padding: 9px 12px !important;
        font-size: 0.88rem !important;
        border-radius: 12px !important;
    }
}

/* Also ensure landscape or very short screens (e.g. height < 640px) scroll comfortably */
@media (max-height: 640px) {
    .play-mode-greeting {
        display: none !important;
    }
    #modal-play-mode-select .modal-content,
    .play-mode-modal-content {
        max-height: 94vh !important;
        max-height: 94dvh !important;
        padding: 10px 12px !important;
    }
}

/* Ultra-Professional Auth Card Redesign (High Contrast & Unmistakable UI) */
#screen-welcome .auth-box {
    background: rgba(10, 15, 29, 0.75) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 18px !important;
    padding: 16px 14px !important;
    margin-top: 10px !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

#screen-welcome .auth-mode-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.35), rgba(15, 23, 42, 0.85)) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.5) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    margin-bottom: 14px !important;
    text-align: left !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

#screen-welcome .auth-mode-icon-badge {
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border: 1.5px solid #38bdf8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.5), 0 0 14px rgba(56, 189, 248, 0.4) !important;
}

#screen-welcome .auth-mode-icon-badge.register-badge {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #34d399 !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.5), 0 0 14px rgba(52, 211, 153, 0.4) !important;
}

#screen-welcome .auth-mode-info {
    flex: 1 !important;
    min-width: 0 !important;
}

#screen-welcome .auth-mode-title {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    letter-spacing: 0.3px !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
}

#screen-welcome .auth-mode-subtitle {
    margin: 3px 0 0 0 !important;
    font-size: 0.74rem !important;
    color: #bae6fd !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Distinct, Elevated Data Entry Groups */
#screen-welcome .modern-input-group,
#screen-welcome .form-group {
    margin-bottom: 12px !important;
    text-align: left !important;
}

#screen-welcome .modern-input-group label,
#screen-welcome .form-group label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    margin-bottom: 5px !important;
    color: #38bdf8 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}

#screen-welcome .input-with-icon {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

#screen-welcome .input-with-icon .field-icon {
    position: absolute !important;
    left: 12px !important;
    font-size: 1.15rem !important;
    color: #38bdf8 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)) !important;
}

#screen-welcome .input-with-icon input,
#screen-welcome .form-group input,
#screen-welcome .form-group select {
    width: 100% !important;
    padding: 11px 14px 11px 42px !important;
    border-radius: 12px !important;
    border: 2px solid rgba(56, 189, 248, 0.45) !important;
    background: #090d16 !important;
    color: #ffffff !important;
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    outline: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(56, 189, 248, 0.15) !important;
}

#screen-welcome .form-group select {
    padding-left: 14px !important;
    cursor: pointer !important;
}

#screen-welcome .input-with-icon input::placeholder,
#screen-welcome .form-group input::placeholder {
    color: #64748b !important;
    font-weight: 500 !important;
}

#screen-welcome .input-with-icon input:focus,
#screen-welcome .form-group input:focus,
#screen-welcome .form-group select:focus {
    border-color: #00d2ff !important;
    background: #0d1527 !important;
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.35), inset 0 2px 5px rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
}

/* High-Impact Primary CTA Buttons */
#screen-welcome .btn-auth-submit,
#screen-welcome .btn-primary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    padding: 13px 20px !important;
    border-radius: 14px !important;
    border: 2px solid #38bdf8 !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0284c7 100%) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100% !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5), 0 0 16px rgba(56, 189, 248, 0.35) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    letter-spacing: 0.3px !important;
    margin-top: 6px !important;
}

#screen-welcome .btn-auth-submit .btn-emoji,
#screen-welcome .btn-primary .btn-emoji {
    font-size: 1.25rem !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)) !important;
}

#screen-welcome .btn-auth-submit:hover,
#screen-welcome .btn-primary:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #38bdf8 100%) !important;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.65), 0 0 20px rgba(56, 189, 248, 0.5) !important;
    border-color: #ffffff !important;
}

#screen-welcome .btn-auth-submit:active,
#screen-welcome .btn-primary:active {
    transform: translateY(1px) !important;
}

#screen-welcome .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    border: 2px solid #34d399 !important;
    border-radius: 14px !important;
    padding: 13px 20px !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5), 0 0 16px rgba(52, 211, 153, 0.35) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 6px !important;
}

#screen-welcome .btn-success:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #6ee7b7 100%) !important;
    border-color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.65), 0 0 20px rgba(52, 211, 153, 0.5) !important;
}

/* Elegant Switch Prompt Card */
#screen-welcome .auth-switch-prompt-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: rgba(30, 41, 59, 0.65) !important;
    border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    margin-top: 12px !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

#screen-welcome .auth-switch-prompt-card .switch-prompt-text {
    font-size: 0.78rem !important;
    color: #cbd5e1 !important;
    font-weight: 600 !important;
}

#screen-welcome .auth-switch-action-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

#screen-welcome .auth-switch-action-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border-color: #ffffff !important;
    transform: translateX(2px) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.6) !important;
}

#screen-welcome .auth-switch-action-btn .arrow-indicator {
    font-size: 0.78rem !important;
    transition: transform 0.2s ease !important;
}

#screen-welcome .auth-switch-action-btn:hover .arrow-indicator {
    transform: translateX(2px) !important;
}

/* Distinct Divider */
#screen-welcome .auth-divider {
    position: relative !important;
    text-align: center !important;
    margin: 16px 0 14px 0 !important;
}

#screen-welcome .auth-divider::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: 1.5px !important;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.35), transparent) !important;
}

#screen-welcome .auth-divider span {
    position: relative !important;
    display: inline-block !important;
    background: #1e293b !important;
    border: 1.5px solid #475569 !important;
    color: #94a3b8 !important;
    padding: 3px 14px !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* High-Energy Guest Action Button */
#screen-welcome .btn-guest-action,
#screen-welcome .btn-secondary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.28)) !important;
    border: 2px solid #f59e0b !important;
    border-radius: 14px !important;
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    color: #fef08a !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
    width: 100% !important;
    letter-spacing: 0.2px !important;
}

#screen-welcome .btn-guest-action:hover,
#screen-welcome .btn-secondary:hover {
    border-color: #fbbf24 !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.45)) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

/* Character Selection */
#screen-welcome .char-card {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 10px !important;
    transition: all 0.2s ease !important;
}

#screen-welcome .char-option input:checked + .char-card.pink {
    border-color: #ec4899 !important;
    background: rgba(236, 72, 153, 0.2) !important;
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.35) !important;
}

#screen-welcome .char-option input:checked + .char-card.blue {
    border-color: #0ea5e9 !important;
    background: rgba(14, 165, 233, 0.2) !important;
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.35) !important;
}

/* ==========================================================================
   Welcome / Auth Screen Mobile Fit Optimization (100% Viewport Fit)
   ========================================================================== */
@media (max-width: 600px), (max-height: 820px) {
    #main-header {
        padding: max(8px, env(safe-area-inset-top, 8px)) 10px 4px 10px !important;
    }
    .brand-logo {
        font-size: 1.3rem !important;
    }
    .brand-text h1 {
        font-size: 1.05rem !important;
    }
    .version-badge {
        font-size: 0.65rem !important;
        padding: 1px 5px !important;
    }

    body.game-active #main-header {
        padding: max(4px, env(safe-area-inset-top, 4px)) 8px 3px 8px !important;
    }
    body.game-active #main-header .brand-logo {
        font-size: 0.95rem !important;
    }
    body.game-active #main-header .brand-text h1 {
        font-size: 0.82rem !important;
    }

    #screen-welcome {
        min-height: calc(100vh - 45px) !important;
        min-height: calc(100dvh - 45px) !important;
        padding: 4px 8px 8px 8px !important;
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
        overflow-y: auto !important;
    }

    #screen-welcome .hero-card {
        padding: 14px 16px 14px 16px !important;
        max-width: 410px !important;
        border-radius: 20px !important;
        margin: auto !important;
        background: linear-gradient(170deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 29, 0.99) 100%) !important;
        border: 2px solid rgba(56, 189, 248, 0.5) !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(14, 165, 233, 0.25) !important;
    }

    #screen-welcome .cloud-badge {
        padding: 3px 10px !important;
        font-size: 0.72rem !important;
        margin-bottom: 5px !important;
        border: 1.5px solid #fbbf24 !important;
    }

    #screen-welcome .hero-header h2 {
        font-size: 1.12rem !important;
        margin: 0 0 4px 0 !important;
        line-height: 1.25 !important;
        color: #ffffff !important;
        text-shadow: 0 2px 8px rgba(0, 210, 255, 0.3) !important;
    }

    /* Hide long description text on mobile so interactive elements fit */
    #screen-welcome .hero-header p {
        display: none !important;
    }

    /* Ultra-compact 2x2 Toolbar */
    #screen-welcome .welcome-quick-actions-bar {
        gap: 6px !important;
        margin: 8px 0 10px 0 !important;
    }

    #screen-welcome .welcome-lang-box,
    #screen-welcome .welcome-theme-btn,
    #screen-welcome .welcome-howtoplay-btn,
    #screen-welcome .welcome-leaderboard-btn,
    #screen-welcome .welcome-admin-btn {
        padding: 8px 7px !important;
        font-size: 0.78rem !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        gap: 6px !important;
        border-width: 1.5px !important;
    }

    #screen-welcome .flag-img-btn {
        width: 20px !important;
        height: 14px !important;
        border-radius: 2px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
    }

    #screen-welcome .welcome-lang-box .welcome-lang-icon {
        display: none !important;
    }

    #screen-welcome .welcome-lang-box #welcome-lang-name,
    #screen-welcome .welcome-lang-box .lang-name {
        display: inline-block !important;
        font-size: 0.80rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        white-space: nowrap !important;
        margin-left: 1px !important;
    }

    #screen-welcome .welcome-lang-box .arrow-down {
        font-size: 0.60rem !important;
        opacity: 0.75 !important;
        margin-left: 2px !important;
    }

    /* Dedicated Framed Auth Box */
    #screen-welcome .auth-box {
        background: rgba(10, 15, 29, 0.8) !important;
        border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
        border-radius: 15px !important;
        padding: 12px 10px !important;
        margin-top: 8px !important;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    }

    /* Auth Header */
    #screen-welcome .auth-mode-header {
        padding: 7px 10px !important;
        margin-bottom: 10px !important;
        gap: 8px !important;
        border-radius: 11px !important;
        background: linear-gradient(135deg, rgba(3, 105, 161, 0.35), rgba(15, 23, 42, 0.9)) !important;
        border: 1.5px solid rgba(56, 189, 248, 0.5) !important;
    }
    #screen-welcome .auth-mode-icon-badge {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
        border-radius: 8px !important;
        border: 1.5px solid #38bdf8 !important;
    }
    #screen-welcome .auth-mode-title {
        font-size: 0.92rem !important;
        color: #ffffff !important;
        font-weight: 900 !important;
    }
    #screen-welcome .auth-mode-subtitle {
        font-size: 0.68rem !important;
        color: #bae6fd !important;
    }

    /* Form Fields & High-Contrast Input Boxes */
    #screen-welcome .form-group,
    #screen-welcome .modern-input-group {
        margin-bottom: 8px !important;
        text-align: left !important;
    }

    #screen-welcome .form-group label,
    #screen-welcome .modern-input-group label {
        font-size: 0.74rem !important;
        margin-bottom: 3px !important;
        color: #38bdf8 !important;
        font-weight: 800 !important;
        letter-spacing: 0.4px !important;
        text-transform: uppercase !important;
    }

    #screen-welcome .form-group input,
    #screen-welcome .form-group select,
    #screen-welcome .input-with-icon input {
        padding: 9px 10px 9px 34px !important;
        font-size: 0.90rem !important;
        font-weight: 700 !important;
        border-radius: 11px !important;
        border: 2px solid rgba(56, 189, 248, 0.45) !important;
        background: #090d16 !important;
        color: #ffffff !important;
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75) !important;
    }

    #screen-welcome .form-group select {
        padding-left: 10px !important;
    }

    #screen-welcome .input-with-icon .field-icon {
        left: 10px !important;
        font-size: 1.05rem !important;
        color: #38bdf8 !important;
    }

    #screen-welcome .input-with-icon input:focus,
    #screen-welcome .form-group input:focus,
    #screen-welcome .form-group select:focus {
        border-color: #00d2ff !important;
        background: #0c1424 !important;
        box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.35) !important;
        color: #ffffff !important;
    }

    /* Primary & Auth Submit Buttons */
    #screen-welcome .btn-primary,
    #screen-welcome .btn-auth-submit {
        padding: 10px 14px !important;
        font-size: 0.98rem !important;
        font-weight: 900 !important;
        border-radius: 12px !important;
        margin-top: 4px !important;
        border: 2px solid #38bdf8 !important;
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0284c7 100%) !important;
        box-shadow: 0 5px 18px rgba(2, 132, 199, 0.5) !important;
        color: #ffffff !important;
    }

    /* Switch Prompt Card */
    #screen-welcome .auth-switch-prompt-card {
        padding: 6px 10px !important;
        margin-top: 8px !important;
        border-radius: 10px !important;
        background: rgba(30, 41, 59, 0.65) !important;
        border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
    }
    #screen-welcome .auth-switch-prompt-card .switch-prompt-text {
        font-size: 0.72rem !important;
        color: #cbd5e1 !important;
        font-weight: 600 !important;
    }
    #screen-welcome .auth-switch-action-btn {
        padding: 5px 9px !important;
        font-size: 0.76rem !important;
        font-weight: 800 !important;
        border-radius: 7px !important;
        background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
        border: 1.5px solid #38bdf8 !important;
        color: #ffffff !important;
    }

    /* Divider */
    #screen-welcome .auth-divider {
        margin: 10px 0 8px 0 !important;
    }

    #screen-welcome .auth-divider span {
        font-size: 0.65rem !important;
        padding: 2px 10px !important;
        background: #1e293b !important;
        border: 1.5px solid #475569 !important;
        color: #94a3b8 !important;
    }

    /* Guest Button */
    #screen-welcome .btn-secondary,
    #screen-welcome .btn-guest-action {
        padding: 10px 14px !important;
        font-size: 0.86rem !important;
        font-weight: 900 !important;
        border-radius: 12px !important;
        border: 2px solid #f59e0b !important;
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28)) !important;
        color: #fef08a !important;
        box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
    }

    /* Register Form Elements Compactness */
    #screen-welcome #form-register .form-row {
        gap: 6px !important;
        margin-bottom: 4px !important;
    }

    #screen-welcome #form-register .char-card {
        padding: 4px 6px !important;
        border-radius: 8px !important;
    }

    #screen-welcome #form-register .char-card .avatar {
        font-size: 1.1rem !important;
    }

    #screen-welcome #form-register .char-card .char-label {
        font-size: 0.65rem !important;
        margin-top: 1px !important;
    }

    #screen-welcome .btn-success {
        padding: 8px 14px !important;
        font-size: 0.88rem !important;
        border-radius: 10px !important;
        margin-top: 4px !important;
    }
}

/* ==========================================================================
   Master Admin / Veli / Öğretmen Modal Mobile Fit Optimization
   ========================================================================== */
@media (max-width: 600px), (max-height: 820px) {
    #modal-admin .modal-content.admin-modal-wide {
        max-width: 96vw !important;
        width: 96vw !important;
        max-height: 94vh !important;
        max-height: 94dvh !important;
        padding: 10px 10px !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    #modal-admin .modal-header {
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
    }

    #modal-admin .modal-header h3 {
        font-size: 0.88rem !important;
        line-height: 1.25 !important;
        margin: 0 !important;
    }

    #modal-admin .close-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
    }

    /* Admin PIN Authentication Gate Card */
    #modal-admin .admin-login-card {
        max-width: 100% !important;
        width: 100% !important;
        margin: 4px auto 8px auto !important;
        padding: 12px 12px !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
    }

    #modal-admin .admin-login-header {
        margin-bottom: 8px !important;
    }

    #modal-admin .admin-badge-icon {
        width: 44px !important;
        height: 44px !important;
        margin-bottom: 6px !important;
    }

    #modal-admin .admin-badge-icon .shield-icon {
        font-size: 1.4rem !important;
    }

    #modal-admin .admin-badge-icon .key-badge {
        font-size: 0.8rem !important;
        padding: 1px !important;
    }

    #modal-admin .admin-login-header h4 {
        font-size: 1rem !important;
        margin: 0 0 2px 0 !important;
    }

    #modal-admin .admin-subtext {
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
        display: none !important; /* Hide redundant description on mobile to fit nicely */
    }

    #modal-admin .admin-pro-form {
        gap: 8px !important;
    }

    #modal-admin .admin-input-group {
        gap: 3px !important;
    }

    #modal-admin .admin-input-group label {
        font-size: 0.72rem !important;
    }

    #modal-admin .admin-input-group input {
        padding: 7px 10px !important;
        font-size: 0.84rem !important;
        border-radius: 8px !important;
        height: 34px !important;
    }

    #modal-admin .captcha-row {
        gap: 6px !important;
    }

    #modal-admin .captcha-display-box {
        height: 36px !important;
        font-size: 1rem !important;
        letter-spacing: 3px !important;
    }

    #modal-admin .btn-refresh-captcha {
        height: 36px !important;
        padding: 0 10px !important;
        font-size: 0.74rem !important;
        border-radius: 8px !important;
    }

    #modal-admin .btn-admin-login {
        padding: 8px 12px !important;
        font-size: 0.88rem !important;
        border-radius: 10px !important;
        height: 36px !important;
    }

    #modal-admin .admin-login-footer-hint {
        font-size: 0.68rem !important;
        margin-top: 2px !important;
        line-height: 1.2 !important;
    }

    /* Admin Dashboard Navigation Tabs */
    #modal-admin .admin-nav-tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 5px !important;
        margin-bottom: 10px !important;
        padding-bottom: 6px !important;
        scrollbar-width: none !important;
    }

    #modal-admin .admin-nav-tabs::-webkit-scrollbar {
        display: none !important;
    }

    #modal-admin .admin-tab {
        padding: 6px 10px !important;
        font-size: 0.74rem !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
    }

    /* Admin Table & Settings on Mobile */
    #modal-admin .admin-table th, 
    #modal-admin .admin-table td {
        padding: 6px 6px !important;
        font-size: 0.75rem !important;
    }

    #modal-admin .settings-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    #modal-admin .setting-card {
        padding: 10px !important;
        border-radius: 10px !important;
    }

    #modal-admin .setting-card h4 {
        font-size: 0.88rem !important;
    }

    #modal-admin .setting-card p {
        font-size: 0.74rem !important;
    }
}



/* ==========================================================================
   FLIGHT REPORT & QUESTION TALLY VIBRANT STYLING
   ========================================================================== */
.flight-tally-box {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
.flight-tally-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)) !important;
    gap: 8px !important;
}
.tally-item-card {
    border-radius: 8px !important;
    padding: 6px 10px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 11.5px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.15s ease !important;
}
.tally-item-card.correct {
    background: #f0fdf4 !important;
    border: 1.5px solid #86efac !important;
    border-left: 4px solid #16a34a !important;
    color: #14532d !important;
}
.tally-item-card.wrong {
    background: #fef2f2 !important;
    border: 1.5px solid #fca5a5 !important;
    border-left: 4px solid #dc2626 !important;
    color: #7f1d1d !important;
}
.tally-icon-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Noto Color Emoji", Arial, sans-serif !important;
}
.tally-icon-badge.correct {
    background: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.35) !important;
}
.tally-icon-badge.wrong {
    background: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.35) !important;
}
.report-substats-strip {
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    margin-bottom: 14px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
}

