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

:root {
    --black: #030303;
    --panel: #0b0b0d;
    --panel2: #111116;
    --green: #b8ff00;
    --green2: #6cff00;
    --purple: #9b4dff;
    --pink: #ff2f92;
    --red: #ff1744;
    --white: #f5f5f5;
    --gray: #77777f;
    --border: rgba(255,255,255,.09);
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(155,77,255,.22),
            transparent 34%
        ),
        radial-gradient(
            circle at 0% 55%,
            rgba(255,47,146,.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 100% 75%,
            rgba(184,255,0,.08),
            transparent 28%
        ),
        #050506;

    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .13;

    background-image:
        linear-gradient(
            rgba(255,255,255,.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.025) 1px,
            transparent 1px
        );

    background-size: 28px 28px;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;

    background:
        radial-gradient(
            ellipse at center,
            transparent 45%,
            rgba(0,0,0,.75) 100%
        );
}

button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.app {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 520px;
    min-height: 100vh;

    margin: 0 auto;
    padding-bottom: 100px;
}

/* =========================
   TOP BAR
========================= */

.topbar {
    padding: 20px 17px 12px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 19px;
    font-weight: 1000;
    letter-spacing: 3px;

    text-shadow:
        0 0 10px rgba(184,255,0,.35);
}

.subtitle {
    margin-top: 4px;

    color: #666;

    font-size: 8px;
    letter-spacing: 4px;
}

.daily {
    display: grid;
    grid-template-columns: auto auto;

    gap: 2px 7px;
    align-items: center;

    text-align: right;
}

.daily-fire {
    grid-row: span 2;

    font-size: 22px;

    filter:
        drop-shadow(
            0 0 7px rgba(255,120,0,.5)
        );
}

.daily strong {
    font-size: 8px;
    letter-spacing: 2px;
}

.daily small {
    color: var(--green);
    font-size: 7px;
}

/* =========================
   PLAYER CARD
========================= */

.player-card {
    margin: 10px 15px 0;
    padding: 13px;

    display: grid;
    grid-template-columns: 58px 1fr 65px;

    gap: 10px;
    align-items: center;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.06),
            rgba(255,255,255,.015)
        );

    border: 1px solid var(--border);

    box-shadow:
        inset 0 1px rgba(255,255,255,.04),
        0 15px 45px rgba(0,0,0,.35);

    backdrop-filter: blur(15px);
}

.level span {
    color: #666;

    font-size: 7px;
    letter-spacing: 2px;
}

.level strong {
    display: block;

    margin-top: 2px;

    font-size: 27px;
    line-height: 1;
}

.xp-top {
    display: flex;
    justify-content: space-between;

    color: #777;

    font-size: 8px;

    margin-bottom: 6px;
}

.xp-bar {
    height: 5px;

    overflow: hidden;

    background: #242429;
}

.xp-fill {
    height: 100%;
    width: 0;

    background:
        linear-gradient(
            90deg,
            var(--green),
            #efff83
        );

    box-shadow:
        0 0 12px rgba(184,255,0,.7);

    transition:
        width .5s ease;
}

.streak {
    padding-left: 10px;

    border-left: 1px solid var(--border);

    display: flex;
    align-items: center;

    gap: 5px;
}

.streak strong {
    color: var(--green);

    font-size: 23px;

    text-shadow:
        0 0 12px rgba(184,255,0,.45);
}

.streak span {
    color: #666;

    font-size: 7px;
    line-height: 1.2;
    letter-spacing: 1px;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;

    padding: 28px 15px 8px;

    transition:
        transform .4s ease,
        opacity .4s ease;
}

.eyebrow {
    color: var(--green);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: 5px;

    text-shadow:
        0 0 12px rgba(184,255,0,.45);
}

.hero h1 {
    margin-top: 9px;

    font-size: 50px;
    line-height: .82;

    font-weight: 1000;

    letter-spacing: -3px;
}

.hero h1 span {
    color: transparent;

    -webkit-text-stroke:
        1px rgba(255,255,255,.45);
}

.hero p {
    margin-top: 13px;

    font-size: 13px;
    font-weight: 900;

    letter-spacing: 2px;
}

.hero small {
    display: block;

    margin-top: 5px;

    color: #606066;

    font-size: 9px;
}

/* =========================
   GAME CORE
========================= */

.game-core {
    position: relative;

    margin-top: 14px;

    height: 330px;

    background: #000;

    border-top:
        1px solid rgba(255,255,255,.06);

    border-bottom:
        1px solid rgba(255,255,255,.06);

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        inset 0 0 80px rgba(0,0,0,1),
        0 15px 50px rgba(0,0,0,.7);
}

.game-core::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.025),
            transparent 62%
        );

    pointer-events: none;
}

.weapon-shadow {
    position: absolute;

    width: 360px;
    height: 70px;

    bottom: 28px;

    border-radius: 50%;

    background: #000;

    box-shadow:
        0 0 50px 30px #000;

    filter: blur(15px);
}

.revolver-wrap {
    position: relative;

    width: 100%;
    max-width: 470px;

    transform: rotate(-3deg);

    filter:
        drop-shadow(
            0 25px 25px rgba(0,0,0,.95)
        )
        drop-shadow(
            0 0 5px rgba(255,255,255,.10)
        );

    z-index: 2;
}

.revolver-image {
    display: block;

    width: 100%;
    height: 285px;

    object-fit: contain;
    object-position: center;

    user-select: none;
    -webkit-user-drag: none;

    mix-blend-mode: screen;

    transition:
        transform .12s ease,
        filter .12s ease;
}

.revolver-image.shooting {
    animation:
        recoil .24s ease;
}

@keyframes recoil {

    0% {
        transform: translateX(0);
    }

    18% {
        transform: translateX(-17px);
    }

    38% {
        transform: translateX(9px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
    }
}

/* =========================
   SHOT COUNTER
========================= */

.shot-counter {
    position: absolute;

    top: 14px;
    left: 50%;

    transform: translateX(-50%);

    padding: 7px 13px;

    color: #555;

    background:
        rgba(0,0,0,.82);

    border:
        1px solid rgba(255,255,255,.08);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: 3px;

    z-index: 5;

    transition:
        color .2s ease,
        border-color .2s ease;
}

.shot-counter.active {
    color: var(--green);

    border-color:
        rgba(184,255,0,.35);
}

/* =========================
   FLASH
========================= */

.muzzle-flash {
    position: absolute;

    right: -5px;
    top: 28%;

    width: 120px;
    height: 120px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #fff 0%,
            #fff 7%,
            #fff700 17%,
            #ff7b00 32%,
            rgba(255,30,0,.45) 53%,
            transparent 73%
        );

    filter:
        blur(4px)
        drop-shadow(
            0 0 30px #ff3d00
        );

    opacity: 0;

    transform: scale(.05);

    pointer-events: none;
}

.muzzle-flash.active {
    animation:
        flash .22s ease-out;
}

@keyframes flash {

    0% {
        opacity: 1;
        transform: scale(.1);
    }

    20% {
        opacity: 1;
        transform: scale(.85);
    }

    45% {
        opacity: .85;
        transform: scale(1.4);
    }

    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* =========================
   WEAPON STATUS
========================= */

.weapon-status {
    position: absolute;

    left: 50%;
    bottom: 10px;

    transform: translateX(-50%);

    padding: 7px 15px;

    background:
        rgba(0,0,0,.9);

    border:
        1px solid rgba(184,255,0,.3);

    color: var(--green);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: 4px;

    box-shadow:
        0 0 20px rgba(184,255,0,.08);

    transition:
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.weapon-status.bang {
    color: var(--red);

    border-color:
        rgba(255,23,68,.65);

    box-shadow:
        0 0 25px rgba(255,23,68,.25);
}

/* =========================
   SHOTS INFO
========================= */

.shots-info {
    margin: 0 15px;

    padding: 12px 4px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom:
        1px solid var(--border);
}

.shots-info div:first-child {
    display: flex;
    align-items: center;

    gap: 9px;
}

.shots-info span {
    color: #666;

    font-size: 8px;
    letter-spacing: 2px;
}

.shots-info strong {
    font-size: 13px;
}

.status-dot {
    color: #777;

    font-size: 7px;
    letter-spacing: 1px;
}

.status-dot i {
    display: inline-block;

    width: 5px;
    height: 5px;

    margin-right: 5px;

    border-radius: 50%;

    background: var(--red);

    box-shadow:
        0 0 10px var(--red);
}

/* =========================
   CHOICE SECTION
========================= */

.choice-section,
.history-section {
    padding: 20px 15px 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 11px;
}

.section-title span {
    font-size: 9px;
    font-weight: 900;

    letter-spacing: 2px;
}

.section-title small {
    color: #555;

    font-size: 8px;
}

.numbers {
    display: grid;

    grid-template-columns:
        repeat(6, 1fr);

    gap: 6px;
}

.numbers button {
    height: 49px;

    border:
        1px solid rgba(255,255,255,.12);

    background:
        linear-gradient(
            145deg,
            #17171b,
            #0b0b0e
        );

    color: #ddd;

    font-size: 12px;
    font-weight: 1000;

    cursor: pointer;

    transition:
        transform .15s ease,
        border .15s ease,
        box-shadow .15s ease,
        background .15s ease,
        opacity .25s ease;
}

.numbers button:hover {
    border-color: var(--green);

    box-shadow:
        0 0 16px rgba(184,255,0,.15);
}

.numbers button:active {
    transform: scale(.94);
}

.numbers button.selected {
    color: #000;

    background:
        linear-gradient(
            135deg,
            var(--green),
            #eaff8c
        );

    border-color:
        var(--green);

    box-shadow:
        0 0 20px rgba(184,255,0,.35);
}

.numbers button.used {
    opacity: .18;

    pointer-events: none;
}

.numbers button.selected.used {
    opacity: 1;

    box-shadow:
        0 0 25px rgba(184,255,0,.45);
}

/* =========================
   FATE LOCKED
========================= */

.selection-lock {
    margin-top: 9px;

    min-height: 57px;

    padding: 10px 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(184,255,0,.08),
            rgba(184,255,0,.025)
        );

    border:
        1px solid rgba(184,255,0,.25);

    box-shadow:
        0 0 25px rgba(184,255,0,.05);

    animation:
        lockAppear .35s ease;
}

.selection-lock > span {
    font-size: 18px;

    filter:
        drop-shadow(
            0 0 8px rgba(184,255,0,.5)
        );
}

.selection-lock div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.selection-lock strong {
    color: var(--green);

    font-size: 11px;
    letter-spacing: 3px;
}

.selection-lock small {
    color: #666;

    font-size: 8px;
    letter-spacing: 1px;
}

@keyframes lockAppear {

    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   CONFIRM BUTTON
========================= */

.confirm-button {
    position: relative;

    width: 100%;
    height: 57px;

    margin-top: 9px;

    border: 0;

    background:
        linear-gradient(
            100deg,
            var(--green),
            #d8ff4c
        );

    color: #050505;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 13px;

    font-size: 11px;
    font-weight: 1000;

    letter-spacing: 2px;

    cursor: pointer;

    box-shadow:
        0 0 30px rgba(184,255,0,.13);

    overflow: hidden;

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        opacity .2s ease;
}

.confirm-button::after {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 60%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.45),
            transparent
        );

    transform: skewX(-20deg);

    animation:
        buttonShine 3s infinite;
}

@keyframes buttonShine {

    0% {
        left: -100%;
    }

    35% {
        left: 140%;
    }

    100% {
        left: 140%;
    }
}

.confirm-button strong {
    font-size: 22px;
}

.confirm-button:active {
    transform: scale(.98);
}

.confirm-button:disabled {
    opacity: .25;

    cursor: not-allowed;

    box-shadow: none;
}

/* =========================
   HISTORY
========================= */

.history {
    min-height: 55px;

    border:
        1px solid var(--border);

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.025),
            rgba(255,255,255,.008)
        );
}

.history-empty {
    padding: 17px;

    color: #4c4c52;

    text-align: center;

    font-size: 9px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px;

    border-bottom:
        1px solid rgba(255,255,255,.05);
}

.history-item:last-child {
    border-bottom: 0;
}

.history-number {
    color: #aaa;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 1px;
}

.history-result {
    font-size: 8px;
    font-weight: 900;

    letter-spacing: 1px;
}

.history-result.bang {
    color: var(--red);

    text-shadow:
        0 0 10px rgba(255,23,68,.5);
}

.history-result.click {
    color: var(--green);
}

/* =========================
   NEXT CHANCE
========================= */

.next-chance {
    margin: 20px 15px 0;

    padding: 18px;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            rgba(155,77,255,.10),
            rgba(255,255,255,.02)
        );

    border:
        1px solid rgba(155,77,255,.20);

    box-shadow:
        0 10px 35px rgba(0,0,0,.3);

    animation:
        lockAppear .45s ease;
}

.next-chance-label {
    color: #777;

    font-size: 8px;
    font-weight: 900;

    letter-spacing: 4px;
}

.countdown {
    margin-top: 6px;

    color: var(--white);

    font-size: 28px;
    font-weight: 1000;

    letter-spacing: 3px;

    font-variant-numeric: tabular-nums;

    text-shadow:
        0 0 18px rgba(155,77,255,.35);
}

.next-chance small {
    display: block;

    margin-top: 5px;

    color: #555;

    font-size: 8px;
}

/* =========================
   BOTTOM NAV
========================= */

.bottom-nav {
    position: fixed;

    bottom: 0;
    left: 50%;

    transform: translateX(-50%);

    width: 100%;
    max-width: 520px;
    height: 72px;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    background:
        rgba(5,5,6,.94);

    border-top:
        1px solid var(--border);

    backdrop-filter: blur(18px);

    z-index: 20;
}

.bottom-nav button {
    border: 0;

    background: transparent;

    color: #4e4e55;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 5px;
}

.bottom-nav button span {
    font-size: 17px;
}

.bottom-nav button small {
    font-size: 7px;
    letter-spacing: 1px;
}

.bottom-nav button.active {
    color: var(--green);

    text-shadow:
        0 0 12px rgba(184,255,0,.35);
}

/* =========================
   RESULT OVERLAY
========================= */

.result-overlay {
    position: fixed;

    inset: 0;

    display: none;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background:
        rgba(0,0,0,.88);

    backdrop-filter: blur(12px);

    z-index: 100;
}

.result-overlay.show {
    display: flex;

    animation:
        overlayAppear .3s ease;
}

@keyframes overlayAppear {

    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.result-modal {
    width: 100%;
    max-width: 360px;

    padding: 30px 22px 22px;

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 0,
            rgba(255,255,255,.06),
            transparent 45%
        ),
        #101012;

    border:
        1px solid rgba(255,255,255,.13);

    box-shadow:
        0 30px 100px rgba(0,0,0,.9);

    animation:
        modalAppear .35s ease;
}

@keyframes modalAppear {

    0% {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-icon {
    width: 68px;
    height: 68px;

    margin: 0 auto 15px;

    display: flex;
    justify-content: center;
    align-items: center;

    border:
        2px solid var(--red);

    color: var(--red);

    font-size: 31px;
    font-weight: 1000;

    box-shadow:
        0 0 30px rgba(255,23,68,.2);
}

.result-label {
    color: var(--red);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 5px;
}

.result-modal h2 {
    margin-top: 8px;

    font-size: 32px;
    font-weight: 1000;
}

.result-modal p {
    margin-top: 8px;

    color: #777;

    font-size: 12px;
}

.result-xp {
    margin: 20px 0 10px;

    padding: 14px;

    display: flex;
    justify-content: space-between;

    background: #080809;

    border:
        1px solid rgba(255,255,255,.06);
}

.result-xp span {
    color: #555;

    font-size: 9px;
}

.result-xp strong {
    color: var(--green);

    text-shadow:
        0 0 10px rgba(184,255,0,.3);
}

.result-streak {
    margin-bottom: 18px;

    padding: 10px;

    display: flex;
    justify-content: space-between;

    border:
        1px solid rgba(255,255,255,.05);

    background:
        rgba(255,255,255,.015);
}

.result-streak span {
    color: #555;

    font-size: 8px;
    letter-spacing: 2px;
}

.result-streak strong {
    color: var(--green);

    font-size: 12px;
}

.result-modal button {
    width: 100%;
    height: 49px;

    border: 0;

    background:
        var(--green);

    color: #000;

    font-size: 10px;
    font-weight: 1000;

    letter-spacing: 2px;

    cursor: pointer;
}

/* =========================
   SCREEN SHAKE
========================= */

body.shake {
    animation:
        screenShake .28s ease;
}

@keyframes screenShake {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-7px, 3px);
    }

    40% {
        transform: translate(6px, -3px);
    }

    60% {
        transform: translate(-4px, 2px);
    }

    80% {
        transform: translate(3px, -1px);
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 380px) {

    .hero h1 {
        font-size: 43px;
    }

    .game-core {
        height: 295px;
    }

    .revolver-image {
        height: 250px;
    }

    .numbers button {
        height: 45px;
    }

    .countdown {
        font-size: 24px;
    }
}
