/* Shared styles for login, register, and tables pages */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #f0f0f0;
    background:
        radial-gradient(ellipse at top, #1f5a3a 0%, #0d2a1c 70%, #07170f 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    color: #f5d97a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
    margin: 0 0 0.6em;
    font-size: 2.4em;
}

a {
    color: #f5d97a;
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ===== Auth pages (login + register) ===== */

.auth-page {
    justify-content: center;
}

.auth-card {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(245, 217, 122, 0.35);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    padding: 36px 40px 32px;
    width: 320px;
    margin-top: 8vh;
    backdrop-filter: blur(2px);
    text-align: center;
}

.auth-card h1 {
    margin-bottom: 1.2em;
}

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

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
    color: #d8e6db;
    letter-spacing: 0.03em;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(245, 217, 122, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1em;
    transition: border-color 0.15s, background 0.15s;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
    outline: none;
    border-color: #f5d97a;
    background: rgba(255, 255, 255, 0.14);
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid #b8860b;
    background: linear-gradient(180deg, #f5d97a 0%, #d4a017 100%);
    color: #2a1d00;
    font-weight: bold;
    font-size: 1em;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.05s, box-shadow 0.15s;
    text-align: center;
}

.btn:hover {
    box-shadow: 0 0 10px rgba(245, 217, 122, 0.6);
    text-decoration: none;
    color: #2a1d00;
}

.btn:active {
    transform: translateY(1px);
}

.btn-block {
    width: 100%;
    margin-top: 6px;
}

.auth-footer {
    margin-top: 18px;
    font-size: 0.9em;
    color: #b6c5b9;
}

/* ===== App nav header (shared) ===== */

.app-nav {
    width: 100%;
    background: rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(245, 217, 122, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.app-nav-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.app-nav-link {
    color: #d8e6db;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.app-nav-link:hover {
    color: #f5d97a;
    text-decoration: none;
    border-bottom-color: rgba(245, 217, 122, 0.4);
}

.app-nav-link.active {
    color: #f5d97a;
    border-bottom-color: #f5d97a;
}

/* ===== Tables page ===== */

.tables-page {
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

.tables-container {
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
    padding: 32px 24px 60px;
    box-sizing: border-box;
}

.tables-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.tables-header h1 {
    margin: 0;
}

.tables-panel {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(245, 217, 122, 0.25);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 24px;
}

table#tables,
table#rankings {
    width: 100%;
    border-collapse: collapse;
    color: #f0f0f0;
}

table#tables thead th,
table#rankings thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f5d97a;
    border-bottom: 2px solid rgba(245, 217, 122, 0.35);
}

table#tables tbody td,
table#rankings tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1em;
}

table#tables tbody tr:hover,
table#rankings tbody tr:hover {
    background: rgba(245, 217, 122, 0.06);
}

table#tables tbody tr:last-child td,
table#rankings tbody tr:last-child td {
    border-bottom: none;
}

td.rank {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: #b6c5b9;
    width: 1%;
    white-space: nowrap;
}

td.gold {
    color: #f5d97a;
    font-weight: bold;
}

.tables-empty {
    text-align: center;
    color: #b6c5b9;
    padding: 24px 0;
    font-style: italic;
}

td.table-id {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: #b6c5b9;
}

td.stake {
    color: #f5d97a;
    font-weight: bold;
}

/* ===== Dev quick-join (appended to /login by dev handler) ===== */

#dev-quick-join {
    width: 100%;
    max-width: 600px;
    margin: 32px auto 48px;
    padding: 20px 28px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(245, 217, 122, 0.3);
    border-radius: 10px;
    color: #d8e6db;
    font-size: 0.92em;
    box-sizing: border-box;
}

#dev-quick-join h2 {
    color: #f5d97a;
    font-family: Georgia, "Times New Roman", serif;
    margin: 0 0 8px;
    font-size: 1.1em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#dev-quick-join p {
    margin: 12px 0 6px;
    color: #b6c5b9;
    font-style: italic;
}

#dev-quick-join ul {
    margin: 4px 0 8px;
    padding-left: 22px;
    line-height: 1.6;
}
