/* ==========================================
   RESET
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   BODY
========================================== */

body {
    background: #121213;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

/* ==========================================
   CONTAINER
========================================== */

.container {
    width: 95%;
    max-width: 900px;
    margin: 40px auto;
}

/* ==========================================
   HEADERS
========================================== */

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    margin-bottom: 15px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header p {
    color: #bdbdbd;
}

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

.game-panel,
.weekly-best,
.auth-box,
.leaderboard-table,
.info-box {
    background: #1f1f20;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

/* ==========================================
   FORMS
========================================== */

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #3a3a3c;
    border-radius: 8px;
    background: #121213;
    color: white;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #538d4e;
}

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

button,
.button {
    display: inline-block;
    background: #538d4e;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover,
.button:hover {
    background: #6aaa64;
}

.danger {
    background: #b91c1c;
}

.danger:hover {
    background: #dc2626;
}

/* ==========================================
   USER INFO
========================================== */

.user-info {
    text-align: right;
    margin-bottom: 20px;
}

.user-info a {
    color: #6aaa64;
    text-decoration: none;
}

.user-info a:hover {
    text-decoration: underline;
}

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

.result-box {
    text-align: center;
}

.result-box p {
    margin: 12px 0;
}

.score {
    color: #6aaa64;
    font-size: 1.5rem;
}

.big-score {
    font-size: 3rem;
    font-weight: bold;
    color: gold;
    text-align: center;
}

/* ==========================================
   MESSAGES
========================================== */

.error-message {
    background: #7f1d1d;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.success-message {
    background: #14532d;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ==========================================
   AUTH PAGES
========================================== */

.auth-box {
    max-width: 500px;
    margin: 40px auto;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #6aaa64;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ==========================================
   LEADERBOARD
========================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #2c2c2e;
}

th,
td {
    padding: 15px;
    text-align: left;
}

tbody tr {
    border-top: 1px solid #3a3a3c;
}

tbody tr:hover {
    background: #2a2a2b;
}

td:first-child {
    font-weight: bold;
}

.actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================
   INFO BOX
========================================== */

.info-box {
    text-align: center;
    color: #bdbdbd;
}

/* ==========================================
   LINKS
========================================== */

a {
    color: #6aaa64;
}

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

@media (max-width: 768px) {

    h1 {
        font-size: 2rem;
    }

    .container {
        width: 98%;
    }

    th,
    td {
        padding: 10px;
        font-size: 0.9rem;
    }

    .big-score {
        font-size: 2rem;
    }

    .actions {
        flex-direction: column;
    }

    .button,
    button {
        width: 100%;
        text-align: center;
    }
}

table tbody tr td:first-child {
    font-weight: bold;
    width: 250px;
}

table tbody tr td:last-child {
    text-align: right;
    font-size: 1.1rem;
}