@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

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

body {
    font-family: 'Roboto', sans-serif;
    background: #f0f0f0;
    color: #333;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
    width: 100%;
    margin: 5vh 0;
}

.header-content {
    text-align: center;
}

.header-content img {
    height: 14.5vh;
    vertical-align: middle;
}

.header-text {
    display: inline-block;
    vertical-align: middle;
    margin: 10px;
}

.header-text h1 {
    font-size: 6.5vh;
    margin: 0;
}

.header-text h3 {
    font-size: 3.5vh;
    font-weight: 400;
    margin: 0;
}

/* ── Home menu ───────────────────────────────────────────── */
.home-menu {
    width: 60vw;
    min-width: 400px;
    height: 60vh;
    margin: 0 auto;
    display: flex;
}

.home-menu .nav {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
}

.nav-item {
    width: 100%;
    text-align: center;
    background: white;
    color: black;
    padding: 1.5vh 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, color 0.1s;
}

.nav-item:hover {
    background: gray;
    color: white;
}

.nav-item.selected {
    background: black;
    color: white;
}

.nav img {
    max-width: 90%;
    margin: 1vh 5%;
    display: block;
}

.home-menu .content {
    flex: 1;
    background: black;
    color: white;
    overflow-y: auto;
}

.content-section {
    display: none;
    padding: 2vh;
    line-height: 26px;
}

.content-section.active {
    display: block;
}

/* ── About / Contact / Changelog ────────────────────────── */
.content-section b {
    font-weight: 700;
}

/* ── Login ───────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
}

.login-form label {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 2px;
    display: block;
}

.login-form input {
    width: 100%;
    padding: 8px 10px;
    background: #222;
    border: 1px solid #444;
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    border-radius: 3px;
    outline: none;
}

.login-form input:focus {
    border-color: #888;
}

.btn {
    padding: 9px 20px;
    background: white;
    color: black;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
}

.btn:hover {
    background: #ddd;
}

.btn:disabled {
    background: #888;
    cursor: not-allowed;
}

.form-message {
    font-size: 0.9em;
    margin-top: 4px;
    min-height: 1.2em;
}

.form-message.error {
    color: #ff6b6b;
}

.form-message.success {
    color: #6bff9e;
}

.logged-in-info {
    line-height: 1.8;
}

.logged-in-info strong {
    color: #aaa;
    font-weight: 400;
    font-size: 0.85em;
    display: block;
    margin-bottom: 2px;
}

.logout-btn {
    margin-top: 16px;
    padding: 7px 16px;
    background: #333;
    color: white;
    border: 1px solid #555;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 3px;
}

.logout-btn:hover {
    background: #444;
}

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.leaderboard-controls label {
    font-size: 0.85em;
    color: #aaa;
    display: block;
    margin-bottom: 3px;
}

.leaderboard-controls select {
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 6px 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.leaderboard-controls select:focus {
    border-color: #888;
}

#lb-load-btn {
    align-self: flex-end;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.leaderboard-table th {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid #444;
    color: #aaa;
    font-weight: 500;
}

.leaderboard-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #222;
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table .rank-1 td:first-child {
    color: #ffd700;
    font-weight: 700;
}

.leaderboard-table .rank-2 td:first-child {
    color: #c0c0c0;
    font-weight: 700;
}

.leaderboard-table .rank-3 td:first-child {
    color: #cd7f32;
    font-weight: 700;
}

.lb-status {
    color: #888;
    font-size: 0.9em;
    margin-top: 8px;
}

/* ── Reset password page ─────────────────────────────────── */
.reset-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    padding: 20px;
}

.reset-card {
    background: white;
    border-radius: 6px;
    padding: 40px 48px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.reset-card .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.reset-card .logo img {
    height: 52px;
}

.reset-card .logo h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: #111;
}

.reset-card h2 {
    font-size: 1.2em;
    font-weight: 500;
    color: #333;
    margin-bottom: 24px;
}

.reset-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.reset-form label {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 4px;
    display: block;
    font-weight: 500;
}

.reset-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    outline: none;
    transition: border-color 0.15s;
}

.reset-form input:focus {
    border-color: #333;
}

.reset-btn {
    width: 100%;
    padding: 11px;
    background: black;
    color: white;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    margin-top: 4px;
}

.reset-btn:hover {
    background: #222;
}

.reset-btn:disabled {
    background: #888;
    cursor: not-allowed;
}

.reset-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    display: none;
}

.reset-message.error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #c0392b;
    display: block;
}

.reset-message.success {
    background: #f0fff4;
    border: 1px solid #b2f2bb;
    color: #27ae60;
    display: block;
}

.reset-card .back-link {
    display: block;
    margin-top: 20px;
    color: #888;
    font-size: 0.85em;
    text-decoration: none;
}

.reset-card .back-link:hover {
    color: #333;
}
