/* WINPESA MAIN STYLESHEET */
:root {
    --bg: #100916;
    --panel: #1b1025;
    --panel-light: #261531;
    --pink: #ed20b0;
    --pink-light: #ff45c6;
    --gold: #ffc857;
    --text: #ffffff;
    --muted: #a99bb4;
    --border: rgba(255,255,255,.09);
    --green: #25d69a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at 50% 0%, #35113e 0%, transparent 38%),
        var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

/* HEADER */

.topbar {
    width: 100%;
    min-height: 75px;
    padding: 14px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(16,9,22,.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(15px);
}

.brand {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    color: white;
}

.brand span {
    color: var(--pink);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    padding: 11px 17px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .5px;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
}

.pink {
    background: linear-gradient(135deg, var(--pink), #a70d85);
    color: white;
    box-shadow: 0 5px 20px rgba(237,32,176,.2);
}

.outline {
    border: 1px solid rgba(255,255,255,.2);
    color: white;
    background: rgba(255,255,255,.04);
}

.outline:hover {
    border-color: var(--pink);
    color: var(--pink-light);
}

.balance {
    background: #24142d;
    border: 1px solid var(--border);
    padding: 11px 15px;
    border-radius: 8px;
    font-size: 13px;
}

.balance b {
    color: var(--green);
    margin-left: 5px;
}

.sound {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #281630;
    border: 1px solid var(--border);
    color: white;
    font-size: 20px;
}

/* MAIN CONTENT */

.page {
    width: min(1250px, 94%);
    margin: 25px auto;
}

/* RECENT ROUNDS */

.history {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    margin-bottom: 18px;
    background: rgba(255,255,255,.035);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.history small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-right: 8px;
}

.history span {
    background: #302033;
    color: #f4f0f6;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

.history span.gold {
    color: var(--gold);
    background: rgba(255,200,87,.1);
}

/* GAME CARD */

.game-card,
.players-card {
    background: linear-gradient(145deg, #21132b, #170e20);
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,.2);
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 20px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.game-meta span:first-child {
    color: var(--pink-light);
}

/* GAME STAGE */

.game-stage {
    height: 440px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 100%, #441044 0%, #21102e 45%, #100916 100%);
}

.grid {
    position: absolute;
    inset: 0;
    opacity: .17;
    background-image:
        linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 55px 55px;
    transform: perspective(400px) rotateX(15deg) scale(1.3);
    transform-origin: bottom;
}

.spectator {
    position: absolute;
    top: 18px;
    left: 20px;
    color: var(--muted);
    font-size: 11px;
    z-index: 2;
}

.spectator span {
    margin-left: 5px;
}

.flight-status {
    position: absolute;
    top: 37%;
    left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
    z-index: 3;
    width: 90%;
}

.multiplier {
    font-size: clamp(48px, 8vw, 85px);
    font-weight: 900;
    color: white;
    text-shadow: 0 0 30px rgba(237,32,176,.45);
    letter-spacing: -3px;
}

.status-copy {
    margin-top: 8px;
    color: var(--pink-light);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 3px;
}

.flight-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

#flightPath {
    fill: none;
    stroke: url(#lineGlow);
    stroke-width: 5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px var(--pink));
}

#planeIcon {
    fill: white;
    font-size: 40px;
    filter: drop-shadow(0 0 10px var(--pink));
}

.game-foot {
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green);
}

.right {
    margin-left: auto;
    text-align: right;
}

/* BETTING CARDS */

.bet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px;
    margin: 20px 0;
}

.bet-card {
    background: linear-gradient(145deg, #25142f, #190f22);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 18px;
}

.bet-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 17px;
}

.seg {
    display: flex;
    background: #110a18;
    border-radius: 7px;
    overflow: hidden;
    font-size: 11px;
}

.seg b,
.seg span {
    padding: 9px 15px;
}

.seg b {
    background: var(--pink);
    color: white;
}

.seg span {
    color: var(--muted);
}

.auto-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    margin-left: auto;
}

.auto-input {
    width: 75px;
    padding: 9px;
    background: #100916;
    border: 1px solid var(--border);
    color: white;
    border-radius: 6px;
    text-align: center;
}

.bet-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #100916;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px;
}

.amount button {
    background: #302039;
    border: none;
    color: white;
    border-radius: 6px;
    width: 35px;
    height: 35px;
    font-size: 19px;
}

.amount strong {
    font-size: 16px;
}

.play-button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pink), #a70d85);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    padding: 10px;
    box-shadow: 0 5px 18px rgba(237,32,176,.2);
}

.play-button:hover {
    filter: brightness(1.15);
}

.quick {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
    margin-top: 13px;
}

.quick button {
    padding: 9px;
    border: 1px solid var(--border);
    background: #2b1935;
    color: white;
    border-radius: 6px;
    font-size: 11px;
}

/* PLAYERS AREA */

.players-card {
    margin-top: 20px;
    padding: 20px;
}

.players-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.players-summary b {
    font-size: 13px;
    color: var(--pink-light);
}

.players-summary small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.total {
    text-align: right;
}

.total strong {
    font-size: 23px;
}

.tabs {
    display: flex;
    gap: 25px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    margin-top: 25px;
    padding-bottom: 13px;
    color: var(--muted);
    font-size: 12px;
}

.tabs b {
    color: var(--pink-light);
    border-bottom: 2px solid var(--pink);
    padding-bottom: 13px;
    margin-bottom: -14px;
}

.table-head {
    display: grid;
    grid-template-columns: 2fr 1fr .5fr 1fr;
    gap: 10px;
    padding: 16px 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 25px 5px;
    color: var(--muted);
    font-size: 11px;
}

/* LOGIN AND REGISTER PAGES */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background:
        radial-gradient(circle at top, #431342 0%, transparent 45%),
        var(--bg);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-brand {
    text-align: center;
    font-size: 31px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.auth-brand span {
    color: var(--pink);
}

.auth-card {
    background: linear-gradient(145deg, #25142f, #170d20);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.auth-card h1 {
    font-size: 25px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form label {
    display: block;
    color: #ddd0e5;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 14px;
    background: #100916;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: .2s;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(237,32,176,.1);
}

.auth-form input::placeholder {
    color: #76677e;
}

.auth-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--pink), #a70d85);
    color: white;
    font-size: 13px;
    font-weight: 900;
    margin-top: 8px;
    box-shadow: 0 5px 20px rgba(237,32,176,.2);
}

.auth-submit:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.auth-links {
    text-align: center;
    margin-top: 22px;
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
}

.auth-links a {
    color: var(--pink-light);
    font-weight: 800;
}

.auth-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
    font-size: 12px;
}

.auth-error {
    padding: 12px;
    background: rgba(255,60,90,.1);
    border: 1px solid rgba(255,60,90,.3);
    color: #ff8294;
    border-radius: 7px;
    font-size: 12px;
    margin-bottom: 15px;
}

.auth-success {
    padding: 12px;
    background: rgba(37,214,154,.1);
    border: 1px solid rgba(37,214,154,.3);
    color: var(--green);
    border-radius: 7px;
    font-size: 12px;
    margin-bottom: 15px;
}

/* RESPONSIVE DESIGN */

@media (max-width: 768px) {
    .topbar {
        padding: 12px 3%;
        flex-wrap: wrap;
    }

    .brand {
        font-size: 23px;
    }

    .top-actions {
        flex-wrap: wrap;
        gap: 7px;
    }

    .btn {
        padding: 9px 11px;
        font-size: 10px;
    }

    .balance {
        padding: 9px;
        font-size: 11px;
    }

    .page {
        width: 94%;
        margin-top: 15px;
    }

    .game-stage {
        height: 330px;
    }

    .bet-grid {
        grid-template-columns: 1fr;
    }

    .history {
        gap: 7px;
    }

    .history span {
        padding: 6px 8px;
        font-size: 10px;
    }

    .game-foot {
        flex-wrap: wrap;
    }

    .right {
        width: 100%;
        margin-left: 0;
        text-align: left;
    }

    .players-card {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .topbar {
        justify-content: center;
    }

    .top-actions {
        justify-content: center;
        width: 100%;
    }

    .sound {
        width: 34px;
        height: 34px;
    }

    .game-stage {
        height: 270px;
    }

    .multiplier {
        font-size: 52px;
    }

    .game-meta {
        font-size: 9px;
        padding: 13px;
    }

    .tabs {
        gap: 15px;
        font-size: 10px;
        overflow-x: auto;
    }

    .table-head {
        font-size: 9px;
    }

    .auth-card {
        padding: 23px 18px;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}