:root {
    /* Color Palette - Premium Dark Theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Game Colors */
    --tile-correct: #22c55e;
    --tile-present: #eab308;
    --tile-absent: #334155;
    --tile-default: #1e293b;
    --tile-border: #475569;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --header-height: 70px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 40%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

@keyframes pop {
    50% {
        transform: scale(1.1);
    }
}

@keyframes flip {
    0% {
        transform: rotateX(0);
    }

    50% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0);
    }
}

@keyframes shake {

    10%,
    90% {
        transform: translateX(-1px);
    }

    20%,
    80% {
        transform: translateX(2px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.pop {
    animation: pop 0.1s ease-in-out;
}

/* Header */
.modern-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    align-items: center;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link-primary {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-link-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
    color: #fff;
}

.nav-link-secondary {
    border: 1px solid var(--text-secondary);
    padding: 7px 15px;
    border-radius: var(--radius-sm);
}

.nav-link-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 0;
    max-width: 100%;
    /* Changed from 1400px to fill screen */
    margin: 0 auto;
    width: 100%;
    flex: 1;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

/* Game Section */
.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 500px;
    width: 100%;
}

.game-board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.game-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.tile {
    width: 60px;
    height: 60px;
    border: 2px solid var(--tile-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    user-select: none;
    background: var(--tile-default);
    color: var(--text-primary);
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
    border-radius: 4px;
    /* More classic wordle look */
}

.tile[data-status="tbd"] {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.tile.revealed {
    color: #fff;
    border: none;
}

.tile.flipping {
    animation: flip 0.15s ease;
    /* Ultra fast */
}

.tile[data-status="correct"] {
    background: var(--tile-correct);
}

.tile[data-status="present"] {
    background: var(--tile-present);
}

.tile[data-status="absent"] {
    background: var(--tile-absent);
}

/* Keyboard */
.keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    font-family: inherit;
    font-weight: 600;
    border: none;
    padding: 0;
    height: 58px;
    min-width: 40px;
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-transform: uppercase;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s;
}

.key:hover {
    background: #334155;
}

.key.correct {
    background: var(--tile-correct);
}

.key.present {
    background: var(--tile-present);
}

.key.absent {
    background: var(--tile-absent);
    opacity: 0.5;
}

.key-wide {
    flex: 1.5;
    font-size: 1.2rem;
}

.key-enter {
    background: var(--success);
    color: #fff;
    font-weight: 800;
}

.key-enter:hover {
    background: #16a34a;
    /* Darker green */
}

.key-back {
    background: var(--error);
    color: #fff;
    font-weight: 800;
}

.key-back:hover {
    background: #dc2626;
    /* Darker red */
}

/* Chat Sidebar */
.chat-sidebar {
    background: var(--bg-secondary);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.chat-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-status.online {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

.chat-message.system {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
    color: var(--accent);
}

.chat-user {
    font-weight: 700;
    color: var(--accent);
    margin-right: 6px;
}

.chat-text {
    color: var(--text-primary);
    word-break: break-word;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-left: auto;
    display: block;
    text-align: right;
    text-align: right;
    margin-top: 4px;
}

.chat-header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.chat-delete-btn:hover {
    color: var(--error);
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #fff;
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent);
}

.btn-chat-send {
    background: var(--accent);
    border: none;
    color: #fff;
    width: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.chat-login-prompt {
    text-align: center;
    color: var(--text-secondary);
}

.chat-login-prompt p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    padding: 30px;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-panel {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
}

.modal-panel-auth {
    max-width: 900px;
}

.modal-panel-leaderboard {
    max-width: 860px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 2;
    transition: color 0.2s, transform 0.2s;
}

.close-btn:hover {
    color: #fff;
    transform: scale(1.05);
}

.modal-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    padding-right: 40px;
}

.modal-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal h2 {
    margin: 0;
    font-weight: 700;
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

#help-modal .modal-content {
    max-width: 620px;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-right: 8px;
}

.help-intro {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
}

.help-steps {
    display: grid;
    gap: 12px;
}

.help-step {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.help-step h3,
.help-section-title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1rem;
}

.help-step p,
.help-example-card p,
.help-note {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.help-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.help-legend {
    display: grid;
    gap: 10px;
}

.legend-chip {
    padding: 10px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    text-align: center;
}

.legend-correct {
    background: var(--tile-correct);
}

.legend-present {
    background: var(--tile-present);
    color: #111827;
}

.legend-absent {
    background: var(--tile-absent);
}

.help-example-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.example-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#help-modal .tile {
    width: 52px;
    height: 52px;
    font-size: 1.45rem;
}

.help-tile-neutral {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.help-note {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #dbeafe;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(240px, 280px) 1fr;
    gap: 22px;
    align-items: stretch;
}

.auth-aside,
.auth-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-aside {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-badge {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-aside h3 {
    margin: 0;
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.2;
}

.auth-aside p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-benefits {
    display: grid;
    gap: 10px;
}

.auth-benefit {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-card {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.45));
}

.auth-form-card h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.25rem;
}

.auth-form-copy {
    margin: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.auth-input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
    background: rgba(15, 23, 42, 0.95);
}

.btn-primary,
.btn-secondary,
.btn-small {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: filter 0.2s;
}

.btn-secondary {
    background: var(--bg-primary);
    border: 1px solid var(--text-secondary);
}

.btn-small {
    padding: 8px 16px;
    width: auto;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.auth-toggle {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22c55e, #3b82f6);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.2);
}

.profile-kicker {
    margin: 0 0 4px;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 800;
}

.profile-hero h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 1.35rem;
}

.profile-meta {
    margin: 0;
    color: var(--text-secondary);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-stat-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.profile-stat-value {
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.profile-stat-meta {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.4;
}

/* Notification */
#notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--bg-secondary);
    color: #fff;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.visible {
    opacity: 1;
    transform: translateY(0);
}

.notification-success {
    background: var(--success);
    border-color: var(--success);
}

.notification-error {
    background: var(--error);
    border-color: var(--error);
}

.notification-warning {
    background: var(--warning);
    border-color: var(--warning);
}

.notification-info {
    background: var(--accent);
    border-color: var(--accent);
}

/* Icon style adjustments for solid backgrounds */
.notification-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

/* Features Section (Hidden in game view typically, or displayed below) */
.features-section {
    display: none;
}

/* Simplified for this SPA feel */

/* Stats Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Leaderboard */
.leaderboard-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.summary-value {
    color: #fff;
    font-size: 1.7rem;
    font-weight: 900;
}

.leaderboard-shell {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
}

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

.leaderboard-table thead {
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-table th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.leaderboard-row-top {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.08), rgba(255, 255, 255, 0.01));
}

.leaderboard-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
}

.leaderboard-player {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.leaderboard-player strong {
    color: #fff;
}

.leaderboard-player span {
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.leaderboard-rate {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    font-weight: 800;
}

.leaderboard-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 28px 16px;
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        margin: 12px auto;
        padding: 24px 18px;
    }

    .modal-header {
        margin-bottom: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside,
    .auth-card {
        padding: 18px;
    }

    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-stats-grid,
    .leaderboard-summary {
        grid-template-columns: 1fr;
    }

    .leaderboard-shell {
        overflow-x: auto;
    }

    .help-step {
        grid-template-columns: 34px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .help-step-number {
        width: 34px;
        height: 34px;
    }

    #help-modal .tile {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        display: none;
        /* Hide chat on mobile for now or make it collapsible */
    }

    .features-section {
        display: block;
        padding: 40px 20px;
        background: var(--bg-secondary);
    }

    .features-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
