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

.hidden { display: none !important; }

body {
    background: #f7f6f2;
    color: #111;
    font-family: system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    padding: 0 24px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 0 60px;
}

header {
    margin-bottom: 56px;
}

.header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

/* ===== AUTH HEADER ===== */

.auth-area {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 3px;
    flex-shrink: 0;
}

.auth-link {
    background: none;
    border: none;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
    letter-spacing: 0.04em;
    padding: 0;
    font-family: inherit;
    transition: color 0.15s;
}
.auth-link:hover { color: #111; }

.auth-user {
    font-size: 12px;
    color: #555;
    letter-spacing: 0.02em;
}

/* ===== AUTH MODAL ===== */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.auth-modal-box {
    background: #fff;
    border: 1px solid #d8d5cc;
    border-radius: 2px;
    padding: 36px 36px 32px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    font-family: inherit;
    transition: color 0.15s;
}
.auth-close:hover { color: #111; }

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #d8d5cc;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bbb;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active {
    color: #111;
    border-bottom-color: #111;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    background: #f7f6f2;
    border: 1px solid #d8d5cc;
    border-radius: 2px;
    color: #111;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}
.auth-form input:focus { border-color: #111; }
.auth-form input::placeholder { color: #bbb; }

.auth-error {
    font-size: 12px;
    color: #c0392b;
    min-height: 1.2em;
}

.auth-btn-primary {
    width: 100%;
    padding: 11px 0;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
    margin-top: 4px;
}
.auth-btn-primary:hover { opacity: 0.75; }

.site-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #111;
}

.site-tagline {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
    letter-spacing: 0.02em;
}

.activities {
    list-style: none;
}

.activity {
    border-top: 1px solid #d8d5cc;
    padding: 28px 0;
}

.activities .activity:last-child {
    border-bottom: 1px solid #d8d5cc;
}

.activity-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    gap: 20px;
}

.activity-link:hover .activity-arrow {
    transform: translateX(5px);
}

.activity-num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #bbb;
    min-width: 22px;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 3px;
}

.activity-body {
    flex: 1;
}

.activity-name {
    font-size: 22px;
    font-weight: 500;
    color: #111;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.activity-desc {
    margin-top: 5px;
    font-size: 13px;
    color: #999;
    letter-spacing: 0.01em;
}

.activity-arrow {
    font-size: 20px;
    color: #111;
    transition: transform 0.15s ease;
    flex-shrink: 0;
    line-height: 1;
}

.activity.soon .activity-name {
    color: #ccc;
    font-weight: 400;
}

.activity.soon .activity-num {
    color: #ddd;
}

.activity.soon .activity-arrow {
    color: #ccc;
    font-size: 16px;
}

.activity.soon .activity-link {
    cursor: default;
    pointer-events: none;
}

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

.leaderboard {
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid #d8d5cc;
}

.lb-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 24px;
}

.lb-activity-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 12px;
    margin-top: 28px;
}

.lb-activity-title:first-child { margin-top: 0; }

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

.lb-table thead th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #bbb;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #d8d5cc;
    text-align: left;
}

.lb-table thead th:not(:nth-child(2)) { text-align: right; }
.lb-table thead th:first-child { width: 28px; }

.lb-table td {
    padding: 14px 0;
    border-bottom: 1px solid #d8d5cc;
    font-size: 14px;
    color: #111;
    text-align: right;
}

.lb-table td:first-child {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ccc;
    width: 28px;
}

.lb-table td:nth-child(2) {
    text-align: left;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.lb-table td:nth-child(3) { color: #111; }
.lb-table td:nth-child(4) { color: #aaa; }
.lb-table td:nth-child(5) { color: #aaa; }

.lb-empty {
    color: #ccc !important;
    font-size: 13px !important;
    padding: 20px 0 !important;
    text-align: left !important;
}

footer {
    margin-top: 64px;
    font-size: 12px;
    color: #ccc;
    letter-spacing: 0.04em;
}
