:root {
    --theme-accent: #ffd54f;
    --theme-border: rgba(255, 213, 79, 0.35);
    --theme-glow: rgba(139, 195, 74, 0.25);
    --theme-panel-border: rgba(255, 213, 79, 0.45);
    --theme-badge-bg: rgba(174, 213, 129, 0.15);
    --theme-badge-color: #aed581;
    --theme-transition: border-color 1.8s ease, box-shadow 1.8s ease, background 1.8s ease;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    user-select: none; 
    scrollbar-width: thin; 
    scrollbar-color: #ffd54f rgba(6, 14, 16, 0.7); 
}

/* CUSTOM SCROLLBARS FOR WEBKIT (CHROME, EDGE, SAFARI) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(6, 14, 16, 0.7);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffd54f 0%, #8bc34a 100%);
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 213, 79, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffe082 0%, #aed581 100%);
    box-shadow: 0 0 12px rgba(255, 213, 79, 0.8);
}

body {
    background: #050a06;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100dvh;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    overflow: hidden;
    color: #e2f0df;
    -webkit-tap-highlight-color: transparent;
}

/* SMOOTH CROSS-FADING WEBSITE BACKGROUND GRADIENTS */
#body-bg-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
}
.body-bg-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
}
.body-bg-slide.active {
    opacity: 1;
}
#body-bg-slide-0 {
    background: #050a06;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(24, 48, 20, 0.75) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(10, 25, 35, 0.65) 0%, transparent 60%);
}
#body-bg-slide-1 {
    background: #0d0803;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(75, 45, 10, 0.75) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(40, 25, 5, 0.65) 0%, transparent 60%);
}
#body-bg-slide-2 {
    background: #03080e;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(10, 45, 75, 0.75) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(5, 25, 45, 0.65) 0%, transparent 60%);
}
#game-frame {
    position: relative;
    width: min(100vw, calc(100dvh * 1000 / 640), 1000px);
    height: min(100dvh, calc(100vw * 640 / 1000), 640px);
    max-width: 1000px;
    max-height: 640px;
    aspect-ratio: 1000 / 640;
    box-shadow: 0 30px 90px rgba(0,0,0,0.95), 0 0 40px var(--theme-glow);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--theme-border);
    background: #000;
    transition: var(--theme-transition);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
}

#game-frame canvas {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: fill !important;
    z-index: 10;
    display: block;
}

/* MENU BLURRED MAP SLIDESHOW BACKGROUND */
#menu-bg-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.menu-bg-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.85);
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.8s ease-in-out, transform 12s ease-out;
}
.menu-bg-slide.active {
    opacity: 1;
    transform: scale(1.0);
}
.menu-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(5, 10, 6, 0.05) 0%, rgba(5, 10, 6, 0.45) 100%);
}

/* MAP PREVIEW THUMBNAILS IN SELECTION CARDS */
.map-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 213, 79, 0.45);
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    pointer-events: none;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(4, 10, 12, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9990;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

#start-modal {
    background: transparent;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(24, 48, 20, 0.25) 0%, rgba(5, 10, 6, 0.40) 70%),
        radial-gradient(circle at 80% 80%, rgba(10, 25, 35, 0.20) 0%, rgba(5, 10, 6, 0.40) 60%);
    z-index: 1000;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulseRotate {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(90deg); }
    100% { transform: scale(1) rotate(0deg); }
}
#portrait-warning-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    background: rgba(6, 12, 14, 0.96);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #ffffff;
}
@media screen and (orientation: portrait) and (max-width: 900px) {
    #portrait-warning-overlay {
        display: flex !important;
    }
}
.modal-card {
    background: linear-gradient(145deg, rgba(16, 28, 32, 0.96), rgba(8, 16, 18, 0.98));
    border: 1.5px solid rgba(255, 213, 79, 0.5);
    padding: 24px 28px;
    border-radius: 22px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0,0,0,0.95), inset 0 1px 1px rgba(255,255,255,0.1);
    color: #e2f0df;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}
.modal-card h2 { 
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 6px; 
    font-size: 28px; 
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffd54f 0%, #aed581 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 213, 79, 0.2);
}
#end-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    text-shadow: none !important;
}
#end-title .end-title-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: inherit;
    font-weight: 900;
    letter-spacing: 1.5px;
}
.modal-card p { font-size: 13px; color: #a2c098; margin-bottom: 16px; font-weight: 400; }
.menu-btn {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    background: linear-gradient(180deg, #243e1d 0%, #172c12 100%);
    border: 1px solid rgba(139, 195, 74, 0.4);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.menu-btn:hover:not(:disabled) {
    border-color: #aed581;
    background: linear-gradient(180deg, #325828 0%, #203c18 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 195, 74, 0.25);
}
.menu-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.map-vote-grid {
    display: flex;
    gap: 10px;
    margin: 14px 0 20px 0;
}
.map-card {
    flex: 1;
    background: rgba(10, 20, 9, 0.8);
    border: 2px solid rgba(139, 195, 74, 0.2);
    border-radius: 12px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.map-card:hover, .map-card.selected {
    border-color: #aed581;
    background: rgba(30, 56, 24, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(139, 195, 74, 0.2);
}
.map-card h4 { font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700; color: #ffd54f; margin-bottom: 2px; }
.map-card p { font-size: 11px; color: #88a880; margin: 0; }
.online-box {
    margin-top: 14px;
    border-top: 1px solid rgba(139, 195, 74, 0.2);
    padding-top: 14px;
}
.online-inputs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.online-inputs input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(139, 195, 74, 0.3);
    background: rgba(5, 12, 4, 0.9);
    color: #ffd54f;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
}
.online-inputs input:focus {
    outline: none;
    border-color: #aed581;
    box-shadow: 0 0 10px rgba(174, 213, 129, 0.3);
}
.code-display {
    font-family: 'Rajdhani', monospace;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #ffd54f;
    background: rgba(4, 10, 3, 0.9);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1.5px dashed #aed581;
    display: inline-block;
    margin: 10px 0;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}
.lobby-slots {
    background: rgba(5, 12, 4, 0.8);
    border: 1px solid rgba(139, 195, 74, 0.25);
    border-radius: 12px;
    padding: 12px;
    margin: 14px 0;
    text-align: left;
}
.slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 8px;
    background: rgba(16, 30, 15, 0.9);
    font-size: 14px;
    font-weight: 600;
}
.slot-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(139, 195, 74, 0.2);
    color: #aed581;
    border: 1px solid rgba(139, 195, 74, 0.3);
}
.editor-tool-btn, .editor-action-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #d1c4e9;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.editor-tool-btn:hover, .editor-action-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
.editor-tool-btn.active {
    background: linear-gradient(135deg, #f57f17, #fbc02d);
    color: #000000;
    border-color: #ffd54f;
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.4);
}
.editor-action-btn.add { border-color: rgba(139, 195, 74, 0.5); color: #c5e1a5; background: rgba(51, 105, 30, 0.4); }
.editor-action-btn.add:hover { background: rgba(51, 105, 30, 0.8); color: #ffffff; }

.editor-action-btn.delete { border-color: rgba(244, 67, 54, 0.5); color: #ef9a9a; background: rgba(183, 28, 28, 0.4); }
.editor-action-btn.delete:hover { background: rgba(183, 28, 28, 0.8); color: #ffffff; }

.editor-action-btn.json { border-color: rgba(129, 199, 132, 0.5); color: #a5d6a7; background: rgba(27, 94, 32, 0.4); }
.editor-action-btn.json:hover { background: rgba(27, 94, 32, 0.8); color: #ffffff; }

.editor-action-btn.apply { border-color: rgba(41, 182, 246, 0.5); color: #81d4fa; background: rgba(1, 87, 155, 0.4); }
.editor-action-btn.apply:hover { background: rgba(1, 87, 155, 0.8); color: #ffffff; }

.editor-action-btn.exit { border-color: rgba(229, 57, 53, 0.6); color: #ffcdd2; background: rgba(136, 14, 79, 0.4); }
.editor-action-btn.exit:hover { background: rgba(229, 57, 53, 0.8); color: #ffffff; }

/* GAME UI OVERLAY & RESPONSIVE TOUCH HUD */
#game-ui-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 200;
    font-family: 'Outfit', sans-serif;
    display: none;
}

#hud-top-center {
    position: absolute;
    top: 12px;
    left: 14px;
    background: rgba(9, 17, 20, 0.92);
    border: 1.5px solid rgba(255, 213, 79, 0.5);
    border-radius: 14px;
    padding: 4px 18px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    pointer-events: auto;
}

#hud-map-name {
    font-size: 11px;
    font-weight: 700;
    color: #ffd54f;
    letter-spacing: 0.5px;
}

#hud-timer {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

#hud-scoreboard {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(9, 17, 20, 0.92);
    border: 1.5px solid rgba(255, 213, 79, 0.45);
    border-radius: 14px;
    padding: 8px 14px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    pointer-events: auto;
}

#hud-my-role {
    font-size: 11px;
    font-weight: 800;
    color: #ffd54f;
    text-align: center;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.hud-score-divider {
    height: 1px;
    background: rgba(255, 213, 79, 0.25);
    margin: 4px 0 6px 0;
}

.hud-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    margin: 3px 0;
}

.hud-score-row.yellow { color: #ffee58; }
.hud-score-row.red { color: #ff7a50; }
.hud-score-row.blue { color: #80deea; }

.hud-you-tag {
    font-size: 10px;
    color: #aed581;
    font-weight: 800;
    margin-left: 2px;
}

#hud-ability-dock {
    position: absolute;
    bottom: 12px;
    left: 14px;
    display: flex;
    gap: 10px;
    background: rgba(9, 17, 20, 0.94);
    border: 1.5px solid rgba(255, 213, 79, 0.5);
    border-radius: 16px;
    padding: 8px 10px;
    box-shadow: 0 8px 26px rgba(0,0,0,0.8);
    pointer-events: auto;
}

.hud-ability-slot {
    position: relative;
    width: 52px;
    height: 52px;
    background: rgba(16, 26, 30, 0.95);
    border: 2px solid rgba(255, 213, 79, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s ease, box-shadow 0.15s ease;
    touch-action: manipulation;
}

.hud-ability-slot:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: #ffd54f;
    box-shadow: 0 0 14px rgba(255, 213, 79, 0.4);
}

.hud-ability-slot:active {
    transform: scale(0.94);
}

.hud-ability-slot.ready {
    border-color: #ffd54f;
    box-shadow: 0 0 12px rgba(255, 213, 79, 0.35);
}

.hud-ability-slot.active-targeting {
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.25);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.8);
    animation: pulseSlot 1s infinite alternate ease-in-out;
}

@keyframes pulseSlot {
    0% { transform: scale(1.0); }
    100% { transform: scale(1.08); }
}

.hud-slot-icon {
    font-size: 22px;
    line-height: 1;
    z-index: 2;
}

.hud-slot-key {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 9px;
    font-weight: 800;
    color: #ffd54f;
    z-index: 2;
}

.hud-slot-status {
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 1px;
    z-index: 2;
}

.hud-slot-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.65);
    height: 100%;
    z-index: 1;
    transition: height 0.2s linear;
}

#hud-bottom-right {
    position: absolute;
    bottom: 12px;
    right: 14px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    pointer-events: auto;
}

.hud-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.hud-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(9, 17, 20, 0.94);
    border: 1.5px solid rgba(255, 213, 79, 0.5);
    color: #ffd54f;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s ease;
    touch-action: manipulation;
}

.hud-action-btn:hover {
    transform: scale(1.12);
    border-color: #ffd54f;
    box-shadow: 0 0 16px rgba(255, 213, 79, 0.5);
}

.hud-action-btn:active {
    transform: scale(0.92);
}

.hud-action-btn.cooldown {
    opacity: 0.40;
    filter: grayscale(80%);
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
    pointer-events: none;
    transform: scale(0.95);
}

#emote-popover {
    display: none;
    position: absolute;
    bottom: 66px;
    right: 72px;
    z-index: 240;
    background: rgba(9, 17, 20, 0.96);
    border: 2px solid #ffd54f;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.95);
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    pointer-events: auto;
}

.emote-btn {
    font-size: 22px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 213, 79, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.45));
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}
.emote-btn:hover {
    transform: scale(1.12);
    border-color: #ffd54f;
    background: linear-gradient(135deg, rgba(255, 213, 79, 0.35), rgba(0, 0, 0, 0.6));
    box-shadow: 0 0 14px rgba(255, 213, 79, 0.5);
}
.emote-btn:active {
    transform: scale(0.92);
}

@media screen and (max-height: 540px), screen and (max-width: 600px) {
    #hud-top-center {
        top: 6px;
        padding: 2px 10px;
    }
    #hud-map-name {
        font-size: 9px;
    }
    #hud-timer {
        font-size: 15px;
    }
    #hud-scoreboard {
        top: 6px;
        right: 8px;
        padding: 4px 8px;
        min-width: 120px;
    }
    #hud-my-role {
        font-size: 9px;
        margin-bottom: 2px;
    }
    .hud-score-divider {
        margin: 2px 0 3px 0;
    }
    .hud-score-row {
        font-size: 10px;
        margin: 1px 0;
    }
    #hud-ability-dock {
        bottom: 6px;
        left: 8px;
        padding: 4px 6px;
        gap: 6px;
    }
    .hud-ability-slot {
        width: 42px;
        height: 42px;
        border-radius: 8px;
    }
    .hud-slot-icon {
        font-size: 16px;
    }
    .hud-slot-key {
        font-size: 8px;
    }
    .hud-slot-status {
        font-size: 9px;
    }
    #hud-bottom-right {
        bottom: 6px;
        right: 8px;
        gap: 6px;
    }
    .hud-action-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .modal-card {
        padding: 14px 18px;
        max-height: 96vh;
        border-radius: 16px;
    }
    .modal-card h2 {
        font-size: 22px;
        margin-bottom: 4px;
    }
    .menu-btn {
        padding: 8px 10px;
        font-size: 13px;
        margin: 4px 0;
    }
    #settings-modal .modal-card {
        max-width: 520px;
    }
}

/* Custom Interactive Map Selector Cards */
.custom-map-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 6px 0 10px 0;
}

.custom-map-card {
    background: rgba(16, 26, 30, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.custom-map-card:hover {
    border-color: rgba(255, 213, 79, 0.6);
    background: rgba(255, 213, 79, 0.08);
    transform: translateY(-2px);
}

.custom-map-card.selected {
    border-color: #ffd54f;
    background: linear-gradient(180deg, rgba(255, 213, 79, 0.25) 0%, rgba(16, 26, 30, 0.95) 100%);
    box-shadow: 0 4px 16px rgba(255, 213, 79, 0.35);
    transform: translateY(-2px);
}

.custom-map-card .map-card-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.custom-map-card .map-card-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
}

.custom-map-card.selected .map-card-name {
    color: #ffd54f;
}

.custom-map-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Solo Visual Map Selection Modal Cards */
.solo-map-card {
    background: rgba(16, 26, 30, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    text-align: left;
}

.solo-map-card:hover {
    border-color: rgba(255, 213, 79, 0.6);
    background: rgba(255, 213, 79, 0.1);
    transform: translateX(4px);
}

.solo-map-card.selected {
    border-color: #ffd54f;
    background: linear-gradient(90deg, rgba(255, 213, 79, 0.22) 0%, rgba(16, 26, 30, 0.95) 100%);
    box-shadow: 0 6px 20px rgba(255, 213, 79, 0.3);
    transform: translateX(4px);
}

.solo-map-icon {
    font-size: 34px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.solo-map-card.selected .solo-map-icon {
    border-color: #ffd54f;
    box-shadow: 0 0 12px rgba(255, 213, 79, 0.4);
}

/* Comprehensive Ultra-Mobile Responsiveness Rules */
html, body {
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Custom Sleek Mobile Scrollbar for Modals */
.modal-card::-webkit-scrollbar {
    width: 5px;
}
.modal-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 213, 79, 0.4);
    border-radius: 4px;
}
.modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 213, 79, 0.8);
}

/* Short Landscape Screens (Smartphones like Samsung Z Flip 7 held horizontally) */
@media screen and (max-height: 540px) {
    #game-frame {
        border-radius: 0px !important;
        border-width: 1px !important;
        max-height: 100dvh !important;
        height: 100dvh !important;
    }
    .modal-overlay {
        padding: 4px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .modal-card {
        padding: 8px 14px !important;
        max-height: 96dvh !important;
        overflow-y: auto !important;
        border-radius: 12px !important;
    }
    .modal-card h2 {
        font-size: 16px !important;
        margin-bottom: 3px !important;
    }
    .modal-card p {
        font-size: 11px !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }
    .menu-btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
        margin: 3px 0 !important;
        border-radius: 8px !important;
    }
    .solo-map-card {
        padding: 6px 8px !important;
        margin-bottom: 6px !important;
    }
    .solo-map-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 22px !important;
    }
    /* Auth Modal landscape fixes */
    #auth-modal .modal-card {
        max-width: 460px !important;
        padding: 8px 14px !important;
    }
    #auth-modal input {
        padding: 5px 8px !important;
        font-size: 13px !important;
        margin: 2px 0 6px 0 !important;
    }
    #auth-modal label {
        font-size: 10px !important;
    }
    /* Mobile Dashboard Navigation Tabs (Profile / Battle Hub / Leaderboard) */
    .dash-mobile-tabs-bar {
        display: flex !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
        width: 100% !important;
        max-width: 480px !important;
        z-index: 1001 !important;
    }
    .dash-tab-btn {
        flex: 1 !important;
        padding: 8px 10px !important;
        background: rgba(10, 18, 22, 0.9) !important;
        border: 1.5px solid rgba(255, 213, 79, 0.35) !important;
        border-radius: 10px !important;
        color: #b0bec5 !important;
        font-family: 'Rajdhani', sans-serif !important;
        font-weight: 800 !important;
        font-size: 12px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        text-align: center !important;
        touch-action: manipulation !important;
    }
    .dash-tab-btn.active {
        background: linear-gradient(180deg, #325828 0%, #1e3816 100%) !important;
        color: #ffd54f !important;
        border-color: #aed581 !important;
        box-shadow: 0 0 12px rgba(139, 195, 74, 0.4) !important;
    }
    .dashboard-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        max-width: 480px !important;
        max-height: 90dvh !important;
        gap: 6px !important;
    }
    .dashboard-panel {
        padding: 10px 12px !important;
        border-radius: 12px !important;
    }
    .dashboard-panel.panel-left,
    .dashboard-panel.panel-right {
        display: none;
    }
    .dashboard-panel.panel-center {
        display: flex;
    }
    .dash-panel-header {
        margin-bottom: 6px !important;
        padding-bottom: 4px !important;
    }
    .dash-panel-title {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
    }
    .dash-action-btn {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    /* Left Panel: Profile & Quests */
    .dash-profile-card {
        padding: 6px 8px !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
    }
    .dash-profile-main {
        gap: 6px !important;
        margin-bottom: 4px !important;
    }
    .dash-avatar-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
        border-radius: 8px !important;
    }
    .dash-username-txt {
        font-size: 12px !important;
    }
    .dash-tag-badge {
        font-size: 10px !important;
        padding: 1px 3px !important;
    }
    .dash-rank-txt {
        font-size: 10px !important;
    }
    .dash-rank-progress-box {
        margin-top: 3px !important;
    }
    .dash-progress-labels {
        font-size: 9px !important;
        margin-bottom: 2px !important;
    }
    .dash-progress-track {
        height: 5px !important;
    }
    .dash-quest-card {
        padding: 6px 8px !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
    }
    .dash-quest-header {
        font-size: 9px !important;
    }
    .dash-quest-desc {
        font-size: 10px !important;
        margin: 2px 0 4px 0 !important;
    }
    .dash-quest-track {
        height: 4px !important;
    }
    .dash-quest-status {
        font-size: 9px !important;
        margin-top: 2px !important;
    }
    /* Center Panel: Battle Hub */
    .dash-brand-header {
        margin-bottom: 6px !important;
    }
    .dash-brand-logo {
        font-size: 18px !important;
        gap: 6px !important;
    }
    .dash-brand-sub {
        font-size: 8px !important;
        letter-spacing: 1px !important;
    }
    .hero-play-btn {
        padding: 8px 10px !important;
        gap: 8px !important;
        border-radius: 10px !important;
    }
    .hero-play-icon {
        font-size: 20px !important;
    }
    .hero-play-title {
        font-size: 13px !important;
    }
    .hero-play-sub {
        font-size: 9px !important;
    }
    .dash-mode-grid {
        margin-top: 6px !important;
        gap: 5px !important;
    }
    .dash-mode-card {
        padding: 5px 3px !important;
        border-radius: 8px !important;
    }
    .dash-mode-icon {
        font-size: 16px !important;
        margin-bottom: 1px !important;
    }
    .dash-mode-name {
        font-size: 10px !important;
    }
    .dash-mode-sub {
        font-size: 8px !important;
    }
    /* Right Panel: Leaderboard */
    .dash-leaderboard-box {
        gap: 4px !important;
    }
    .dash-lb-row {
        padding: 4px 6px !important;
        font-size: 10px !important;
        border-radius: 8px !important;
    }
    .dash-lb-rank {
        width: 14px !important;
        font-size: 10px !important;
    }
    .dash-lb-name {
        max-width: 75px !important;
        font-size: 10px !important;
    }
    .dash-lb-mmr {
        font-size: 10px !important;
    }
    /* HUD UI Adjustments in game (Mobile Ergonomics) */
    #hud-top-center {
        top: max(8px, env(safe-area-inset-top)) !important;
        padding: 4px 14px !important;
    }
    #hud-scoreboard {
        top: max(8px, env(safe-area-inset-top)) !important;
        right: max(16px, env(safe-area-inset-right)) !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    #hud-ability-dock {
        bottom: max(16px, env(safe-area-inset-bottom)) !important;
        left: max(16px, env(safe-area-inset-left)) !important;
        gap: 6px !important;
    }
    .hud-ability-slot {
        width: 48px !important;
        height: 48px !important;
    }
    #hud-bottom-right {
        bottom: max(16px, env(safe-area-inset-bottom)) !important;
        right: max(16px, env(safe-area-inset-right)) !important;
        gap: 6px !important;
    }
    .hud-action-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}

/* Ultra-Narrow Mobile Portrait Screens (Width <= 480px) */
@media screen and (max-width: 480px) {
    .modal-card {
        padding: 12px 14px;
        width: 95vw;
        max-width: 95vw;
    }
    .menu-btn {
        font-size: 13px;
        padding: 10px;
    }
    .custom-map-card .map-card-name {
        font-size: 11px;
    }
    .custom-map-card .map-card-icon {
        font-size: 18px;
    }
}

/* 3-PANEL TACTICAL DASHBOARD LAYOUT */
.dash-mobile-tabs-bar {
    display: none;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    gap: 14px;
    width: 100%;
    max-width: 960px;
    max-height: 88dvh;
    box-sizing: border-box;
    z-index: 1000;
}

.dashboard-panel {
    background: rgba(10, 18, 22, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 213, 79, 0.4);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.dash-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 213, 79, 0.2);
}

.dash-panel-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #ffd54f;
    letter-spacing: 1px;
}

.dash-action-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffd54f;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.dash-action-btn:hover {
    background: rgba(255, 213, 79, 0.2);
    border-color: #ffd54f;
}

.dash-profile-card {
    background: rgba(16, 26, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}

.dash-profile-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dash-avatar-icon {
    font-size: 28px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 213, 79, 0.4);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-username-txt {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

.dash-tag-badge {
    font-family: 'Rajdhani', monospace;
    font-size: 12px;
    font-weight: 800;
    color: #aed581;
    background: rgba(0, 0, 0, 0.5);
    padding: 1px 5px;
    border-radius: 4px;
}

.dash-rank-txt {
    font-size: 12px;
    color: #80deea;
    font-weight: 700;
    margin-top: 2px;
}

.dash-rank-progress-box {
    margin-top: 6px;
}

.dash-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 4px;
}

.dash-progress-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 213, 79, 0.3);
}

.dash-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8bc34a 0%, #ffd54f 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.dash-quest-card {
    background: rgba(16, 26, 30, 0.85);
    border: 1px dashed rgba(139, 195, 74, 0.4);
    border-radius: 14px;
    padding: 12px;
    text-align: left;
    margin-bottom: 12px;
}

.dash-quest-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    color: #ffd54f;
}

.dash-quest-reward {
    color: #aed581;
}

.dash-quest-desc {
    font-size: 12px;
    color: #e2f0df;
    margin: 4px 0 6px 0;
    font-weight: 600;
}

.dash-quest-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    overflow: hidden;
}

.dash-quest-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #aed581 100%);
    border-radius: 6px;
}

.dash-quest-status {
    font-size: 10px;
    color: #88a880;
    margin-top: 4px;
    font-weight: 600;
    text-align: right;
}

/* KÄFERKAMPF CORPORATE BRAND HEADER & HERO CTA */
.dash-brand-header {
    text-align: center;
    margin-bottom: 14px;
}

.dash-brand-logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #ffd54f;
    letter-spacing: 3px;
    text-shadow: 0 0 16px rgba(255, 213, 79, 0.6), 0 2px 8px rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dash-quest-claim-btn {
    background: linear-gradient(180deg, #43a047 0%, #1b5e20 100%);
    border: 1.5px solid #aed581;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
    transition: all 0.15s ease;
}
.dash-quest-claim-btn:hover {
    transform: scale(1.05);
    border-color: #ffd54f;
    box-shadow: 0 4px 12px rgba(139, 195, 74, 0.6);
}

.dash-brand-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #aed581;
    letter-spacing: 1.8px;
    margin-top: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.hero-play-btn {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #43a047 0%, #1b5e20 100%);
    border: 2px solid #aed581;
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.35);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    touch-action: manipulation;
}

.hero-play-btn:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: #ffd54f;
    box-shadow: 0 12px 32px rgba(139, 195, 74, 0.55);
}

.hero-play-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 8px #aed581);
}

.hero-play-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
}

.hero-play-sub {
    font-size: 11px;
    color: #dbedc8;
    font-weight: 600;
}

.dash-mode-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.dash-game-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
}

.dash-mode-badge {
    font-size: 11px;
    color: #aed581;
    font-weight: 800;
    background: rgba(174, 213, 129, 0.15);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(174, 213, 129, 0.3);
}

.dash-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.dash-mode-card {
    background: rgba(16, 26, 30, 0.85);
    border: 1.5px solid rgba(255, 213, 79, 0.25);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    touch-action: manipulation;
}

.dash-mode-card:hover {
    border-color: #ffd54f;
    background: rgba(255, 213, 79, 0.15);
    transform: translateY(-2px);
}

.dash-mode-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.dash-mode-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
}

.dash-mode-sub {
    font-size: 10px;
    color: #90a4ae;
    font-weight: 600;
}

/* Leaderboard Live Preview Box */
.dash-leaderboard-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-lb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(16, 26, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 7px 9px;
    font-size: 12px;
}

.dash-lb-row.me {
    border-color: #ffd54f;
    background: rgba(255, 213, 79, 0.18);
}

.dash-lb-rank {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    width: 22px;
    color: #ffd54f;
    text-align: left;
}

.dash-lb-name {
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

.dash-lb-mmr {
    font-family: 'Rajdhani', monospace;
    font-weight: 800;
    color: #aed581;
}

/* Responsive Dashboard for Mobile / Tablet Screens in Portrait Mode */
@media screen and (max-width: 850px) and (orientation: portrait) {
    .dashboard-container {
        grid-template-columns: 1fr;
        max-width: 480px;
        max-height: 92dvh;
    }
    .dashboard-panel.panel-left,
    .dashboard-panel.panel-right {
        display: none;
    }
}

/* BOT DIFFICULTY SELECTOR STYLES */
.difficulty-selector {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 213, 79, 0.25);
}

.diff-btn {
    flex: 1;
    padding: 8px 10px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #b0bec5;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.diff-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.diff-btn.active.easy {
    background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
    color: #aed581;
    border-color: #8bc34a;
    box-shadow: 0 0 10px rgba(139, 195, 74, 0.4);
}

.diff-btn.active.normal {
    background: linear-gradient(180deg, #f57f17 0%, #e65100 100%);
    color: #ffe082;
    border-color: #ffd54f;
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.4);
}

.diff-btn.active.hard {
    background: linear-gradient(180deg, #c62828 0%, #b71c1c 100%);
    color: #ff8a80;
    border-color: #ff5252;
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
}

/* DISCONNECT & GAME TOAST NOTIFICATION STYLES */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-banner {
    pointer-events: auto;
    background: linear-gradient(135deg, rgba(16, 26, 30, 0.96) 0%, rgba(8, 16, 18, 0.98) 100%);
    border: 1.5px solid #ffd54f;
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(255, 213, 79, 0.35);
    animation: toastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
    max-width: 380px;
}

.toast-banner.disconnect {
    border-color: #ff7a50;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(255, 122, 80, 0.4);
}

.toast-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.toast-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #ffd54f;
    letter-spacing: 0.8px;
}

.toast-banner.disconnect .toast-title {
    color: #ff7a50;
}

.toast-msg {
    font-size: 12px;
    color: #eceff1;
    font-weight: 600;
    margin-top: 1px;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* VICTORY CELEBRATION CONFETTI CANVAS */
#victory-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10001;
    display: none;
}

/* SMOOTH COZY APP LOADER STYLES */
#app-initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #101c1e 0%, #060b0d 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
}

.loader-badge-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-spinner-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 213, 79, 0.15);
    border-top: 3px solid #ffd54f;
    border-right: 3px solid #aed581;
    animation: cozySpin 1.8s linear infinite;
    box-shadow: 0 0 20px rgba(255, 213, 79, 0.25);
}

.loader-beetle-icon {
    font-size: 42px;
    animation: gentlePulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 213, 79, 0.6));
}

.loader-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #ffd54f;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(255, 213, 79, 0.4);
    margin-bottom: 6px;
}

.loader-subtitle {
    font-size: 13px;
    color: #aed581;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.loader-bar-bg {
    width: 260px;
    height: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 213, 79, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8bc34a 0%, #ffd54f 100%);
    border-radius: 10px;
    transition: width 0.4s ease-out;
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.8);
}

@keyframes cozySpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 213, 79, 0.5)); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 22px rgba(174, 213, 129, 0.8)); }
}

