:root {
    --bg: #0f1117;
    --bg-soft: #151823;
    --card: #1b1f2d;
    --card-light: #222739;

    --text: #f5f7fb;
    --muted: #9da6bd;

    --border: rgba(255, 255, 255, 0.09);

    --left: #ef4444;
    --left-soft: rgba(239, 68, 68, 0.14);

    --right: #3b82f6;
    --right-soft: rgba(59, 130, 246, 0.14);

    --green: #22c55e;
    --gold: #f59e0b;

    --shadow: rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 32%),
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.08), transparent 32%),
        var(--bg);
    overflow-x: hidden;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

/* HEADER */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px var(--shadow);
    font-size: 24px;
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.55rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.brand p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.nav-actions .small-btn {
    white-space: nowrap;
}

.small-btn {
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--card);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.small-btn:hover {
    transform: translateY(-2px);
    background: var(--card-light);
    border-color: rgba(255, 255, 255, 0.16);
}

.small-btn-gold {
    color: #111827;
    background: var(--gold);
    border-color: rgba(245, 158, 11, 0.6);
}

/* MAIN GAME CARD */

.game-shell {
    position: relative;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px var(--shadow);
    overflow: hidden;
}

/* TOP BATTLE COUNTDOWN */

.battle-countdown {
    padding: 16px 20px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.battle-countdown-floating {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    width: min(300px, calc(100% - 44px));
    backdrop-filter: blur(10px);
    transition: bottom 0.2s ease;
}

.battle-countdown-floating.is-above-footer {
    bottom: 140px;
}

.battle-countdown span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.battle-countdown strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

/* BILLBOARD */

.billboard {
    width: min(1080px, 88%);
    aspect-ratio: 4 / 1;
    min-height: 120px;
    max-height: 190px;
    margin: 24px auto 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        var(--card);
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    z-index: 4;
    overflow: hidden;
}

.billboard::before,
.billboard::after {
    content: "";
    position: absolute;
    bottom: -36px;
    width: 8px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0 0 8px 8px;
}

.billboard::before {
    left: 28%;
}

.billboard::after {
    right: 28%;
}

.billboard-inner {
    padding: 16px;
}

.billboard-label {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.billboard h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    letter-spacing: -0.035em;
}

.billboard p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.93rem;
}

/* ARENA */

.arena {
    --shift: 0px;

    position: relative;
    min-height: 390px;
    margin-top: 16px;
    overflow: hidden;
}

.arena::before {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 40px;
    height: 90px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.045);
    z-index: 0;
}

.arena-bg-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 62%, var(--left-soft), transparent 24%),
        radial-gradient(circle at 82% 62%, var(--right-soft), transparent 24%);
    pointer-events: none;
    z-index: 1;
}

.center-line {
    position: absolute;
    left: 50%;
    bottom: 76px;
    width: 2px;
    height: 170px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.18);
    z-index: 1;
}

.center-line::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -6px;
    width: 12px;
    height: 12px;
    transform: translateX(-50%);
    background: var(--muted);
    border-radius: 50%;
    opacity: 0.45;
}

/* FIGHTERS */

.fighter {
    position: absolute;
    bottom: 82px;
    width: 200px;
    max-width: 34vw;
    display: grid;
    justify-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 3;
    transition:
        transform 0.16s ease,
        opacity 0.16s ease;
}

.fighter-left {
    left: 8%;
    transform: translateX(calc(var(--shift) * 0.16));
}

.fighter-right {
    right: 8%;
    transform: translateX(calc(var(--shift) * 0.16));
}

.fighter:hover {
    opacity: 0.94;
}

.fighter-left:hover {
    transform: translateX(calc(var(--shift) * 0.16)) translateY(-3px);
}

.fighter-right:hover {
    transform: translateX(calc(var(--shift) * 0.16)) translateY(-3px);
}

.fighter-avatar {
    width: 128px;
    height: 128px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 62px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    user-select: none;
}

.fighter-left .fighter-avatar {
    background:
        linear-gradient(135deg, var(--left-soft), rgba(255, 255, 255, 0.025)),
        var(--card);
    border-color: rgba(239, 68, 68, 0.22);
}

.fighter-right .fighter-avatar {
    background:
        linear-gradient(135deg, var(--right-soft), rgba(255, 255, 255, 0.025)),
        var(--card);
    border-color: rgba(59, 130, 246, 0.24);
}

.fighter-name {
    margin-top: 12px;
    padding: 8px 13px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.fighter-click-label {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.side-clicked .fighter-avatar {
    animation: simplePop 0.16s ease;
}

@keyframes simplePop {
    0% {
        transform: scale(1);
    }

    55% {
        transform: scale(1.07);
    }

    100% {
        transform: scale(1);
    }
}

/* ROPE */

.rope-area {
    position: absolute;
    left: 11%;
    right: 11%;
    bottom: 174px;
    height: 40px;
    z-index: 2;
}

.rope {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 8px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #9ca3af;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

.rope-knot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #e5e7eb;
    border: 4px solid #9ca3af;
    transform: translate(calc(-50% + var(--shift)), -50%);
    transition: transform 0.18s ease;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

/* HUD */

.hud {
    display: grid;
    grid-template-columns: 1fr minmax(210px, 300px) 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.14);
}

.hud-side {
    display: grid;
    gap: 8px;
}

.hud-side span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hud-side strong {
    font-size: 1.2rem;
}

.hud-side-right {
    text-align: right;
}

.power-meter {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.power-meter-fill {
    height: 100%;
    width: 50%;
    border-radius: inherit;
    background: var(--right);
    transition: width 0.18s ease;
}

.power-meter-fill-enemy {
    background: var(--left);
}

.game-status {
    text-align: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
}

.game-status strong {
    display: block;
    font-size: 1rem;
}

.game-status span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.86rem;
}

/* ACTION BUTTONS */

.battle-actions {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.battle-btn {
    border: 1px solid transparent;
    min-height: 66px;
    border-radius: 18px;
    color: white;
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    transition:
        transform 0.12s ease,
        filter 0.12s ease,
        border-color 0.12s ease;
}

.battle-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.battle-btn:active {
    transform: translateY(1px) scale(0.99);
}

.battle-btn-left {
    background: var(--left);
    border-color: rgba(239, 68, 68, 0.45);
}

.battle-btn-right {
    background: var(--right);
    border-color: rgba(59, 130, 246, 0.45);
}

.hint {
    margin: 13px auto 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 0.94rem;
    text-align: center;
    line-height: 1.5;
}

/* STATS */

.stats-row {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card,
.latest-result {
    padding: 16px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.stat-card {
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    line-height: 1.1;
}

.stat-card span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

.latest-result {
    margin-top: 14px;
    text-align: center;
}

.latest-result strong {
    display: block;
    margin-bottom: 6px;
}

.latest-result p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hud {
        grid-template-columns: 1fr;
    }

    .hud-side-right {
        text-align: left;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .fighter {
        width: 150px;
    }

    .fighter-avatar {
        width: 104px;
        height: 104px;
        border-radius: 24px;
        font-size: 52px;
    }

    .fighter-left {
        left: 3%;
    }

    .fighter-right {
        right: 3%;
    }

    .rope-area {
        left: 6%;
        right: 6%;
    }
}

@media (max-width: 620px) {
    .page {
        width: min(100% - 22px, 1120px);
        padding-top: 18px;
    }

    .brand {
        align-items: flex-start;
    }

    .logo {
        width: 44px;
        height: 44px;
        border-radius: 13px;
        font-size: 22px;
    }

    .nav-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .nav-actions .small-btn {
        flex: 1;
        text-align: center;
    }

    .user-pill {
        width: 100%;
        justify-content: space-between;
    }

    .game-shell {
        border-radius: 20px;
    }

    .billboard {
        width: 90%;
        min-height: 96px;
    }

    .arena {
        min-height: 330px;
    }

    .fighter {
        bottom: 76px;
        max-width: 43vw;
    }

    .fighter-name {
        font-size: 0.72rem;
        padding: 7px 10px;
    }

    .fighter-click-label {
        font-size: 0.74rem;
    }

    .rope-area {
        bottom: 154px;
    }

    .rope-knot {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .battle-actions {
        grid-template-columns: 1fr;
    }

    .battle-btn {
        min-height: 60px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* DISABLED / SELECTED VOTE STATES */

button:disabled {
    cursor: not-allowed;
}

.is-disabled {
    opacity: 0.42;
    filter: grayscale(0.15);
}

.is-disabled.is-selected {
    opacity: 1;
    filter: none;
}

/* IMPROVED SELECTED VOTE STATE */

.is-selected {
    opacity: 1;
}

/* Selected fighter card */
.fighter.is-selected {
    position: absolute;
}

.fighter.is-selected .fighter-avatar {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.16),
        0 0 0 8px rgba(255, 255, 255, 0.045),
        0 18px 42px rgba(0, 0, 0, 0.35);
}

/* Left selected glow */
.fighter-left.is-selected .fighter-avatar {
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow:
        0 0 0 1px rgba(239, 68, 68, 0.65),
        0 0 0 8px rgba(239, 68, 68, 0.13),
        0 18px 42px rgba(239, 68, 68, 0.16),
        0 18px 42px rgba(0, 0, 0, 0.32);
}

/* Right selected glow */
.fighter-right.is-selected .fighter-avatar {
    border-color: rgba(59, 130, 246, 0.75);
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.7),
        0 0 0 8px rgba(59, 130, 246, 0.14),
        0 18px 42px rgba(59, 130, 246, 0.18),
        0 18px 42px rgba(0, 0, 0, 0.32);
}

/* Your Vote badge on selected fighter */
.fighter.is-selected::after {
    content: "Your Vote";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.fighter-left.is-selected::after {
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.fighter-right.is-selected::after {
    border-color: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

/* Selected vote button */
.battle-btn.is-selected {
    opacity: 1;
    position: relative;
    transform: translateY(-1px);
}

.battle-btn.is-selected::after {
    content: "Locked In";
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.battle-btn-left.is-selected {
    box-shadow:
        0 0 0 1px rgba(239, 68, 68, 0.55),
        0 0 0 6px rgba(239, 68, 68, 0.13),
        0 18px 38px rgba(239, 68, 68, 0.18);
}

.battle-btn-right.is-selected {
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.55),
        0 0 0 6px rgba(59, 130, 246, 0.13),
        0 18px 38px rgba(59, 130, 246, 0.18);
}

/* VOTE CONFIRMATION MODAL */

.vote-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
}

.vote-modal.is-open {
    display: block;
}

.vote-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
}

.vote-modal-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(440px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.vote-modal-card h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.vote-modal-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.vote-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.modal-btn {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 800;
    cursor: pointer;
}

.modal-btn-cancel {
    background: transparent;
    color: var(--text);
}

.modal-btn-confirm {
    background: var(--green);
    color: #052e14;
    border-color: rgba(34, 197, 94, 0.45);
}

.modal-btn:hover {
    filter: brightness(1.05);
}

.modal-btn:disabled {
    opacity: 0.65;
}

@media (max-width: 620px) {
    .vote-modal-actions {
        grid-template-columns: 1fr;
    }
}

/* LEADERBOARD */

.leaderboard-card {
    margin-top: 14px;
    padding: 18px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.leaderboard-header strong {
    display: block;
    font-size: 1.1rem;
}

.leaderboard-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.leaderboard-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.leaderboard-item,
.leaderboard-empty {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
}

.leaderboard-empty {
    display: block;
    color: var(--muted);
    text-align: center;
}

.leaderboard-rank {
    color: var(--muted);
    font-weight: 800;
}

.leaderboard-name {
    font-weight: 750;
}

.leaderboard-score {
    font-size: 1.05rem;
}

/* AUTH PAGES */

.auth-wrap {
    min-height: 520px;
    display: grid;
    place-items: center;
    padding: 24px 0;
}

.auth-card {
    width: min(460px, 100%);
    padding: 24px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    letter-spacing: -0.045em;
}

.auth-header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.auth-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fecaca;
    font-weight: 700;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 7px;
}

.auth-form label span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    padding: 13px 14px;
    outline: none;
}

.auth-form input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.auth-submit {
    margin-top: 6px;
    border: 0;
    border-radius: 16px;
    padding: 14px 16px;
    background: var(--right);
    color: white;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(59, 130, 246, 0.18);
}

.auth-submit:hover {
    filter: brightness(1.05);
}

.auth-switch {
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--text);
    font-weight: 800;
}

/* LOGGED-IN USER HEADER */

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 12px;
    padding: 9px 13px;
    color: var(--text);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    white-space: nowrap;
}

.user-pill span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.user-pill strong {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 900;
}

@media (max-width: 620px) {
    .user-pill {
        width: 100%;
        justify-content: space-between;
    }
}

/* LOGIN REQUIRED VOTING */

.login-required-box {
    margin: 14px auto 0;
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.28);
    text-align: center;
}

.login-required-box strong {
    display: block;
    font-size: 1.05rem;
}

.login-required-box p {
    margin: 6px 0 14px;
    color: var(--muted);
}

.login-required-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.login-required-box.attention {
    animation: loginAttention 0.7s ease;
}

@keyframes loginAttention {
    0% {
        transform: scale(1);
        border-color: rgba(245, 158, 11, 0.28);
    }

    35% {
        transform: scale(1.015);
        border-color: rgba(245, 158, 11, 0.75);
    }

    100% {
        transform: scale(1);
        border-color: rgba(245, 158, 11, 0.28);
    }
}

.battle-btn.requires-login {
    opacity: 0.82;
}

.battle-btn.requires-login::after {
    content: "Login Required";
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 620px) {
    .login-required-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* WINNER RESULT MODAL */

.winner-reopen-btn {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.winner-reopen-btn:hover {
    background: rgba(255, 255, 255, 0.075);
}

.winner-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1100;
}

.winner-modal.is-open {
    display: block;
}

.winner-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(7px);
}

.winner-modal-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(500px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.winner-modal-label {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.winner-modal-card h2 {
    margin: 0;
    font-size: clamp(1.7rem, 5vw, 2.4rem);
    letter-spacing: -0.05em;
}

.winner-modal-card>p:not(.winner-modal-label) {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.winner-score-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.winner-score-row div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.winner-score-row span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.winner-score-row strong {
    display: block;
    margin-top: 6px;
    font-size: 1.7rem;
}

.winner-user-result {
    margin-top: 16px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.075);
    color: var(--muted);
    font-weight: 750;
    line-height: 1.45;
}

.winner-user-result-win {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

.winner-user-result-loss {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.24);
    color: #fecaca;
}

.winner-close-btn {
    width: 100%;
    margin-top: 18px;
}

@media (max-width: 620px) {
    .winner-score-row {
        grid-template-columns: 1fr;
    }
}

/* LATEST WINNER BUTTON ONLY */

.latest-result-button-only {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px;
}

.latest-result-button-only[hidden] {
    display: none;
}

.latest-result-button-only .winner-reopen-btn {
    margin-top: 0;
}

/* ACTIVE BILLBOARD ADS */

.billboard {
    overflow: hidden;
}

.billboard-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.billboard-link[hidden] {
    display: none;
}

.billboard-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.billboard.has-active-ad {
    border-color: rgba(245, 158, 11, 0.34);
}

.billboard.has-image-ad {
    padding: 0;
}

/* SIMPLE ADMIN */

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.admin-card {
    padding: 22px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.admin-card h2 {
    margin: 0 0 18px;
    font-size: 1.35rem;
    letter-spacing: -0.035em;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

.auth-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    padding: 13px 14px;
    outline: none;
}

.auth-form select:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-muted {
    color: var(--muted);
}

.admin-ad-list {
    display: grid;
    gap: 10px;
}

.admin-ad-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-ad-item strong {
    display: block;
}

.admin-ad-item p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ADMIN APPROVAL CONTROLS */

.admin-ad-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
}

.admin-ad-item a {
    color: var(--text);
    font-weight: 800;
}

.admin-ad-actions {
    display: grid;
    gap: 8px;
    min-width: 120px;
}

.admin-action-btn {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 11px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    font-weight: 850;
    cursor: pointer;
}

.admin-action-btn:hover {
    filter: brightness(1.08);
}

.admin-action-btn.approve {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.34);
    color: #bbf7d0;
}

.admin-action-btn.reject,
.admin-action-btn.delete {
    background: rgba(239, 68, 68, 0.13);
    border-color: rgba(239, 68, 68, 0.30);
    color: #fecaca;
}

.admin-action-btn.deactivate {
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.30);
    color: #fde68a;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.status-active {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

.status-expired {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

@media (max-width: 700px) {
    .admin-ad-item {
        grid-template-columns: 1fr;
    }

    .admin-ad-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* WIDE FORM CARD */

.auth-card-wide {
    width: min(620px, 100%);
}

/* BILLBOARD SUBMISSION SCHEDULE */

.ad-schedule-box {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.ad-schedule-box>strong {
    display: block;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.02rem;
}

.ad-schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ad-schedule-grid div {
    padding: 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.065);
    text-align: center;
}

.ad-schedule-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-schedule-grid p {
    margin: 7px 0 0;
    color: var(--text);
    line-height: 1.45;
    font-weight: 750;
}

@media (max-width: 620px) {
    .ad-schedule-grid {
        grid-template-columns: 1fr;
    }
}

/* ADMIN WEEKLY BID SUMMARY */

.admin-bid-summary {
    grid-column: 1 / -1;
}

.bid-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.bid-summary-box {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.065);
}

.bid-summary-box span,
.highest-bid-card span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bid-summary-box strong {
    display: block;
    margin-top: 7px;
    line-height: 1.45;
}

.highest-bid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.highest-bid-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.065);
}

.highest-bid-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.15rem;
}

.highest-bid-card p {
    margin: 7px 0 0;
    color: var(--muted);
}

.highest-bid-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.highest-bid-approved {
    border-color: rgba(34, 197, 94, 0.24);
    background: rgba(34, 197, 94, 0.07);
}

.highest-bid-pending {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.07);
}

@media (max-width: 700px) {

    .bid-summary-grid,
    .highest-bid-row {
        grid-template-columns: 1fr;
    }
}

/* CLEAN REVIEW ADS DASHBOARD */

.admin-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.admin-card-full,
.admin-bid-summary {
    grid-column: 1 / -1;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.admin-card-header h2 {
    margin: 0;
}

.admin-card-header p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.recent-compact-list .admin-ad-item {
    opacity: 0.95;
}

/* Admin modal */

.admin-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1200;
}

.admin-modal.is-open {
    display: block;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(7px);
}

.admin-modal-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    transform: translate(-50%, -50%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.admin-modal-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.admin-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-close:hover {
    background: rgba(255, 255, 255, 0.075);
}

/* Add approved status color */

.status-approved {
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
}

/* Make admin action buttons work better in dashboard cards */

.admin-ad-item {
    min-width: 0;
}

.admin-ad-actions form {
    margin: 0;
}

@media (max-width: 950px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
}

/* NOTIFICATIONS PAGE */

.notifications-card {
    padding: 22px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.notifications-header h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.notifications-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.notifications-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.065);
}

.notification-item.is-unread {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.notification-item strong {
    display: block;
}

.notification-item p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.notification-item span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.notification-read-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.notification-read-btn:hover {
    background: rgba(255, 255, 255, 0.075);
}

.empty-state {
    padding: 28px;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.065);
}

.empty-state strong {
    display: block;
    font-size: 1.15rem;
}

.empty-state p {
    margin: 8px 0 0;
    color: var(--muted);
}

@media (max-width: 700px) {

    .notifications-header,
    .notification-item {
        grid-template-columns: 1fr;
    }
}

/* HEADER NOTIFICATION BADGE */

.notification-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.notification-badge {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--left);
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    padding: 0 6px;
    transform: translateY(-1px);
}

/* NOTIFICATION ACTION LINKS */

.notification-action-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 12px;
    padding: 9px 12px;
    background: rgba(59, 130, 246, 0.10);
    color: var(--text);
    font-weight: 850;
    text-decoration: none;
}

.notification-action-link:hover {
    background: rgba(59, 130, 246, 0.16);
}

/* COMMUNITY GUIDELINES */

.guidelines-card {
    padding: 24px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.guidelines-card h2 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    letter-spacing: -0.04em;
}

.guidelines-card>p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.guidelines-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.guidelines-section h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.guidelines-section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.guidelines-section ul {
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.7;
}

.guidelines-section li+li {
    margin-top: 6px;
}

/* USER BID UPDATE SECTION */

.your-bids-box {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.your-bids-box>strong {
    display: block;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.05rem;
}

.your-bids-list {
    display: grid;
    gap: 12px;
}

.your-bid-item {
    display: grid;
    grid-template-columns: 1fr minmax(190px, 240px);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.your-bid-item h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.your-bid-item p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.bid-note {
    font-size: 0.9rem;
}

.increase-bid-form {
    display: grid;
    gap: 9px;
}

.increase-bid-form label {
    display: grid;
    gap: 6px;
}

.increase-bid-form label span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.increase-bid-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    padding: 12px 13px;
    outline: none;
}

.increase-bid-form input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

@media (max-width: 700px) {
    .your-bid-item {
        grid-template-columns: 1fr;
    }
}

/* BID UPDATE CONFIRM MODAL */

.bid-confirm-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1300;
}

.bid-confirm-modal.is-open {
    display: block;
}

.bid-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(7px);
}

.bid-confirm-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(440px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.bid-confirm-card h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.bid-confirm-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.bid-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

/* UNDO BID UPDATE */

.undo-bid-box {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.32);
}

.undo-bid-box strong {
    display: block;
}

.undo-bid-box p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.4;
}

.undo-bid-btn {
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 13px;
    padding: 10px 13px;
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.undo-bid-btn:hover {
    background: rgba(245, 158, 11, 0.25);
}

.undo-bid-btn span {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.78rem;
}

@media (max-width: 620px) {
    .bid-confirm-actions {
        grid-template-columns: 1fr;
    }

    .undo-bid-box {
        align-items: stretch;
        flex-direction: column;
    }

    .undo-bid-btn {
        width: 100%;
    }
}

/* SUBMIT AD PAGE ORGANIZATION */

.submit-ad-actions-panel {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.submit-ad-actions-panel strong {
    display: block;
    font-size: 1.05rem;
}

.submit-ad-actions-panel p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.submit-ad-open-btn {
    width: auto;
    min-width: 180px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .submit-ad-actions-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-ad-open-btn {
        width: 100%;
    }
}

/* REMOVE REJECTED BID */

.remove-rejected-form {
    margin-top: 12px;
}

.remove-rejected-btn {
    border: 1px solid rgba(239, 68, 68, 0.32);
    border-radius: 12px;
    padding: 9px 12px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-weight: 850;
    cursor: pointer;
}

.remove-rejected-btn:hover {
    background: rgba(239, 68, 68, 0.18);
}

/* ADMIN BID UPDATE ACTIVITY */

.bid-update-list {
    display: grid;
    gap: 10px;
}

.bid-update-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.16);
}

.bid-update-item strong {
    display: block;
}

.bid-update-item p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.bid-update-item p strong {
    display: inline;
    color: var(--text);
}

.bid-update-item span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ADMIN FILTERS AND PAGINATION */

.admin-filter-bar {
    display: grid;
    grid-template-columns: 150px 150px 1fr auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.065);
}

.admin-filter-bar label {
    display: grid;
    gap: 6px;
}

.admin-filter-bar label span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-filter-bar input,
.admin-filter-bar select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    padding: 11px 12px;
    outline: none;
}

.admin-filter-bar input:focus,
.admin-filter-bar select:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.admin-search-field {
    min-width: 0;
}

.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.pagination-status {
    color: var(--muted);
    font-weight: 800;
}

.admin-pagination .is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 900px) {
    .admin-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .admin-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .admin-filter-bar {
        grid-template-columns: 1fr;
    }

    .admin-pagination {
        flex-direction: column;
    }
}

/* FIX SELECT DROPDOWN OPTION VISIBILITY */

select option {
    background: #1b1f2d;
    color: #f5f7fb;
}

select option:checked {
    background: #2563eb;
    color: #ffffff;
}

/* SHOW PASSWORD TOGGLE */

.show-password-toggle {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.show-password-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--right);
}

.show-password-toggle span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

/* USER STREAK FIRE BADGE */

.streak-fire-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(239, 68, 68, 0.16));
    border: 1px solid rgba(245, 158, 11, 0.36);
    color: #fff7ed;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
    box-shadow:
        0 0 0 3px rgba(245, 158, 11, 0.07),
        0 10px 24px rgba(0, 0, 0, 0.18);
}

.streak-fire-badge[hidden] {
    display: none;
}

.streak-fire-icon {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transform: translateY(-1px);
}

.streak-fire-badge strong {
    color: #fff7ed;
    font-size: 0.82rem;
    font-weight: 950;
}

/* MOBILE USER HEADER FIX */

@media (max-width: 620px) {
    .nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .nav-actions .user-pill {
        grid-column: 1 / -1;
    }

    .user-pill {
        display: grid;
        grid-template-columns: minmax(0, auto) auto 1fr;
        align-items: center;
        justify-content: start;
        gap: 8px;
        width: 100%;
    }

    .user-pill>span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-pill>strong:last-child {
        justify-self: end;
        white-space: nowrap;
    }

    .streak-fire-badge {
        justify-self: start;
        flex-shrink: 0;
    }

    .nav-actions .small-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* LOGOUT CONFIRMATION MODAL */

.logout-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1400;
}

.logout-modal.is-open {
    display: block;
}

.logout-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(7px);
}

.logout-modal-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(420px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.logout-modal-card h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.logout-modal-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.logout-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.logout-modal-confirm {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.logout-confirm-trigger {
    cursor: pointer;
}

@media (max-width: 620px) {
    .logout-modal-actions {
        grid-template-columns: 1fr;
    }
}

/* EXTERNAL LINK WARNING PAGE */

.external-warning-card {
    width: min(560px, 100%);
    margin: 80px auto 0;
    padding: 28px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
    text-align: center;
}

.external-warning-logo {
    margin: 0 auto 16px;
}

.external-warning-card h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    letter-spacing: -0.05em;
}

.external-warning-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.external-destination {
    margin-top: 20px;
    padding: 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.external-destination span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.external-destination strong {
    display: block;
    margin-top: 6px;
    word-break: break-word;
}

.external-warning-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.external-warning-actions .small-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 620px) {
    .external-warning-card {
        margin-top: 32px;
    }

    .external-warning-actions {
        grid-template-columns: 1fr;
    }
}

/* ADMIN CYCLE ACTION BUTTONS */

.admin-cycle-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.admin-cycle-actions form {
    margin: 0;
}

.admin-cycle-btn {
    min-width: 132px;
    min-height: 46px;
    padding: 10px 14px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
}

@media (max-width: 1050px) {
    .admin-card-header {
        flex-direction: column;
    }

    .admin-cycle-actions {
        width: 100%;
        justify-content: stretch;
    }

    .admin-cycle-actions form {
        flex: 1;
    }

    .admin-cycle-btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .admin-cycle-actions {
        flex-direction: column;
    }
}

/* BILLBOARD TEXT AD LINK BUTTON */

.billboard-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--gold);
    color: #111827;
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
}

.billboard-cta:hover {
    filter: brightness(1.05);
}

.billboard-cta[hidden] {
    display: none;
}

/* FILE UPLOAD INPUTS */

.auth-form input[type="file"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
    padding: 11px 12px;
}

.auth-form input[type="file"]::file-selector-button {
    border: 0;
    border-radius: 10px;
    margin-right: 12px;
    padding: 8px 12px;
    background: var(--right);
    color: white;
    font-weight: 850;
    cursor: pointer;
}

.auth-form input[type="file"]::file-selector-button:hover {
    filter: brightness(1.05);
}

/* ADMIN IMAGE PREVIEW */

.admin-image-preview {
    margin-top: 12px;
}

.admin-image-preview img {
    display: block;
    width: min(320px, 100%);
    max-height: 120px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.045);
}

.admin-image-preview p {
    margin-top: 8px;
}

/* UPLOAD NOTE */

.upload-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* FIXED BILLBOARD SIZE */

.billboard-inner {
    width: 100%;
    padding: 16px 20px;
}

.billboard h2 {
    font-size: clamp(1.15rem, 3vw, 1.75rem);
}

.billboard p {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 620px) {
    .billboard {
        width: 90%;
        min-height: 100px;
        max-height: 150px;
    }

    .billboard-inner {
        padding: 12px 14px;
    }

    .billboard-label {
        font-size: 0.64rem;
    }

    .billboard h2 {
        font-size: 1.1rem;
    }

    .billboard p {
        font-size: 0.82rem;
    }
}

/* BILLBOARD IMAGE TEXT OVERLAY */

.billboard {
    position: relative;
    overflow: hidden;
}

.billboard.has-image-ad {
    display: block;
}

.billboard.has-image-ad .billboard-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.billboard.has-image-ad .billboard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.billboard.has-image-ad::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(5, 8, 15, 0.96) 0%,
            rgba(5, 8, 15, 0.88) 26%,
            rgba(5, 8, 15, 0.58) 48%,
            rgba(5, 8, 15, 0.20) 72%,
            rgba(5, 8, 15, 0.04) 100%);
    pointer-events: none;
}

.billboard.has-image-ad .billboard-label,
.billboard.has-image-ad h2,
.billboard.has-image-ad p {
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.65),
        0 8px 18px rgba(0, 0, 0, 0.55);
}

.billboard.has-image-ad .billboard-inner {
    position: absolute;
    left: 28px;
    top: 50%;
    bottom: auto;
    right: auto;
    transform: translateY(-50%);
    z-index: 2;
    width: min(45%, 380px);
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    text-align: left;
    box-shadow: none;
}

.billboard.has-image-ad .billboard-label {
    margin-bottom: 4px;
}

.billboard.has-image-ad h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1rem, 2.5vw, 1.45rem);
}

.billboard.has-image-ad p {
    max-width: 100%;
    margin: 5px 0 0;
    color: rgba(245, 247, 251, 0.86);
    font-size: 0.9rem;
}

.billboard.has-image-ad .billboard-cta {
    margin-top: 9px;
    pointer-events: auto;
}

.billboard.has-image-ad .billboard-label,
.billboard.has-image-ad h2,
.billboard.has-image-ad p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.billboard.has-image-ad .billboard-label {
    color: rgba(255, 255, 255, 0.78);
}

.billboard.has-image-ad h2 {
    color: #ffffff;
}

.billboard.has-image-ad p {
    color: rgba(255, 255, 255, 0.88);
}

/*
    Make sure overlay content is clickable above the image link.
*/
.billboard.has-image-ad .billboard-inner a {
    position: relative;
    z-index: 3;
}

@media (max-width: 620px) {
    .billboard.has-image-ad .billboard-inner {
        left: 16px;
        top: 50%;
        right: 16px;
        bottom: auto;
        width: auto;
        transform: translateY(-50%);
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .billboard.has-image-ad::after {
        background:
            linear-gradient(90deg,
                rgba(5, 8, 15, 0.96) 0%,
                rgba(5, 8, 15, 0.82) 58%,
                rgba(5, 8, 15, 0.28) 100%);
    }


    .billboard.has-image-ad h2 {
        font-size: 1rem;
    }

    .billboard.has-image-ad p {
        font-size: 0.78rem;
    }

    .billboard.has-image-ad .billboard-cta {
        padding: 7px 11px;
        font-size: 0.76rem;
    }
}

/* PAYMENT STATUS PILLS */

.status-payment_method_required {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.status-payment_method_saved {
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
}

.status-payment_pending {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.status-paid {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.status-payment_failed {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

/* STRONG READABILITY OVERLAY FOR IMAGE BILLBOARDS */

.billboard.has-image-ad::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.92) 0%,
            rgba(0, 0, 0, 0.88) 24%,
            rgba(0, 0, 0, 0.62) 44%,
            rgba(0, 0, 0, 0.26) 68%,
            rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.22) 0%,
            rgba(0, 0, 0, 0.10) 50%,
            rgba(0, 0, 0, 0.24) 100%);
    pointer-events: none;
}

.billboard.has-image-ad .billboard-inner {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: min(38%, 340px);
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    text-align: left;
}

.billboard.has-image-ad .billboard-label,
.billboard.has-image-ad h2,
.billboard.has-image-ad p {
    text-shadow:
        0 2px 3px rgba(0, 0, 0, 0.95),
        0 8px 18px rgba(0, 0, 0, 0.85);
}

.billboard.has-image-ad .billboard-label {
    color: rgba(255, 255, 255, 0.82);
}

.billboard.has-image-ad h2 {
    color: #ffffff;
}

.billboard.has-image-ad p {
    color: rgba(255, 255, 255, 0.94);
}

@media (max-width: 620px) {
    .battle-countdown-floating {
        right: 12px;
        bottom: 12px;
        width: min(220px, calc(100% - 24px));
        padding: 12px 14px;
        border-radius: 16px;
    }

    .battle-countdown-floating.is-above-footer {
        bottom: 180px;
    }

    .battle-countdown span {
        font-size: 0.65rem;
    }

    .battle-countdown strong {
        font-size: 1.35rem;
    }
}

/* IMAGE LOGO HEADER */

.brand-logo-layout {
    align-items: center;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
}

.site-logo-image {
    display: block;
    width: min(390px, 52vw);
    max-height: 105px;
    height: auto;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.45;
}

/* Keeps text available for screen readers without showing it visually */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

@media (max-width: 760px) {
    .brand-logo-layout {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-logo-image {
        width: min(340px, 88vw);
        max-height: 95px;
    }
}

@media (max-width: 420px) {
    .site-logo-image {
        width: min(300px, 88vw);
        max-height: 82px;
    }

    .brand-copy p {
        font-size: 0.9rem;
    }
}

/* HIDE LOGIN REQUIRED BADGE UNTIL HOVER */

.battle-btn.requires-login,
.fighter.requires-login {
    position: relative;
}

/* Hidden by default */
.battle-btn.requires-login::after,
.fighter.requires-login::after {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Show only while hovering/focusing */
.battle-btn.requires-login:hover::after,
.battle-btn.requires-login:focus-visible::after,
.fighter.requires-login:hover::after,
.fighter.requires-login:focus-visible::after {
    opacity: 1 !important;
    visibility: visible !important;
}

/* FIX LOGIN REQUIRED BADGE WITHOUT BREAKING FIGHTER POSITIONS */

/*
    Battle buttons can be relative.
    Fighters must stay absolute or the arena layout breaks.
*/
.battle-btn.requires-login {
    position: relative;
}

.fighter.requires-login {
    position: absolute;
}

/* Hide login required badge by default */
.battle-btn.requires-login::after,
.fighter.requires-login::after {
    content: "Sign in to vote";
    position: absolute;
    left: 10%;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) translateY(6px);
    z-index: 20;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);

    transition:
        opacity 0.16s ease,
        visibility 0.16s ease,
        transform 0.16s ease;
}

/* Show only on hover/focus */
.battle-btn.requires-login:hover::after,
.battle-btn.requires-login:focus-visible::after,
.fighter.requires-login:hover::after,
.fighter.requires-login:focus-visible::after {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, -50%) translateY(0);
}

[hidden] {
    display: none !important;
}


/* MOBILE BILLBOARD AD FIX */

@media (max-width: 620px) {
    .billboard {
        width: 92%;
        aspect-ratio: auto;
        height: 150px;
        min-height: 150px;
        max-height: none;
        margin-top: 18px;
    }

    .billboard.has-image-ad {
        height: 150px;
        min-height: 150px;
    }

    .billboard.has-image-ad .billboard-link {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .billboard.has-image-ad .billboard-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .billboard.has-image-ad .billboard-inner {
        left: 14px;
        top: 50%;
        right: auto;
        bottom: auto;
        width: 62%;
        transform: translateY(-50%);
        padding: 0;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        text-align: left;
    }

    .billboard.has-image-ad .billboard-label {
        margin: 0 0 3px;
        font-size: 0.58rem;
        letter-spacing: 0.12em;
        line-height: 1.1;
    }

    .billboard.has-image-ad h2 {
        margin: 0;
        font-size: 1rem;
        line-height: 1.1;
    }

    .billboard.has-image-ad p {
        margin: 4px 0 0;
        font-size: 0.72rem;
        line-height: 1.25;
        max-width: 100%;

        display: -webkit-box;
        /* -webkit-line-clamp: 2; */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .billboard.has-image-ad .billboard-cta {
        margin-top: 7px;
        padding: 6px 10px;
        font-size: 0.68rem;
        line-height: 1;
    }

    .billboard.has-image-ad::after {
        background:
            linear-gradient(90deg,
                rgba(0, 0, 0, 0.94) 0%,
                rgba(0, 0, 0, 0.82) 54%,
                rgba(0, 0, 0, 0.28) 78%,
                rgba(0, 0, 0, 0.08) 100%);
    }
}

@media (max-width: 420px) {
    .billboard {
        height: 165px;
        min-height: 165px;
    }

    .billboard.has-image-ad {
        height: 165px;
        min-height: 165px;
    }

    .billboard.has-image-ad .billboard-inner {
        width: 68%;
    }

    .billboard.has-image-ad h2 {
        font-size: 0.95rem;
    }

    .billboard.has-image-ad p {
        font-size: 0.7rem;
    }
}

/* MOBILE ARENA FIX - KEEP FIGHTERS INSIDE SCREEN */

@media (max-width: 620px) {
    .arena {
        min-height: 345px;
        margin-top: 12px;
        overflow: hidden;
    }

    .arena::before {
        left: 16px;
        right: 16px;
        bottom: 42px;
        height: 86px;
    }

    /*
        Important:
        On mobile, do not let the rope shift move fighters off-screen.
    */
    .fighter-left,
    .fighter-right {
        transform: none !important;
    }

    .fighter-left:hover,
    .fighter-right:hover {
        transform: translateY(-3px) !important;
    }

    .fighter {
        width: 128px;
        max-width: none;
        bottom: 84px;
    }

    .fighter-left {
        left: 14px;
    }

    .fighter-right {
        right: 14px;
    }

    .fighter-avatar {
        width: 88px;
        height: 88px;
        border-radius: 22px;
        font-size: 44px;
    }

    .fighter-name {
        margin-top: 9px;
        padding: 6px 10px;
        font-size: 0.68rem;
        letter-spacing: 0.02em;
    }

    .fighter-click-label {
        margin-top: 6px;
        font-size: 0.7rem;
    }

    .fighter.is-selected::after {
        top: -10px;
        padding: 5px 9px;
        font-size: 0.62rem;
    }

    .fighter-left.is-selected .fighter-avatar {
        box-shadow:
            0 0 0 1px rgba(239, 68, 68, 0.65),
            0 0 0 6px rgba(239, 68, 68, 0.13),
            0 14px 30px rgba(0, 0, 0, 0.30);
    }

    .fighter-right.is-selected .fighter-avatar {
        box-shadow:
            0 0 0 1px rgba(59, 130, 246, 0.70),
            0 0 0 6px rgba(59, 130, 246, 0.14),
            0 14px 30px rgba(0, 0, 0, 0.30);
    }

    .rope-area {
        left: 16%;
        right: 16%;
        bottom: 156px;
        height: 36px;
    }

    .rope {
        height: 7px;
    }

    .rope-knot {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        border-width: 4px;
    }

    .center-line {
        bottom: 76px;
        height: 155px;
    }
}

@media (max-width: 420px) {
    .fighter {
        width: 112px;
    }

    .fighter-left {
        left: 10px;
    }

    .fighter-right {
        right: 10px;
    }

    .fighter-avatar {
        width: 78px;
        height: 78px;
        border-radius: 20px;
        font-size: 40px;
    }

    .fighter-name {
        font-size: 0.62rem;
        padding: 5px 8px;
    }

    .fighter-click-label {
        font-size: 0.66rem;
    }

    .rope-area {
        left: 18%;
        right: 18%;
        bottom: 154px;
    }
}

/* MOBILE ROPE CLIPPING SAFETY */

@media (max-width: 620px) {
    .rope-area {
        left: 22%;
        right: 22%;
    }

    .rope-knot {
        z-index: 4;
    }
}

/* GAME INTRO ABOVE BILLBOARD */

.game-intro {
    width: min(720px, 90%);
    margin: 24px auto 0;
    text-align: center;
}

.game-intro h2 {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.game-intro p {
    margin: 8px auto 0;
    max-width: 620px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

/* HEADER LOGO CLEANUP */

.brand-logo-layout {
    display: flex;
    align-items: center;
    gap: 0;
}

.brand-logo-layout .site-logo-link {
    flex-shrink: 0;
}

.brand-logo-layout .site-logo-image {
    width: min(390px, 48vw);
    max-height: 105px;
    height: auto;
    object-fit: contain;
}

@media (max-width: 760px) {
    .brand-logo-layout {
        width: 100%;
    }

    .brand-logo-layout .site-logo-image {
        width: min(340px, 88vw);
        max-height: 95px;
    }
}

/* EMAIL VERIFICATION */

.verify-notice-box {
    padding: 15px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.20);
    text-align: center;
    color: var(--muted);
    line-height: 1.5;
}

.verify-notice-box p {
    margin: 0;
}

.verify-actions {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 16px;
}

.verify-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.local-debug-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.28);
    text-align: center;
}

.local-debug-box strong {
    display: block;
    color: #fde68a;
}

.local-debug-box p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.45;
}

.local-debug-box a {
    color: var(--text);
    font-weight: 900;
}

/* RECAPTCHA */

.recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 2px;
    overflow: hidden;
}

@media (max-width: 420px) {
    .recaptcha-wrap {
        transform: scale(0.92);
        transform-origin: center;
    }
}

/* TERMS / LEGAL PAGE */

.legal-card {
    padding: 26px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.legal-card h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    letter-spacing: -0.045em;
}

.legal-updated {
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.legal-card p {
    color: var(--muted);
    line-height: 1.65;
}

.legal-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.legal-section h3 {
    margin: 0 0 10px;
    font-size: 1.18rem;
}

.legal-section ul {
    margin: 10px 0 0;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.7;
}

.legal-section li+li {
    margin-top: 6px;
}

.legal-section a {
    color: var(--text);
    font-weight: 850;
}

/* TERMS AGREEMENT CHECKBOX */

.terms-agreement {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted);
    line-height: 1.45;
}

.terms-agreement input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--right);
}

.terms-agreement span {
    font-size: 0.88rem;
    font-weight: 650;
}

.terms-agreement a {
    color: var(--text);
    font-weight: 850;
}

/* SITE FOOTER - FULL WIDTH */

.site-footer {
    width: 100%;
    margin-top: 40px;
    padding: 28px 0;
    background: rgba(0, 0, 0, 0.22);
    border-top: 1px solid var(--border);
}

.site-footer-inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
}

.site-footer strong {
    display: block;
    font-size: 1.05rem;
}

.site-footer p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

@media (max-width: 760px) {
    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

/* TERMS AGREEMENT CHECKBOX */

.terms-agreement {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted);
    line-height: 1.45;
}

.terms-agreement input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--right);
}

.terms-agreement span {
    font-size: 0.88rem;
    font-weight: 650;
}

.terms-agreement a {
    color: var(--text);
    font-weight: 850;
}

/* MONEY INPUT */

.money-input-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    overflow: hidden;
}

.money-input-wrap:focus-within {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.money-prefix,
.money-suffix {
    color: var(--muted);
    font-weight: 900;
    padding: 0 12px;
}

.money-prefix {
    border-right: 1px solid var(--border);
}

.money-suffix {
    border-left: 1px solid var(--border);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.money-input-wrap input {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* GLOBAL LOADING MODAL */

.loading-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
}

.loading-modal.is-open {
    display: grid;
}

.loading-modal-card {
    width: min(360px, calc(100% - 32px));
    padding: 26px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
    text-align: center;
}

.loading-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--gold);
    animation: loadingSpin 0.85s linear infinite;
}

.loading-modal-card strong {
    display: block;
    font-size: 1.2rem;
}

.loading-modal-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

@keyframes loadingSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ADMIN EXPORTS */

.export-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.export-card {
    display: block;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.075);
    color: var(--text);
    text-decoration: none;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.export-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.14);
}

.export-card strong {
    display: block;
    font-size: 1.08rem;
}

.export-card span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 900px) {
    .export-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .export-grid {
        grid-template-columns: 1fr;
    }
}

/* BACKUP SNAPSHOTS */

.backup-snapshot-list {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.backup-snapshot-list h2 {
    margin: 0 0 14px;
}

/* DANGER ZONE */

.danger-zone {
    margin-top: 22px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    text-align: center;
}

.danger-zone h2 {
    margin: 0;
    font-size: 1.15rem;
}

.danger-zone p {
    margin: 8px 0 14px;
    color: var(--muted);
    line-height: 1.45;
}

.danger-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    padding: 11px 14px;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-weight: 900;
    text-decoration: none;
}

.danger-link:hover {
    background: rgba(239, 68, 68, 0.24);
}

/* MODERN SITE FOOTER */

.site-footer {
    width: 100%;
    margin-top: 54px;
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.035),
            rgba(0, 0, 0, 0.22));
    border-top: 1px solid var(--border);
}

.site-footer-inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 28px;
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.5fr);
    gap: 44px;
    align-items: start;
}

.footer-brand {
    display: grid;
    gap: 12px;
}

.footer-logo-link {
    display: inline-flex;
    width: fit-content;
    line-height: 0;
}

.footer-logo {
    display: block;
    width: min(260px, 100%);
    height: auto;
    object-fit: contain;
}

.footer-brand p {
    margin: 0;
    max-width: 310px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.94rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 26px;
}

.footer-column {
    display: grid;
    gap: 9px;
    align-content: start;
}

.footer-column strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-column a {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
    text-decoration: none;
    line-height: 1.35;
    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.footer-column a:hover {
    color: var(--text);
    transform: translateX(2px);
}

.footer-admin-link {
    color: #fde68a !important;
}

.site-footer-bottom {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    color: var(--muted);
    font-size: 0.84rem;
}

@media (max-width: 900px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 650px) {
    .site-footer {
        margin-top: 40px;
    }

    .site-footer-inner {
        padding-top: 28px;
    }

    .footer-logo {
        width: min(230px, 90vw);
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .site-footer-bottom {
        flex-direction: column;
        padding-bottom: 26px;
    }
}

/* DELETE ACCOUNT */

.delete-account-btn {
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    font-weight: 950;
    cursor: pointer;
}

.delete-account-btn:hover {
    background: rgba(239, 68, 68, 0.26);
}

/* REPORT USER BUTTON */

.leaderboard-item {
    grid-template-columns: 70px 1fr auto auto;
}

.report-user-btn {
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 999px;
    padding: 6px 9px;
    background: rgba(239, 68, 68, 0.10);
    color: #fecaca;
    font-size: 0.74rem;
    font-weight: 850;
    cursor: pointer;
}

.report-user-btn:hover {
    background: rgba(239, 68, 68, 0.18);
}

@media (max-width: 620px) {
    .leaderboard-item {
        grid-template-columns: 52px 1fr auto;
    }

    .report-user-btn {
        grid-column: 2 / -1;
        width: fit-content;
    }
}

/* FOOTER DANGER LINK */

.footer-column a.footer-danger-link {
    color: #fecaca;
}

.footer-column a.footer-danger-link:hover {
    color: #ffffff;
}

/* USERNAME LIVE STATUS */

.username-status {
    margin-top: 8px;
    margin-bottom: 14px;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.35;
    font-weight: 750;
}

.username-status.is-neutral {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted);
}

.username-status.is-checking {
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
}

.username-status.is-available {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #bbf7d0;
}

.username-status.is-unavailable {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fecaca;
}

/* USERNAME STATUS SPACING */

.username-status {
    margin-top: 8px;
    margin-bottom: 14px;
}

/* CENTER STANDALONE AUTH ACTION BUTTONS */

.auth-card .verify-action-link {
    display: inline-flex;
    width: auto;
    min-width: 190px;
    justify-content: center;
    align-items: center;
    margin: 18px auto 0;
}

.auth-card>.verify-action-link {
    display: flex;
}

/* PREVENT MOBILE INPUT ZOOM */

@media (max-width: 760px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* FLOATING TIMER DYNAMIC FOOTER OFFSET */

.battle-countdown-floating {
    bottom: var(--floating-countdown-bottom, 22px);
}

.battle-countdown-floating.is-above-footer {
    bottom: var(--floating-countdown-bottom, 22px);
}

@media (max-width: 620px) {
    .battle-countdown-floating {
        bottom: var(--floating-countdown-bottom, 12px);
    }

    .battle-countdown-floating.is-above-footer {
        bottom: var(--floating-countdown-bottom, 12px);
    }
}