:root {
    --bg-black: #080808;
    --panel-black: #121212;
    --gold: #d4af37;
    --red: #b90e1a;
    --text: #ece7d5;
    --muted: #b9b4a4;
    --border: #44381a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Rajdhani", sans-serif;
    background:
        radial-gradient(circle at 20% 10%, #2a1e04 0%, transparent 35%),
        radial-gradient(circle at 85% 20%, #3a070d 0%, transparent 40%),
        linear-gradient(120deg, #050505 0%, #120606 45%, #0b0b0b 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.home-page {
    background:
        linear-gradient(rgba(5, 5, 5, 0.82), rgba(8, 8, 8, 0.88)),
    url("/static/images/mbvu.jpg") center/cover no-repeat fixed,
        radial-gradient(circle at 20% 10%, #2a1e04 0%, transparent 35%),
        radial-gradient(circle at 85% 20%, #3a070d 0%, transparent 40%),
        linear-gradient(120deg, #050505 0%, #120606 45%, #0b0b0b 100%);
}

.bg-glow {
    position: fixed;
    width: 30rem;
    height: 30rem;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.glow-left {
    top: -8rem;
    left: -10rem;
    background: var(--gold);
}

.glow-right {
    bottom: -8rem;
    right: -8rem;
    background: var(--red);
}

.topbar,
.container {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.topbar h1 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.1em;
    font-size: 2rem;
    color: var(--gold);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.1em;
    font-size: 2rem;
    color: var(--gold);
    text-decoration: none;
}

.auth-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.header-promo {
    margin: 0;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
}

.header-promo strong {
    color: var(--gold);
}

.container {
    width: min(1080px, 95vw);
    margin: 1.5rem auto 3rem;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
    animation: riseIn 0.7s ease-out;
}

.hero .tagline {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--gold);
    font-weight: 700;
}

.hero h2 {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2rem, 7vw, 5rem);
    margin: 0.5rem 0;
    letter-spacing: 0.04em;
}

.hero h2 span {
    color: var(--red);
}

.countdown {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--gold);
    border-radius: 10px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.45);
}

.hero-multiplier {
    margin: 0.9rem 0 0;
    font-size: 1.1rem;
    color: var(--text);
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.35;
    text-wrap: balance;
}

.hero-multiplier strong {
    color: var(--gold);
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.fighter-card {
    background: linear-gradient(160deg, rgba(31, 31, 31, 0.95), rgba(12, 12, 12, 0.95));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(10px);
    opacity: 0;
    animation: riseIn 0.6s ease-out forwards;
    position: relative;
}

.odds-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--gold);
    color: #000;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.fighter-card:nth-child(2) {
    animation-delay: 0.12s;
}

.fighter-card.active {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), 0 12px 28px rgba(212, 175, 55, 0.2);
}

.fighter-card h3 {
    margin-top: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 2rem;
    letter-spacing: 0.03em;
}

.bet-panel {
    margin-top: 1.25rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(10, 10, 10, 0.85);
}

.form-grid,
.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--muted);
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid #3c3c3c;
    background: #090909;
    color: var(--text);
    padding: 0.7rem;
    border-radius: 10px;
    outline: none;
}

input:focus {
    border-color: var(--gold);
}

select {
    width: 100%;
    border: 1px solid #3c3c3c;
    background: #090909;
    color: var(--text);
    padding: 0.7rem;
    border-radius: 10px;
    outline: none;
}

select:focus {
    border-color: var(--gold);
}

.btn {
    border: 1px solid var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(1.12);
}

.btn.danger {
    background: rgba(185, 14, 26, 0.2);
    border-color: var(--red);
    color: #ffd8d8;
}

.btn.ghost {
    border-color: #444;
    color: #e4e4e4;
    background: transparent;
    text-decoration: none;
}

.notice {
    min-height: 1.2rem;
    color: var(--gold);
    margin-top: 0.9rem;
}

.bet-actions-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.bets-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.bet-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.85rem;
    line-height: 1.45;
}

.bet-status {
    margin-left: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.8rem;
}

.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 3;
}

.modal-content {
    width: min(720px, 96vw);
    background: #111;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

.modal-actions {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auth-page-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-card {
    width: min(560px, 96vw);
    background: rgba(12, 12, 12, 0.92);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
}

.legal-doc {
    width: min(960px, 96vw);
}

.legal-doc h2 {
    margin: 0.4rem 0 0.8rem;
    color: var(--gold);
    font-size: 1.35rem;
}

.legal-doc h3 {
    margin: 0.9rem 0 0.4rem;
    color: var(--gold);
    font-size: 1.05rem;
}

.legal-doc p,
.legal-doc li {
    color: var(--muted);
    line-height: 1.55;
}

.legal-doc ul {
    margin: 0.35rem 0 0.7rem;
    padding-left: 1.1rem;
}

.auth-card h1 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.06em;
    font-size: 2.2rem;
}

.auth-subtext {
    color: var(--muted);
    margin-top: 0.35rem;
}

.auth-card label {
    margin-top: 0.7rem;
}

.auth-actions-row {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auth-switch {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.auth-switch a {
    color: var(--gold);
}

.site-footer {
    margin-top: 2rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.site-footer h4 {
    margin: 0 0 0.55rem;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.04em;
    color: var(--gold);
    font-size: 1.4rem;
}

.site-footer p {
    margin: 0 0 0.45rem;
    color: var(--muted);
}

.footer-logo {
    width: 150px;
    max-width: 100%;
    margin: 0 0 0.7rem;
    border-radius: 6px;
}

.site-footer a {
    display: block;
    margin: 0 0 0.45rem;
    color: var(--text);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold);
}

.footer-note {
    margin: 0.8rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 0.95rem;
}

.terms-section {
    margin-top: 1.6rem;
    padding: 1.3rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.72);
}

.terms-section h3 {
    margin: 0 0 0.9rem;
    color: var(--gold);
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.04em;
    font-size: 2rem;
}

.terms-section h4 {
    margin: 1rem 0 0.45rem;
    color: var(--gold);
    font-size: 1.1rem;
}

.terms-section p,
.terms-section li {
    color: var(--muted);
    line-height: 1.5;
}

.terms-section ul {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.1rem;
}

@keyframes riseIn {
    from {
        transform: translateY(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 850px) {
    .cards,
    .form-grid,
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
        padding: 0.9rem 1rem;
    }

    .header-promo {
        white-space: normal;
        width: 100%;
        font-size: 0.92rem;
    }

    .auth-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.55rem;
    }

    .brand-title {
        font-size: 1.65rem;
    }

    .container {
        width: min(1080px, 94vw);
        margin: 1rem auto 2rem;
    }

    .hero .tagline {
        letter-spacing: 0.13em;
    }

    .hero-multiplier {
        font-size: 1rem;
        padding: 0 0.35rem;
    }

    .site-footer {
        padding: 1rem;
    }

    .terms-section {
        padding: 1rem;
    }

    .terms-section h3 {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .bets-list {
        grid-template-columns: 1fr;
    }

    .home-page {
        background-attachment: scroll;
    }
}

@media (max-width: 520px) {
    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .hero h2 {
        font-size: clamp(1.8rem, 11vw, 2.5rem);
    }

    .header-promo {
        padding: 0.42rem 0.65rem;
        font-size: 0.88rem;
    }

    .countdown {
        width: 100%;
        max-width: 300px;
        text-align: center;
        font-size: 1.05rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .auth-actions .btn,
    .auth-actions #authStatus {
        width: auto;
    }

    .auth-card {
        padding: 1rem;
    }

    .auth-card h1 {
        font-size: 1.8rem;
    }
}
