   :root {
                --gold: #d4af37;
                --gold-light: #f2d980;
                --gold-dim: #9c7a24;
                --jungle-black: #060f0b;
                --jungle-dark: #0d1f17;
                --jungle-mid: #16342394;
                --jungle-glass: rgba(16, 36, 26, 0.65);
                --cream: #f3ecd8;
                --emerald: #2f6b4f;
                --danger: #b0432f;
                --shield-blue: #3a86ff;
            }

            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
                -webkit-tap-highlight-color: transparent;
                touch-action: manipulation;
            }
            body {
                font-family: "Poppins", sans-serif;
                background: radial-gradient(ellipse at 50% 20%, #163b28 0%, #0a1b13 45%, #060f0b 100%);
                overflow: hidden;
                position: relative;
                width: 100vw;
                height: 100vh;
            }
            .bg-particles {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                pointer-events: none;
                z-index: -1;
            }
            .particle {
                position: absolute;
                background: radial-gradient(circle, #ffe9a8 0%, rgba(255, 233, 168, 0.15) 60%, transparent 100%);
                border-radius: 50%;
                box-shadow: 0 0 8px 2px rgba(255, 217, 128, 0.5);
                animation: float 6s ease-in-out infinite;
            }
            @keyframes float {
                0%,
                100% {
                    transform: translateY(0px) rotate(0deg);
                    opacity: 0.25;
                }
                50% {
                    transform: translateY(-20px) rotate(180deg);
                    opacity: 0.9;
                }
            }
            #preloader {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: radial-gradient(ellipse at 50% 50%, #14301f 0%, #060f0b 80%);
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                z-index: 1000;
                transition:
                    opacity 0.8s ease,
                    visibility 0.8s ease;
            }
            #preloader.hidden {
                opacity: 0;
                visibility: hidden;
            }
            .loader {
                width: 90px;
                height: 90px;
                border: 3px solid rgba(212, 175, 55, 0.15);
                border-left: 3px solid var(--gold);
                border-top: 3px solid var(--gold-light);
                border-radius: 50%;
                animation: spin 1s linear infinite;
                margin-bottom: 30px;
                box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
            }
            @keyframes spin {
                0% {
                    transform: rotate(0deg);
                }
                100% {
                    transform: rotate(360deg);
                }
            }
            .loader-text {
                color: var(--gold-light);
                font-family: "Cinzel", serif;
                font-size: 1.1rem;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 3px;
                text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
                animation: pulse 2s ease-in-out infinite;
            }
            @keyframes pulse {
                0%,
                100% {
                    opacity: 0.6;
                }
                50% {
                    opacity: 1;
                }
            }
            #counterg {
                position: absolute;
                top: 30px;
                right: 30px;
                background: var(--jungle-glass);
                backdrop-filter: blur(12px);
                border: 2px solid var(--gold);
                border-radius: 20px;
                padding: 14px 26px;
                font-family: "Cinzel", serif;
                font-size: 1.7rem;
                color: var(--gold-light);
                font-weight: 700;
                text-shadow: 0 0 18px rgba(212, 175, 55, 0.6);
                box-shadow:
                    0 10px 30px rgba(0, 0, 0, 0.4),
                    inset 0 0 20px rgba(212, 175, 55, 0.08);
                animation: counterGlow 2s ease-in-out infinite alternate;
                z-index: 10;
            }
            @keyframes counterGlow {
                from {
                    box-shadow:
                        0 10px 30px rgba(0, 0, 0, 0.4),
                        inset 0 0 20px rgba(212, 175, 55, 0.08);
                }
                to {
                    box-shadow:
                        0 10px 40px rgba(212, 175, 55, 0.35),
                        inset 0 0 25px rgba(212, 175, 55, 0.15);
                }
            }
            #counterg::before {
                content: "DISTANCE ";
                font-size: 0.6em;
                letter-spacing: 2px;
                opacity: 0.75;
            }
            #end {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.9);
                backdrop-filter: blur(20px);
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                visibility: hidden;
                opacity: 0;
                transition: all 0.5s ease;
                z-index: 100;
            }
            #end.visible {
                visibility: visible;
                opacity: 1;
            }
            .game-over-text {
                font-family: "Cinzel", serif;
                font-size: 2.8rem;
                font-weight: 900;
                background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, var(--gold-dim) 100%);
                -webkit-background-clip: text;
                background-clip: text;
                -webkit-text-fill-color: transparent;
                filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.45));
                margin-bottom: 22px;
                animation: gameOverPulse 1s ease-in-out;
                text-transform: uppercase;
                letter-spacing: 4px;
            }
            @keyframes gameOverPulse {
                0% {
                    transform: scale(0.5);
                    opacity: 0;
                }
                50% {
                    transform: scale(1.1);
                }
                100% {
                    transform: scale(1);
                    opacity: 1;
                }
            }
            #retry {
                background: linear-gradient(145deg, var(--gold-light), var(--gold) 55%, var(--gold-dim));
                border: none;
                border-radius: 25px;
                padding: 18px 48px;
                font-family: "Cinzel", serif;
                font-size: 1.1rem;
                font-weight: 700;
                color: #241a05;
                text-transform: uppercase;
                letter-spacing: 2px;
                cursor: pointer;
                box-shadow: 0 15px 35px rgba(212, 175, 55, 0.35);
                transition: all 0.3s ease;
                position: relative;
                overflow: hidden;
            }
            #retry::before {
                content: "";
                position: absolute;
                top: 0;
                left: -100%;
                width: 100%;
                height: 100%;
                background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
                transition: left 0.5s ease;
            }
            #retry:hover {
                transform: translateY(-5px);
                box-shadow: 0 20px 40px rgba(212, 175, 55, 0.55);
            }
            #retry:hover::before {
                left: 100%;
            }
            li {
                line-height: 30px;
            }
            #howto-modal .start-box ul {
                max-height: 200px;
                overflow-y: auto;
                padding-right: 6px;
            }
            #howto-modal .start-box ul li {
                line-height: 22px;
                font-size: 0.85rem;
                padding-left: 20px;
            }
            #howto-modal .start-box ul::-webkit-scrollbar {
                width: 5px;
            }
            #howto-modal .start-box ul::-webkit-scrollbar-thumb {
                background: var(--gold-dim);
                border-radius: 4px;
            }
            #controlls {
                position: absolute;
                bottom: 30px;
                left: 40%;
                transform: translateX(-50%);
                background: var(--jungle-glass);
                backdrop-filter: blur(15px);
                border-radius: 25px;
                padding: 20px;
                border: 2px solid rgba(212, 175, 55, 0.45);
                box-shadow:
                    0 20px 60px rgba(0, 0, 0, 0.5),
                    inset 0 0 30px rgba(212, 175, 55, 0.05);
                z-index: 50;
            }
            #controlls > div {
                display: grid;
                grid-template-columns: 60px 60px 60px;
                grid-template-rows: 60px 60px;
                grid-gap: 15px;
                align-items: center;
                justify-items: center;
            }
            .control-btn {
                width: 60px;
                height: 60px;
                background: linear-gradient(145deg, #14261c, #0d1a13);
                border: 2px solid var(--gold-dim);
                border-radius: 15px;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: all 0.3s ease;
                position: relative;
                overflow: hidden;
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;
            }
            .control-btn:active {
                transform: translateY(0) scale(0.95);
                background: linear-gradient(145deg, #1c3325, #14261c);
            }
            .control-btn.active {
                transform: translateY(-3px) scale(1.05);
                border-color: var(--gold);
                box-shadow: 0 15px 30px rgba(212, 175, 55, 0.35);
                background: linear-gradient(145deg, #1c3325, #14261c);
            }
            .control-btn svg {
                width: 24px;
                height: 24px;
                fill: var(--gold-light);
                filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
                transition: all 0.3s ease;
            }
            .control-btn.active svg {
                filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
                transform: scale(1.1);
            }
            #forward {
                grid-column: 2;
                grid-row: 1;
            }
            #left {
                grid-column: 1;
                grid-row: 2;
            }
            #backward {
                grid-column: 2;
                grid-row: 2;
            }
            #right {
                grid-column: 3;
                grid-row: 2;
            }
            .ripple {
                position: absolute;
                border-radius: 50%;
                background: rgba(212, 175, 55, 0.35);
                transform: scale(0);
                animation: ripple-animation 0.6s linear;
                pointer-events: none;
            }
            @keyframes ripple-animation {
                to {
                    transform: scale(4);
                    opacity: 0;
                }
            }
            @media (max-width: 768px) {
                #controlls {
                    left: 25%;
                }
                .game-over-text {
                    font-size: 2rem;
                }
                #retry {
                    padding: 15px 35px;
                    font-size: 1rem;
                }
                .control-btn {
                    width: 60px;
                    height: 60px;
                }
                .control-btn svg {
                    width: 24px;
                    height: 24px;
                }
                #controlls > div {
                    grid-template-columns: 60px 60px 60px;
                    grid-template-rows: 60px 60px;
                    grid-gap: 15px;
                }
                #controlls {
                    bottom: 20px;
                    padding: 15px;
                }
            }
            @media (max-width: 480px) {
                .control-btn {
                    width: 55px;
                    height: 55px;
                }
                #controlls > div {
                    grid-template-columns: 55px 55px 55px;
                    grid-template-rows: 55px 55px;
                    grid-gap: 12px;
                }
                #controlls {
                    bottom: 15px;
                    padding: 12px;
                }
            }
            .fade-in {
                animation: fadeIn 1s ease forwards;
            }
            @keyframes fadeIn {
                from {
                    opacity: 0;
                    transform: translateY(30px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }
            @keyframes shake {
                0%,
                100% {
                    transform: translateX(0);
                }
                25% {
                    transform: translateX(-10px);
                }
                75% {
                    transform: translateX(10px);
                }
            }
            #touch-area {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 70%;
                z-index: 5;
                touch-action: pan-x pan-y;
            }
            #start-screen {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: radial-gradient(ellipse at 50% 40%, rgba(22, 59, 40, 0.9) 0%, rgba(6, 15, 11, 0.97) 70%);
                backdrop-filter: blur(10px);
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 2000;
            }
            .start-box {
                background: var(--jungle-glass);
                backdrop-filter: blur(16px);
                padding: 36px 44px;
                border-radius: 18px;
                border: 2px solid var(--gold);
                text-align: center;
                color: var(--cream);
                max-width: 420px;
                box-shadow:
                    0 25px 70px rgba(0, 0, 0, 0.55),
                    inset 0 0 40px rgba(212, 175, 55, 0.06);
                animation: fadeIn 0.8s ease;
                position: relative;
            }
            .start-box::before,
            .start-box::after {
                content: "";
                position: absolute;
                width: 26px;
                height: 26px;
                border: 2px solid var(--gold);
                opacity: 0.7;
            }
            .start-box::before {
                top: 10px;
                left: 10px;
                border-right: none;
                border-bottom: none;
            }
            .start-box::after {
                bottom: 10px;
                right: 10px;
                border-left: none;
                border-top: none;
            }
            .start-box .eyebrow {
                font-family: "Poppins", sans-serif;
                font-size: 0.72rem;
                letter-spacing: 4px;
                text-transform: uppercase;
                color: var(--gold-dim);
                margin-bottom: 8px;
            }
            .start-box h1 {
                font-family: "Cinzel", serif;
                font-size: 2.3rem;
                font-weight: 900;
                letter-spacing: 2px;
                background: linear-gradient(180deg, var(--gold-light), var(--gold) 65%, var(--gold-dim));
                -webkit-background-clip: text;
                background-clip: text;
                -webkit-text-fill-color: transparent;
                filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.35));
                margin-bottom: 18px;
            }
            .start-box h3 {
                font-family: "Cinzel", serif;
                font-size: 0.95rem;
                letter-spacing: 2px;
                text-transform: uppercase;
                color: var(--gold-light);
                border-top: 1px solid rgba(212, 175, 55, 0.3);
                border-bottom: 1px solid rgba(212, 175, 55, 0.3);
                padding: 10px 0;
                margin-bottom: 14px;
            }
            .start-box ul {
                text-align: left;
                list-style: none;
                margin: 10px 0 26px;
                padding-left: 0;
                font-size: 0.95rem;
                color: var(--cream);
                opacity: 0.9;
            }
            .start-box ul li {
                padding-left: 22px;
                position: relative;
            }
            .start-box ul li::before {
                content: "❧";
                position: absolute;
                left: 0;
                color: var(--gold);
            }
            #play-btn {
                background: linear-gradient(145deg, var(--gold-light), var(--gold) 55%, var(--gold-dim));
                border: none;
                padding: 15px 40px;
                border-radius: 25px;
                color: #241a05;
                font-size: 1.05rem;
                cursor: pointer;
                font-family: "Cinzel", serif;
                font-weight: 700;
                letter-spacing: 1px;
                text-transform: uppercase;
                box-shadow: 0 12px 30px rgba(212, 175, 55, 0.3);
                transition:
                    transform 0.3s ease,
                    box-shadow 0.3s ease;
            }
            #play-btn:hover {
                transform: translateY(-3px);
                box-shadow: 0 16px 35px rgba(212, 175, 55, 0.5);
            }
            #hud {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                height: 68px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0 22px;
                background: linear-gradient(180deg, rgba(10, 20, 14, 0.88), rgba(10, 20, 14, 0.72));
                backdrop-filter: blur(16px);
                border-bottom: 1.5px solid rgba(212, 175, 55, 0.4);
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
                z-index: 60;
            }
            #hud-left,
            #hud-right {
                display: flex;
                align-items: center;
                gap: 18px;
            }
            .hud-metric {
                display: flex;
                flex-direction: column;
                gap: 2px;
            }
            .hud-metric .metric-label {
                font-family: "Poppins", sans-serif;
                font-size: 0.6rem;
                font-weight: 600;
                letter-spacing: 1.5px;
                text-transform: uppercase;
                color: var(--gold-dim);
            }
            .hud-metric .metric-value {
                font-family: "Cinzel", serif;
                font-size: 1.3rem;
                font-weight: 700;
                color: var(--gold-light);
                text-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
                line-height: 1.15;
            }
            .hud-divider {
                width: 1px;
                height: 30px;
                background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.4), transparent);
                flex-shrink: 0;
            }
            #lives-hud {
                display: flex;
                align-items: center;
                gap: 5px;
            }
            .life-heart {
                width: 19px;
                height: 19px;
                fill: var(--danger);
                filter: drop-shadow(0 0 5px rgba(176, 67, 47, 0.55));
                transition: all 0.3s ease;
            }
            .life-heart.lost {
                fill: rgba(255, 255, 255, 0.14);
                filter: none;
                transform: scale(0.85);
            }
            .icon-btn {
                width: 40px;
                height: 40px;
                background: linear-gradient(145deg, #16291d, #0c1912);
                border: 1.5px solid rgba(212, 175, 55, 0.35);
                border-radius: 11px;
                cursor: pointer;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                transition:
                    transform 0.2s ease,
                    border-color 0.2s ease,
                    box-shadow 0.2s ease,
                    background 0.2s ease;
                color: var(--gold-light);
                padding: 0;
                position: relative;
                flex-shrink: 0;
            }
            .icon-btn svg {
                width: 19px;
                height: 19px;
                fill: var(--gold-light);
                filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.35));
                transition: all 0.2s ease;
            }
            .icon-btn:hover {
                border-color: var(--gold);
                background: linear-gradient(145deg, #1c3325, #14261c);
                box-shadow:
                    0 8px 20px rgba(212, 175, 55, 0.3),
                    inset 0 0 12px rgba(212, 175, 55, 0.08);
            }
            .icon-btn:hover svg {
                filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
            }
            .icon-btn:active {
                transform: scale(0.92);
            }
            .icon-btn::after {
                content: attr(aria-label);
                position: absolute;
                top: 120%;
                left: 50%;
                transform: translateX(-50%) translateY(-4px);
                background: rgba(6, 15, 11, 0.95);
                border: 1px solid rgba(212, 175, 55, 0.4);
                color: var(--gold-light);
                font-family: "Poppins", sans-serif;
                font-size: 0.65rem;
                letter-spacing: 0.5px;
                white-space: nowrap;
                padding: 4px 9px;
                border-radius: 8px;
                opacity: 0;
                pointer-events: none;
                transition:
                    opacity 0.2s ease,
                    transform 0.2s ease;
                z-index: 5;
            }
            .icon-btn:hover::after {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            .icon-btn.muted {
                border-color: var(--danger);
                color: #e0806c;
            }
            .icon-btn.muted svg {
                fill: #e0806c;
                filter: drop-shadow(0 0 5px rgba(176, 67, 47, 0.55));
            }
            .icon-btn.muted:hover {
                border-color: #e0806c;
                box-shadow:
                    0 8px 20px rgba(176, 67, 47, 0.35),
                    inset 0 0 12px rgba(176, 67, 47, 0.1);
            }
            .sound-off {
                display: none;
            }
            .fullscreen-exit-icon {
                display: none;
            }
            .modal-overlay {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: radial-gradient(ellipse at 50% 40%, rgba(22, 59, 40, 0.9) 0%, rgba(6, 15, 11, 0.97) 70%);
                backdrop-filter: blur(10px);
                display: flex;
                align-items: center;
                justify-content: center;
                visibility: hidden;
                opacity: 0;
                transition: all 0.35s ease;
                z-index: 2100;
            }
            .modal-overlay.visible {
                visibility: visible;
                opacity: 1;
            }
            .modal-overlay .start-box {
                max-width: 380px;
                width: 90%;
            }
            .modal-overlay h2 {
                font-family: "Cinzel", serif;
                font-size: 1.7rem;
                font-weight: 900;
                letter-spacing: 2px;
                text-transform: uppercase;
                background: linear-gradient(180deg, var(--gold-light), var(--gold) 65%, var(--gold-dim));
                -webkit-background-clip: text;
                background-clip: text;
                -webkit-text-fill-color: transparent;
                filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.35));
                margin-bottom: 18px;
            }
            .menu-btn {
                display: block;
                width: 100%;
                margin: 8px 0;
                padding: 13px 20px;
                border-radius: 14px;
                font-family: "Cinzel", serif;
                font-size: 0.85rem;
                letter-spacing: 1.5px;
                text-transform: uppercase;
                cursor: pointer;
                transition: all 0.25s ease;
            }
            .menu-btn-primary {
                background: linear-gradient(145deg, var(--gold-light), var(--gold) 55%, var(--gold-dim));
                border: none;
                color: #241a05;
                font-weight: 700;
                box-shadow: 0 10px 24px rgba(212, 175, 55, 0.3);
            }
            .menu-btn-primary:hover {
                transform: translateY(-2px);
                box-shadow: 0 14px 28px rgba(212, 175, 55, 0.45);
            }
            .menu-btn-secondary {
                background: transparent;
                border: 1.5px solid var(--gold-dim);
                color: var(--gold-light);
                font-weight: 600;
            }
            .menu-btn-secondary:hover {
                border-color: var(--gold);
                background: rgba(212, 175, 55, 0.1);
                transform: translateY(-2px);
            }
            .start-btn-row {
                display: flex;
                flex-direction: column;
                gap: 4px;
            }
            .start-tagline {
                font-size: 0.9rem;
                color: var(--cream);
                opacity: 0.85;
                line-height: 1.5;
                margin-bottom: 22px;
            }
            .volume-control {
                margin: 22px 0 6px;
                text-align: left;
            }
            .volume-control label {
                display: flex;
                justify-content: space-between;
                font-family: "Poppins", sans-serif;
                font-size: 0.75rem;
                letter-spacing: 1px;
                text-transform: uppercase;
                color: var(--gold-dim);
                margin-bottom: 8px;
            }
            input[type="range"]#volume-slider {
                -webkit-appearance: none;
                appearance: none;
                width: 100%;
                height: 6px;
                border-radius: 3px;
                background: linear-gradient(90deg, var(--gold-dim), var(--gold));
                outline: none;
                cursor: pointer;
            }
            input[type="range"]#volume-slider::-webkit-slider-thumb {
                -webkit-appearance: none;
                width: 18px;
                height: 18px;
                border-radius: 50%;
                background: var(--gold-light);
                border: 2px solid var(--jungle-dark);
                cursor: pointer;
                box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
            }
            input[type="range"]#volume-slider::-moz-range-thumb {
                width: 18px;
                height: 18px;
                border-radius: 50%;
                background: var(--gold-light);
                border: 2px solid var(--jungle-dark);
                cursor: pointer;
                box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
            }
            @media (max-width: 768px) {
                #hud {
                    height: 58px;
                    padding: 0 12px;
                }
                #hud-left,
                #hud-right {
                    gap: 10px;
                }
                .hud-metric .metric-value {
                    font-size: 1.05rem;
                }
                .hud-divider {
                    height: 24px;
                }
                .icon-btn {
                    width: 34px;
                    height: 34px;
                    border-radius: 9px;
                }
                .icon-btn svg {
                    width: 16px;
                    height: 16px;
                }
                .icon-btn::after {
                    display: none;
                }
                .life-heart {
                    width: 15px;
                    height: 15px;
                }
            }
            @media (max-width: 480px) {
                #hud-left {
                    gap: 8px;
                }
                #hud-right {
                    gap: 6px;
                }
                .hud-metric .metric-label {
                    font-size: 0.52rem;
                }
                .hud-divider {
                    display: none;
                }
            }

            /* new HUD elements */
            #level-display {
                font-size: 0.8rem;
                color: var(--gold-light);
                background: rgba(0, 0, 0, 0.4);
                padding: 2px 10px;
                border-radius: 20px;
                border: 1px solid var(--gold-dim);
            }
            .shield-active {
                border-color: var(--shield-blue) !important;
                box-shadow: 0 0 20px var(--shield-blue) !important;
            }
            .collectible-coin {
                fill: gold;
                filter: drop-shadow(0 0 8px gold);
            }

            /* ===== COINS / XP / RANK ===== */
            #coin-display::before {
                content: "🪙 ";
            }
            #xp-bar-wrap {
                width: 90px;
            }
            #xp-bar-track {
                width: 100%;
                height: 6px;
                border-radius: 4px;
                background: rgba(255, 255, 255, 0.12);
                overflow: hidden;
                margin-top: 3px;
            }
            #xp-bar-fill {
                height: 100%;
                width: 0%;
                background: linear-gradient(90deg, var(--shield-blue), #8ab4ff);
                box-shadow: 0 0 8px var(--shield-blue);
                transition: width 0.3s ease;
            }
            #rank-display {
                font-size: 0.62rem;
            }

            /* ===== TOASTS (achievements / bonus) ===== */
            #toast-stack {
                position: fixed;
                top: 78px;
                left: 50%;
                transform: translateX(-50%);
                display: flex;
                flex-direction: column;
                gap: 8px;
                z-index: 300;
                pointer-events: none;
                align-items: center;
            }
            .toast {
                background: var(--jungle-glass);
                backdrop-filter: blur(14px);
                border: 2px solid var(--gold);
                border-radius: 14px;
                padding: 10px 22px;
                font-family: "Cinzel", serif;
                font-size: 0.85rem;
                color: var(--gold-light);
                text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
                box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
                opacity: 0;
                transform: translateY(-15px);
                animation: toastIn 0.4s ease forwards, toastOut 0.4s ease 2.4s forwards;
                white-space: nowrap;
            }
            .toast.achievement {
                border-color: #8ab4ff;
                color: #cfe0ff;
            }
            @keyframes toastIn {
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }
            @keyframes toastOut {
                to {
                    opacity: 0;
                    transform: translateY(-10px);
                }
            }

            /* ===== RAIN ===== */
            #rain-canvas {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                pointer-events: none;
                z-index: 8;
                display: none;
            }

            /* ===== NIGHT MODE VIGNETTE ===== */
            #night-overlay {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                pointer-events: none;
                z-index: 6;
                background: radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(2, 5, 8, 0.55) 100%);
                opacity: 0;
                transition: opacity 1.2s ease;
            }
            #night-overlay.active {
                opacity: 1;
            }
            #weather-badge {
                position: absolute;
                top: 78px;
                left: 30px;
                background: var(--jungle-glass);
                border: 1.5px solid var(--gold-dim);
                border-radius: 14px;
                padding: 6px 14px;
                font-size: 0.7rem;
                color: var(--gold-light);
                letter-spacing: 1px;
                z-index: 40;
                display: none;
                gap: 6px;
                align-items: center;
            }

            /* ===== SHOP ===== */
            .shop-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
                margin: 14px 0 20px;
            }
            .skin-card {
                border: 2px solid rgba(212, 175, 55, 0.35);
                border-radius: 12px;
                padding: 10px 6px;
                text-align: center;
                cursor: pointer;
                background: rgba(0, 0, 0, 0.25);
                transition: all 0.2s ease;
                font-family: "Poppins", sans-serif;
            }
            .skin-card:hover {
                border-color: var(--gold);
                transform: translateY(-2px);
            }
            .skin-card.owned {
                border-color: var(--emerald);
            }
            .skin-card.equipped {
                border-color: var(--gold);
                box-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
            }
            .skin-swatch {
                width: 28px;
                height: 28px;
                border-radius: 50%;
                margin: 0 auto 6px;
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
            }
            .skin-name {
                font-size: 0.62rem;
                color: var(--cream);
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
            .skin-price {
                font-size: 0.6rem;
                color: var(--gold-light);
                margin-top: 3px;
            }
            .shop-coin-total {
                font-family: "Cinzel", serif;
                color: var(--gold-light);
                margin-bottom: 4px;
                font-size: 1rem;
            }

            /* ===== ACHIEVEMENTS LIST MODAL ===== */
            .achv-row {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 8px 0;
                border-bottom: 1px solid rgba(212, 175, 55, 0.15);
                font-size: 0.8rem;
                text-align: left;
            }
            .achv-row.locked {
                opacity: 0.4;
            }
            .achv-name {
                color: var(--cream);
            }
            .achv-check {
                color: var(--gold-light);
            }

            /* ===== WEAPON HUD ICON ===== */
            #weapon-hud {
                display: none;
                align-items: center;
                gap: 4px;
                font-size: 0.7rem;
                color: #ffb37a;
            }