/* ================================================= */
/* GLOBAL */
/* ================================================= */

:root {

    --primary: #2563eb;
    --success: #16a34a;
    --danger: #dc2626;

    --bg: #f5f7fb;
    --card-bg: #ffffff;

    --text: #1f2937;
    --muted: #6b7280;

    --shadow:
        0 4px 12px rgba(
            0,
            0,
            0,
            0.08
        );

    --radius: 16px;

}

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {

    background: var(--bg);

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        sans-serif;

    min-height: 100vh;

}

/* ================================================= */
/* CARDS */
/* ================================================= */

.card {

    border: none;

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow);

}

/* ================================================= */
/* SETUP SCREEN */
/* ================================================= */

#setupScreen {

    max-width: 600px;

    margin: auto;

}

#setupScreen h2 {

    font-weight: 700;

}

.player-name-input {

    margin-bottom: 12px;

}

/* ================================================= */
/* ROUND HEADER */
/* ================================================= */

.round-header {

    position: sticky;

    top: 0;

    z-index: 100;

    background:
        var(--bg);

    padding-bottom: 10px;

}

#roundTitle {

    font-weight: 700;

    color:
        var(--primary);

}

/* ================================================= */
/* SCORE ENTRY */
/* ================================================= */

.player-score-card {

    background:
        var(--card-bg);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow);

    padding: 16px;

    margin-bottom: 12px;

}

.player-name {

    font-size: 1rem;

    font-weight: 600;

    margin-bottom: 8px;

}

.score-input {

    height: 64px;

    font-size: 1.5rem;

    font-weight: 700;

    text-align: center;

}

.score-input:focus {

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 0.25rem
        rgba(
            37,
            99,
            235,
            .15
        );

}

/* ================================================= */
/* LEADERBOARD */
/* ================================================= */

#leaderboardContainer {

    overflow-x: auto;

}

.leaderboard-table {

    width: 100%;

    margin: 0;

}

.leaderboard-table th {

    background:
        #f8fafc;

}

.leaderboard-table th,
.leaderboard-table td {

    padding: 12px;

    text-align: center;

}

.rank-1 {

    background:
        #fef9c3;

    font-weight: 700;

}

.rank-2 {

    background:
        #f3f4f6;

}

.rank-3 {

    background:
        #fde68a;

}

/* ================================================= */
/* HISTORY */
/* ================================================= */

.history-round {

    border-bottom:
        1px solid #e5e7eb;

    padding:
        12px 0;

}

.history-round:last-child {

    border-bottom: none;

}

.history-title {

    font-weight: 600;

    margin-bottom: 8px;

}

.history-player {

    display: flex;

    justify-content: space-between;

    margin-bottom: 4px;

}

/* ================================================= */
/* BUTTONS */
/* ================================================= */

.btn {

    border-radius: 12px;

    font-weight: 600;

}

#resetGameBtn {

    margin-bottom: 40px;

}

/* ================================================= */
/* MODAL */
/* ================================================= */

.modal-content {

    border-radius:
        var(--radius);

    border: none;

}

/* ================================================= */
/* SCROLLBAR */
/* ================================================= */

::-webkit-scrollbar {

    width: 8px;

}

::-webkit-scrollbar-thumb {

    background:
        #cbd5e1;

    border-radius:
        10px;

}

/* ================================================= */
/* MOBILE OPTIMIZATION */
/* ================================================= */

@media (max-width: 768px) {

    body {

        font-size: 15px;

    }

    .score-input {

        height: 70px;

        font-size: 1.8rem;

    }

    .player-name {

        font-size: 1.1rem;

    }

    #roundTitle {

        font-size: 1.6rem;

    }

}

/* ================================================= */
/* TABLET & DESKTOP */
/* ================================================= */

@media (min-width: 769px) {

    .container-fluid {

        max-width: 900px;

        margin: auto;

    }

}

/* ================================================= */
/* EMPTY STATES */
/* ================================================= */

.empty-state {

    text-align: center;

    color:
        var(--muted);

    padding: 20px;

}
#addPlayerBtn {
    position: relative !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

