/*
 * Scorpion Arena independent games interface.
 * This file controls only the games modal.
 */

#arenaGamesV2Root {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
    background: rgba(0, 0, 0, .84);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

#arenaGamesV2Root.ag2-visible {
    display: flex;
}

.ag2-panel {
    width: min(100%, 590px);
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    border: 1px solid rgba(245, 198, 91, .30);
    border-radius: 28px;
    color: #f7f3ff;
    background:
        radial-gradient(
            circle at 90% 2%,
            rgba(139, 92, 246, .22),
            transparent 34%
        ),
        radial-gradient(
            circle at 0% 65%,
            rgba(69, 168, 255, .10),
            transparent 33%
        ),
        linear-gradient(
            145deg,
            rgba(27, 23, 39, .995),
            rgba(8, 8, 13, .995)
        );
    box-shadow: 0 28px 80px rgba(0, 0, 0, .64);
    animation: ag2Open .22s ease-out;
}

@keyframes ag2Open {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.98);
    }

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

.ag2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ag2-title {
    font-size: 23px;
    font-weight: 950;
    line-height: 1.2;
}

.ag2-description {
    margin-top: 6px;
    color: #aaa3b8;
    font-size: 12px;
    line-height: 1.55;
}

.ag2-close {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    color: #f7f3ff;
    cursor: pointer;
    font-size: 21px;
    font-weight: 800;
}

.ag2-balance {
    margin-top: 15px;
    padding: 14px;
    border: 1px solid rgba(245,198,91,.23);
    border-radius: 16px;
    background: rgba(245,198,91,.065);
}

.ag2-balance-label {
    color: #aaa3b8;
    font-size: 10px;
}

.ag2-balance-value {
    margin-top: 4px;
    color: #ffe09a;
    font-size: 21px;
    font-weight: 950;
}

.ag2-view {
    display: none;
}

.ag2-view.ag2-active {
    display: block;
}

.ag2-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 17px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 15px;
    background: rgba(255,255,255,.032);
}

.ag2-tab {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #aaa3b8;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.ag2-tab.ag2-active {
    color: #f7f3ff;
    background:
        linear-gradient(
            135deg,
            rgba(139,92,246,.38),
            rgba(245,198,91,.16)
        );
}

.ag2-dice-stage {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 11px;
    margin-top: 17px;
}

.ag2-dice-player {
    padding: 15px 10px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 17px;
    background: rgba(255,255,255,.038);
    text-align: center;
}

.ag2-dice-face {
    min-height: 52px;
    font-size: 49px;
    line-height: 1;
}

.ag2-dice-name {
    margin-top: 8px;
    color: #aaa3b8;
    font-size: 10px;
    font-weight: 900;
}

.ag2-vs {
    color: #f5c65b;
    font-size: 11px;
    font-weight: 950;
}

.ag2-queue {
    display: none;
    margin-top: 13px;
    padding: 12px;
    border: 1px solid rgba(69,168,255,.22);
    border-radius: 13px;
    background: rgba(69,168,255,.055);
    color: #aaa3b8;
    font-size: 11px;
    line-height: 1.55;
}

.ag2-label {
    display: block;
    margin: 16px 0 8px;
    color: #aaa3b8;
    font-size: 12px;
    font-weight: 850;
}

.ag2-input-wrap {
    position: relative;
}

.ag2-input {
    width: 100%;
    height: 57px;
    padding: 0 69px 0 16px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    outline: none;
    background: rgba(255,255,255,.052);
    color: #f7f3ff;
    font-size: 20px;
    font-weight: 900;
}

.ag2-input:focus {
    border-color: #f5c65b;
}

.ag2-currency {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #f5c65b;
    font-size: 12px;
    font-weight: 950;
}

.ag2-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.ag2-preset {
    min-height: 40px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    background: rgba(255,255,255,.045);
    color: #f7f3ff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 850;
}

.ag2-action {
    width: 100%;
    min-height: 54px;
    margin-top: 16px;
    border: 0;
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #d6a6d0,
            #f5c65b
        );
    color: #120d18;
    cursor: pointer;
    font-size: 14px;
    font-weight: 950;
}

.ag2-action:active,
.ag2-preset:active,
.ag2-tab:active,
.ag2-close:active {
    transform: scale(.98);
}

.ag2-notice {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 13px;
    background: rgba(255,255,255,.033);
    color: #aaa3b8;
    font-size: 10px;
    line-height: 1.6;
}

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

.ag2-summary-box {
    padding: 11px 6px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 13px;
    background: rgba(255,255,255,.037);
    text-align: center;
}

.ag2-summary-label {
    color: #aaa3b8;
    font-size: 9px;
}

.ag2-summary-value {
    margin-top: 5px;
    font-size: 13px;
    font-weight: 950;
}

.ag2-wheel-area {
    position: relative;
    width: min(86vw, 400px);
    aspect-ratio: 1;
    margin: 29px auto 14px;
}

.ag2-wheel-pointer {
    position: absolute;
    z-index: 10;
    top: -15px;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 30px solid #ffe09a;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,.55));
}

.ag2-wheel {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: #343442;
    box-shadow:
        inset 0 0 46px rgba(0,0,0,.31),
        0 0 0 7px rgba(255,255,255,.018),
        0 20px 50px rgba(0,0,0,.35);
    transition:
        transform 5s cubic-bezier(.10,.72,.08,1);
}

.ag2-wheel::before {
    content: "";
    position: absolute;
    inset: 4%;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
}

.ag2-wheel::after {
    content: "";
    position: absolute;
    inset: 26%;
    z-index: 2;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    background:
        linear-gradient(
            145deg,
            rgba(24,20,34,.995),
            rgba(8,7,12,.995)
        );
    box-shadow: 0 8px 30px rgba(0,0,0,.42);
}

.ag2-wheel-centre {
    position: absolute;
    z-index: 8;
    top: 50%;
    left: 50%;
    width: 42%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.ag2-wheel-status {
    font-size: 17px;
    font-weight: 950;
}

.ag2-wheel-time {
    margin-top: 5px;
    color: #ffe09a;
    font-size: 12px;
    font-weight: 900;
}

.ag2-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 13px;
    border: 1px solid rgba(69,168,255,.22);
    border-radius: 14px;
    background: rgba(69,168,255,.055);
}

.ag2-share-label {
    color: #aaa3b8;
    font-size: 10px;
}

.ag2-share-amount {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 950;
}

.ag2-chance {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(56,217,150,.10);
    color: #92f7c5;
    font-size: 11px;
    font-weight: 950;
}

.ag2-list-section {
    margin-top: 17px;
}

.ag2-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.ag2-list-title {
    font-size: 13px;
    font-weight: 950;
}

.ag2-list-note {
    color: #aaa3b8;
    font-size: 9px;
}

.ag2-participants {
    display: grid;
    gap: 7px;
    max-height: 230px;
    overflow-y: auto;
}

.ag2-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 12px;
    background: rgba(255,255,255,.029);
}

.ag2-player-name {
    overflow: hidden;
    font-size: 11px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag2-player-amount {
    font-size: 10px;
    font-weight: 900;
}

.ag2-player-chance {
    color: #ffe09a;
    font-size: 10px;
    font-weight: 900;
}

.ag2-more-players {
    padding: 10px;
    border: 1px dashed rgba(255,255,255,.10);
    border-radius: 12px;
    color: #aaa3b8;
    font-size: 10px;
    text-align: center;
}

.ag2-hash {
    margin-top: 14px;
    color: #8e879d;
    font-size: 9px;
    text-align: center;
    word-break: break-all;
}

.ag2-tournament {
    margin-top: 17px;
    padding: 20px 16px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 17px;
    background: rgba(255,255,255,.034);
    text-align: center;
}

.ag2-tournament-icon {
    font-size: 52px;
}

.ag2-tournament-title {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 950;
}

.ag2-tournament-text {
    margin-top: 7px;
    color: #aaa3b8;
    font-size: 11px;
    line-height: 1.6;
}

@media (min-width: 620px) {
    #arenaGamesV2Root {
        align-items: center;
    }
}
