/* ─── NEW GAME MODES CSS v3.0 ─────────────────────────── */

/* ─── Quick Actions Grid: 2 rows of 3 ────────────────── */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* New card types */
.action-card.duel-card {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(234, 88, 12, 0.05));
    border: 1px solid rgba(234, 88, 12, 0.25);
}
.duel-card .action-badge { color: #EA580C; }
.duel-card .action-btn { background: #EA580C; color: #fff; }

.action-card.sd-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.sd-card .action-badge { color: #EF4444; }
.sd-card .action-btn { background: #EF4444; color: #fff; }

.action-card.tf-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.tf-card .action-badge { color: #22C55E; }
.tf-card .action-btn { background: #22C55E; color: #fff; }

.action-card.mb-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(168, 85, 247, 0.25);
}
.mb-card .action-badge { color: #A855F7; }
.mb-card .action-btn { background: #A855F7; color: #fff; }

/* ─── League Banner ──────────────────────────────────── */

.league-banner {
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 2px solid #CD7F32;
    background: rgba(205, 127, 50, 0.08);
    transition: opacity 0.3s;
}

.league-banner.skeleton {
    opacity: 0.5;
}

.league-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.league-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.league-info {
    flex: 1;
    min-width: 0;
}

.league-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.league-meta {
    font-size: 12px;
    color: var(--text-muted, #888);
    margin-top: 2px;
}

.league-standings-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-medium, #444);
    background: transparent;
    color: var(--text-primary, #fff);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.league-standings-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* ─── League Standings Modal ─────────────────────────── */

.league-modal {
    max-width: 480px;
}

.league-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 2px solid;
    margin-bottom: 12px;
}

.league-modal-icon {
    font-size: 24px;
}

.league-modal-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 16px;
    flex: 1;
}

.league-modal-week {
    font-size: 11px;
    color: var(--text-muted, #888);
}

.league-standings-list {
    max-height: 400px;
    overflow-y: auto;
}

.league-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.league-entry.league-you {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.league-entry.league-promo {
    border-left: 3px solid #22C55E;
}

.league-entry.league-relegate {
    border-left: 3px solid #EF4444;
}

.league-rank {
    width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.league-name {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-score {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary, #fff);
}

.league-games {
    font-size: 12px;
    color: var(--text-muted, #888);
    width: 30px;
    text-align: right;
}

.league-divisions-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light, #333);
}

.league-div-chip {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid;
    opacity: 0.6;
}

.league-div-chip.league-div-current {
    opacity: 1;
    font-weight: 700;
    background: rgba(255,255,255,0.05);
}

/* ─── Sudden Death Mode ──────────────────────────────── */

.sd-banner {
    text-align: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #EF4444;
    letter-spacing: 2px;
    margin-bottom: 12px;
    animation: sd-pulse 2s ease-in-out infinite;
}

@keyframes sd-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 20px 4px rgba(239, 68, 68, 0.3); }
}

.sd-skull { font-size: 16px; }

.sd-survived {
    color: #EF4444 !important;
    font-family: 'Orbitron', sans-serif !important;
}

.sd-death-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: sd-death-in 0.5s ease-out;
}

@keyframes sd-death-in {
    from { opacity: 0; transform: scale(1.2); }
    to { opacity: 1; transform: scale(1); }
}

.sd-death-text {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 32px;
    color: #EF4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.sd-death-survived {
    display: block;
    font-size: 16px;
    color: var(--text-secondary, #bbb);
    margin-top: 12px;
    font-weight: 400;
}

/* SD Results */
.sd-results {
    text-align: center;
}

.sd-result-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.sd-skull-big {
    font-size: 48px;
}

.sd-survived-count {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 56px;
    color: #EF4444;
    line-height: 1;
}

.sd-survived-label {
    font-size: 14px;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sd-share-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    border-radius: 10px;
    border: 2px solid #EF4444;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.sd-share-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ─── Mistake Rewind ─────────────────────────────────── */

.rewind-banner {
    text-align: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #6366F1;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.btn-rewind {
    background: linear-gradient(135deg, #6366F1, #4F46E5) !important;
    color: #fff !important;
    border: none !important;
}

.rewind-comparison {
    border-left: 4px solid #6366F1;
}

.rewind-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.rewind-stat {
    text-align: center;
}

.rewind-stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 24px;
}

.rewind-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #888);
    margin-top: 4px;
}

.rewind-stat.rewind-improved .rewind-stat-value {
    color: #4CAF50;
}

/* ─── True/False Mode ────────────────────────────────── */

.tf-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
}

.tf-btn {
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 20px !important;
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 1px;
}

.tf-true {
    border: 2px solid rgba(34, 197, 94, 0.4) !important;
    background: rgba(34, 197, 94, 0.08) !important;
    color: #22C55E !important;
}

.tf-false {
    border: 2px solid rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #EF4444 !important;
}

.tf-btn.correct {
    background: rgba(34, 197, 94, 0.25) !important;
    border-color: #22C55E !important;
}

.tf-btn.wrong {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #EF4444 !important;
}

.tf-answer-reveal {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 14px;
    animation: fadeIn 0.3s ease-out;
}

.tf-answer-label {
    font-weight: 700;
    color: var(--text-muted, #888);
    margin-right: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Mystery Box Mode ───────────────────────────────── */

.mystery-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 6px;
    color: #A855F7;
    font-weight: 600;
    animation: mystery-shimmer 1.5s ease-in-out infinite;
}

@keyframes mystery-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.mystery-revealed {
    animation: mystery-reveal 0.5s ease-out;
}

@keyframes mystery-reveal {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ─── Daily Duel Results ─────────────────────────────── */

.duel-results {
    border-left: 4px solid #EA580C;
}

.duel-pending {
    text-align: center;
    padding: 12px;
    color: var(--text-secondary, #bbb);
}

.duel-pending-note {
    font-size: 12px;
    color: var(--text-muted, #888);
    margin-top: 4px;
}

.duel-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 18px;
    justify-content: center;
    margin-bottom: 16px;
}

.duel-result-icon {
    font-size: 24px;
}

.duel-xp-bonus {
    font-size: 14px;
    opacity: 0.8;
}

.duel-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.duel-player {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.duel-player-label {
    font-size: 12px;
    color: var(--text-muted, #888);
    text-transform: uppercase;
}

.duel-player-score {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 24px;
}

.duel-player-level {
    font-size: 11px;
    color: var(--text-muted, #888);
}

.duel-vs {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 16px;
    color: var(--text-muted, #888);
}

/* ─── Responsive: New Modes ──────────────────────────── */

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

    .tf-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .rewind-stats {
        flex-direction: column;
        gap: 8px;
    }

    .duel-matchup {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .duel-vs {
        padding: 4px 0;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .action-card {
        padding: 14px 12px;
    }

    .action-icon {
        font-size: 20px;
    }

    .action-icon img {
        width: 36px;
        height: 36px;
    }

    .action-title {
        font-size: 13px;
    }

    .sd-survived-count {
        font-size: 40px;
    }

    .sd-death-text {
        font-size: 24px;
    }

    .tf-btn {
        font-size: 16px !important;
        padding: 16px !important;
    }

    .league-modal-name {
        font-size: 14px;
    }
}
