﻿.challenge-rooms-wrapper {
    background: linear-gradient(145deg, rgba(15,15,25,0.95), rgba(25,15,40,0.95));
    border: 1px solid rgba(124,58,237,0.35);
    border-radius: 20px;
    padding: 1.75rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), 0 0 80px rgba(124,58,237,0.1);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid rgba(124,58,237,0.2);
    background: rgba(10,10,20,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
    }

    .stat-card.total {
        border-color: rgba(124,58,237,0.3);
        background: rgba(124,58,237,0.07);
    }

    .stat-card.active-stat {
        border-color: rgba(var(--secondary-color-rgb),0.35);
        background: rgba(var(--secondary-color-rgb),0.07);
    }

    .stat-card.finished-stat {
        border-color: rgba(107,114,128,0.35);
        background: rgba(107,114,128,0.07);
    }

    .stat-card.wins-stat {
        border-color: rgba(52,211,153,0.35);
        background: rgba(52,211,153,0.07);
    }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card.total .stat-value {
    color: #a78bfa;
}

.stat-card.active-stat .stat-value {
    color: #d9a2f5;
}

.stat-card.finished-stat .stat-value {
    color: #9ca3af;
}

.stat-card.wins-stat .stat-value {
    color: #34d399;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(226,232,240,0.5);
}

/* ══════════════════════════════════════════
       HEADER
    ══════════════════════════════════════════ */
.rooms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(124,58,237,0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #a78bfa;
    flex-shrink: 0;
}

.rooms-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Search */
.header-search {
    position: relative;
    flex: 0 0 260px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(167,139,250,0.5);
    font-size: 0.8rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: rgba(10,10,20,0.6);
    border: 1px solid rgba(124,58,237,0.25);
    border-radius: 8px;
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .search-input::placeholder {
        color: rgba(226,232,240,0.3);
    }

    .search-input:focus {
        border-color: rgba(124,58,237,0.55);
        box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
    }

/* ══════════════════════════════════════════
       FILTER ROW
    ══════════════════════════════════════════ */
.filter-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--sq-glass-border);
    background: var(--sq-glass);
    color: var(--sq-text-dim);
    transition: all 0.2s ease;
}

    .filter-btn:hover {
        border-color: var(--sq-on-border);
        color: #fff;
        background: var(--sq-glass-hover);
    }

    .filter-btn.filter-active {
        background: var(--sq-on-bg);
        border-color: var(--sq-on-border);
        color: #fff;
    }

/* ══════════════════════════════════════════
       CARDS CONTAINER
    ══════════════════════════════════════════ */
.challenge-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ══════════════════════════════════════════
       CHALLENGE CARD
    ══════════════════════════════════════════ */
.challenge-card {
    position: relative;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    background: rgba(10,10,20,0.6);
    border: 1px solid rgba(124,58,237,0.18);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s ease;
}

    .challenge-card:hover {
        transform: translateX(-3px);
        border-color: rgba(124,58,237,0.45);
        box-shadow: 0 4px 20px rgba(124,58,237,0.15);
        background: rgba(124,58,237,0.05);
    }

    /* State overrides */
    .challenge-card.active {
        border-right: 3px solid #7c3aed;
    }

    .challenge-card.ended {
        opacity: 0.58;
        border-right: 3px solid #4b5563;
    }

        .challenge-card.ended:hover {
            opacity: 0.8;
        }

    .challenge-card.winner {
        border: 1px solid rgba(52,211,153,0.3);
        background: linear-gradient(135deg, rgba(10,10,20,0.6), rgba(52,211,153,0.04));
        box-shadow: 0 0 24px rgba(52,211,153,0.08);
    }

        .challenge-card.winner:hover {
            box-shadow: 0 4px 24px rgba(52,211,153,0.18);
        }

/* ── Glow top line ── */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124,58,237,0.5) 50%, transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.challenge-card:hover .card-glow {
    opacity: 1;
}

.challenge-card.winner .card-glow {
    background: linear-gradient(90deg, transparent, rgba(52,211,153,0.5) 50%, transparent);
}

/* ── Right accent ── */
.card-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(124,58,237,0.7), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.challenge-card:hover .card-accent {
    opacity: 1;
}

.challenge-card.winner .card-accent {
    background: linear-gradient(180deg, transparent, rgba(52,211,153,0.7), transparent);
}

/* ── Winner badge ── */
.winner-badge {
    /*position: absolute;*/
    top: 0.85rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(52,211,153,0.1);
    border: 1.5px solid rgba(52,211,153,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
    font-size: 0.78rem;
    box-shadow: 0 0 14px rgba(52,211,153,0.3);
    animation: winner-pulse 2.2s ease-in-out infinite;
    z-index: 2;
}

@keyframes winner-pulse {
    0%, 100% {
        box-shadow: 0 0 14px rgba(52,211,153,0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 24px rgba(52,211,153,0.55);
        transform: scale(1.1);
    }
}

/* ══════════════════════════════════════════
       CARD ROWS
    ══════════════════════════════════════════ */
.card-row {
    display: flex;
    align-items: center;
}

/* ── Top: title + status ── */
.card-top {
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.card-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.card-room-id {
    font-size: 0.72rem;
    color: rgba(167,139,250,0.6);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Status badge */
.status-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(124,58,237,0.14);
    border: 1px solid rgba(124,58,237,0.3);
    color: #a78bfa;
}

.ended .status-badge {
    background: rgba(107,114,128,0.12);
    border-color: rgba(107,114,128,0.3);
    color: #9ca3af;
}

.winner .status-badge {
    background: rgba(52,211,153,0.1);
    border-color: rgba(52,211,153,0.35);
    color: #34d399;
}

/* ── Meta row ── */
.card-meta {
    gap: 0.75rem;
    margin-bottom: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-label {
    font-size: 0.71rem;
    color: rgba(226,232,240,0.4);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .meta-label i {
        font-size: 0.65rem;
    }

.meta-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.meta-divider {
    width: 1px;
    height: 14px;
    background: rgba(124,58,237,0.25);
    flex-shrink: 0;
}

/* ── Dates row ── */
.card-dates {
    gap: 0.625rem;
    margin-bottom: 0.4rem;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.date-label {
    font-size: 0.7rem;
    color: rgba(226,232,240,0.38);
    font-weight: 500;
    white-space: nowrap;
}

.date-value {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.date-arrow {
    font-size: 0.75rem;
    color: rgba(124,58,237,0.45);
    flex-shrink: 0;
}

/* ── Countdown row ── */
.card-countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #d9a2f5;
    background: rgba(var(--secondary-color-rgb),0.1);
    border: 1px solid rgba(var(--secondary-color-rgb),0.28);
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.5rem;
    animation: countdown-blink 1.8s ease-in-out infinite;
}

    .card-countdown i {
        font-size: 0.7rem;
    }

@keyframes countdown-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

/* ── Footer / Enter button ── */
.card-footer {
    justify-content: flex-end;
    margin-top: 0.3rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(124,58,237,0.12);
}

.enter-btn {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(var(--sq-accent-rgb), .75);
    transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.challenge-card:hover .enter-btn {
    color: var(--sq-accent);
    letter-spacing: 0.1em;
}

.challenge-card.winner .enter-btn {
    color: rgba(52,211,153,0.75);
}

.challenge-card.winner:hover .enter-btn {
    color: #34d399;
}

/* ══════════════════════════════════════════
       EMPTY STATE
    ══════════════════════════════════════════ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(124,58,237,0.08);
    border: 2px solid rgba(124,58,237,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: rgba(124,58,237,0.45);
}

.empty-state p {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(226,232,240,0.45);
}

/* ══════════════════════════════════════════
       RESPONSIVE
    ══════════════════════════════════════════ */
@media (max-width: 768px) {
    .challenge-rooms-wrapper {
        padding: 1rem;
        border-radius: 14px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .rooms-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .card-top {
        flex-wrap: wrap;
    }

    .card-dates {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .date-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .filter-row {
        gap: 0.35rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.65rem;
    }
}

/* ─── ROOT ─────────────────────────────────────────────── */
.challenge-room {
    background: radial-gradient(ellipse at top left, #1a1a3e 0%, #0f0f1b 60%, #0a0a12 100%);
    min-height: 100vh;
    color: #e0e0f0;
    padding: 0 20px;
    margin-top: 0;
}

/* ─── HEADER ────────────────────────────────────────────── */
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 28px;
    border-radius: 18px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb),0.2), rgba(var(--secondary-color-rgb),0.12));
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.challenge-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .5px;
    background: linear-gradient(90deg, #c4b5fd, #f5a3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.challenge-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
    opacity: .7;
}

.badge-type {
    background: rgba(167,139,250,0.2);
    border: 1px solid rgba(167,139,250,0.4);
    padding: 2px 10px;
    border-radius: 20px;
    color: #a78bfa;
    font-size: 12px;
}

.dot {
    opacity: .4;
}

.header-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.info-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 13px;
    transition: background .2s;
}

    .info-chip:hover {
        background: rgba(255,255,255,0.09);
    }

    .info-chip.prize {
        border-color: rgba(250,200,50,0.35);
        background: rgba(250,200,50,0.08);
        color: #fcd34d;
    }

.chip-icon {
    font-size: 14px;
}

/* ─── MAIN GRID ──────────────────────────────────────────── */
.main-grid {
    display: grid;
    grid-template-columns: 3fr 5fr 4fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }

    .col-events {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── GLASS CARD ─────────────────────────────────────────── */
.glass-card {
    background: rgba(255,255,255,0.04);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

.mt-3 {
    margin-top: 20px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .4px;
}

/* ─── BADGES ─────────────────────────────────────────────── */
.count-badge {
    background: rgba(101,31,255,0.35);
    border: 1px solid rgba(167,139,250,0.4);
    color: #a78bfa;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

.active-badge {
    background: rgba(0,255,159,0.15);
    border-color: rgba(0,255,159,0.4);
    color: #00ff9f;
}

/* ─── CHALLENGE CARDS ────────────────────────────────────── */
.challenge-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    margin-top: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform .2s, box-shadow .2s;
}

    .challenge-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }

    .challenge-card.pending {
        border-left: 4px solid #f59e0b;
        background: rgba(245,158,11,0.05);
    }

    .challenge-card.active {
        border-left: 4px solid #00ff9f;
        background: rgba(0,255,159,0.04);
    }

.challenge-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vs-icon {
    font-size: 22px;
}

.challenger-name {
    font-weight: 700;
    font-size: 15px;
}

.challenge-label {
    font-size: 12px;
    opacity: .55;
    margin-top: 2px;
}

.vs-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.vs-label {
    font-size: 11px;
    opacity: .5;
    font-style: italic;
}

.actions {
    display: flex;
    gap: 8px;
}

/* ─── ACTION BUTTONS ─────────────────────────────────────── */
.btn-action {
    border: none;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .2s, transform .15s;
}

    .btn-action:hover {
        filter: brightness(1.15);
        transform: translateY(-1px);
    }

    .btn-action.accept {
        background: var(--sq-ok-grad);
        color: white;
    }

    .btn-action.decline {
        background: var(--sq-danger-grad);
        color: white;
    }

    .btn-action.view {
        background: var(--sq-glass);
        border: 1px solid var(--sq-glass-border);
        color: var(--sq-text);
    }

/* ─── LEADERBOARD ────────────────────────────────────────── */
.leaderboard {
}

.player-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-top: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: transform .2s, background .2s, box-shadow .2s;
}

    .player-row:hover {
        transform: translateX(4px);
        background: rgba(255,255,255,0.07);
        box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    }

    .player-row.gold {
        border-left: 3px solid #fbbf24;
        background: rgba(251,191,36,0.06);
    }

    .player-row.silver {
        border-left: 3px solid #9ca3af;
        background: rgba(156,163,175,0.06);
    }

    .player-row.bronze {
        border-left: 3px solid #cd7c3e;
        background: rgba(205,124,62,0.06);
    }

.player-rank {
    font-size: 18px;
    width: 30px;
    text-align: center;
}

.player-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.player-score {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* ─── LIVE FEED ──────────────────────────────────────────── */
.game-feed {
    max-height: 300px;
    overflow-y: auto;
}

    .game-feed::-webkit-scrollbar {
        width: 4px;
    }

    .game-feed::-webkit-scrollbar-track {
        background: transparent;
    }

    .game-feed::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.15);
        border-radius: 4px;
    }

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.35);
    color: #f87171;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.2s infinite;
}

.event-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    margin-top: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    animation: slideIn .3s ease;
    transition: background .2s;
}

    .event-row:hover {
        background: rgba(255,255,255,0.06);
    }

.event-icon {
    font-size: 14px;
    opacity: 0.85;
}

.event-text {
    flex: 1;
    color: rgba(255,255,255,0.9);
}

.event-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.4;
}

.event-time {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
}

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    opacity: .45;
    font-size: 14px;
}

.empty-icon {
    font-size: 28px;
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(1.4);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.events-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 25px;
    font-size: 14px;
    opacity: .7;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top: 2px solid var(--sq-accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.timer-value {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
}

.timer-normal {
    color: #2e7d32;
}

.timer-warning {
    color: #ff9800;
}

.timer-danger {
    color: #e53935;
    animation: timerBlink 1s infinite;
}

@keyframes timerBlink {
    0% {
        opacity: 1
    }

    50% {
        opacity: .4
    }

    100% {
        opacity: 1
    }
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.online {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.offline {
    background: #6b7280;
}

.event-date-separator {
    align-self: center;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    margin: 14px 0 8px 0;
}

.sub-section-title {
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 14px;
    opacity: .8;
}

.incoming-title {
    color: #7dd3fc;
}

.sent-title {
    color: #fbbf24;
}

.challenge-card {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
}

    .challenge-card.incoming {
        border-right: 4px solid var(--secondary-color);
    }

    .challenge-card.sent {
        border-right: 4px solid #f59e0b;
    }

.challenge-label {
    font-size: 12px;
    opacity: .7;
}

.empty-state {
    text-align: center;
    opacity: .6;
    font-size: 13px;
    padding: 18px;
}



/*#region PaymentList */


.sqg-section {
    min-height: 100vh;
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}

.sqg-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at top, #1a0a2e 0%, #0d0d1a 60%, #050510 100%);
    z-index: -1;
}

.sqg-content {
    position: relative;
    z-index: 10;
}

/* Header */
.sqg-page-header {
    text-align: center;
}

.sqg-page-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.sqg-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    margin-bottom: 8px;
}

.sqg-page-subtitle {
    color: #a78bfa;
    font-size: 0.95rem;
}

/* Loading */
.sqg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px;
    color: #a78bfa;
}

.sqg-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table */
.sqg-table-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.sqg-table {
    width: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
    font-size: 0.9rem;
}

    .sqg-table thead tr {
        background: rgba(139, 92, 246, 0.15);
        border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    }

    .sqg-table thead th {
        padding: 16px 20px;
        font-weight: 600;
        color: #a78bfa;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .sqg-table tbody tr {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s;
    }

        .sqg-table tbody tr:last-child {
            border-bottom: none;
        }

        .sqg-table tbody tr:hover {
            background: rgba(139, 92, 246, 0.08);
        }

    .sqg-table tbody td {
        padding: 14px 20px;
        vertical-align: middle;
    }

.sqg-id {
    color: #64748b;
    font-size: 0.8rem;
}

.sqg-amount {
    font-weight: 600;
    color: #f1f5f9;
}

.sqg-currency {
    font-size: 0.7rem;
    color: #64748b;
    margin-left: 4px;
}

.sqg-coins-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sqg-date {
    color: #94a3b8;
    font-size: 0.82rem;
    white-space: nowrap;
}

.sqg-refid {
    color: #64748b;
    font-size: 0.78rem;
    font-family: monospace;
}

/* Status badges */
.sqg-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.sqg-status-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.sqg-status-pending {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fbbf24;
}

.sqg-status-failed {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.sqg-status-default {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

/* Empty state */
.sqg-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.sqg-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.sqg-pagination-wrapper {
    display: flex;
    justify-content: center;
}


/*#endregion */

/*#region Pagination */


.sqg-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}

/* Page size select */
.sqg-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #a78bfa;
    padding: 6px 12px;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

    .sqg-select:hover,
    .sqg-select:focus {
        border-color: rgba(139, 92, 246, 0.7);
    }

    .sqg-select option {
        background: #1a0a2e;
        color: #e2e8f0;
    }

/* Page info */
.sqg-page-info {
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    gap: 6px;
    align-items: center;
}

    .sqg-page-info strong {
        color: #a78bfa;
    }

.sqg-total {
    color: #475569;
}

/* Pages list */
.sqg-pages {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sqg-page-item button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .sqg-page-item button:hover {
        background: var(--sq-glass-hover);
        border-color: var(--sq-on-border);
        color: #fff;
    }

.sqg-page-item.active button {
    background: var(--sq-on-bg);
    border-color: var(--sq-on-border);
    color: #fff;
    font-weight: 700;
}

.sqg-page-item.disabled button {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/*#endregion */

/*#region withdraw_list */
.sqg-section {
    min-height: 100vh;
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}

.sqg-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at top, #1a0a2e 0%, #0d0d1a 60%, #050510 100%);
    z-index: -1;
}

.sqg-content {
    position: relative;
    z-index: 10;
}

/* Header */
.sqg-page-header {
    text-align: center;
}

.sqg-page-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.sqg-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    margin-bottom: 8px;
}

/* Button */
.sqg-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--sq-accent-grad);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--sq-accent-glow);
    transition: transform .2s, box-shadow .2s, filter .2s;
}

    .sqg-btn-primary:hover {
        color: #fff;
        transform: translateY(-2px);
        filter: brightness(1.06);
        box-shadow: var(--sq-accent-glow-hover);
    }

/* Loading */
.sqg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px;
    color: #a78bfa;
}

.sqg-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table */
.sqg-table-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.sqg-table {
    width: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
    font-size: 0.88rem;
}

    .sqg-table thead tr {
        background: rgba(139, 92, 246, 0.15);
        border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    }

    .sqg-table thead th {
        padding: 14px 16px;
        font-weight: 600;
        color: #a78bfa;
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .sqg-table tbody tr {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s;
    }

        .sqg-table tbody tr:last-child {
            border-bottom: none;
        }

        .sqg-table tbody tr:hover {
            background: rgba(139, 92, 246, 0.08);
        }

    .sqg-table tbody td {
        padding: 13px 16px;
        vertical-align: middle;
    }

.sqg-id {
    color: #475569;
    font-size: 0.78rem;
}

.sqg-amount {
    font-weight: 600;
    color: #f1f5f9;
}

.sqg-currency {
    font-size: 0.68rem;
    color: #64748b;
    margin-left: 3px;
}

.sqg-shaba {
    font-family: monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 0.03em;
}

.sqg-date {
    color: #94a3b8;
    font-size: 0.8rem;
    white-space: nowrap;
}

.sqg-muted {
    color: #64748b;
    font-size: 0.82rem;
}

.sqg-note {
    color: #94a3b8;
    font-size: 0.82rem;
    max-width: 180px;
}

/* Status badges */
.sqg-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.sqg-status-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.sqg-status-pending {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fbbf24;
}

.sqg-status-failed {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.sqg-status-default {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

/* Empty state */
.sqg-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.sqg-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Pagination */
.sqg-pagination-wrapper {
    display: flex;
    justify-content: center;
}

/*#endregion */


/*#region WithdrawRequest */
.sqg-withdraw-create {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    min-width: 360px;
    max-width: 480px;
    margin: 0 auto;
}

.sqg-form-header {
    background: rgba(139, 92, 246, 1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 24px;
    text-align: center;
}

    /* user-facing withdraw form: soft header in the site palette (the admin
       challenge form shares .sqg-form-header and is styled separately) */
    .sqg-withdraw-create .sqg-form-header {
        background: linear-gradient(135deg, rgba(var(--primary-color-rgb), .38), rgba(var(--secondary-color-rgb), .2));
        border-bottom: 1px solid rgba(var(--sq-accent-rgb), .35);
    }

.sqg-form-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.sqg-form-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
}

.sqg-form-body {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(160deg, rgba(20, 15, 40, 0.95) 0%, rgba(10, 8, 25, 0.98) 100%);
}

.sqg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sqg-label {
    color: #a78bfa;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sqg-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 11px 14px;
    color: #f1f5f9;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

    .sqg-input:focus {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    }

    .sqg-input::placeholder {
        color: #475569;
    }

.sqg-input-mono {
    font-family: monospace;
    letter-spacing: 0.05em;
}

.sqg-field-hint {
    color: #475569;
    font-size: 0.75rem;
}

/* Message */
.sqg-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.sqg-message-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.sqg-message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* Submit button */
.sqg-form-actions {
    padding-top: 4px;
}

.sqg-btn-submit {
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--sq-accent-grad);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--sq-accent-glow);
    transition: transform .2s, box-shadow .2s, filter .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .sqg-btn-submit:hover:not(:disabled) {
        color: #fff;
        transform: translateY(-2px);
        filter: brightness(1.06);
        box-shadow: var(--sq-accent-glow-hover);
    }

    .sqg-btn-submit:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.sqg-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(196, 181, 253, 0.3);
    border-top-color: #c4b5fd;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/*#endregion */


/*#region NewChallenge (sqg-challenge-form)

   The challenge settings form. Reuses the withdraw form's shell, header,
   fields, message and submit button as-is and only adds what a form this
   size needs on top: a wider card, grouped sections and a two-column grid
   that collapses on narrow screens. */

.sqg-challenge-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    margin: 0 auto;
}

.sqg-form-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.sqg-form-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sqg-group-title {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.sqg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.sqg-field-wide {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .sqg-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The small add/edit affordances that sit inside a field label. */
.sqg-term-btn {
    cursor: pointer;
    margin: 0 6px;
    opacity: 0.75;
    transition: opacity 0.2s, color 0.2s;
}

    .sqg-term-btn:hover {
        opacity: 1;
        color: #fff;
    }

/* Read-only inputs here are not disabled - they are filled from the
   terminology dialog - so they need to look inert without looking broken. */
.sqg-challenge-form .sqg-input[readonly],
.sqg-challenge-form textarea.sqg-input[readonly] {
    background: rgba(255, 255, 255, 0.02);
    color: #cbd5e1;
    cursor: default;
}

.sqg-challenge-form textarea.sqg-input {
    resize: vertical;
    line-height: 1.7;
}

.sqg-challenge-form select.sqg-input option {
    background: #140f28;
    color: #f1f5f9;
}

/* Picker for which challenge the form is editing (or "new"). */
.sqg-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sqg-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--sq-glass-border);
    background: var(--sq-glass);
    color: var(--sq-text);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

    .sqg-chip:hover {
        background: var(--sq-glass-hover);
        border-color: var(--sq-on-border);
        color: #fff;
        text-decoration: none;
    }

    .sqg-chip.active {
        background: var(--sq-on-bg);
        border-color: var(--sq-on-border);
        color: #fff;
    }

.sqg-chip-level {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.7;
    white-space: nowrap;
}

.sqg-image-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 10px;
}

/*#endregion */

.sqg-dialog-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(5, 5, 16, 0.7) !important;
}


/*#region Button language (--sq-*)

   One set of tokens for every button and toggle in the header and on the home
   page. The template's violet->blue gradient (--primary/--secondary) is too
   cool against the magenta hero and the pink logo, so actions use the game's
   own hot pink instead. The hierarchy has three levels:
     - accent : the solid pink gradient, only for the main call to action
     - glass  : dark translucent surface + hairline border, for everything else
     - on     : the selected item in a segmented control or an active icon
                button, shown as a pink-tinted glass rather than a second
                full-strength gradient competing with the CTA */
:root {
    --sq-accent: #ff2d87;
    --sq-accent-rgb: 255, 45, 135;
    --sq-accent-grad: linear-gradient(135deg, #ff5a9e 0%, #f0247f 48%, #c8127a 100%);
    --sq-accent-glow: 0 8px 24px rgba(255, 45, 135, .38), inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -1px 0 rgba(0, 0, 0, .18);
    --sq-accent-glow-hover: 0 12px 30px rgba(255, 45, 135, .52), inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .18);
    --sq-glass: rgba(22, 12, 40, .55);
    --sq-glass-hover: rgba(40, 20, 62, .7);
    --sq-glass-border: rgba(255, 255, 255, .13);
    --sq-on-bg: rgba(255, 45, 135, .16);
    --sq-on-border: rgba(255, 45, 135, .55);
    --sq-on-text: #ffd3e6;
    --sq-text: #e9e4f7;
    --sq-text-dim: #b9b0d6;
    /* semantic actions (accept / reject / delete) keep their meaning colour,
       but every page draws them from these two instead of its own shades */
    --sq-ok-grad: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --sq-ok-rgb: 16, 185, 129;
    --sq-danger-grad: linear-gradient(135deg, #ff6b81 0%, #e11d48 100%);
    --sq-danger-rgb: 225, 29, 72;
    --sq-danger-text: #ff9aac;
}

/* Generic buttons from the template (btn-main) and Bootstrap (.btn-*) that
   pages use directly. body.dark-scheme lifts the specificity above
   coloring.css / bootstrap without !important. */
body.dark-scheme a.btn-main,
body.dark-scheme .btn-main,
body.dark-scheme .btn.btn-primary,
body.dark-scheme .btn.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--sq-accent-grad);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--sq-accent-glow);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

    body.dark-scheme a.btn-main:hover,
    body.dark-scheme .btn-main:hover,
    body.dark-scheme .btn.btn-primary:hover,
    body.dark-scheme .btn.btn-success:hover {
        color: #fff;
        transform: translateY(-2px);
        filter: brightness(1.06);
        box-shadow: var(--sq-accent-glow-hover);
    }

    body.dark-scheme .btn-main:disabled,
    body.dark-scheme .btn.btn-primary:disabled {
        opacity: .5;
        transform: none;
        filter: grayscale(.4);
        box-shadow: none;
        cursor: not-allowed;
    }

/* approve/confirm in admin flows reads as "go" - green, same shape */
body.dark-scheme .btn.btn-success {
    background: var(--sq-ok-grad);
    box-shadow: 0 8px 22px rgba(var(--sq-ok-rgb), .32), inset 0 1px 0 rgba(255,255,255,.3);
}

    body.dark-scheme .btn.btn-success:hover {
        box-shadow: 0 12px 28px rgba(var(--sq-ok-rgb), .45), inset 0 1px 0 rgba(255,255,255,.3);
    }

body.dark-scheme .btn.btn-secondary,
body.dark-scheme .btn.btn-light,
body.dark-scheme .btn.btn-info,
body.dark-scheme .btn.btn-outline-primary {
    border-radius: 999px;
    border: 1px solid var(--sq-glass-border);
    background: var(--sq-glass);
    color: var(--sq-text);
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

    body.dark-scheme .btn.btn-secondary:hover,
    body.dark-scheme .btn.btn-light:hover,
    body.dark-scheme .btn.btn-info:hover,
    body.dark-scheme .btn.btn-outline-primary:hover {
        color: #fff;
        background: var(--sq-glass-hover);
        border-color: var(--sq-on-border);
        transform: translateY(-2px);
    }

body.dark-scheme .btn.btn-danger,
body.dark-scheme .btn.btn-outline-danger {
    border-radius: 999px;
    border: 1px solid rgba(var(--sq-danger-rgb), .45);
    background: rgba(var(--sq-danger-rgb), .14);
    color: var(--sq-danger-text);
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

    body.dark-scheme .btn.btn-danger:hover,
    body.dark-scheme .btn.btn-outline-danger:hover {
        color: #fff;
        background: var(--sq-danger-grad);
        border-color: transparent;
        box-shadow: 0 8px 20px rgba(var(--sq-danger-rgb), .35);
        transform: translateY(-2px);
    }

body.dark-scheme .btn.btn-link {
    color: var(--sq-on-text);
    text-decoration: none;
    font-weight: 600;
}

    body.dark-scheme .btn.btn-link:hover {
        color: #fff;
    }

/* MudBlazor dialogs (Dialog / GenericDialog) */
body.dark-scheme .mud-button-filled.mud-button-filled-primary {
    border-radius: 999px;
    background: var(--sq-accent-grad);
    color: #fff;
    box-shadow: var(--sq-accent-glow);
}

body.dark-scheme .mud-button-text.mud-button-text-primary,
body.dark-scheme .mud-button-outlined.mud-button-outlined-primary {
    border-radius: 999px;
    color: var(--sq-on-text);
    border-color: var(--sq-on-border);
}

/* Bootstrap inputs default to a white box, which glared next to the dark
   MudBlazor fields on the same forms (e.g. the login captcha). */
body.dark-scheme .form-control,
body.dark-scheme .form-select {
    background-color: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    border-radius: 10px;
}

    body.dark-scheme .form-control::placeholder {
        color: rgba(233,228,247,.45);
    }

    body.dark-scheme .form-control:focus,
    body.dark-scheme .form-select:focus {
        background-color: rgba(255,255,255,.06);
        border-color: var(--sq-on-border);
        color: #fff;
        box-shadow: 0 0 0 3px rgba(var(--sq-accent-rgb), .18);
    }

    body.dark-scheme .form-control:disabled,
    body.dark-scheme .form-control[readonly] {
        background-color: rgba(255,255,255,.02);
        color: #cbd5e1;
    }

/* Radzen's default-base theme is light with a blue accent - its date picker
   was a white box with a white calendar on the edit-profile form. */
body.dark-scheme .rz-datepicker .rz-inputtext,
body.dark-scheme .rz-dropdown,
body.dark-scheme .rz-dropdown .rz-inputtext {
    background: transparent;
    color: #fff;
    border: none;
    box-shadow: none;
}

body.dark-scheme .rz-datepicker-trigger,
body.dark-scheme .rz-dropdown-trigger {
    color: var(--sq-text-dim);
}

body.dark-scheme .rz-datepicker-popup-container,
body.dark-scheme .rz-dropdown-panel,
body.dark-scheme .rz-popup {
    background: #1a1233;
    color: var(--sq-text);
    border: 1px solid var(--sq-glass-border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.6);
}

body.dark-scheme .rz-calendar-header {
    background: rgba(255,255,255,.04);
    color: #fff;
}

body.dark-scheme .rz-calendar-view th,
body.dark-scheme .rz-calendar-view td span,
body.dark-scheme .rz-dropdown-item,
body.dark-scheme .rz-calendar-header .rz-button {
    color: var(--sq-text);
}

body.dark-scheme .rz-calendar-other-month,
body.dark-scheme .rz-calendar-other-month span {
    color: rgba(233,228,247,.3) !important;
}

body.dark-scheme .rz-calendar-view td span:hover,
body.dark-scheme .rz-dropdown-item:hover {
    background: var(--sq-glass-hover);
    color: #fff;
}

body.dark-scheme .rz-state-active,
body.dark-scheme .rz-dropdown-item.rz-state-highlight {
    background: var(--sq-accent-grad) !important;
    color: #fff !important;
}

body.dark-scheme .form-select option {
    background: #140f28;
    color: #f1f5f9;
}

body.dark-scheme .btn-check:focus + .btn,
body.dark-scheme .btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    box-shadow: none;
}

/*#endregion */

/*#region Home page sections (sq-*)

   Shared shell used by the home page's added sections (hero CTA, live stats,
   how-it-works, leaderboard, closing CTA). Everything here is namespaced with
   an sq- prefix and adds new classes only - no existing template class is
   redefined, so the rest of the site renders exactly as before.
   Colours come from the active scheme (css/colors/scheme-*.css). */

.sq-sec {
    padding: 64px 0;
}

.sq-sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.sq-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.sq-sec-title {
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 900;
    letter-spacing: -.015em;
    color: #fff;
    margin: 0;
}

/* buttons - built on the --sq-* button tokens above; the header's login
   button and toggles use the same tokens, so the whole page reads as one set. */
.sq-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 58px;
    padding: 10px 30px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.35;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background .2s ease, border-color .2s ease;
}

    .sq-btn:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }

.sq-btn-primary {
    background: var(--sq-accent-grad);
    border-color: rgba(255,255,255,.16);
    color: #fff;
    box-shadow: var(--sq-accent-glow);
}

    .sq-btn-primary:hover {
        color: #fff;
        transform: translateY(-2px);
        filter: brightness(1.06);
        box-shadow: var(--sq-accent-glow-hover);
    }

.sq-btn-note {
    font-size: 11px;
    font-weight: 600;
    opacity: .85;
}

.sq-btn-ghost {
    background: var(--sq-glass);
    border-color: var(--sq-glass-border);
    color: var(--sq-text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .sq-btn-ghost:hover {
        color: #fff;
        background: var(--sq-glass-hover);
        border-color: var(--sq-on-border);
        transform: translateY(-2px);
    }

/* hero additions */
.sq-hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 26px;
}

.sq-live {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--sq-glass);
    border: 1px solid var(--sq-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sq-text);
}

.sq-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc97;
    box-shadow: 0 0 0 3px rgba(61,220,151,.18);
    animation: sq-pulse 2.2s ease-in-out infinite;
}

@keyframes sq-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }
}

/* live stats strip */
.sq-statstrip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
    padding: 8px;
    border-radius: 26px;
    background: var(--sq-glass);
    border: 1px solid var(--sq-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 34px rgba(0,0,0,.4);
}

.sq-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 18px;
}

.sq-stat-div {
    width: 1px;
    height: 26px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,.16), transparent);
}

.sq-stat-ic {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.sq-stat-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: start;
}

    .sq-stat-txt b {
        font-size: 18px;
        font-weight: 800;
        color: #fff;
    }

    .sq-stat-txt small {
        font-size: 11px;
        color: var(--sq-text-dim);
    }

.sq-gold {
    background: linear-gradient(90deg, #ffd66b, #ffb84d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sq-ic-violet {
    background: linear-gradient(150deg, rgba(var(--primary-color-rgb),.42), rgba(var(--primary-color-rgb),.08));
}

.sq-ic-blue {
    background: linear-gradient(150deg, rgba(var(--secondary-color-rgb),.42), rgba(var(--secondary-color-rgb),.08));
}

.sq-ic-pink {
    background: linear-gradient(150deg, rgba(var(--tertiary-color-rgb),.42), rgba(var(--tertiary-color-rgb),.08));
}

.sq-ic-gold {
    background: linear-gradient(150deg, rgba(255,201,77,.34), rgba(255,201,77,.07));
}

/* how it works - numbered because these really are sequential steps */
.sq-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.sq-step {
    position: relative;
    padding: 30px 26px 26px;
    border-radius: 18px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.09);
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

    .sq-step:hover {
        transform: translateY(-4px);
        border-color: var(--sq-on-border);
        background: rgba(255,255,255,.06);
    }

.sq-step-num {
    position: absolute;
    top: -18px;
    inset-inline-start: 26px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sq-accent-grad);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(var(--sq-accent-rgb), .4), inset 0 1px 0 rgba(255,255,255,.3);
}

.sq-step h4 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
}

.sq-step p {
    font-size: 14px;
    color: #92939e;
    margin: 0;
}

/* closing CTA */
.sq-finale {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(20,14,44,.95), rgba(10,8,26,.95));
    border: 1px solid rgba(var(--sq-accent-rgb), .28);
}

.sq-finale-glow {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    top: -330px;
    inset-inline-start: 50%;
    transform: translateX(50%);
    background: radial-gradient(circle, rgba(var(--tertiary-color-rgb), .35), transparent 65%);
    filter: blur(70px);
    pointer-events: none;
}

.sq-finale-in {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 56px 28px;
}

    .sq-finale-in h2 {
        font-size: clamp(22px, 3vw, 30px);
        font-weight: 900;
        color: #fff;
        margin: 0;
    }

    .sq-finale-in p {
        font-size: 15px;
        color: #92939e;
        max-width: 52ch;
        margin: 0;
    }

@media (max-width: 960px) {
    .sq-steps {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 640px) {
    .sq-sec {
        padding: 46px 0;
    }

    .sq-statstrip .sq-stat-div {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sq-live-dot {
        animation: none;
    }
}

/*#endregion */

/*#region Global dialog close button
   Shared "×" for custom-bodied dialogs. These dialogs are opened with
   NoHeader = true + BackgroundClass = "transparent-dialog", so MudBlazor's own
   header close button is not available - this gives every one of them the same
   dismiss affordance in the same spot.

   Usage: give the dialog's root element .sqg-dlg (it just needs to be a
   positioned ancestor) and add, as its first child:

       <button type="button" class="sqg-dlg-x" @onclick="Close">
           <svg viewBox="0 0 24 24"><path d="M7 7l10 10M17 7L7 17" /></svg>
       </button>
*/
.sqg-dlg {
    position: relative;
}

.sqg-dlg-x {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 9px;
    cursor: pointer;
    color: #a79ee0;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .09);
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

    .sqg-dlg-x:hover {
        color: #fff;
        background: rgba(255, 77, 77, .16);
        border-color: rgba(255, 90, 90, .38);
        transform: rotate(90deg);
    }

    .sqg-dlg-x:focus-visible {
        outline: 2px solid rgba(var(--primary-color-rgb), .8);
        outline-offset: 2px;
    }

/* style.css gives EVERY .mud-dialog a card surface (gradient + violet border
   + 20px radius + shadow). Most dialogs here render their own card inside it,
   so that surface showed up as a second, larger empty frame around the real
   card - very obvious on dialogs opened with FullWidth + MaxWidth.False,
   where the outer frame spans the whole screen.

   app.js tags exactly those dialogs (the ones whose only visual child is the
   component's own card) with .sqg-dlg-bare, so the redundant outer surface
   can be dropped while dialogs that genuinely rely on it keep it. */
.mud-dialog.sqg-dlg-bare {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

    .sqg-dlg-x svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

@media (prefers-reduced-motion: reduce) {
    .sqg-dlg-x:hover {
        transform: none;
    }
}
/*#endregion */


/*#region Puzzle challenges (pz-*)

   Shared surface for the eleven puzzle duels. Everything the games in
   wwwroot/js/puzzles.js draw uses these classes, so all of them look like one
   family and a new game inherits the look for free. */

.pz-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pz-host { width: 100%; display: flex; justify-content: center; }

.pz-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    background: linear-gradient(160deg, rgba(20, 15, 40, 0.95), rgba(10, 8, 25, 0.98));
    color: #f1f5f9;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    max-width: 100%;
}

.pz-lead { font-size: 1rem; font-weight: 600; text-align: center; line-height: 1.9; }
.pz-lead b { color: #c4b5fd; }
.pz-note { font-size: 0.82rem; color: #8c86a8; text-align: center; line-height: 1.8; }
.pz-arrow { color: #8c86a8; font-size: 1.1rem; }
.pz-big-num { font-size: 1.5rem; font-weight: 700; color: #ffb930; font-variant-numeric: tabular-nums; }

.pz-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; justify-content: center; }
.pz-col { display: flex; flex-direction: column; gap: 13px; align-items: center; }
.pz-grid { display: grid; gap: 5px; direction: ltr; }

.pz-cell {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    border: 1px solid rgba(160, 140, 220, 0.14);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    font-variant-numeric: tabular-nums;
    transition: background 0.12s, border-color 0.12s;
}

    .pz-cell.sm { width: 36px; height: 36px; font-size: 0.85rem; }
    .pz-cell.pz-big { font-size: 1.5rem; }
    .pz-cell.dead { background: rgba(255, 255, 255, 0.015); border-color: transparent; color: #5b5578; cursor: default; }
    .pz-cell.on { background: rgba(139, 92, 246, 0.3); border-color: #8b5cf6; color: #fff; }
    .pz-cell.path { background: rgba(255, 185, 48, 0.2); border-color: #ffb930; color: #ffb930; }
    .pz-cell.head { background: #ffb930; border-color: #ffb930; color: #1a1000; }
    .pz-cell.ok { background: rgba(61, 220, 151, 0.22); border-color: #3ddc97; }
    .pz-cell.ghost { background: rgba(139, 92, 246, 0.28); border-color: #c4b5fd; }

.pz-chip {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(160, 140, 220, 0.2);
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    user-select: none;
    font-variant-numeric: tabular-nums;
    transition: all 0.14s;
}

    .pz-chip.sel { background: rgba(139, 92, 246, 0.3); border-color: #8b5cf6; color: #fff; }
    .pz-chip.used { opacity: 0.3; cursor: not-allowed; }

.pz-opt {
    padding: 11px;
    border-radius: 11px;
    border: 1px solid rgba(160, 140, 220, 0.2);
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.14s;
}

    .pz-opt.on { background: rgba(61, 220, 151, 0.18); border-color: #3ddc97; }

.pz-pan {
    min-width: 170px;
    min-height: 120px;
    border: 1px dashed rgba(160, 140, 220, 0.25);
    border-radius: 14px;
    padding: 11px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.pz-slot { display: flex; flex-direction: column; align-items: center; gap: 3px; }
/* Drawn, not typed: in Vazir ● comes out barely bigger than ·. The glyph stays in the text. */
.pz-pegs { width: 10px; height: 10px; border-radius: 50%; font-size: 0; box-sizing: border-box; }
    .pz-pegs.hit { background: #c4b5fd; }
    .pz-pegs.near { border: 2px solid #c4b5fd; }
    .pz-pegs.miss { width: 4px; height: 4px; margin: 3px; background: #6f6890; }

.pz-btn {
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--sq-accent-grad);
    color: #fff;
    font-family: inherit;
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--sq-accent-glow);
    transition: transform .16s, box-shadow .16s, filter .16s, background .16s;
}

    .pz-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); box-shadow: var(--sq-accent-glow-hover); color: #fff; }
    .pz-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
    .pz-btn.ghost { background: var(--sq-glass); border-color: var(--sq-glass-border); color: var(--sq-text); box-shadow: none; }
    .pz-btn.ghost:hover:not(:disabled) { background: var(--sq-glass-hover); border-color: var(--sq-on-border); filter: none; box-shadow: none; }

/* How-to-play box at the top of every puzzle: the goal is always visible,
   the steps open on a tap. Same look as the older games' rules panel. */
.pz-guide {
    align-self: stretch;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

    .pz-guide summary {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
        cursor: pointer;
        list-style: none;
        font-size: 0.8rem;
        line-height: 1.8;
    }

        .pz-guide summary::-webkit-details-marker { display: none; }

.pz-guide-ic {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    color: #0b0916;
    background: #c3b0ff;
}

.pz-guide-goal { flex: 1; font-weight: 600; color: #e9e4ff; }

.pz-guide-more {
    flex: none;
    margin-top: 1px;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #c3b0ff;
    border: 1px solid rgba(195, 176, 255, 0.35);
}

    .pz-guide[open] .pz-guide-more { background: rgba(195, 176, 255, 0.15); }

.pz-guide-list {
    margin: 0;
    padding: 0 0 12px;
    padding-inline: 30px 14px;
    font-size: 0.78rem;
    line-height: 1.95;
    color: #b9b2d8;
}

@media (max-width: 560px) {
    .pz-cell { width: 34px; height: 34px; font-size: 0.85rem; }
    .pz-cell.sm { width: 29px; height: 29px; }
    .pz-root { padding: 12px; gap: 11px; }
}

/*#endregion */

/*#region Decline-invitation dialog (RejectChallengeDialog)
   Two choice cards (lose score / pay coins), the player's coins, then
   cancel + confirm. Uses the ux- buttons and chips from ui.css. */
.rjd {
    width: min(420px, calc(100vw - 32px));
    padding: 20px 18px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(40, 24, 70, .97), rgba(20, 14, 38, .98));
    border: 1px solid var(--sq-glass-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    color: var(--sq-text);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rjd-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-inline-end: 34px; /* room for the shared × */
}

.rjd-head-ic {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--sq-danger-text);
    background: rgba(var(--sq-danger-rgb), .14);
    border: 1px solid rgba(var(--sq-danger-rgb), .4);
}

.rjd-title { font-size: 17px; line-height: 1.4; }
.rjd-sub { font-size: 13px; color: var(--sq-text-dim); }

.rjd-opts { display: flex; flex-direction: column; gap: 10px; }

.rjd-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    text-align: start;
    font-family: inherit;
    color: var(--sq-text);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .rjd-opt:hover { background: rgba(255, 255, 255, .07); }

    .rjd-opt.on {
        background: var(--sq-on-bg);
        border-color: var(--sq-on-border);
    }

    .rjd-opt.off { opacity: .55; cursor: not-allowed; }
    .rjd-opt.off:hover { background: rgba(255, 255, 255, .04); }

    .rjd-opt:focus-visible { outline: 2px solid rgba(var(--sq-accent-rgb), .8); outline-offset: 2px; }

.rjd-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .35);
    position: relative;
}

.rjd-opt.on .rjd-dot { border-color: var(--sq-accent); }

    .rjd-opt.on .rjd-dot::after {
        content: "";
        position: absolute;
        inset: 3px;
        border-radius: 50%;
        background: var(--sq-accent);
    }

.rjd-opt-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; line-height: 1.45; }
.rjd-opt-text b { font-size: 15px; }
.rjd-opt-text small { font-size: 12.5px; color: var(--sq-text-dim); }

.rjd-foot-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    font-size: 12.5px;
    color: var(--sq-text-dim);
}

.rjd-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/*#endregion */
