html, body {
    touch-action: none;
    -webkit-text-size-adjust: 100%;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}


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

body {
    background-color: #000000;
    color: #00FF41;
    font-family: 'Space Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Exactly 720x1280 Godot mobile portrait bounds */
#game-container {
    position: absolute;
    width: 720px;
    height: 1280px;
    background: #030712;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    display: block;
    touch-action: none;
}

/* RETRO ARCADE / LAN STATUS PILL */
.lan-status-pill {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: none; /* Hidden by default; only displayed while downloading sprites */
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: rgba(10, 15, 25, 0.88);
    border: 1px solid rgba(0, 255, 65, 0.5);
    border-radius: 20px;
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25), inset 0 0 8px rgba(0, 0, 0, 0.8);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #00ff41;
    text-shadow: 0 0 6px #00ff41;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lan-status-pill.syncing {
    border-color: rgba(252, 163, 17, 0.8);
    color: #fca311;
    text-shadow: 0 0 8px #fca311;
    box-shadow: 0 0 18px rgba(252, 163, 17, 0.4);
}

.lan-status-pill.error {
    border-color: rgba(255, 68, 68, 0.8);
    color: #ff4444;
    text-shadow: 0 0 8px #ff4444;
}

.lan-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #00ff41;
    box-shadow: 0 0 8px #00ff41;
    animation: lan-pulse 1.8s infinite;
}

.lan-status-pill.syncing .lan-status-dot {
    background-color: #fca311;
    box-shadow: 0 0 8px #fca311;
    animation: lan-blink 0.35s infinite alternate;
}

@keyframes lan-pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1.0; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes lan-blink {
    0% { opacity: 0.2; }
    100% { opacity: 1.0; }
}

/* Touch Action adjustments for inputs, buttons and lists to prevent double tap zoom */
button, .menu-row-btn, .grid-btn, .action-btn, #mute-btn, #pause-btn, input, a {
    touch-action: manipulation;
}
.submenu-content-box, .social-row-container, .bank-statement, #sim-challenges-list {
    touch-action: pan-y;
}

/* Force login overlay elements and layout to fit and center correctly */
#login-overlay > div,
#google-setup-overlay > div {
    display: block !important;
    max-height: 90% !important;
    overflow-y: auto !important;
    flex-shrink: 0 !important;
}

#login-overlay .menu-row-btn,
#google-setup-overlay .menu-row-btn,
#game-container.text-size-large #login-overlay .menu-row-btn,
#game-container.text-size-xlarge #login-overlay .menu-row-btn,
#game-container.text-size-large #google-setup-overlay .menu-row-btn,
#game-container.text-size-xlarge #google-setup-overlay .menu-row-btn,
#login-overlay button,
#google-setup-overlay button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#login-overlay input,
#google-setup-overlay input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* Loading Screen overlay inside container */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #00FF41;
    font-size: 36px;
    font-weight: bold;
}

/* Tap to Start overlay inside container */
#start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #00FF41;
    font-size: 40px;
    cursor: pointer;
}

/* Login Screen Overlay inside container */
#login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ambient Void Background */
.void-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0a1128 0%, #030712 100%);
    z-index: 0;
}

/* 3D Perspective Floor */
.perspective-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    perspective: 600px;
    z-index: 1;
    overflow: hidden;
}

.grid-floor {
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.3) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.3) 2px, transparent 2px);
    background-size: 60px 60px;
    transform: rotateX(75deg);
    animation: gridMove 1.5s linear infinite;
    box-shadow: inset 0 0 100px #030712;
    z-index: 1;
}

.red-carpet {
    position: absolute;
    bottom: -50%;
    left: 50%;
    width: 140px;
    height: 200%;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0) 0%, rgba(255, 0, 0, 0.4) 50%, rgba(255, 0, 0, 0) 100%);
    transform: translateX(-50%) rotateX(75deg);
    z-index: 2;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 60px;
    }
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* End & Pause Screen Overlay */
#end-screen,
#pause-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.95);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.end-title {
    font-size: 56px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.8);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.end-btn {
    background: rgba(0, 255, 65, 0.2);
    border: 2px solid #00FF41;
    color: #00FF41;
    padding: 15px 30px;
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    margin: 15px;
    width: 320px;
    text-align: center;
}

.end-btn:active {
    background: #00FF41;
    color: #000;
}

#pause-btn {
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    background: rgba(9, 12, 18, 0.8);
    border: 1px solid #ffcc00;
    color: #ffcc00;
    padding: 6px 16px;
    font-family: 'Space Mono', monospace;
    font-size: 22px;
    cursor: pointer;
    border-radius: 4px;
}

.flash-sale-combat-btn {
    position: absolute;
    top: 92px;
    right: 36px;
    z-index: 50;
    background: rgba(0, 255, 65, 0.18);
    border: 2px solid #00FF41;
    color: #00FF41;
    padding: 6px 14px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    text-shadow: 0 0 8px #00FF41;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: flashPulse 1.5s infinite;
}

@keyframes flashPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(0, 255, 65, 0.4); }
    50% { transform: scale(1.06); box-shadow: 0 0 25px rgba(0, 255, 65, 0.8); border-color: #fff; color: #fff; }
}

/* ================= MAIN MENU PANEL (ConsoleBox Style) ================= */
.console-box {
    position: absolute;
    left: 36px;
    top: 64px;
    width: 648px;
    height: 1152px;
    background: rgba(11, 22, 34, 0.85);
    border: 4px solid #1e2938;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    z-index: 20;
}

.console-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    min-height: 0;
}

/* Header bar wins/losses and points */
.menu-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    border-bottom: 2px solid #1e2938;
    padding-bottom: 12px;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-family: 'Space Mono', monospace;
}

.menu-top-bar .left-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-top-bar .right-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00FF41;
}

.dev-banner {
    font-size: 22px;
    color: #64748b;
    margin-bottom: 12px;
    font-family: 'Space Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.menu-logo-box {
    text-align: center;
    font-size: 54px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-family: 'Space Mono', monospace;
}

.menu-logo-box span {
    color: #00FF41;
}

.menu-subtitle {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 2px;
    font-family: 'Space Mono', monospace;
    text-align: center;
}

/* Animated Boss & Skin Previews (Large Transparent Display) */
.boss-preview-container,
.large-preview {
    width: 100%;
    height: 280px;
    min-height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
    pointer-events: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.menu-boss-sprite,
.large-menu-sprite {
    width: 260px;
    height: 260px;
    max-width: 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-boss-sprite video,
.large-menu-sprite video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.45));
}

/* Monitor Grid 3x2 */
.boss-grid-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 380px;
}

.grid-btn {
    background: #030712;
    border: 2px solid #384052;
    height: 96px;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    color: #fff;
    transition: all 0.2s ease;
    position: relative;
}

.grid-btn:hover:not(.locked-btn) {
    border-color: #00FF41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

.grid-btn.active-boss {
    border-color: #00FF41 !important;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
}

.locked-btn {
    opacity: 0.4;
    cursor: not-allowed;
}

.grid-btn .lock-icon {
    position: absolute;
    font-size: 14px;
    bottom: 6px;
    right: 6px;
}

/* Dynamic Options Buttons Stack */
.menu-row-btn {
    width: 380px;
    height: 60px;
    background: #030712;
    border: 2px solid #00FF41;
    color: #00FF41;
    font-family: 'Space Mono', monospace;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.menu-row-btn:hover:not(.locked-btn) {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.menu-row-btn.locked-btn {
    border-color: #384052;
    color: #384052;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Submenus inside main menu box styling */
.submenu-title {
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
}

.submenu-subtitle {
    font-size: 28px;
    color: #64748b;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-align: center;
}

.submenu-content-box {
    width: 100%;
    flex-grow: 1;
    background: rgba(3, 7, 18, 0.6);
    border: 2px solid #1e2938;
    padding: 25px;
    font-family: 'Space Mono', monospace;
    font-size: 22px;
    line-height: 1.6;
    color: #cbd5e1;
    overflow-y: auto;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.submenu-content-box::-webkit-scrollbar {
    width: 6px;
}

.submenu-content-box::-webkit-scrollbar-thumb {
    background: #1e2938;
}

/* ================= Ticker Marquee Style (Bottom of 1280 bounds) ================= */
.ticker-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 720px;
    height: 35px;
    background: rgba(0, 0, 0, 0.95);
    overflow: hidden;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #1e2938;
    z-index: 1000;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
}

.ticker-label {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker-scroll 25s linear infinite;
    color: #ffffff;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    letter-spacing: 1px;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Paper Receipt styles for end-screen */
.paper-receipt {
    background: #f7f7f5;
    color: #1a1a1a;
    width: 500px;
    padding: 35px 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    margin-bottom: 25px;
    font-family: 'Space Mono', monospace;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.paper-receipt::before {
    content: "";
    position: absolute;
    left: 0;
    top: -10px;
    width: 100%;
    height: 10px;
    background: linear-gradient(135deg, transparent 5px, #f7f7f5 0), linear-gradient(-135deg, transparent 5px, #f7f7f5 0);
    background-size: 10px 10px;
}

.paper-receipt::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 10px;
    background: linear-gradient(45deg, transparent 5px, #f7f7f5 0), linear-gradient(-45deg, transparent 5px, #f7f7f5 0);
    background-size: 10px 10px;
}

.receipt-header {
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 5px;
    color: #111;
    margin-top: 0;
}

.receipt-divider {
    border-top: 1px dashed #1a1a1a;
    margin: 12px 0;
}

.bank-statement {
    font-size: 14px;
    line-height: 1.6;
    min-height: 140px;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding-right: 5px;
    text-align: left;
}

.bank-statement::-webkit-scrollbar {
    width: 4px;
}

.bank-statement::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.receipt-stamp {
    position: absolute;
    bottom: 25px;
    right: 30px;
    border: 4px double #15803d;
    color: #15803d;
    font-size: 20px;
    font-weight: bold;
    padding: 4px 14px;
    transform: rotate(-12deg);
    opacity: 0.8;
    pointer-events: none;
    letter-spacing: 3px;
    border-radius: 4px;
}

.stamp-lost {
    border-color: #b91c1c !important;
    color: #b91c1c !important;
}

/* ================= COMBAT SCREEN STYLES ================= */
.combat-ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
}

.combat-logo {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
    z-index: 30;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    font-family: 'Space Mono', monospace;
}

.combat-logo span {
    color: #00FF41;
}

/* Chart Canvas Position */
.tick-chart-bg {
    position: absolute;
    top: 145px;
    left: 36px;
    width: 648px;
    height: 200px;
    background: rgba(3, 7, 18, 0.85);
    border: 2px solid rgba(0, 255, 64, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
    z-index: 30;
}

#live-chart {
    width: 100%;
    height: 100%;
}

.scorecard-labels {
    position: absolute;
    top: 365px;
    left: 36px;
    width: 648px;
    min-height: 50px;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 42px;
    font-weight: bold;
    z-index: 30;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
    font-family: 'Space Mono', monospace;
}

#price-scorecard {
    max-width: 520px;
    word-wrap: break-word;
    word-break: break-word;
}

#timer-label {
    font-size: 44px;
}

/* Tug of War Balance Track y = 985px */
#balance-track-bg {
    position: absolute;
    left: 45px;
    top: 945px;
    width: 630px;
    height: 18px;
    background: rgba(30, 41, 59, 0.8);
    z-index: 30;
    border: 1px solid #334155;
    border-radius: 4px;
    box-sizing: border-box;
}

#balance-fill-player {
    position: absolute;
    right: 315px;
    top: 0;
    width: 0px;
    height: 16px;
    background: #00FF41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

#balance-fill-boss {
    position: absolute;
    left: 315px;
    top: 0;
    width: 0px;
    height: 16px;
    background: #ff3333;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

#balance-diamond {
    position: absolute;
    left: 295px;
    top: -18px;
    width: 40px;
    height: 54px;
    font-size: 34px;
    color: #ffffff;
    text-align: center;
    line-height: 54px;
    pointer-events: none;
    z-index: 32;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

#balance-label {
    position: absolute;
    left: 45px;
    top: 980px;
    width: 630px;
    height: 32px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #ffffff;
    z-index: 30;
    letter-spacing: 1px;
    font-family: 'Space Mono', monospace;
}

/* Combat Controls (4 buttons at bottom, Z X C V, y = 1040) */
#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 720px;
    height: 1280px;
    pointer-events: none;
    z-index: 999;
}

/* Pain & Damage Red Vignette Screen Shake */
@keyframes painFlashAnim {
    0% {
        box-shadow: inset 0 0 0px rgba(255, 0, 0, 0);
        filter: brightness(1.1) contrast(1.1);
    }
    25% {
        box-shadow: inset 0 0 120px rgba(255, 0, 30, 0.85);
        filter: brightness(1.25) contrast(1.25) drop-shadow(0 0 15px #ff0033);
        transform: translate(3px, -4px) scale(1.015);
    }
    50% {
        box-shadow: inset 0 0 70px rgba(255, 0, 30, 0.5);
        transform: translate(-3px, 3px);
    }
    100% {
        box-shadow: inset 0 0 0px rgba(255, 0, 0, 0);
        filter: none;
        transform: none;
    }
}

.pain-flash {
    animation: painFlashAnim 0.4s ease-out forwards;
}

.controls-overlay {
    position: absolute;
    top: 1035px;
    left: 45px;
    width: 630px;
    height: 110px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    z-index: 100;
}

.action-btn {
    width: 108px;
    height: 108px;
    background-color: rgba(3, 7, 18, 0.75);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: all 0.1s ease;
    box-sizing: border-box;
}

.action-btn svg {
    width: 46px;
    height: 46px;
}

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

.action-btn-cyan {
    border: 2px solid #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
}

.action-btn-cyan:hover {
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.9);
}

.action-btn-green {
    border: 2px solid #00ff41;
    color: #00ff41;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.action-btn-green:hover {
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.7);
}

.action-btn-cyan.pressed {
    transform: scale(0.92);
    box-shadow: 0 0 30px rgba(0, 240, 255, 1.0);
    filter: brightness(1.3);
}

.action-btn-green.pressed {
    transform: scale(0.92);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.9);
    filter: brightness(1.3);
}

.key-badge {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 3px #000, 0 0 5px #000;
    font-family: 'Space Mono', monospace;
    pointer-events: none;
}

.action-btn-cyan .key-badge {
    color: #00f0ff;
}

.action-btn-green .key-badge {
    color: #00ff41;
}

/* ================= REACTIONS ================= */
#reaction-text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: bold;
    color: #fca311;
    text-shadow: 0 0 20px rgba(252, 163, 17, 1), 2px 2px 0px #000;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    font-family: 'Space Mono', monospace;
}

.reaction-anim {
    animation: popReaction 0.8s ease-out forwards;
}

@keyframes popReaction {
    0% {
        opacity: 1;
        transform: translate(-50%, 20px) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -10px) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -40px) scale(0.9);
    }
}

/* ================= FIGHTERS ================= */
.fighter-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.fighter-north {
    top: 580px;
}

.fighter-south {
    top: 720px;
}

.sprite {
    width: 256px;
    height: 256px;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 4096px 256px;
}

.player-sprite {
    background-image: url('assets/player_spritesheet.webp');
    transform: scale(1.15);
    filter: drop-shadow(0 25px 15px rgba(0, 0, 0, 0.9));
}

.npc-sprite {
    background-image: url('assets/npc_btc_final_idle_spritesheet.webp');
    transform: scale(1.0);
    filter: drop-shadow(0 15px 10px rgba(0, 0, 0, 0.8));
}

.anim-idle {
    animation: playSprite16 1.2s steps(15) infinite;
}

.anim-action {
    animation: playSprite16Action 0.65s steps(15) forwards;
}

.anim-super-punch {
    animation: playSprite16Action 0.9s steps(15) forwards;
}

.anim-super-kick {
    animation: playSprite16Action 0.9s steps(15) forwards;
}

.anim-loop {
    animation: playSprite16 1.0s steps(15) infinite;
}

@keyframes pulse-ad-icon {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.15); opacity: 1.0; }
}

@keyframes playSprite16 {
    from {
        background-position-x: 0px;
    }
    to {
        background-position-x: -3840px;
    }
}

@keyframes playSprite16Action {
    from {
        background-position-x: 0px;
    }
    to {
        background-position-x: -3840px;
    }
}

/* Floating Coin Animation */
.floating-coin {
    position: absolute;
    font-size: 24px;
    color: rgba(0, 255, 65, 0.35);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.7);
    pointer-events: none;
    z-index: 5;
    user-select: none;
    font-family: 'Space Mono', monospace;
    animation: floatUp 15s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(1280px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.25;
    }
    90% {
        opacity: 0.25;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* NPC Alert Charge Bar */
.boss-charge-container {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    z-index: 20;
    pointer-events: none;
    width: 140px;
}

.boss-charge-label {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: #ff3131;
    text-shadow: 0 0 5px #ff3131;
    letter-spacing: 1px;
    font-weight: bold;
}

.boss-charge-bar-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #ff3131;
    box-shadow: 0 0 8px rgba(255, 49, 49, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

#boss-charge-fill {
    width: 100%; /* Default fully loaded/ready */
    height: 100%;
    background: #ff3131;
    box-shadow: 0 0 10px #ff3131;
    transition: width 2.5s linear;
}

/* Neon Chart Flash Effects */
@keyframes flash-green-glow {
    0% { box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 64, 0.4); }
    30% { box-shadow: 0 0 35px rgba(0, 255, 65, 1); border-color: rgba(0, 255, 65, 1); }
    100% { box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 64, 0.4); }
}

@keyframes flash-red-glow {
    0% { box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 64, 0.4); }
    30% { box-shadow: 0 0 35px rgba(255, 49, 49, 1); border-color: rgba(255, 49, 49, 1); }
    100% { box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 64, 0.4); }
}

@keyframes flash-gray-glow {
    0% { box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 64, 0.4); }
    30% { box-shadow: 0 0 25px rgba(170, 170, 170, 0.8); border-color: rgba(170, 170, 170, 0.8); }
    100% { box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); border-color: rgba(0, 255, 64, 0.4); }
}

.flash-green {
    animation: flash-green-glow 0.8s ease-out;
}

.flash-red {
    animation: flash-red-glow 0.8s ease-out;
}

.flash-gray {
    animation: flash-gray-glow 0.8s ease-out;
}

/* ================= FIGHTER SHOP STYLES ================= */
.shop-row {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid #1e2938;
    gap: 8px;
    width: 100%;
}

.shop-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    width: 100%;
}

.shop-item-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.shop-item-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 2px;
}

.shop-controls {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.shop-btn {
    flex: 1;
    background: #030712;
    border: 1px solid #384052;
    color: #888;
    padding: 10px 4px;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.shop-btn:hover:not(.active) {
    border-color: #00FF41;
    color: #00FF41;
}

.shop-btn.active {
    border-color: #00FF41;
    color: #00FF41;
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.shop-btn.locked {
    border-color: #fca311;
    color: #fca311;
}

.shop-btn.locked:hover {
    background: rgba(252, 163, 17, 0.1);
    box-shadow: 0 0 10px rgba(252, 163, 17, 0.3);
}

.shop-btn-cost {
    font-size: 12px;
    opacity: 0.85;
}

/* Currency Icons */
.currency-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 17px;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    margin-left: 5px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
.bcoin-icon {
    color: #ffcc00;
    text-shadow: 0 0 5px #ffcc00;
    border: 1.5px solid rgba(255, 204, 0, 0.6);
    background: rgba(255, 204, 0, 0.15);
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}
.dcoin-icon {
    color: #00d2ff;
    text-shadow: 0 0 5px #00d2ff;
    border: 1.5px solid rgba(0, 210, 255, 0.6);
    background: rgba(0, 210, 255, 0.15);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
}

/* Options configuration styles */
.option-row-label {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px rgba(255,255,255,0.2);
}
.option-row-sublabel {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: #888;
}
.option-btn {
    max-width: 100px;
    padding: 10px 15px !important;
    font-size: 14px !important;
    margin: 0;
    min-width: 100px;
    flex: none;
}
.option-size-btn {
    max-width: 80px;
    padding: 10px 10px !important;
    font-size: 12px !important;
    margin: 0;
    min-width: 80px;
}

/* Bottom Ad Banner */
.bottom-ad-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #09090b;
    border-top: 2px solid #ff3131;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 9999;
    box-sizing: border-box;
    font-family: 'Space Mono', monospace;
    overflow: hidden;
}
.ad-banner-label {
    background: #ff3131;
    color: #000;
    font-weight: bold;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 2px;
    margin-right: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(255, 49, 49, 0.5);
}
.ad-banner-marquee-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}
.ad-banner-marquee {
    display: inline-block;
    color: #ff3131;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255, 49, 49, 0.3);
    animation: adMarquee 15s linear infinite;
    padding-left: 100%;
}
@keyframes adMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Purchase Bcoins Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    box-sizing: border-box;
}
.modal-content {
    background: #030712;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.3);
    width: 85%;
    max-width: 500px;
    padding: 25px;
    border-radius: 10px;
    box-sizing: border-box;
}
.modal-header {
    font-size: 24px;
    font-weight: bold;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}
.package-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.package-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0f1d;
    border: 1px solid #1e2938;
    color: #fff;
    padding: 12px 18px;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 100%;
}
.package-btn:hover {
    border-color: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
    background: #111a30;
}
.pack-name {
    font-weight: bold;
    color: #ffcc00;
}
.pack-cost {
    color: #00ff41;
}

/* Ad Player Overlay */
.ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100005;
    box-sizing: border-box;
    font-family: 'Space Mono', monospace;
}
.ad-content {
    width: 85%;
    max-width: 500px;
    background: #030712;
    border: 2px solid #ff3131;
    box-shadow: 0 0 30px rgba(255, 49, 49, 0.3);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}
.ad-title {
    color: #ff3131;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 49, 49, 0.5);
}
.ad-video-simulation {
    width: 100%;
    height: 200px;
    background: #000;
    border: 1px solid #1e2938;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}
.ad-video-simulation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(255, 49, 49, 0.05), rgba(255, 49, 49, 0.05) 1px, transparent 1px, transparent 2px);
    pointer-events: none;
}
#ad-simulation-text {
    color: #00ff41;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    padding: 10px;
    text-transform: uppercase;
}
.ad-timer-container {
    font-size: 16px;
    color: #888;
    margin-bottom: 15px;
}
#ad-timer-text {
    color: #ff3131;
    font-weight: bold;
}

/* Earn Bcoins Menu Elements */
.bcoin-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    width: 100%;
}
.bcoin-section-title {
    font-size: 13px;
    color: #555;
    letter-spacing: 1px;
    font-weight: bold;
    border-bottom: 1px solid #1e2938;
    padding-bottom: 3px;
    text-transform: uppercase;
}
.earn-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 15px 20px;
    font-family: 'Space Mono', monospace;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    outline: none;
    box-sizing: border-box;
}
.earn-btn:hover {
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
}
.earn-btn-reward {
    font-weight: bold;
}
.social-row-container::-webkit-scrollbar {
    height: 4px;
}
.social-row-container::-webkit-scrollbar-thumb {
    background: #1e2938;
    border-radius: 2px;
}
.social-btn-toggle {
    flex: 1;
    min-width: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #555;
    color: #ccc;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-align: center;
    border-radius: 4px;
}
.social-btn-toggle:hover {
    border-color: #ffcc00;
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.05);
}
.social-btn-toggle.followed {
    border-color: #00ff41 !important;
    color: #00ff41 !important;
    background: rgba(0, 255, 65, 0.1) !important;
    cursor: default;
}
.purchase-btn-main {
    background: rgba(255, 204, 0, 0.05);
    border-color: #ffcc00;
    color: #ffcc00;
}
.purchase-btn-main:hover {
    background: rgba(255, 204, 0, 0.15);
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.3);
}
.premium-btn {
    background: rgba(0, 240, 255, 0.05);
    border-color: #00f0ff;
    color: #00f0ff;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}
.premium-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.earn-btn.exchange-btn {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid #00d2ff;
    color: #00d2ff;
    text-shadow: 0 0 5px #00d2ff;
}
.earn-btn.exchange-btn:hover {
    background: rgba(0, 210, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

/* Custom Game Dialog Styles */
#game-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000000;
    box-sizing: border-box;
}

#game-dialog-overlay .modal-content {
    background: #030712;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.3);
    width: 85%;
    max-width: 450px;
    padding: 25px;
    border-radius: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dialog-btn {
    width: 100%;
    height: 48px;
    background: #030712;
    border: 2px solid #00FF41;
    color: #00FF41;
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
    box-sizing: border-box;
}

.dialog-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.dialog-btn.cancel {
    border-color: #ff3131;
    color: #ff3131;
    text-shadow: 0 0 5px #ff3131;
}

.dialog-btn.cancel:hover {
    background: rgba(255, 49, 49, 0.1);
    box-shadow: 0 0 15px rgba(255, 49, 49, 0.3);
}

.dialog-btn.confirm {
    border-color: #ffcc00;
    color: #ffcc00;
    text-shadow: 0 0 5px #ffcc00;
}

.dialog-btn.confirm:hover {
    background: rgba(255, 204, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

/* Cyberpunk Glitch Text Effect */
.glitch-title {
    position: relative;
    animation: titleGlitch 2.5s infinite steps(1);
}

@keyframes titleGlitch {
  0% {
    text-shadow: 2px -2px 0px #ff0055, -2px 2px 0px #00ffcc;
  }
  2% {
    text-shadow: -3px 2px 0px #ff0055, 3px -2px 0px #00ffcc;
  }
  4% {
    text-shadow: 0px 0px 0px #ff0055, 0px 0px 0px #00ffcc;
  }
  92% {
    text-shadow: 0px 0px 0px #ff0055, 0px 0px 0px #00ffcc;
  }
  94% {
    text-shadow: 3px -1px 0px #ff0055, -3px 1px 0px #00ffcc;
  }
  96% {
    text-shadow: -2px 3px 0px #ff0055, 2px -3px 0px #00ffcc;
  }
  98% {
    text-shadow: 2px -2px 0px #ff0055, -2px 2px 0px #00ffcc;
  }
  100% {
    text-shadow: 0px 0px 0px #ff0055, 0px 0px 0px #00ffcc;
  }
}



/* ==========================================
   TEXT SIZING & ACCESSIBILITY SYSTEM
   ========================================== */

/* LARGE SIZE SETTINGS */
#game-container.text-size-large .menu-row-btn {
    font-size: 36px !important;
    height: 68px !important;
    width: 460px !important;
}
#game-container.text-size-large .grid-btn {
    font-size: 28px !important;
}
#game-container.text-size-large .submenu-title {
    font-size: 54px !important;
}
#game-container.text-size-large .submenu-subtitle {
    font-size: 32px !important;
}
#game-container.text-size-large .submenu-content-box {
    font-size: 26px !important;
}
#game-container.text-size-large .dev-banner {
    font-size: 24px !important;
}
#game-container.text-size-large .menu-top-bar {
    font-size: 34px !important;
}
#game-container.text-size-large .menu-top-bar span {
    font-size: 33px !important;
}
#game-container.text-size-large #btn-get-bcoins {
    font-size: 20px !important;
}
#game-container.text-size-large #price-scorecard {
    font-size: 48px !important;
    max-width: 480px !important;
}
#game-container.text-size-large #timer-label {
    font-size: 52px !important;
}
#game-container.text-size-large #balance-track-bg {
    top: 940px !important;
}
#game-container.text-size-large #balance-label {
    font-size: 26px !important;
    top: 975px !important;
}
#game-container.text-size-large .controls-overlay {
    top: 1030px !important;
    height: 115px !important;
}
#game-container.text-size-large #pause-btn {
    font-size: 28px !important;
}
#game-container.text-size-large .action-btn {
    width: 112px !important;
    height: 112px !important;
}
#game-container.text-size-large .action-btn svg {
    width: 50px !important;
    height: 50px !important;
}
#game-container.text-size-large .key-badge {
    font-size: 16px !important;
    bottom: -22px !important;
}
#game-container.text-size-large .shop-btn {
    font-size: 18px !important;
    padding: 12px 10px !important;
}
#game-container.text-size-large .bcoin-section span[style*="font-size"] {
    font-size: 26px !important;
}
#game-container.text-size-large .bcoin-section {
    font-size: 22px !important;
}
#game-container.text-size-large #login-overlay input,
#game-container.text-size-large #google-setup-overlay input,
#game-container.text-size-large #feedback-input {
    font-size: 22px !important;
}
#game-container.text-size-large .option-row-label {
    font-size: 22px !important;
}
#game-container.text-size-large .option-row-sublabel {
    font-size: 18px !important;
}
#game-container.text-size-large .option-btn {
    font-size: 18px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    padding: 12px 18px !important;
}
#game-container.text-size-large .option-size-btn {
    font-size: 16px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    padding: 12px 12px !important;
}
#game-container.text-size-large .menu-top-bar .currency-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
}
#game-container.text-size-large .menu-top-bar #btn-get-bcoins .currency-icon {
    width: 18px !important;
    height: 18px !important;
    font-size: 12px !important;
}
#game-container.text-size-large .menu-row-btn .currency-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 18px !important;
}
#game-container.text-size-large .submenu-title .currency-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 24px !important;
}
#game-container.text-size-large .bcoin-section .currency-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 16px !important;
}
#game-container.text-size-large .modal-header .currency-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
}
#game-container.text-size-large .pack-name .currency-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 16px !important;
}

/* EXTRA LARGE (XLARGE) SIZE SETTINGS */
#game-container.text-size-xlarge .menu-row-btn {
    font-size: 40px !important;
    height: 76px !important;
    width: 510px !important;
}
#game-container.text-size-xlarge .grid-btn {
    font-size: 32px !important;
}
#game-container.text-size-xlarge .submenu-title {
    font-size: 60px !important;
}
#game-container.text-size-xlarge .submenu-subtitle {
    font-size: 38px !important;
}
#game-container.text-size-xlarge .submenu-content-box {
    font-size: 30px !important;
}
#game-container.text-size-xlarge .dev-banner {
    font-size: 26px !important;
}
#game-container.text-size-xlarge .menu-top-bar {
    font-size: 38px !important;
}
#game-container.text-size-xlarge .menu-top-bar span {
    font-size: 37px !important;
}
#game-container.text-size-xlarge #btn-get-bcoins {
    font-size: 22px !important;
}
#game-container.text-size-xlarge #price-scorecard {
    font-size: 52px !important;
    max-width: 440px !important;
}
#game-container.text-size-xlarge #timer-label {
    font-size: 58px !important;
}
#game-container.text-size-xlarge #balance-track-bg {
    top: 935px !important;
}
#game-container.text-size-xlarge #balance-label {
    font-size: 28px !important;
    top: 970px !important;
}
#game-container.text-size-xlarge .controls-overlay {
    top: 1025px !important;
    height: 120px !important;
}
#game-container.text-size-xlarge #pause-btn {
    font-size: 32px !important;
}
#game-container.text-size-xlarge .action-btn {
    width: 116px !important;
    height: 116px !important;
}
#game-container.text-size-xlarge .action-btn svg {
    width: 52px !important;
    height: 52px !important;
}
#game-container.text-size-xlarge .key-badge {
    font-size: 18px !important;
    bottom: -24px !important;
}
#game-container.text-size-xlarge .shop-btn {
    font-size: 20px !important;
    padding: 14px 12px !important;
}
#game-container.text-size-xlarge .bcoin-section span[style*="font-size"] {
    font-size: 30px !important;
}
#game-container.text-size-xlarge .bcoin-section {
    font-size: 25px !important;
}
#game-container.text-size-xlarge #login-overlay input,
#game-container.text-size-xlarge #google-setup-overlay input,
#game-container.text-size-xlarge #feedback-input {
    font-size: 26px !important;
}
#game-container.text-size-xlarge .option-row-label {
    font-size: 26px !important;
}
#game-container.text-size-xlarge .option-row-sublabel {
    font-size: 22px !important;
}
#game-container.text-size-xlarge .option-btn {
    font-size: 22px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    padding: 14px 20px !important;
}
#game-container.text-size-xlarge .option-size-btn {
    font-size: 18px !important;
    min-width: 115px !important;
    max-width: 115px !important;
    padding: 14px 14px !important;
}
#game-container.text-size-xlarge .menu-top-bar .currency-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 24px !important;
}
#game-container.text-size-xlarge .menu-top-bar #btn-get-bcoins .currency-icon {
    width: 22px !important;
    height: 22px !important;
    font-size: 14px !important;
}
#game-container.text-size-xlarge .menu-row-btn .currency-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 20px !important;
}
#game-container.text-size-xlarge .submenu-title .currency-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 28px !important;
}
#game-container.text-size-xlarge .bcoin-section .currency-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
}
#game-container.text-size-xlarge .modal-header .currency-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 24px !important;
}
#game-container.text-size-xlarge .pack-name .currency-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
}

/* ================= MULTIPLAYER LIVE BRAWLER STYLES ================= */
.live-lobby-status {
    position: absolute;
    top: 100px;
    right: 36px;
    z-index: 30;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #ff3131;
    border: 1px solid #ff3131;
    background: rgba(3, 7, 18, 0.85);
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 49, 49, 0.4);
    text-shadow: 0 0 5px #ff3131;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff3131;
    border-radius: 50%;
    animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 1; }
}

.player-name-tag {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid #00f0ff;
    color: #00f0ff;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    text-shadow: 0 0 5px #00f0ff;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
    pointer-events: none;
    z-index: 20;
}

.player-name-tag.is-user {
    border-color: #ffd700;
    color: #ffd700;
    text-shadow: 0 0 5px #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.sim-sprite {
    width: 256px;
    height: 256px;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 4096px 256px;
    animation: simBreathe 1.5s ease-in-out infinite;
}

.sim-sprite.anim-action {
    animation: playSprite16Action 0.65s steps(15) forwards !important;
}

.sim-sprite.anim-super-punch {
    animation: playSprite16Action 0.9s steps(15) forwards !important;
}

.sim-sprite.anim-super-kick {
    animation: playSprite16Action 0.9s steps(15) forwards !important;
}

.sim-sprite.anim-loop {
    animation: playSprite16 1.0s steps(15) infinite !important;
}

@keyframes simBreathe {
    0%, 100% {
        transform: scale(var(--sim-scale-x, 1.3), var(--sim-scale-y, 1.3)) translateY(0);
    }
    50% {
        transform: scale(var(--sim-scale-x, 1.3), calc(var(--sim-scale-y, 1.3) * 1.02)) translateY(-2px);
    }
}

/* ================= MULTIPLE MODE HEALTH BAR HUD ================= */
.multiple-health-hud {
    position: absolute;
    top: 90px;
    left: 36px;
    width: 648px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    z-index: 35;
}

.hud-player-card {
    flex: 1;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 6px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s ease, opacity 0.3s ease;
}

.hud-player-card.is-user {
    border-color: #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

.hud-player-card.is-knocked-out {
    border-color: #ff3131 !important;
    opacity: 0.6;
}

.hud-player-name {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    color: #cccccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-player-card.is-user .hud-player-name {
    color: #ffd700;
}

.hud-player-card.is-knocked-out .hud-player-name {
    color: #ff3131 !important;
}

.hud-health-bar-bg {
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
}

.hud-health-bar-fill {
    height: 100%;
    width: 100%;
    background: #33ff33;
    box-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
    transition: width 0.3s ease, background 0.3s ease;
}

.hud-player-card.is-knocked-out .hud-health-bar-fill {
    width: 0% !important;
}


#combat-screen.is-multiple-mode #pause-btn {
    top: 40px;
    left: 36px;
    transform: none;
    font-size: 14px;
    padding: 4px 10px;
}

/* Blockchain spinner & crypto modal styles */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blockchain-spinner {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 255, 204, 0.1);
    border-top: 4px solid #00ffcc;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.crypto-package-btn:hover {
    border-color: #00ffcc !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3) !important;
    background: #0d222b !important;
}


.crypto-package-btn:hover {
    border-color: #00ffcc !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3) !important;
    background: #0d222b !important;
}

.deposit-pack-btn.active {
    border-color: #ffcc00 !important;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.4) !important;
    background: #191402 !important;
}

#bot-toggle-btn {
    position: absolute;
    top: 92px;
    left: 36px;
    z-index: 40;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: bold;
    padding: 6px 12px;
    background: rgba(9, 12, 18, 0.85);
    border: 1px solid #00f0ff;
    color: #00f0ff;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    transition: all 0.2s ease;
}

#bot-toggle-btn.active {
    border-color: #00FF41;
    color: #00FF41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
    text-shadow: 0 0 5px #00FF41;
}

#autofight-toggle-btn {
    position: absolute;
    top: 92px;
    right: 36px;
    z-index: 40;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: bold;
    padding: 6px 12px;
    background: rgba(9, 12, 18, 0.85);
    border: 1px solid #ff3131;
    color: #ff3131;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 49, 49, 0.2);
    transition: all 0.2s ease;
}

#autofight-toggle-btn.active {
    border-color: #00FF41;
    color: #00FF41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
    text-shadow: 0 0 5px #00FF41;
}

/* ================= SIMULATED CHALLENGE CIRCUIT MAP STYLES ================= */
.circuit-track-bg {
    fill: none;
    stroke: rgba(0, 240, 255, 0.35);
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.circuit-track-pulse {
    fill: none !important;
    stroke: #00ffcc !important;
    stroke-width: 3.5px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-dasharray: 14 10 !important;
    animation: circuitPulse 1.2s linear infinite !important;
    filter: drop-shadow(0 0 8px #00ffcc) !important;
}

@keyframes circuitPulse {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -48;
    }
}

.circuit-decor-line {
    fill: none;
    stroke: rgba(0, 240, 255, 0.3);
    stroke-width: 1.5px;
    stroke-linecap: round;
}

.circuit-node-decor {
    fill: #00f0ff;
    opacity: 0.8;
}

.challenge-dot {
    position: absolute !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: #030712 !important;
    border: 2px solid #00f0ff !important;
    color: #00f0ff !important;
    font-family: 'Space Mono', monospace !important;
    font-size: 13px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5) !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
}

.challenge-dot:hover {
    transform: translate(-50%, -50%) scale(1.18) !important;
    background: #00f0ff !important;
    color: #000 !important;
    box-shadow: 0 0 16px #00f0ff !important;
}

.challenge-dot.active {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #000;
    box-shadow: 0 0 18px #ffcc00;
    transform: translate(-50%, -50%) scale(1.22);
}

.completed-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00FF41;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    box-shadow: 0 0 6px #00FF41;
}

/* ==========================================
   IN-GAME FLOATING TOOLTIPS (FIRST 10 SECONDS)
   ========================================== */
.tutorial-callout-bubble {
    position: absolute;
    z-index: 250000;
    background: rgba(10, 15, 26, 0.97);
    border: 2px solid #00FF41;
    border-radius: 14px;
    box-shadow: 0 0 35px rgba(0, 255, 65, 0.7), inset 0 0 15px rgba(0, 255, 65, 0.2);
    padding: 16px 20px;
    width: 90%;
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.tutorial-callout-header {
    font-family: 'Space Mono', monospace;
    font-size: 17px;
    font-weight: 800;
    color: #00FF41;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 6px;
}

.tutorial-callout-badge {
    background: rgba(0, 255, 65, 0.25);
    border: 1.5px solid #00FF41;
    color: #00FF41;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
}

.tutorial-callout-text {
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 500;
}

.tooltip-pointing-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    left: 50%;
    transform: translateX(-50%);
}

.arrow-down {
    bottom: -10px;
    border-top: 10px solid #00FF41;
}

.arrow-up {
    top: -10px;
    border-bottom: 10px solid #00FF41;
}

.callout-pos-controls {
    bottom: 240px;
    border-color: #00FF41;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.8);
}

.callout-pos-chart {
    top: 270px;
    border-color: #00E5FF;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8);
}
.callout-pos-chart .tutorial-callout-header {
    color: #00E5FF;
}
.callout-pos-chart .tooltip-pointing-arrow {
    border-bottom-color: #00E5FF;
}

.callout-pos-goal {
    top: 480px;
    border-color: #ffcc00;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.8);
}
.callout-pos-goal .tutorial-callout-header {
    color: #ffcc00;
}

/* ================= TOURNAMENT SYSTEM STYLES ================= */
.tournament-countdown-banner {
    /* Main menu is a flex container; an auto-height child would stretch over it. */
    position: absolute;
    top: 8px;
    left: 36px;
    width: 648px;
    height: 48px;
    max-height: 48px;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(8, 14, 28, 0.95), rgba(16, 24, 48, 0.95));
    border: 1.5px solid #00e5ff;
    border-radius: 8px;
    padding: 8px 14px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
    font-family: 'Space Mono', monospace;
    transition: all 0.25s ease;
    z-index: 100;
}

.tournament-countdown-banner:hover {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.55);
    transform: translateY(-1px);
    border-color: #00ffcc;
}

/* Keep temporary asset-loading status clear of the compact tournament ticker. */
#game-container:has(#tournament-countdown-banner):has(#main-menu:not([style*="display: none"])) .lan-status-pill {
    top: 66px;
    left: auto;
    right: 44px;
    transform: none;
}

.tournament-countdown-banner.tournament-urgent {
    border-color: #ffaa00;
    box-shadow: 0 0 25px rgba(255, 170, 0, 0.6);
    animation: urgentPulse 1.2s infinite alternate;
}

@keyframes urgentPulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
        border-color: #ffaa00;
    }
    100% {
        box-shadow: 0 0 35px rgba(255, 60, 0, 0.85);
        border-color: #ff3c00;
    }
}

.tournament-ticker-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tournament-live-badge {
    background: #00e5ff;
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tournament-live-badge.urgent-badge {
    background: #ff3366;
    color: #fff;
    animation: pulse 1s infinite;
}

.tournament-timer-text {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-ticker-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.prize-pill {
    color: #ffcc00;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
    white-space: nowrap;
}

.enter-pill {
    color: #00e5ff;
    font-size: 11px;
    font-weight: 900;
}

/* Prestige Trophy Title Badges */
.trophy-title-champion {
    background: linear-gradient(90deg, #ffcc00, #ff8800) !important;
    color: #000 !important;
    font-weight: 900 !important;
    border: 1px solid #ffe600 !important;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.7) !important;
}

.trophy-title-warlord {
    background: linear-gradient(90deg, #9945ff, #00e5ff) !important;
    color: #fff !important;
    font-weight: 900 !important;
    border: 1px solid #00e5ff !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5) !important;
}

.trophy-title-contender {
    background: linear-gradient(90deg, #00ff66, #00aa44) !important;
    color: #000 !important;
    font-weight: 900 !important;
    border: 1px solid #00ff66 !important;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.5) !important;
}

.trophy-title-generic {
    background: rgba(0, 229, 255, 0.18);
    color: #00e5ff;
    border: 1px solid #00e5ff;
    font-weight: bold;
}


/* Menus and account forms use viewport pixels instead of the combat scale. */
.viewport-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    transform: none !important;
    box-sizing: border-box;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom !important;
    font-family: 'Space Mono', monospace;
    font-size: 16px !important;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
}
.viewport-overlay .viewport-card {
    position: relative;
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    max-height: calc(100dvh - 48px) !important;
    padding: 24px !important;
    margin: auto !important;
    flex: 0 0 auto;
    overflow-y: auto !important;
    border-radius: 16px;
    touch-action: pan-y pinch-zoom !important;
}
.viewport-overlay button,
.viewport-overlay .menu-row-btn,
.viewport-overlay .earn-btn,
.viewport-overlay .end-btn {
    min-height: 44px !important;
    height: auto !important;
    min-width: 44px;
    max-width: 100% !important;
    padding: 12px 16px;
    font-size: 15px !important;
    line-height: 1.35 !important;
    white-space: normal;
    touch-action: manipulation;
}
.viewport-overlay input {
    min-height: 48px !important;
    font-size: 16px !important;
    line-height: 1.5;
    user-select: text;
    -webkit-user-select: text;
    touch-action: manipulation;
}
.viewport-overlay button:focus-visible,
.viewport-overlay a:focus-visible,
.viewport-overlay input:focus-visible {
    outline: 3px solid #f7c948 !important;
    outline-offset: 4px;
}
.viewport-overlay p,
.viewport-overlay .modal-body,
.viewport-overlay .tutorial-slide,
.viewport-overlay #auth-subtitle,
.viewport-overlay #auth-toggle-msg,
.viewport-overlay [role="status"] {
    font-size: 14px !important;
    line-height: 1.6 !important;
}
.viewport-overlay .tutorial-slide div,
.viewport-overlay .tutorial-slide span {
    font-size: inherit !important;
}
.viewport-overlay .modal-header,
.viewport-overlay .viewport-card h2 {
    font-size: 22px !important;
    line-height: 1.3;
    text-shadow: none !important;
}
#login-overlay.viewport-overlay button[aria-label="Close sign in"] {
    width: 44px !important;
    min-height: 44px !important;
    top: 4px !important;
    right: 4px !important;
    padding: 8px !important;
    border-radius: 8px;
    color: #cbd5e1 !important;
}
#auth-title { padding-right: 16px; }
#auth-toggle-link { display: inline-flex !important; align-items: center; min-height: 44px; font-size: 15px; }
#nickname-claim-modal.viewport-overlay .viewport-card > div:nth-child(3) { font-size: 14px !important; }
#nickname-claim-modal.viewport-overlay .viewport-card > div:first-child { position: static !important; transform: none !important; white-space: normal !important; margin-bottom: 16px; }
#tutorial-modal.viewport-overlay .viewport-card > div:nth-child(2) { max-height: none !important; overflow: visible !important; font-size: 15px !important; }
#google-setup-overlay.viewport-overlay h2 { padding-right: 0; }
#end-screen.viewport-overlay { z-index: 1000000 !important; gap: 12px; }
#end-screen.viewport-overlay .paper-receipt { width: min(100%, 500px); padding: 28px 20px; margin: auto 0 0; flex: 0 0 auto; }
#end-screen.viewport-overlay .bank-statement { font-size: 14px; }
#end-screen.viewport-overlay .end-btn { width: min(100%, 500px) !important; margin: 0 !important; flex: 0 0 auto; }
#end-screen.viewport-overlay > :last-child { margin-bottom: auto !important; }
#pause-screen.viewport-overlay { z-index: 1000000; gap: 16px; background: rgba(3, 7, 18, .97); justify-content: center !important; }
#pause-screen.viewport-overlay .end-title { font-size: 32px; margin-bottom: 12px; }
#pause-screen.viewport-overlay .end-btn { width: min(100%, 380px); margin: 0; }
#pause-guide-modal.viewport-overlay > .modal-content { width: min(100%, 520px) !important; max-width: 520px !important; padding: 24px !important; max-height: calc(100dvh - 48px); overflow-y: auto; margin: auto; flex: 0 0 auto; }
#start-overlay.viewport-overlay { background: radial-gradient(ellipse at 50% 25%, #182332 0%, #080e18 60%, #03060b 100%); cursor: default; color: #f8fafc; z-index: 1000000; }
#start-overlay .welcome-card { width: min(100%, 560px) !important; max-width: 560px !important; max-height: none !important; text-align: center; padding: 12px 8px !important; overflow: visible !important; }
#start-overlay .welcome-eyebrow { color: #6ee7cf; font-size: 11px !important; letter-spacing: .13em; margin-bottom: 12px; }
.welcome-arena { display: flex; align-items: center; justify-content: center; gap: 4px; height: 176px; margin-bottom: 18px; border-bottom: 1px solid #273948; background: radial-gradient(ellipse at 50% 100%, #143a39, transparent 65%); }
.welcome-arena .welcome-fighter { display: block; flex: 0 1 180px; width: 180px; height: 180px; background-repeat: no-repeat; background-size: 1600% 100%; background-position: 0 0; }
.welcome-player { background-image: url("assets/Blue%20suit/side_90/idle.webp"); transform: scaleX(-1); }
.welcome-boss { background-image: url("assets/BTC/side_90/idle.webp"); }
.welcome-arena span { color: #f8bd53; font-size: 16px; font-weight: bold; }
#start-overlay h1 { font-size: clamp(27px, 5vw, 38px); line-height: 1.25; letter-spacing: -1.1px; margin: 0 0 18px; font-weight: 700; }
#start-overlay h1 span { color: #f8bd53; }
#start-overlay .welcome-description { font-size: 16px !important; line-height: 1.7 !important; color: #cbd5e1; margin: 0 0 24px; }
#start-overlay .welcome-play { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px !important; background: #b8f66b; color: #10190a; border: 1px solid #ceff92; border-radius: 10px; font: 700 17px 'Space Mono', monospace !important; padding: 16px 20px; box-shadow: 0 5px 24px #b8f66b18; cursor: pointer; }
#start-overlay .welcome-play:hover { background: #ceff92; }
#start-overlay .welcome-reassurance { color: #a9b8c9; font-size: 12px !important; line-height: 1.7 !important; margin: 14px 0 18px; }
.welcome-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
#start-overlay .welcome-links button { border: 0; border-bottom: 1px solid #3c4b5c; background: transparent; color: #cbd5e1; font: 13px 'Space Mono', monospace !important; cursor: pointer; padding: 8px; }
@media (max-height: 700px) {
    #start-overlay .welcome-arena { height: 112px; margin-bottom: 14px; }
    #start-overlay .welcome-arena .welcome-fighter { flex-basis: 116px; width: 116px; height: 116px; }
    #start-overlay .welcome-description { margin-bottom: 16px; }
    .viewport-overlay { justify-content: flex-start !important; }
}
@media (max-width: 380px) {
    .viewport-overlay .viewport-card { padding: 20px 16px !important; }
    #start-overlay h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .viewport-overlay *, .viewport-overlay *::before, .viewport-overlay *::after { animation: none !important; transition: none !important; }
}

/* Portrait arenas grow vertically while sprites keep their original proportions. */
:root { --cb-safe-top: env(safe-area-inset-top, 0px); --cb-safe-bottom: env(safe-area-inset-bottom, 0px); }
#game-container { --cb-arena-extra: 0px; }
.console-box { height: calc(100% - 150px); }
#console-content-main { justify-content: space-evenly; overflow-y: auto; touch-action: pan-y; }
#console-content-main > * { flex-shrink: 0; }
#confetti-canvas { height: 100%; }
#combat-screen .fighter-container { translate: 0 calc(var(--cb-arena-extra) * .55); }
#reaction-text { translate: 0 calc(var(--cb-arena-extra) * .55); }
#loading-screen.viewport-overlay { z-index: 4000000; background: radial-gradient(ellipse at 50% 45%, #0e2730, #030712 70%); justify-content: center !important; font-weight: normal; }
#loading-screen .cb-intro-brand { color: #fff; font-size: clamp(24px, 6vw, 36px); line-height: 1.3; letter-spacing: 3px; }
#loading-screen .cb-intro-scene { flex: 0 0 auto; border-bottom: 1px solid #00ff4166; background: radial-gradient(ellipse at 50% 100%, #00ff4118, transparent 70%); }
#loading-screen .cb-intro-fighter { animation: cbIntroStrike 1.6s steps(15) infinite; image-rendering: pixelated; }
#loading-screen .cb-intro-boss { animation-delay: -.8s; }
#loading-screen .cb-intro-coin { box-shadow: 0 0 28px #fca31133; animation: cbIntroCoin 2.4s ease-in-out infinite; }
#loading-screen .cb-intro-price { stroke-dasharray: 100; animation: cbIntroChart 3.2s ease-in-out infinite; }
#loading-screen #loading-title { font-size: 16px; font-weight: bold; margin: 22px 0 10px; }
#loading-screen #loading-subtitle { font-size: 13px; line-height: 1.6; }
#loading-screen #loading-progress { font-size: 13px; }
#loading-screen .cb-intro-meter span { transition: transform .2s ease; }
@keyframes cbIntroStrike { to { background-position: 100% 0; } }
@keyframes cbIntroCoin { 50% { transform: translateY(-8px) rotate(10deg); } }
@keyframes cbIntroChart { 0% { stroke-dashoffset: 100; opacity: .3; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
    #loading-screen .cb-intro-fighter, #loading-screen .cb-intro-coin, #loading-screen .cb-intro-price { animation: none !important; }
    #loading-screen .cb-intro-fighter { background-position: 46.6667% 0; }
    #loading-screen .cb-intro-meter span { transition: none; }
}
@media (max-height: 500px) {
    #loading-screen .cb-intro-scene { height: 140px; width: 300px; }
    #loading-screen .cb-intro-fighter { width: 120px; height: 120px; }
    #loading-screen .cb-intro-coin { top: 12px; }
    #loading-screen #loading-title { margin-top: 10px; }
    #loading-screen .cb-intro-meter { margin-top: 10px; }
    #loading-screen .cb-intro-caption { display: none; }
}

#game-container #mute-btn { right: 12px !important; }
