/* ============================
   Chess Solving Contest - Styles
   ============================ */

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e2a4a;
    --bg-input: #0f1629;
    --text-primary: #e8e8e8;
    --text-secondary: #a0aec0;
    --accent: #e2b714;
    --accent-hover: #f0c840;
    --success: #48bb78;
    --error: #fc8181;
    --border: #2d3748;
    --radius: 8px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none !important; }

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
    color: var(--accent);
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

#main-nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-btn.active {
    color: var(--accent);
    background: rgba(226, 183, 20, 0.1);
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

#user-display {
    color: var(--accent);
    font-weight: 600;
}

.score-badge {
    background: rgba(226, 183, 20, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #1a1a2e;
}
.btn-primary:hover { background: var(--accent-hover); }

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

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }

/* Sections */
.section {
    display: none;
    padding: 40px 0;
    flex: 1;
}
.section.active { display: block; }

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.feature {
    background: var(--bg-card);
    padding: 30px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--accent);
}

.feature p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.login-prompt {
    margin-top: 16px;
    color: var(--error);
    font-size: 14px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.category-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cat-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--accent);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    flex: 1;
}

.cat-status {
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 20px;
}

.cat-unavailable { color: var(--text-secondary); }
.cat-completed { color: var(--success); font-weight: 600; }
.cat-inprogress { color: var(--accent); font-weight: 600; }
.cat-ready { color: var(--text-secondary); }
.cat-participants {
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.7;
}

.cat-play-btn {
    align-self: flex-start;
}

/* Contest breadcrumb */
.contest-breadcrumb {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px 0;
}

.contest-breadcrumb span {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
}

/* Leaderboard category selector */
.lb-category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    justify-content: center;
}

.lb-cat-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.lb-cat-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.lb-cat-btn.active {
    background: var(--accent);
    color: #1a1a2e;
    border-color: var(--accent);
}

/* Auth */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--accent);
    color: #1a1a2e;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-error {
    background: rgba(252, 129, 129, 0.1);
    color: var(--error);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-form .btn {
    width: 100%;
    margin-top: 8px;
}

.forgot-link {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
}

.forgot-link a {
    color: #ffffff !important;
    opacity: 0.85;
    text-decoration: none;
}

.forgot-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

.auth-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.form-success {
    background: rgba(80, 200, 120, 0.12);
    color: #50c878;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
}

.form-group label small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: normal;
}

/* Contest */
.contest-intro {
    text-align: center;
    padding: 60px 0;
}

.contest-intro h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.contest-intro p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
}

.contest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.puzzle-counter {
    font-size: 18px;
    font-weight: 600;
}

.puzzle-counter span {
    color: var(--accent);
}

.score-display {
    font-size: 18px;
    font-weight: 600;
}

.score-display span {
    color: var(--accent);
}

.contest-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.board-container {
    flex-shrink: 0;
}

.board-info {
    margin-top: 12px;
}

.stipulation {
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
}

.move-input-btns {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Highlight piesa selectata */
.highlight-selected {
    box-shadow: inset 0 0 0 4px #e2b714 !important;
}
/* Highlight destinatie selectata */
.highlight-target {
    box-shadow: inset 0 0 0 4px #48bb78 !important;
}

.puzzle-info {
    flex: 1;
    min-width: 250px;
}

.puzzle-meta {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.meta-item {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item:last-child { margin-bottom: 0; }

.meta-item strong {
    color: var(--text-primary);
}

.puzzle-feedback {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 15px;
}

.puzzle-feedback.correct {
    background: rgba(72, 187, 120, 0.15);
    color: var(--success);
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.puzzle-feedback.incorrect {
    background: rgba(252, 129, 129, 0.15);
    color: var(--error);
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.puzzle-info .btn {
    width: 100%;
    margin-bottom: 8px;
}

/* Result */
.result-card {
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
    background: var(--bg-card);
    padding: 50px 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.result-card h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.result-score {
    margin-bottom: 24px;
}

.result-score span:first-child {
    display: block;
    font-size: 64px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.result-label {
    font-size: 18px;
    color: var(--text-secondary);
}

#result-details {
    text-align: left;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.result-card .btn {
    margin: 0 8px;
}

/* Leaderboard */
#section-leaderboard h2 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.leaderboard-table th {
    background: var(--bg-secondary);
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.leaderboard-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

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

.leaderboard-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.leaderboard-table .rank-1 { color: #ffd700; font-weight: 700; }
.leaderboard-table .rank-2 { color: #c0c0c0; font-weight: 700; }
.leaderboard-table .rank-3 { color: #cd7f32; font-weight: 700; }

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: auto;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Chessboard overrides */
.board-container .board-b72b1 {
    border: 2px solid var(--accent);
    border-radius: 4px;
}

/* Timer */
.timer-display {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* Countdown */
.countdown-box {
    margin: 30px auto;
    max-width: 300px;
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.countdown {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    margin-top: 8px;
}

/* Result time */
.result-time {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.result-time span {
    color: var(--accent);
    font-weight: 600;
}

/* Leaderboard tabs */
.leaderboard-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.lb-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.lb-tab.active {
    background: var(--accent);
    color: #1a1a2e;
}

.lb-panel {
    display: none;
}

.lb-panel.active {
    display: block;
}

.lb-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

/* Date navigator pe Home */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px 0 24px;
    font-size: 17px;
    font-weight: 600;
}

.date-nav .date-display {
    min-width: 180px;
    text-align: center;
    color: var(--accent);
}

.date-nav .btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Puzzle result indicators in leaderboard */
.puzzle-dots {
    display: inline-flex;
    gap: 4px;
}

.puzzle-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    font-weight: 700;
}

.puzzle-dot.correct {
    background: rgba(72, 187, 120, 0.2);
    color: var(--success);
}

.puzzle-dot.wrong {
    background: rgba(252, 129, 129, 0.2);
    color: var(--error);
}

.puzzle-dot.unanswered {
    background: rgba(160, 174, 192, 0.15);
    color: var(--text-secondary);
}

/* Reload mark (asterisk) for users who reopened puzzles */
.reload-mark {
    color: var(--error);
    font-weight: 700;
    font-size: 18px;
    cursor: help;
}

/* Review section */
.review-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.review-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 600;
}

.review-badge {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.review-badge.correct {
    background: rgba(72, 187, 120, 0.15);
    color: var(--success);
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.review-badge.wrong {
    background: rgba(252, 129, 129, 0.15);
    color: var(--error);
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.review-badge.skipped {
    background: rgba(160, 174, 192, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.review-solution-full {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Promotion dialog */
.promotion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.promotion-modal {
    background: var(--bg-card);
    padding: 28px 32px;
    border-radius: 16px;
    border: 2px solid var(--accent);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.promotion-modal h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent);
}

.promotion-pieces {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.promotion-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.promotion-btn:hover {
    border-color: var(--accent);
    background: rgba(226, 183, 20, 0.15);
    transform: scale(1.08);
}

.promotion-btn img {
    width: 56px;
    height: 56px;
}

.promotion-btn span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: inherit;
}

.promotion-btn:hover span {
    color: var(--accent);
}

/* Move progress (multi-move puzzles) */
.move-progress {
    margin-top: 12px;
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.move-step-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 6px;
}

.move-history {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
}

.move-user {
    background: rgba(72, 187, 120, 0.2);
    color: var(--success);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

.move-auto {
    background: rgba(160, 174, 192, 0.15);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

/* Highlight squares */
.highlight-move {
    box-shadow: inset 0 0 0 3px var(--accent);
}

.highlight-correct {
    box-shadow: inset 0 0 0 4px var(--success) !important;
}

.highlight-wrong {
    box-shadow: inset 0 0 0 4px var(--error) !important;
}

.highlight-auto {
    box-shadow: inset 0 0 0 4px var(--text-secondary) !important;
}

/* Responsive */
@media (max-width: 800px) {
    .contest-layout {
        flex-direction: column;
        align-items: center;
    }

    .blitz-layout {
        flex-direction: column;
        align-items: center;
    }

    .chess-board-el {
        max-width: 100% !important;
    }

    .blitz-board-wrap {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .board-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .blitz-info {
        width: 100%;
    }

    .blitz-header {
        padding: 12px 16px;
        gap: 12px;
    }

    .blitz-countdown { font-size: 38px; }
    .blitz-counter-num, .blitz-score-num { font-size: 24px; }

    .puzzle-info {
        width: 100%;
        min-width: unset;
    }

    .hero h2 { font-size: 26px; }

    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    #main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .result-card .btn {
        display: block;
        margin: 8px 0;
    }
}

@media (max-width: 500px) {

    .hero-features {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .lb-category-selector {
        gap: 3px;
    }

    .lb-cat-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* ============================
   Indrumar dezlegari
   ============================ */

.indrumar {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px;
}

.indrumar h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.indrumar-intro {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.6;
}

.indrumar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 20px;
}

.indrumar-section h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stip-badge {
    display: inline-block;
    background: var(--accent);
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.study-badge {
    background: #48bb78;
}

.selfmate-badge {
    background: #9f7aea;
}

.helpmate-badge {
    background: #4299e1;
}

.indrumar-subsection {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.indrumar-subsection:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.indrumar-subsection h4 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 600;
}

.indrumar-section p,
.indrumar-section li {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.indrumar-section ul {
    margin: 8px 0 8px 20px;
}

.indrumar-section li {
    margin-bottom: 4px;
}

.indrumar-note {
    color: var(--error) !important;
    font-weight: 600;
    margin-top: 8px;
}

.indrumar-notice {
    margin-top: 24px;
    background: rgba(226, 183, 20, 0.08);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.indrumar-notice p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ============================
   Blitz
   ============================ */
.blitz-hero { text-align: center; padding: 36px 0 20px; }
.blitz-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 13px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.blitz-status-info { color: var(--text-secondary); font-size: 15px; margin: 8px 0 16px; }
.blitz-participants { color: var(--text-secondary); font-size: 13px; margin-bottom: 20px; min-height: 20px; }

/* Header timer row */
.blitz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 28px;
    margin-bottom: 20px;
    gap: 20px;
}
.blitz-timer-wrap { display: flex; flex-direction: column; align-items: center; }
.blitz-countdown {
    font-size: 52px;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
    min-width: 80px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}
.blitz-countdown.timer-warning { color: var(--accent); }
.blitz-countdown.timer-danger  { color: var(--error); animation: blitz-pulse .4s infinite alternate; }
@keyframes blitz-pulse { from { opacity: 1; } to { opacity: .5; } }
.blitz-timer-bar-wrap { width: 80px; height: 5px; background: var(--border); border-radius: 3px; margin-top: 4px; }
.blitz-timer-bar { height: 100%; border-radius: 3px; transition: width 1s linear, background .3s; }

.blitz-counter, .blitz-score-wrap { text-align: center; }
.blitz-counter-num, .blitz-score-num { font-size: 32px; font-weight: 700; color: var(--accent); }
.blitz-counter-label, .blitz-score-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Layout tabla + info */
.blitz-layout { display: flex; gap: 24px; align-items: flex-start; }
.blitz-board-wrap { flex-shrink: 0; }
.blitz-info { flex: 1; min-width: 0; padding-top: 8px; }
.blitz-meta { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }

/* Feedback */
.blitz-feedback {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    margin-top: 16px;
}
.blitz-feedback.correct  { background: rgba(72,187,120,.15); color: var(--success); border: 1px solid var(--success); }
.blitz-feedback.incorrect { background: rgba(252,129,129,.15); color: var(--error);   border: 1px solid var(--error); }

/* Result */
.blitz-result-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    max-width: 460px;
    margin: 40px auto;
}
.blitz-final-score {
    font-size: 80px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin: 12px 0 4px;
}
.blitz-result-stats { display: flex; justify-content: center; gap: 32px; margin: 24px 0; }
.blitz-stat { text-align: center; }
.blitz-stat span { display: block; font-size: 32px; font-weight: 700; }
.blitz-stat.correct span  { color: var(--success); }
.blitz-stat.wrong   span  { color: var(--error); }
.blitz-stat.timeout span  { color: var(--text-secondary); }
.blitz-stat div { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* Leaderboard tabs */
.blitz-lb-tabs { display: flex; gap: 8px; margin: 28px 0 12px; }
.blitz-lb-tab {
    padding: 8px 22px;
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}
.blitz-lb-tab.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); font-weight: 600; }
