/* Sports Trivia Styles */

.trivia-home {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.challenge-header {
    text-align: center;
    margin-bottom: 2rem;
}

.challenge-header h1 {
    color: #16A34A;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.challenge-description {
    font-size: 1.2rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.challenge-date {
    font-size: 1rem;
    color: #9CA3AF;
    font-weight: 500;
}

.challenge-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #16A34A;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
}

.user-session-status {
    margin-bottom: 2rem;
}

.play-section {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.play-section h2 {
    color: #111827;
    margin-bottom: 1rem;
}

.game-rules {
    text-align: left;
    margin: 1.5rem 0;
    background: #F9FAFB;
    border-radius: 8px;
    padding: 1.5rem;
}

.game-rules h3 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.game-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-rules li {
    padding: 0.5rem 0;
    color: #4B5563;
    font-size: 0.95rem;
}

.play-buttons {
    margin-top: 1.5rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.login-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6B7280;
}

.login-note a {
    color: #16A34A;
    text-decoration: none;
    font-weight: 500;
}

.login-note a:hover {
    text-decoration: underline;
}

.leaderboard-preview {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 2rem;
}

.leaderboard-preview h2 {
    color: #111827;
    margin-bottom: 1.5rem;
    text-align: center;
}

.leaderboard-table {
    margin-bottom: 1.5rem;
}

.leaderboard-table table {
    width: 100%;
    margin-bottom: 0;
}

.leaderboard-table th {
    background: #F9FAFB;
    color: #374151;
    font-weight: 600;
    padding: 0.75rem;
    border-bottom: 2px solid #E5E7EB;
}

.leaderboard-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #F3F4F6;
}

.leaderboard-table tr:hover {
    background: #F9FAFB;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trivia-home {
        padding: 1rem 0.5rem;
    }
    
    .challenge-header h1 {
        font-size: 2rem;
    }
    
    .challenge-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .play-section {
        padding: 1.5rem;
    }
    
    .leaderboard-preview {
        padding: 1.5rem;
    }
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.alert-danger {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
}

.alert h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.alert p {
    margin-bottom: 0.5rem;
}

.alert p:last-child {
    margin-bottom: 0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #16A34A;
    color: white;
    border-color: #16A34A;
}

.btn-primary:hover {
    background: #15803D;
    border-color: #15803D;
    color: white;
    text-decoration: none;
}

.btn-outline-primary {
    background: transparent;
    color: #16A34A;
    border-color: #16A34A;
}

.btn-outline-primary:hover {
    background: #16A34A;
    color: white;
    text-decoration: none;
}

/* Game Play Styles */
.trivia-play {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-header h1 {
    color: #16A34A;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.game-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #16A34A;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #6B7280;
}

.question-container {
    margin-bottom: 2rem;
}

.question-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.question-header {
    margin-bottom: 1.5rem;
}

.difficulty-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.difficulty-1 { background: #10B981; }
.difficulty-2 { background: #F59E0B; }
.difficulty-3 { background: #EF4444; }
.difficulty-4 { background: #8B5CF6; }
.difficulty-5 { background: #1F2937; }

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.answer-options {
    display: grid;
    gap: 1rem;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.answer-option:hover {
    border-color: #16A34A;
    background: #F0FDF4;
}

.answer-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #F3F4F6;
    border-radius: 50%;
    font-weight: 700;
    color: #374151;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option-text {
    font-size: 1rem;
    color: #374151;
    line-height: 1.5;
}

.auth-required {
    text-align: center;
    padding: 2rem;
    background: #FEF3C7;
    border-radius: 8px;
    margin-top: 2rem;
}

.start-game {
    text-align: center;
    padding: 3rem 2rem;
}

.start-game h3 {
    margin-bottom: 1rem;
    color: #111827;
}

.game-completed,
.game-failed {
    text-align: center;
    padding: 2rem;
}

/* Leaderboard Styles */
.trivia-leaderboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h1 {
    color: #16A34A;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.leaderboard-header h2 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.leaderboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.leaderboard-table-container {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.leaderboard-table th {
    background: #F9FAFB;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #E5E7EB;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #F3F4F6;
}

.leaderboard-table tr:hover {
    background: #F9FAFB;
}

.rank-cell {
    width: 80px;
    text-align: center;
}

.rank-medal {
    font-size: 1.5rem;
}

.rank-number {
    font-weight: 600;
    color: #6B7280;
}

.player-cell {
    font-weight: 600;
    color: #111827;
}

.time-cell {
    font-weight: 600;
    color: #16A34A;
}

.completed-cell {
    color: #6B7280;
    font-size: 0.875rem;
}

.no-scores {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.no-scores h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.leaderboard-actions {
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Answer feedback styles */
.answer-feedback {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    border: 2px solid #e9ecef;
}

.answer-feedback.correct {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.answer-feedback.incorrect {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.answer-feedback h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.answer-feedback p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

/* Final results styles */
.game-results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    border: 2px solid #e9ecef;
}

.game-results h3 {
    margin: 0 0 1.5rem 0;
    font-size: 2rem;
}

.final-score {
    margin: 1.5rem 0;
}

.final-score p {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.failure-message {
    color: #6c757d;
    font-style: italic;
    margin-top: 1rem;
}

.game-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.game-actions .btn {
    min-width: 150px;
}
