/* =========================================================
   ELITSLOTS DUEL
========================================================= */

.duel-page {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 70px;
}

.duel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 24px;
}

.duel-heading h1 {
    margin: 5px 0 6px;
    font-size: clamp(32px, 4vw, 52px);
}

.duel-heading p {
    margin: 0;
    opacity: .72;
}

.demo-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    border: 1px solid rgba(138, 77, 255, .45);
    border-radius: 999px;
    background: rgba(110, 65, 220, .12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.duel-arena-card,
.bet-panel,
.live-bets {
    border: 1px solid rgba(255,255,255,.08);
    background: #151725;
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(0,0,0,.24);
}

.duel-arena-card {
    overflow: hidden;
}

.arena-topbar {
    min-height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    background: #0d0f18;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.round-label,
.arena-topbar span {
    font-size: 11px;
    opacity: .6;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.arena-topbar strong {
    margin-left: 8px;
}

.countdown-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

#countdown {
    min-width: 42px;
    text-align: center;
    font-size: 25px;
}

.duel-arena {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 8.5;
    min-height: 420px;
    overflow: hidden;
    background: #b98b52;
}

.arena-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.arena-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.15), transparent 35%, transparent 65%, rgba(0,0,0,.15)),
        linear-gradient(0deg, rgba(0,0,0,.2), transparent 30%);
}

.countdown-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: rgba(4,6,12,.16);
    opacity: 0;
    transition: opacity .2s ease;
}

.countdown-overlay.show {
    opacity: 1;
}

#countdownBig {
    display: grid;
    place-items: center;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: rgba(8,10,18,.72);
    border: 3px solid rgba(255,255,255,.72);
    font-size: 70px;
    font-weight: 900;
    text-shadow: 0 5px 25px rgba(0,0,0,.8);
    animation: countdownPulse .9s ease infinite;
}

.round-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(8,10,18,.8);
    border: 1px solid rgba(255,255,255,.12);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.winner-banner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    opacity: 0;
    z-index: 8;
    pointer-events: none;
    transition: .45s ease;
    text-align: center;
}

.winner-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.winner-banner span {
    font-size: 13px;
    letter-spacing: .22em;
    font-weight: 900;
}

.winner-banner strong {
    font-size: clamp(34px, 5vw, 70px);
    color: #fff;
    text-shadow: 0 5px 30px rgba(0,0,0,.8);
}

.aim-line {
    position: absolute;
    top: 49%;
    height: 2px;
    width: 27%;
    opacity: 0;
    z-index: 5;
    background: rgba(255,255,255,.8);
    box-shadow: 0 0 12px rgba(255,255,255,.9);
}

.aim-left {
    left: 24%;
    transform-origin: left center;
}

.aim-right {
    right: 24%;
    transform-origin: right center;
}

.aim-line.fire-left {
    animation: fireLeft .22s ease-out;
}

.aim-line.fire-right {
    animation: fireRight .22s ease-out;
}

.shot-flash {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 12%, #ffd85a 25%, rgba(255,130,0,.35) 50%, transparent 70%);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
}

.shot-left {
    left: 29%;
    top: 48%;
}

.shot-right {
    right: 29%;
    top: 48%;
}

.shot-flash.fire {
    animation: muzzleFlash .28s ease-out;
}

.hit-effect {
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%) scale(.4);
    opacity: 0;
    z-index: 7;
    color: #fff;
    font-size: 55px;
    text-shadow: 0 0 22px rgba(255,70,70,.9);
}

.hit-effect.show {
    animation: hitPop .5s ease-out;
}

.duel-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px;
    background: #10121d;
}

.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 15px 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    color: #fff;
    background: #1b1f31;
    cursor: pointer;
    text-align: left;
    transition: .2s ease;
}

.choice-card:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(145,91,255,.7);
}

.choice-card.selected {
    border-color: #8c55ff;
    box-shadow: 0 0 0 2px rgba(140,85,255,.18), 0 10px 30px rgba(100,50,220,.2);
}

.choice-card:disabled {
    cursor: not-allowed;
    opacity: .52;
}

.choice-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    font-size: 19px;
}

.choice-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.choice-text small {
    font-size: 10px;
    opacity: .55;
    letter-spacing: .1em;
}

.choice-text strong {
    font-size: 15px;
}

.choice-total {
    margin-left: auto;
    font-size: 12px;
    opacity: .7;
}

.bet-panel {
    margin-top: 16px;
    padding: 22px;
}

.bet-panel-top,
.bet-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.bet-panel h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.demo-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.demo-balance span {
    font-size: 11px;
    opacity: .55;
}

.demo-balance strong {
    margin-top: 4px;
}

.bet-controls {
    margin-top: 22px;
}

.amount-control {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 260px;
}

.amount-control > span {
    font-size: 12px;
    opacity: .6;
}

.amount-box {
    display: flex;
    height: 46px;
}

.amount-box button,
.amount-box input {
    border: 1px solid rgba(255,255,255,.09);
    background: #0d0f18;
    color: #fff;
}

.amount-box button {
    width: 45px;
    cursor: pointer;
    font-size: 20px;
}

.amount-box input {
    width: 100%;
    text-align: center;
    outline: none;
}

.confirm-bet {
    min-height: 46px;
    margin-top: 19px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #7340ff, #9b64ff);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.confirm-bet:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.demo-note {
    margin: 15px 0 0;
    font-size: 11px;
    opacity: .48;
}

.live-bets {
    margin-top: 20px;
    padding: 24px;
}

.live-bets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.live-bets-header h2 {
    margin: 5px 0 0;
}

.live-player-count {
    display: flex;
    align-items: center;
    gap: 7px;
    opacity: .75;
}

.bet-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.summary-box {
    padding: 16px;
    border-radius: 12px;
    background: #10121d;
    border: 1px solid rgba(255,255,255,.06);
}

.summary-box span {
    display: block;
    font-size: 10px;
    opacity: .5;
    letter-spacing: .08em;
}

.summary-box strong {
    display: block;
    margin-top: 7px;
}

.live-bets-table {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
}

.live-bets-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    align-items: center;
    min-height: 52px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.live-bets-row:last-child {
    border-bottom: 0;
}

.live-bets-head {
    min-height: 42px;
    background: #0d0f18;
    color: rgba(255,255,255,.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.live-bet-player {
    font-weight: 700;
}

.live-bet-amount {
    font-variant-numeric: tabular-nums;
}

.pick-tag,
.status-tag {
    display: inline-flex;
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.pick-tag {
    background: rgba(138,77,255,.14);
    color: #c6a8ff;
}

.status-tag {
    background: rgba(255,255,255,.06);
    opacity: .75;
}

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

@keyframes muzzleFlash {
    0% { opacity: 0; transform: scale(.2); }
    25% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.7); }
}

@keyframes hitPop {
    0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
    25% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); }
}

@keyframes fireLeft {
    0% { opacity: 0; width: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; width: 27%; }
}

@keyframes fireRight {
    0% { opacity: 0; width: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; width: 27%; }
}

@media (max-width: 800px) {
    .duel-page {
        width: min(100% - 20px, 1400px);
        padding-top: 25px;
    }

    .duel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .duel-arena {
        min-height: 260px;
    }

    .duel-choices,
    .bet-summary {
        grid-template-columns: 1fr;
    }

    .bet-panel-top,
    .bet-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .demo-balance {
        align-items: flex-start;
    }

    .amount-control {
        width: 100%;
    }

    .confirm-bet {
        width: 100%;
    }

    .live-bets-row {
        grid-template-columns: 1.2fr 1fr 1fr;
    }

    .live-bets-row span:nth-child(4) {
        display: none;
    }

    .live-bets-head span:nth-child(4) {
        display: none;
    }

    .round-message {
        max-width: 90%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
