* {
    box-sizing: border-box;
}


body {
    margin: 0;

    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at top,
            #252525,
            #0b0b0b 60%
        );

    color: white;
}


.app {
    width: min(900px, 92%);

    margin: 0 auto;

    padding: 70px 0 30px;
}



/* =========================================================
   HERO
   ========================================================= */

.hero {
    text-align: center;

    margin-bottom: 45px;
}


.eyebrow {
    margin: 0 0 10px;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 4px;

    color: #ff4d30;
}


.hero h1 {
    margin: 0;

    font-size:
        clamp(
            38px,
            7vw,
            70px
        );

    letter-spacing: -2px;
}


.subtitle {
    margin-top: 14px;

    color: #a7a7a7;

    font-size: 18px;
}



/* =========================================================
   CARDS
   ========================================================= */

.game-card {
    background: #151515;

    border: 1px solid #303030;

    border-radius: 18px;

    padding: 40px;

    box-shadow:
        0 25px 60px
        rgba(0, 0, 0, 0.4);
}


.game-section {
    text-align: center;
}


.game-section h2 {
    margin-top: 0;

    font-size: 28px;
}


.game-section p {
    color: #999;
}



/* =========================================================
   BUTTONS
   ========================================================= */

button {
    width: 100%;

    max-width: 360px;

    padding: 16px 20px;

    border-radius: 9px;

    border: none;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}


button:hover {
    transform: translateY(-2px);
}


.primary-button {
    background: #ff4d30;

    color: white;
}


.primary-button:hover {
    background: #ff654d;
}


.secondary-button {
    background: white;

    color: #111;

    margin-top: 12px;
}


.secondary-button:hover {
    background: #dddddd;
}


.dark-button {
    margin-top: 12px;

    background: #252525;

    color: white;

    border: 1px solid #444;
}


.dark-button:hover {
    background: #303030;
}


.end-button {
    margin-top: 12px;

    background: transparent;

    color: #ff6b6b;

    border: 1px solid #773333;
}


.end-button:hover {
    background: #351515;
}


.wide-button {
    max-width: none;
}



/* =========================================================
   INPUTS
   ========================================================= */

input,
select {
    width: 100%;

    max-width: 360px;

    padding: 16px;

    background: #090909;

    color: white;

    border: 1px solid #444;

    border-radius: 9px;

    font-size: 18px;

    font-weight: bold;

    outline: none;
}


input {
    text-align: center;

    font-size: 22px;

    letter-spacing: 5px;

    text-transform: uppercase;
}


select {
    max-width: none;

    text-align: left;
}


input:focus,
select:focus {
    border-color: #ff4d30;
}


.input-label {
    display: block;

    margin-bottom: 10px;

    color: #888;

    font-size: 12px;

    font-weight: bold;

    letter-spacing: 2px;
}



/* =========================================================
   DIVIDERS
   ========================================================= */

.divider {
    display: flex;

    align-items: center;

    gap: 20px;

    margin: 38px 0;

    color: #666;
}


.divider::before,
.divider::after {
    content: "";

    height: 1px;

    flex: 1;

    background: #333;
}



/* =========================================================
   GENERAL
   ========================================================= */

.message {
    min-height: 20px;

    margin-bottom: 0;
}


.center-message {
    text-align: center;
}


.error {
    color: #ff6b6b !important;
}


.success {
    color: #7ee787 !important;
}


.hidden {
    display: none !important;
}



/* =========================================================
   LOBBY
   ========================================================= */

.lobby-card {
    text-align: left;
}


.lobby-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}


.lobby-header h2 {
    margin: 5px 0 0;

    font-size: 32px;
}


#lobbyRoomCode,
#gameRoomCode {
    color: #ff4d30;

    letter-spacing: 3px;
}


.small-button {
    width: auto;

    max-width: none;

    padding: 10px 18px;

    background: transparent;

    color: #aaa;

    border: 1px solid #444;
}


.small-button:hover {
    color: white;

    border-color: #777;
}


.lobby-meta {
    padding: 18px 20px;

    margin-bottom: 30px;

    background: #0c0c0c;

    border: 1px solid #303030;

    border-radius: 10px;
}


.lobby-meta span {
    display: block;

    margin-bottom: 6px;

    color: #777;

    font-size: 11px;

    letter-spacing: 2px;
}


.lobby-meta strong {
    font-size: 20px;
}


.player-list {
    margin-bottom: 25px;

    border: 1px solid #303030;

    border-radius: 10px;

    overflow: hidden;
}


.player-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 18px 20px;

    background: #0c0c0c;

    border-bottom:
        1px solid #252525;

    font-size: 18px;

    font-weight: bold;
}


.player-row:last-child {
    border-bottom: none;
}


.host-badge {
    padding: 5px 9px;

    background: #ff4d30;

    color: white;

    border-radius: 5px;

    font-size: 10px;

    letter-spacing: 1px;
}


.lobby-note {
    margin: 25px 0;

    text-align: center;

    color: #888;
}



/* =========================================================
   ROUND
   ========================================================= */

.round-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;
}


.setup-label {
    margin: 0 0 8px;

    color: #777;

    font-size: 11px;

    font-weight: bold;

    letter-spacing: 2px;
}


.round-number {
    font-size: 42px;

    font-weight: bold;

    color: #ff4d30;
}


.ready-badge {
    padding: 8px 12px;

    border-radius: 7px;

    background: #1d6f42;

    color: white;

    font-size: 12px;

    font-weight: bold;

    letter-spacing: 2px;
}


.setup-card {
    padding: 22px;

    margin-bottom: 16px;

    background: #0c0c0c;

    border: 1px solid #303030;

    border-radius: 12px;
}


.setup-card h2 {
    margin: 0;

    font-size: 26px;
}


.setup-detail {
    margin: 8px 0 0;

    color: #999;
}


.race-heading {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.race-type-badge {
    padding: 6px 9px;

    border-radius: 5px;

    background: #292929;

    color: white;

    font-size: 10px;

    font-weight: bold;

    letter-spacing: 1px;
}



/* =========================================================
   HOST
   ========================================================= */

.host-controls {
    margin-top: 30px;
}


.button-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 12px;

    margin-bottom: 12px;
}


.button-grid button {
    max-width: none;
}



/* =========================================================
   STANDINGS
   ========================================================= */

.standings-table {
    overflow: hidden;

    border: 1px solid #303030;

    border-radius: 12px;

    background: #0c0c0c;
}


.standing-row {
    display: grid;

    grid-template-columns:
        55px 1fr 80px 85px;

    align-items: center;

    gap: 10px;

    padding: 15px 18px;

    border-bottom: 1px solid #242424;
}


.standing-row:last-child {
    border-bottom: none;
}


.standing-header {
    color: #777;

    font-size: 11px;

    font-weight: bold;

    letter-spacing: 1px;
}


.standing-position {
    color: #ff4d30;

    font-size: 20px;

    font-weight: bold;
}


.standing-name {
    font-weight: bold;
}


.standing-points {
    text-align: right;

    font-weight: bold;
}


.standing-wins {
    text-align: right;

    color: #aaa;
}



/* =========================================================
   FINISH ORDER ENTRY
   ========================================================= */

.finish-entry-row {
    display: grid;

    grid-template-columns:
        85px 1fr;

    align-items: center;

    gap: 15px;

    margin: 15px 0;
}


.finish-place {
    font-size: 18px;

    font-weight: bold;

    color: #ff4d30;
}



/* =========================================================
   RESULTS
   ========================================================= */

.results-title {
    text-align: center;

    margin-bottom: 20px;
}


.results-title h2 {
    margin: 0;

    font-size: 40px;

    color: #ff4d30;
}


.result-row,
.reward-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 20px;

    margin-bottom: 10px;

    background: #0c0c0c;

    border: 1px solid #303030;

    border-radius: 10px;
}


.result-place {
    min-width: 55px;

    color: #ff4d30;

    font-size: 20px;

    font-weight: bold;
}


.result-name {
    flex: 1;

    font-size: 18px;

    font-weight: bold;
}


.result-points {
    color: #aaa;

    font-weight: bold;
}


.reward-info {
    flex: 1;
}


.reward-info strong {
    display: block;

    margin-bottom: 5px;
}


.reward-info span {
    color: #999;
}


.temporary-note {
    margin-top: 20px;

    text-align: center;

    color: #666;

    font-size: 12px;
}



/* =========================================================
   FINAL SCREEN
   ========================================================= */

.final-header {
    text-align: center;

    margin-bottom: 30px;
}


.final-header h2 {
    margin: 0;

    font-size: 38px;
}


.champion-card {
    padding: 35px 20px;

    text-align: center;

    background: #0c0c0c;

    border: 1px solid #47362a;

    border-radius: 14px;
}


.trophy {
    margin: 10px 0;

    font-size: 55px;
}


.champion-card h1 {
    margin: 5px 0;

    font-size: 38px;

    color: #ff4d30;
}


.champion-card p:last-child {
    color: #aaa;

    font-size: 18px;
}


.history-card {
    padding: 18px;

    margin-bottom: 12px;

    background: #0c0c0c;

    border: 1px solid #303030;

    border-radius: 10px;
}


.history-card h3 {
    margin: 0 0 12px;

    color: #ff4d30;
}


.history-result {
    display: flex;

    justify-content: space-between;

    padding: 5px 0;

    color: #aaa;
}


.history-result strong {
    color: white;
}



/* =========================================================
   FOOTER
   ========================================================= */

footer {
    margin-top: 30px;

    text-align: center;

    color: #555;

    font-size: 13px;
}



/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .app {
        padding-top: 40px;
    }


    .game-card {
        padding: 25px 18px;
    }


    .hero {
        margin-bottom: 30px;
    }


    .lobby-header {
        align-items: flex-start;
    }


    .lobby-header h2 {
        font-size: 26px;
    }


    .button-grid {
        grid-template-columns: 1fr;
    }


    .button-grid button {
        margin-top: 0;
    }


    .setup-card h2 {
        font-size: 22px;
    }


    .standing-row {
        grid-template-columns:
            35px 1fr 55px 65px;

        padding: 13px 12px;

        font-size: 13px;
    }


    .finish-entry-row {
        grid-template-columns:
            65px 1fr;
    }


    .result-row,
    .reward-row {
        padding: 14px;
    }

}