/* ==============
   AUTH & MODALS
   ============== */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-modal.hidden {
    display: none;
}

.auth-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.auth-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--dark);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(255, 200, 0, 0.05);
    z-index: 10;
    animation: authPop 0.25s var(--ease);
}

@keyframes authPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 1rem 0 0.5rem;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--muted);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--white);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: var(--yellow);
    background: rgba(255, 255, 255, 0.08);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.auth-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-close:hover {
    color: var(--white);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 180px;
    justify-content: flex-end;
}

.user-badge {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--yellow);
}

.nav-link-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.nav-link-btn:hover {
    color: var(--white);
    text-decoration: underline;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.auth-btns {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 180px;
    justify-content: flex-end;
}

#auth-status {
    min-width: 180px;
    display: flex;
    justify-content: flex-end;
}

/* ==============
   LEADERBOARD
   ============== */
.lb-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.lb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.lb-section {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.lb-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--yellow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.lb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-rank {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--muted);
    width: 24px;
}

.lb-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
}

.lb-score {
    font-weight: 800;
    color: var(--white);
}

.lb-empty {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .lb-grid {
        grid-template-columns: 1fr;
    }

    /* Auth & Profile Mobile Adjustments */
    #auth-status,
    .auth-btns,
    .user-profile {
        min-width: unset;
        /* Remove large desktop min-width */
        gap: 0.5rem;
    }

    .user-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .btn-sm {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }
}