/* CAD Offsite v2 - Player Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0e1a;
    --bg-card: rgba(15, 20, 40, 0.85);
    --border: rgba(99, 102, 241, 0.2);
    --accent: #6366f1;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --factual: #f59e0b;
    --hallucination: #a855f7;
    --bias: #ec4899;
    --radius: 14px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1040 50%, #0a0e1a 100%);
    color: var(--text);
    min-height: 100vh;
}

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

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Hero */
.hero {
    text-align: center;
    padding: 40px 20px 20px;
}

.hero-icon {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(16px);
    margin-bottom: 20px;
}

.card-center {
    text-align: center;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.card h2 i {
    color: var(--accent);
    margin-right: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(15, 20, 40, 0.6);
    color: var(--text);
    font-family: inherit;
    font-size: 1.05rem;
    text-align: center;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.25);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Error */
.error-text {
    color: var(--error);
    margin-top: 12px;
    font-size: 0.9rem;
}

/* Nav Links */
.nav-links {
    text-align: center;
    margin-top: 20px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 12px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a i {
    margin-right: 4px;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.round-badge {
    background: var(--accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.team-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Timer */
.timer {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--success);
    transition: color 0.3s;
}

.timer.urgent {
    color: var(--warning);
    animation: pulse 1s ease infinite;
}

.timer.critical {
    color: var(--error);
    animation: pulse 0.5s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Word Display */
.word-display {
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    line-height: 2.4;
    border: 1px solid var(--border);
}

.word {
    display: inline;
    padding: 4px 2px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
    margin-right: 4px;
    font-size: 1.05rem;
}

.word:hover {
    background: rgba(255, 255, 255, 0.08);
}

.word.selected {
    background: rgba(99, 102, 241, 0.3);
    border-bottom: 2px solid var(--accent);
    font-weight: 600;
}

/* Review colors */
.word.review-tp {
    background: rgba(16, 185, 129, 0.3);
    border-bottom: 2px solid var(--success);
}

.word.review-fp {
    background: rgba(239, 68, 68, 0.3);
    border-bottom: 2px solid var(--error);
}

.word.review-fn {
    background: rgba(245, 158, 11, 0.3);
    border-bottom: 2px solid var(--warning);
    text-decoration: underline;
}

.review-display {
    cursor: default;
    margin-top: 16px;
}

.review-display .word {
    cursor: default;
}

/* Game Actions */
.game-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.game-actions span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.game-instructions {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 8px;
}

.game-instructions p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.game-instructions i {
    color: var(--accent);
    margin-right: 6px;
}

.game-instructions strong {
    color: var(--text);
}

/* Score Display */
.score-display {
    margin: 20px 0;
}

.score-big {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.score-big.positive {
    color: var(--success);
}

.score-big.negative {
    color: var(--error);
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.stat-item {
    padding: 16px 12px;
    border-radius: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item.correct .stat-value {
    color: var(--success);
}

.stat-item.wrong .stat-value {
    color: var(--error);
}

.stat-item.missed .stat-value {
    color: var(--warning);
}

.stat-item.time .stat-value {
    color: var(--accent);
}

/* Category Breakdown */
.category-breakdown {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.cat-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cat-badge.factual {
    background: rgba(245, 158, 11, 0.15);
    color: var(--factual);
}

.cat-badge.hallucination {
    background: rgba(168, 85, 247, 0.15);
    color: var(--hallucination);
}

.cat-badge.bias {
    background: rgba(236, 72, 153, 0.15);
    color: var(--bias);
}

.cat-badge i {
    margin-right: 4px;
}

/* Final */
.final-accuracy {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
}

.final-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .score-big {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}