/* Stick War: Legends - Modern Dark-Fantasy Glassmorphism Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #09090b;
    --panel-bg: rgba(15, 23, 42, 0.85);
    --panel-border: rgba(255, 255, 255, 0.12);
    --player-blue: #38bdf8;
    --player-blue-glow: rgba(56, 189, 248, 0.4);
    --enemy-red: #ef4444;
    --enemy-red-glow: rgba(239, 68, 68, 0.4);
    --gold-yellow: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.5);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.75);
    --card-hover: rgba(51, 65, 85, 0.9);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* App Container */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* TOP BAR HUD — transparan, resource & tombol kayu di kanan (gaya SWL foto) */
#top-hud {
    position: absolute;
    top: 10px;
    left: 16px;
    right: 16px;
    height: auto;
    min-height: 56px;
    display: block;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 50;
    pointer-events: none;
}

#top-hud > * {
    pointer-events: auto;
}

/* Base Statue Health Displays — player kiri atas deck, musuh kanan bawah wood panel */
.statue-hud {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 210px;
    position: absolute;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 6px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.statue-hud.player-side {
    left: 16px;
    bottom: 128px;
}

.statue-hud.enemy-side {
    right: 16px;
    top: 248px;
    bottom: auto;
}

.statue-icon {
    font-size: 24px;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
}

.player-side .statue-icon {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid var(--player-blue);
    box-shadow: 0 0 10px var(--player-blue-glow);
}

.enemy-side {
    flex-direction: row-reverse;
}

.enemy-side .statue-icon {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--enemy-red);
    box-shadow: 0 0 10px var(--enemy-red-glow);
}

.statue-info {
    flex: 1;
}

.statue-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.health-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.health-bar-fill {
    height: 100%;
    transition: width 0.25s ease-out;
    border-radius: 6px;
}

#player-statue-bar {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    box-shadow: 0 0 8px var(--player-blue-glow);
}

#enemy-statue-bar {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    box-shadow: 0 0 8px var(--enemy-red-glow);
    float: right;
}

/* CENTER RESOURCE HUD */
.center-hud {
    display: flex;
    align-items: center;
    gap: 20px;
}

.resource-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.resource-pill .icon {
    font-size: 18px;
}

.resource-pill.gold .val {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold-yellow);
    text-shadow: 0 0 10px var(--gold-glow);
}

.resource-pill.pop .val {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}

/* Utility buttons */
.hud-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== SWL TOP-RIGHT: resource + tombol kayu bulat (foto) ===== */
.swl-top-right {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background:
        repeating-linear-gradient(
            90deg,
            #c48a3a 0px,
            #d49a48 8px,
            #b87a32 16px,
            #c98f40 24px,
            #b0722e 32px
        ),
        linear-gradient(180deg, #d4a056 0%, #b87830 100%);
    background-blend-mode: multiply;
    border: 3px solid #6b3f14;
    border-radius: 0 0 0 28px;
    padding: 8px 10px 8px 16px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 220, 160, 0.35),
        inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}

.swl-resources {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 88px;
}

.swl-res-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.swl-res-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

.swl-res-val {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #fff8e7;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.55);
    min-width: 42px;
}

.swl-top-right .mode-active-badge {
    display: none;
}

.swl-wood-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    border-left: 2px solid rgba(107, 63, 20, 0.45);
}

.swl-wood-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid #6b3f14;
    background:
        radial-gradient(circle at 35% 30%, #fde68a 0%, #fbbf24 50%, #d97706 100%);
    box-shadow:
        0 3px 0 #78350f,
        0 5px 10px rgba(0, 0, 0, 0.4),
        inset 0 2px 3px rgba(255, 255, 255, 0.45);
    color: #451a03;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: transform 0.12s, filter 0.12s;
}

.swl-wood-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px) scale(1.05);
}

.swl-wood-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #78350f,
        inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.swl-wood-btn.active {
    outline: 3px solid #fef3c7;
    outline-offset: 1px;
    box-shadow:
        0 3px 0 #78350f,
        0 0 12px rgba(254, 243, 199, 0.75),
        inset 0 2px 3px rgba(255, 255, 255, 0.45);
}

.swl-pause {
    background:
        radial-gradient(circle at 35% 30%, #fdba74 0%, #f59e0b 50%, #b45309 100%);
    color: #451a03;
    font-size: 16px;
    letter-spacing: -2px;
}

.swl-arrow-glyph {
    font-size: 20px;
    transform: scaleX(-1);
    display: inline-block;
}

.swl-swords span,
.swl-shield span {
    font-size: 18px;
    line-height: 1;
}

/* Red X cancel training (di bawah tombol unit — foto SWL) */
.cancel-training-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 8px;
    margin-left: 4px;
    border-radius: 50%;
    border: 3px solid #7f1d1d;
    background: radial-gradient(circle at 35% 30%, #f87171 0%, #ef4444 55%, #b91c1c 100%);
    box-shadow:
        0 3px 0 #7f1d1d,
        0 5px 12px rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 56;
}

.cancel-training-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.08);
}

.cancel-training-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #7f1d1d;
}

.cancel-training-btn.hidden {
    display: none !important;
}

.deck-utils {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.pause-extra-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.pause-menu-sm {
    width: min(180px, 50vw) !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
}

.hud-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.diff-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

/* CANVAS CONTAINER */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* FLOATING NOTICES */
#floating-notice {
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    z-index: 300;
    transition: opacity 0.3s, transform 0.3s;
}

/* MANUAL CONTROL BANNER */
#manual-control-indicator {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--player-blue);
    box-shadow: 0 0 20px var(--player-blue-glow);
    padding: 8px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 70;
    backdrop-filter: blur(8px);
}

.control-badge {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 12px;
    color: var(--player-blue);
    letter-spacing: 1px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 12px;
}

.control-instructions {
    font-size: 12px;
    color: #cbd5e1;
}

.control-instructions kbd {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-release {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-release:hover {
    background: #ef4444;
    color: #fff;
}

/* BOTTOM COMMAND DECK */
#bottom-command-deck {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--panel-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 10px 16px;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.6);
    z-index: 50;
    pointer-events: auto;
}

.deck-spacer {
    flex: 1;
}

/* TOP SPAWN BAR — unit train di atas kiri (gaya SWL bulat kuning) */
#top-spawn-bar {
    position: absolute;
    top: 12px;
    left: 16px;
    z-index: 55;
    pointer-events: none;
}

#top-spawn-bar .recruitment-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: flex-start;
    pointer-events: auto;
}

#top-spawn-bar .recruit-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fde68a 0%, #fbbf24 45%, #d97706 100%);
    border: 3px solid #78350f;
    box-shadow:
        0 4px 0 #92400e,
        0 6px 14px rgba(0, 0, 0, 0.45),
        inset 0 2px 4px rgba(255, 255, 255, 0.45);
    padding: 4px;
    overflow: visible;
    position: relative;
}

#top-spawn-bar .recruit-btn:hover:not(.disabled):not(.round-locked) {
    background: radial-gradient(circle at 35% 30%, #fef3c7 0%, #fcd34d 45%, #eab308 100%);
    border-color: #451a03;
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 6px 0 #92400e,
        0 10px 18px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

#top-spawn-bar .recruit-btn.disabled {
    opacity: 0.55;
    filter: grayscale(0.35);
}

#top-spawn-bar .recruit-btn.round-locked,
.recruit-btn.round-locked {
    display: none !important;
}

#top-spawn-bar .recruit-icon {
    font-size: 26px;
    margin-bottom: 0;
}

#top-spawn-bar .recruit-name {
    display: none;
}

#top-spawn-bar .recruit-cost {
    font-size: 11px;
    color: #451a03;
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    position: relative;
    z-index: 3;
}

#top-spawn-bar .recruit-key {
    top: -2px;
    left: -2px;
    background: rgba(0, 0, 0, 0.65);
    color: #fde68a;
    position: absolute;
    z-index: 4;
}

#top-spawn-bar .queue-badge {
    top: -4px;
    right: -4px;
    position: absolute;
    z-index: 5;
}

#top-spawn-bar .training-progress-fill {
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.4);
    border-top: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    z-index: 2;
}

/* ARMY STANCES */
.stance-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 145px;
}

.stance-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.stance-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
}

.stance-btn.active#btn-defend {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--player-blue);
    color: #fff;
    box-shadow: 0 0 10px var(--player-blue-glow);
}

.stance-btn.active#btn-attack {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--enemy-red);
    color: #fff;
    box-shadow: 0 0 10px var(--enemy-red-glow);
}

.stance-btn.active#btn-retreat {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #fff;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.stance-btn kbd {
    font-size: 10px;
    opacity: 0.6;
}

/* UNIT RECRUITMENT CARDS */
.recruitment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.recruit-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease-out;
    padding: 6px;
    text-align: center;
    overflow: hidden;
}

.training-progress-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(56, 189, 248, 0.35);
    border-top: 2px solid var(--player-blue);
    pointer-events: none;
    transition: height 0.1s linear;
    z-index: 1;
}

.queue-badge {
    position: absolute;
    top: 4px;
    right: 5px;
    font-size: 9px;
    font-weight: 800;
    background: #0284c7;
    color: #f8fafc;
    padding: 1px 5px;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
    z-index: 5;
}

.recruit-btn:hover:not(.disabled) {
    background: var(--card-hover);
    border-color: var(--player-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.recruit-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.recruit-key {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 4px;
    border-radius: 4px;
    z-index: 5;
}

.recruit-icon {
    font-size: 24px;
    margin-bottom: 2px;
    position: relative;
    z-index: 3;
}

.recruit-name {
    font-size: 10px;
    font-weight: 700;
    color: #f1f5f9;
    position: relative;
    z-index: 3;
}

.recruit-cost {
    font-size: 10px;
    font-weight: 800;
    color: var(--gold-yellow);
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
    z-index: 3;
}

/* MINIMAP CONTAINER */
.minimap-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#minimap-canvas {
    width: 170px;
    height: 55px;
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
}

.minimap-legend {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* MODALS */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    transition: opacity 0.3s;
}

.modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 32px 40px;
    width: 480px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-content h1 {
    font-family: 'Cinzel', serif;
    font-size: 34px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.victory-text {
    color: var(--gold-yellow);
    text-shadow: 0 0 20px var(--gold-glow);
}

.defeat-text {
    color: var(--enemy-red);
    text-shadow: 0 0 20px var(--enemy-red-glow);
}

.modal-content p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 8px;
}

.stat-val {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.stat-title {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border: none;
    color: #0f172a;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px var(--player-blue-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--player-blue-glow);
}

/* GUIDE MODAL */
.guide-modal-content {
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    width: 620px;
}

.guide-modal-content h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold-yellow);
    margin-bottom: 16px;
    text-align: center;
}

.guide-section {
    margin-bottom: 20px;
}

.guide-section h3 {
    font-size: 14px;
    color: var(--player-blue);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.guide-section p, .guide-section li {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.6;
}

.unit-guide-item {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 8px;
}

.unit-guide-item .icon {
    font-size: 24px;
}

.unit-guide-item .desc {
    font-size: 11px;
    color: #94a3b8;
}

.btn-close-modal {
    display: block;
    margin: 20px auto 0;
}

.modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.modal-header-row h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold-yellow);
    font-size: 20px;
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-quick-classic {
    font-size: 11px;
    padding: 6px 12px;
    letter-spacing: 0.5px;
}

/* ========================================================
   HOME SCREEN OVERLAY
   ======================================================== */
.home-screen-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 24px 36px 18px;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.94) 0%, rgba(3, 7, 18, 0.98) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.home-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.glow-orb {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
}

.orb-left {
    top: -100px;
    left: -100px;
    background: var(--player-blue);
}

.orb-right {
    bottom: -100px;
    right: -100px;
    background: var(--gold-yellow);
}

.home-header {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-logo-wrapper {
    text-align: left;
}

.game-logo-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--gold-yellow);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.game-logo-title {
    font-family: 'Cinzel', serif;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 2.5px;
    background: linear-gradient(135deg, #ffffff 20%, #e2e8f0 50%, var(--gold-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(251, 191, 36, 0.3);
    line-height: 1.1;
}

.game-logo-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

.player-wallet-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 8px 18px;
    border-radius: 999px;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.gem-icon {
    font-size: 20px;
}

.gem-val {
    font-size: 18px;
    font-weight: 800;
    color: #fef08a;
}

.gem-lbl {
    font-size: 11px;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mode Selection Cards */
.mode-cards-container {
    width: 100%;
    max-width: 1160px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 15px 0;
}

.mode-card {
    position: relative;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.mode-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(30, 41, 59, 0.85);
    box-shadow: 0 14px 30px rgba(56, 189, 248, 0.25);
}

.mode-card-badge {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--player-blue);
}

.mode-card-badge.danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.mode-card-badge.gold {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.mode-card-icon {
    font-size: 46px;
    margin-top: 14px;
    margin-bottom: 12px;
    transition: transform 0.25s;
}

.mode-card:hover .mode-card-icon {
    transform: scale(1.12);
}

.mode-card-title {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 8px;
}

.mode-card-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 52px;
}

.btn-mode-play {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 9px;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #041427;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.btn-mode-play:hover {
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

/* Zombie Card Special Glow */
.zombie-card:hover {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.3);
}

.btn-zombie {
    background: linear-gradient(135deg, #991b1b, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-zombie:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

/* Tournament Card Special Glow */
.tournament-card:hover {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 14px 30px rgba(251, 191, 36, 0.3);
}

.btn-gold {
    background: linear-gradient(135deg, #b45309, #fbbf24) !important;
    color: #1c1303 !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35) !important;
}

.btn-gold:hover {
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6) !important;
}

/* Home Bottom Bar */
.home-bottom-bar {
    width: 100%;
    max-width: 820px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.home-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 22px;
    cursor: pointer;
    color: #f8fafc;
    transition: all 0.2s;
}

.home-nav-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: var(--player-blue);
    transform: translateY(-2px);
}

.home-nav-btn .nav-icon {
    font-size: 20px;
}

.home-nav-btn .nav-text {
    font-size: 13px;
    font-weight: 700;
}

.home-nav-btn .nav-subtext {
    font-size: 10px;
    color: var(--gold-yellow);
    background: rgba(251, 191, 36, 0.15);
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 600;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
    animation: pulse 1.5s infinite;
}

/* Mode Active Pill in Top HUD */
.mode-active-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--player-blue);
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
}

.hud-btn-exit {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
}

.hud-btn-exit:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    color: #fff !important;
}

/* Giant Spell Button in Deck */
.spell-btn {
    position: relative;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(249, 115, 22, 0.3)) !important;
    border-color: #f97316 !important;
    color: #fed7aa !important;
    overflow: hidden;
}

.spell-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.5), rgba(249, 115, 22, 0.5)) !important;
    border-color: #fb923c !important;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.5);
}

.cooldown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fbbf24;
    border-radius: 8px;
}

/* ========================================================
   MODALS CONTENT (Campaign, Tournament, Quests, Skins)
   ======================================================== */
.campaign-modal-content {
    width: 680px;
    max-height: 85vh;
    overflow-y: auto;
}

.campaign-levels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.campaign-level-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.2s;
}

.campaign-level-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--player-blue);
    transform: translateX(4px);
}

.campaign-level-info {
    text-align: left;
}

.campaign-level-num {
    font-size: 10px;
    color: var(--gold-yellow);
    font-weight: 700;
    text-transform: uppercase;
}

.campaign-level-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 2px 0 4px;
}

.campaign-level-desc {
    font-size: 11.5px;
    color: #94a3b8;
}

.campaign-level-stat {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 4px;
}

/* Tournament Modal & Bracket */
.tournament-modal-content {
    width: 780px;
    max-height: 88vh;
    overflow-y: auto;
}

.tournament-bracket {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.25);
    padding: 16px;
    border-radius: 12px;
}

.bracket-col-title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-yellow);
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.bracket-match {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bracket-match.active-match {
    border-color: var(--player-blue);
    box-shadow: 0 0 12px var(--player-blue-glow);
    background: rgba(56, 189, 248, 0.08);
}

.bracket-team {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    padding: 3px 6px;
    border-radius: 4px;
    color: #cbd5e1;
}

.bracket-team.player-team {
    font-weight: 800;
    color: var(--player-blue);
    background: rgba(56, 189, 248, 0.15);
}

.bracket-team.winner {
    color: var(--gold-yellow);
    font-weight: bold;
}

.tournament-footer-action {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

/* Quests Modal */
.quests-modal-content {
    width: 620px;
    max-height: 85vh;
    overflow-y: auto;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.quest-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
}

.quest-info {
    text-align: left;
    flex: 1;
    margin-right: 18px;
}

.quest-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.quest-progress-bg {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, var(--player-blue));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.quest-progress-txt {
    font-size: 10.5px;
    color: #94a3b8;
}

.btn-claim-quest {
    background: linear-gradient(135deg, #b45309, #fbbf24);
    border: none;
    border-radius: 8px;
    color: #1c1303;
    font-weight: 800;
    font-size: 11.5px;
    padding: 8px 16px;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.btn-claim-quest:hover {
    transform: scale(1.05);
}

.btn-claim-quest.claimed {
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

/* Skins / Armory Modal */
.skins-modal-content {
    width: 720px;
    max-height: 85vh;
    overflow-y: auto;
}

.skins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.skin-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
}

.skin-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.skin-card.equipped {
    border-color: var(--gold-yellow);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.05);
}

.skin-badge {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.skin-preview-icon {
    font-size: 38px;
    margin: 8px 0;
}

.skin-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.skin-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 32px;
}

.skin-buff {
    font-size: 10.5px;
    color: var(--gold-yellow);
    font-weight: 700;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 6px;
    padding: 3px 6px;
    margin-bottom: 12px;
}

.btn-equip-skin {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid var(--player-blue);
    color: var(--player-blue);
    transition: all 0.2s;
}

.btn-equip-skin:hover {
    background: var(--player-blue);
    color: #0f172a;
}

.btn-equip-skin.equipped-btn {
    background: var(--gold-yellow);
    border-color: var(--gold-yellow);
    color: #1c1303;
    cursor: default;
}

/* Game Over Modal Buttons */
.game-over-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.hidden {
    display: none !important;
}

/* ==========================================
   AUTHENTIC STICK WAR: LEGACY HOME MENU CSS
   ========================================== */
.home-screen-legacy {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 120;
    pointer-events: auto;
}

#legacy-home-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
}

.legacy-right-panel {
    position: absolute;
    top: 0;
    right: 5%;
    bottom: 0;
    width: 380px;
    max-width: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: auto;
}

.legacy-wallet-pill {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 15;
}

/* Authentic Stylized Logo */
.legacy-logo-wrapper {
    text-align: center;
    margin-bottom: 35px;
    transform: perspective(400px) rotateX(8deg);
}

.legacy-logo-title {
    font-family: 'Cinzel', serif;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow: 
        -3px -3px 0 #000,  3px -3px 0 #000,
        -3px  3px 0 #000,  3px  3px 0 #000,
         0    4px 15px rgba(0, 0, 0, 0.9);
    line-height: 1;
}

.logo-white {
    color: #ffffff;
}

.logo-helmet {
    color: #fbbf24;
    position: relative;
    display: inline-block;
}

.logo-helmet::before {
    content: "🛡️";
    font-size: 20px;
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
}

.legacy-logo-sub {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 12px;
    color: #38bdf8;
    text-shadow: 
        -2px -2px 0 #000,  2px -2px 0 #000,
        -2px  2px 0 #000,  2px  2px 0 #000;
    margin-top: 4px;
}

/* Authentic Glossy 3D Action Buttons (Red PLAY & Blue SKINS) */
.legacy-main-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 240px;
    margin-bottom: 40px;
}

.btn-3d {
    width: 100%;
    height: 62px;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
    box-shadow: 
        0 8px 0 rgba(0, 0, 0, 0.4),
        0 15px 25px rgba(0, 0, 0, 0.5),
        inset 0 2px 3px rgba(255, 255, 255, 0.6);
}

.btn-3d:active {
    transform: translateY(4px);
    box-shadow: 
        0 4px 0 rgba(0, 0, 0, 0.4),
        0 8px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 3px rgba(255, 255, 255, 0.6);
}

.btn-play-red {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
    border: 3px solid #fca5a5;
}

.btn-play-red:hover {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #b91c1c 100%);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.8), 0 8px 0 #7f1d1d;
}

.btn-skins-blue {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    border: 3px solid #93c5fd;
}

.btn-skins-blue:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 50%, #1e40af 100%);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.8), 0 8px 0 #1e3a8a;
}

/* Golden Bottom Action Toolbar */
.legacy-bottom-toolbar {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 12px;
    z-index: 20;
}

.tb-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    border: 2.5px solid #fef08a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.15s;
}

.tb-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.9);
}

.tb-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.mode-modal-content {
    width: 820px !important;
    max-width: 95% !important;
}

/* Archidon Campaign Card Styling */
.archidon-campaign-card {
    border-color: rgba(34, 197, 94, 0.4) !important;
    background: radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.15), rgba(15, 23, 42, 0.95)) !important;
}

.archidon-badge {
    background: rgba(34, 197, 94, 0.2) !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    color: #4ade80 !important;
}

.archidon-icon-art {
    font-size: 42px !important;
    filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.6));
    animation: archidonFloat 3s infinite ease-in-out;
}

@keyframes archidonFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.08); }
}

.btn-archidon {
    background: linear-gradient(135deg, #16a34a, #4ade80) !important;
    color: #052e16 !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-archidon:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.7);
}

/* VISUAL CAMPAIGN MAP OF CITIES */
.campaign-map-wrapper {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px 16px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.campaign-map-visual {
    position: relative;
    width: 100%;
    padding: 20px 10px;
}

.map-path-line {
    position: absolute;
    top: 55px;
    left: 8%;
    right: 8%;
    height: 6px;
    background: linear-gradient(90deg, #16a34a, #38bdf8, #a855f7, #f59e0b, #ef4444);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    z-index: 1;
}

.map-cities-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.city-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    transition: all 0.3s ease;
}

.city-node-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.city-node.completed .city-node-icon {
    background: #15803d;
    border-color: #4ade80;
    color: #fff;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
}

.city-node.active-city .city-node-icon {
    background: #0284c7;
    border-color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.9);
    animation: activeCityPulse 1.8s infinite ease-in-out;
}

@keyframes activeCityPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(56, 189, 248, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 0 30px rgba(56, 189, 248, 1); }
}

.city-node.locked {
    opacity: 0.55;
    filter: grayscale(0.8);
}

.city-marker-flag {
    position: absolute;
    top: -30px;
    background: var(--gold-yellow);
    color: #0f172a;
    font-size: 9.5px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.6);
    white-space: nowrap;
    animation: flagBounce 1.2s infinite ease-in-out;
}

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

.city-node-name {
    font-size: 11px;
    font-weight: 800;
    color: #f8fafc;
    margin-top: 8px;
    text-align: center;
}

.city-node-status {
    font-size: 9px;
    font-weight: 700;
    margin-top: 2px;
    color: #94a3b8;
}

.city-node.completed .city-node-status { color: #4ade80; }
.city-node.active-city .city-node-status { color: #38bdf8; }

.tag-done {
    color: #4ade80;
    font-weight: 800;
}

.tag-active {
    color: #38bdf8;
    font-weight: 800;
}

.locked-card {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.active-card {
    border-color: var(--player-blue) !important;
    background: rgba(2, 132, 199, 0.1) !important;
}

/* CAMPAIGN FINALE CELEBRATION MODAL */
.finale-modal-content {
    background: radial-gradient(circle at 50% 30%, #1e1b4b, #0f172a) !important;
    border: 2px solid var(--gold-yellow) !important;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.5) !important;
    width: 520px !important;
}

.finale-header-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--gold-yellow);
    color: var(--gold-yellow);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.finale-title {
    font-family: 'Cinzel', serif;
    font-size: 34px !important;
    color: #fbbf24 !important;
    text-shadow: 0 0 25px rgba(251, 191, 36, 0.8), 0 4px 10px rgba(0, 0, 0, 0.9) !important;
    margin-bottom: 6px !important;
}

.finale-subtitle {
    color: #e2e8f0 !important;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.trophy-canvas-wrapper {
    width: 320px;
    height: 240px;
    margin: 10px auto;
    position: relative;
}

#trophy-stickman-canvas {
    width: 320px;
    height: 240px;
    display: block;
}

.finale-reward-pill {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 800;
    color: #f8fafc;
    display: inline-block;
}

.gold-txt {
    color: var(--gold-yellow);
    font-size: 16px;
}

/* ==========================================
   MODE SELECT - LEGACY CARD MENU (sky background)
   ========================================== */
#mode-select-modal.mode-select-overlay {
    background: linear-gradient(
        180deg,
        #3d8fd4 0%,
        #56a8e4 42%,
        #6db4ea 58%,
        #4ca64c 58.5%,
        #3d9140 78%,
        #2f7a34 100%
    );
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
}

/* Clouds */
#mode-select-modal.mode-select-overlay::before,
#mode-select-modal.mode-select-overlay::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 100px;
    pointer-events: none;
    filter: blur(1px);
}

#mode-select-modal.mode-select-overlay::before {
    width: 220px;
    height: 54px;
    top: 6%;
    left: 8%;
    box-shadow:
        60px -22px 0 -8px rgba(255, 255, 255, 0.92),
        130px 6px 0 -16px rgba(255, 255, 255, 0.9),
        480px 30px 0 -4px rgba(255, 255, 255, 0.85),
        900px -10px 0 -12px rgba(255, 255, 255, 0.9),
        980px 18px 0 -20px rgba(255, 255, 255, 0.85);
}

#mode-select-modal.mode-select-overlay::after {
    width: 180px;
    height: 44px;
    top: 14%;
    right: 12%;
    box-shadow:
        -70px 16px 0 -10px rgba(255, 255, 255, 0.9),
        40px -14px 0 -6px rgba(255, 255, 255, 0.88);
}

/* Wooden back button */
.mode-back-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 10;
    width: 74px;
    height: 62px;
    padding: 7px;
    background: linear-gradient(160deg, #c89562, #8b5a2b 55%, #6e4520);
    border: 3px solid #4a2e14;
    border-radius: 10px;
    cursor: pointer;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.35),
        0 4px 10px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, filter 0.15s;
}

.mode-back-btn:hover {
    transform: scale(1.06);
    filter: brightness(1.08);
}

.mode-back-btn:active {
    transform: scale(0.96);
}

.mode-back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #42a5f5, #1e88e5 60%, #1565c0);
    border: 2px solid #0d47a1;
    border-radius: 6px;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Cards row */
.mode-cards-row {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 22px;
    width: 96%;
    max-width: 1240px;
    padding: 20px;
}

.legacy-mode-card {
    position: relative;
    width: 172px;
    padding: 0;
    border: 4px solid #0a0a0a;
    border-radius: 10px;
    background: #111;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.18s;
    -webkit-tap-highlight-color: transparent;
}

.legacy-mode-card:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
}

.legacy-mode-card:active {
    transform: translateY(-2px) scale(0.98);
}

.legacy-mode-art {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #1a1a1a;
}

.legacy-mode-art svg {
    display: block;
    width: 100%;
    height: 100%;
}

.legacy-mode-label {
    background: linear-gradient(180deg, #2f8fe0 0%, #1a6fc4 45%, #155ea8 100%);
    border-top: 3px solid #0a0a0a;
    padding: 10px 6px 12px;
    text-align: center;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.legacy-mode-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 17px;
    line-height: 1.15;
    letter-spacing: 0.5px;
    color: #ffb02e;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
}

.legacy-mode-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: #ffd88a;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
}

@media (max-width: 1024px) {
    .legacy-mode-card {
        width: 148px;
    }

    .legacy-mode-art {
        height: 250px;
    }

    .legacy-mode-title {
        font-size: 14px;
    }
}

@media (max-width: 720px) {
    .mode-cards-row {
        gap: 12px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .legacy-mode-card {
        width: 130px;
    }

    .legacy-mode-art {
        height: 200px;
    }
}



/* ==========================================
   CAMPAIGN: SAVE SLOTS + WORLD MAP
   ========================================== */
#campaign-modal.campaign-overlay {
    background: linear-gradient(
        180deg,
        #3d8fd4 0%,
        #56a8e4 42%,
        #6db4ea 58%,
        #4ca64c 58.5%,
        #3d9140 78%,
        #2f7a34 100%
    );
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
}

#campaign-modal.campaign-overlay::before,
#campaign-modal.campaign-overlay::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 100px;
    pointer-events: none;
    filter: blur(1px);
}

#campaign-modal.campaign-overlay::before {
    width: 220px;
    height: 54px;
    top: 5%;
    left: 12%;
    box-shadow:
        60px -22px 0 -8px rgba(255, 255, 255, 0.92),
        520px 40px 0 -4px rgba(255, 255, 255, 0.85),
        900px -6px 0 -12px rgba(255, 255, 255, 0.9);
}

#campaign-modal.campaign-overlay::after {
    width: 180px;
    height: 44px;
    top: 12%;
    right: 10%;
    box-shadow:
        -70px 16px 0 -10px rgba(255, 255, 255, 0.9),
        40px -14px 0 -6px rgba(255, 255, 255, 0.88);
}

.campaign-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Legacy logo on save screen */
.sw-legacy-logo {
    text-align: center;
    margin-bottom: 28px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.swl-helmet-row {
    font-size: 34px;
    line-height: 1;
    margin-bottom: -4px;
}

.swl-title {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 52px;
    letter-spacing: 4px;
    color: #f3f4f6;
    text-shadow:
        3px 3px 0 #111,
        -1px -1px 0 #111,
        1px -1px 0 #111,
        -1px 1px 0 #111,
        0 6px 12px rgba(0, 0, 0, 0.4);
    line-height: 1;
}

.swl-sub {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 12px;
    color: #e2e8f0;
    text-shadow: 2px 2px 0 #111;
    margin-top: 2px;
}

/* Save slots row */
.save-slots-row {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
    align-items: stretch;
    z-index: 2;
}

.save-slot-card {
    position: relative;
    width: 220px;
    background: linear-gradient(180deg, #a8703c 0%, #8b5a2b 18%, #6e4520 100%);
    border: 4px solid #4a2e14;
    border-radius: 14px;
    padding: 10px 10px 0;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.18s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.save-slot-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
}

.save-slot-card:active {
    transform: translateY(-2px) scale(0.98);
}

.save-slot-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #7f1d1d;
    background: #ef4444;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.save-slot-delete:hover {
    background: #f87171;
    transform: scale(1.1);
}

.save-slot-art {
    position: relative;
    width: 100%;
    height: 120px;
    border: 3px solid #3a2410;
    border-radius: 8px;
    overflow: hidden;
    background: #222;
}

.save-slot-art svg {
    display: block;
    width: 100%;
    height: 100%;
}

.save-slot-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid #f1c40f;
    color: #f1c40f;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
    text-transform: uppercase;
}

.save-slot-body {
    background: linear-gradient(180deg, #3d6b8f 0%, #2f5573 100%);
    border: 2px solid #1a3a52;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 10px 10px 8px;
    text-align: center;
    flex: 1;
}

.save-slot-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
}

.save-slot-progress {
    width: 100%;
    height: 16px;
    background: #111;
    border: 2px solid #000;
    border-radius: 4px;
    overflow: hidden;
}

.save-slot-progress-fill {
    height: 100%;
    background: linear-gradient(180deg, #5eead4, #22c55e 40%, #16a34a);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
    transition: width 0.4s ease;
}

.save-slot-pct {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.save-slot-foot {
    background: linear-gradient(180deg, #6e4520, #4a2e14);
    color: #f8fafc;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 6px;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    border-top: 2px solid #3a2410;
    margin: 8px -10px 0;
}

.save-slot-card.is-empty .save-slot-body {
    background: linear-gradient(180deg, #3d6b8f 0%, #2f5573 100%);
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-slot-card.is-empty .save-slot-title {
    margin-bottom: 0;
    font-size: 16px;
}

.save-slot-card.is-empty .save-slot-foot {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 12px;
}

.save-slots-footer {
    margin-top: 26px;
    z-index: 2;
}

/* ========== WORLD MAP STAGE ========== */
#campaign-stage-map {
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
}

.map-top-left {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
}

.map-home-btn {
    background: linear-gradient(180deg, #3d6b8f, #1a3a52);
    border: 3px solid #0d2133;
    border-radius: 8px;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 18px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, filter 0.15s;
}

.map-home-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.12);
}

.map-top-right {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.map-gem-pill {
    background: linear-gradient(180deg, #3d6b8f, #1a3a52);
    border: 3px solid #0d2133;
    border-radius: 8px;
    color: #f8fafc;
    font-weight: 800;
    font-size: 16px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.map-gem-pill.dim {
    opacity: 0.9;
    font-size: 14px;
}

.inamorta-map {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.inamorta-map .map-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#map-level-nodes {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.map-star-node {
    position: absolute;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: transform 0.15s;
    z-index: 5;
}

.map-star-node:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 6;
}

.map-star-node:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.7);
}

.map-star {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    background: radial-gradient(circle at 35% 30%, #ef5350, #c62828 70%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.map-star-node.completed .map-star {
    background: radial-gradient(circle at 35% 30%, #66bb6a, #2e7d32 70%);
}

.map-star-node.current .map-star {
    background: radial-gradient(circle at 35% 30%, #ef5350, #b71c1c 70%);
    animation: starPulse 1.2s infinite ease-in-out;
}

.map-star-node.selected .map-star {
    outline: 3px solid #f1c40f;
    outline-offset: 2px;
}

.map-star-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.88);
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.map-star-alert {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
    font-weight: 900;
    color: #f1c40f;
    text-shadow: 0 2px 0 #111, 0 0 8px rgba(241, 196, 15, 0.7);
    animation: alertBounce 0.9s infinite ease-in-out;
    pointer-events: none;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

@keyframes alertBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

/* Right side action buttons */
.map-side-actions {
    position: absolute;
    right: 18px;
    bottom: 28px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 170px;
}

.map-btn-play {
    background: linear-gradient(180deg, #ef5350 0%, #c62828 55%, #a31515 100%);
    border: 3px solid #7f1d1d;
    border-radius: 10px;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 34px;
    letter-spacing: 3px;
    padding: 14px 10px;
    cursor: pointer;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, filter 0.15s;
}

.map-btn-play:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.map-btn-play:active {
    transform: scale(0.97);
}

.map-btn-secondary {
    background: linear-gradient(180deg, #3d6b8f 0%, #1a3a52 100%);
    border: 3px solid #0d2133;
    border-radius: 10px;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 17px;
    padding: 12px 10px;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, filter 0.15s;
}

.map-btn-secondary:hover {
    transform: scale(1.04);
    filter: brightness(1.12);
}

@media (max-width: 800px) {
    .swl-title {
        font-size: 34px;
        letter-spacing: 2px;
    }

    .swl-sub {
        font-size: 15px;
        letter-spacing: 8px;
    }

    .save-slot-card {
        width: 170px;
    }

    .save-slot-art {
        height: 95px;
    }

    .map-side-actions {
        width: 130px;
        right: 10px;
        bottom: 14px;
    }

    .map-btn-play {
        font-size: 24px;
        padding: 10px 6px;
    }

    .map-btn-secondary {
        font-size: 13px;
        padding: 9px 6px;
    }
}

/* ==========================================
   CAMPAIGN BATTLE TUTORIAL (Mission 1)
   ========================================== */
#battle-tutorial {
    position: absolute;
    inset: 0;
    z-index: 280;
    pointer-events: none;
}

.tutorial-speech {
    position: absolute;
    top: 14%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 0;
    max-width: min(560px, 90%);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}

.tutorial-msg {
    background: rgba(40, 44, 52, 0.95);
    color: #f8fafc;
    border: 3px solid #67e8f9;
    border-radius: 14px;
    padding: 16px 22px;
    font-size: clamp(15px, 2.4vw, 20px);
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1.35;
    min-width: 220px;
    text-align: left;
    box-shadow: 0 0 18px rgba(103, 232, 249, 0.35);
}

.tutorial-wizard {
    margin-left: -6px;
    margin-bottom: -8px;
    flex-shrink: 0;
    animation: tutorial-wizard-bob 1.6s ease-in-out infinite;
}

.tutorial-hand {
    position: absolute;
    left: 50%;
    top: 50%;
    pointer-events: none;
    z-index: 281;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
    animation: tutorial-hand-point 0.85s ease-in-out infinite;
    will-change: left, top;
}

.tutorial-hand-inner {
    transform: rotate(180deg);
    transform-origin: center center;
    line-height: 0;
}

.tutorial-skip-btn {
    position: absolute;
    right: 18px;
    top: 38%;
    pointer-events: auto;
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    color: #0f172a;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 22px;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 4px 0 #475569, 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s, filter 0.12s;
    z-index: 282;
}

.tutorial-skip-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.tutorial-skip-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #475569, 0 3px 8px rgba(0, 0, 0, 0.3);
}

@keyframes tutorial-hand-point {
    0%, 100% {
        transform: translate(-30%, 0);
    }
    50% {
        transform: translate(-30%, 14px);
    }
}

@keyframes tutorial-wizard-bob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@media (max-width: 700px) {
    .tutorial-speech {
        top: 10%;
    }

    .tutorial-skip-btn {
        right: 10px;
        top: 32%;
        padding: 10px 16px;
        font-size: 13px;
    }

    .tutorial-wizard svg {
        width: 68px;
        height: 76px;
    }
}

/* ==========================================
   PAUSED MENU (kayak Stick War Legacy)
   ========================================== */
#pause-modal {
    z-index: 290;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pause-panel {
    position: relative;
    width: min(420px, 92vw);
    padding: 36px 40px 28px;
    border-radius: 18px;
    background:
        repeating-linear-gradient(
            90deg,
            #c48a3a 0px,
            #d49a48 8px,
            #b87a32 16px,
            #c98f40 24px,
            #b0722e 32px
        ),
        linear-gradient(180deg, #d4a056 0%, #b87830 100%);
    background-blend-mode: multiply;
    border: 4px solid #6b3f14;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.65),
        inset 0 2px 0 rgba(255, 220, 160, 0.35),
        inset 0 -4px 0 rgba(0, 0, 0, 0.25);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pause-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 900;
    letter-spacing: 6px;
    color: #5c3310;
    text-shadow:
        0 2px 0 rgba(255, 230, 170, 0.35),
        0 4px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
    line-height: 1;
}

.pause-menu-btn {
    width: min(240px, 70vw);
    padding: 14px 24px;
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #f8fafc;
    background: linear-gradient(180deg, #3b5f9e 0%, #1e3a6e 55%, #162c54 100%);
    border: 3px solid #0f172a;
    border-radius: 10px;
    cursor: pointer;
    box-shadow:
        0 4px 0 #0b1224,
        0 6px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.1s, filter 0.1s;
}

.pause-menu-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.pause-menu-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #0b1224, 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pause-checks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 18px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 2px dashed rgba(91, 50, 16, 0.35);
    width: 100%;
}

.pause-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 800;
    color: #3b2410;
    cursor: pointer;
    user-select: none;
}

.pause-check input {
    width: 22px;
    height: 22px;
    accent-color: #1e3a6e;
    cursor: pointer;
}

.pause-shop-btn {
    position: absolute;
    right: 24px;
    bottom: 24px;
    padding: 12px 22px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(180deg, #e879f9 0%, #a21caf 100%);
    border: 3px solid #701a75;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0 #581c87, 0 6px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s, filter 0.1s;
    z-index: 2;
}

.pause-shop-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.pause-shop-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #581c87;
}

/* Compact UI scale (Ukuran UI checkbox) */
body.ui-compact #top-hud {
    transform: scale(0.9);
    transform-origin: top center;
}

body.ui-compact #top-spawn-bar {
    transform: scale(0.9);
    transform-origin: top left;
}

body.ui-compact #bottom-command-deck {
    transform: scale(0.92);
    transform-origin: bottom center;
}

/* Skins/Toko di atas pause */
#skins-modal {
    z-index: 310;
}

@media (max-width: 700px) {
    #top-spawn-bar {
        top: 80px;
        left: 8px;
    }

    #top-spawn-bar .recruit-btn {
        width: 62px;
        height: 62px;
    }

    #top-spawn-bar .recruit-icon {
        font-size: 20px;
    }

    #top-spawn-bar .recruit-cost {
        font-size: 9px;
    }

    .pause-shop-btn {
        right: 10px;
        bottom: 10px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .pause-panel {
        padding: 28px 20px 22px;
    }
}
