:root {
    --primary-gradient: linear-gradient(135deg, #008751 0%, #00b368 100%);
    --secondary-gradient: linear-gradient(135deg, #008751 0%, #00b368 100%);
    --nigerian-gradient: linear-gradient(135deg, #008751 0%, #00b368 100%);
    --card-gradient: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --skip-color: #fce4ec;
    --text-dark: #2d3748;
    --text-light: #f7fafc;
    --shadow-soft: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-hard: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #faf7f4;
    color: var(--text-dark);
    min-height: 100vh;
    overscroll-behavior-y: none;
}

/* App Container */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
}

/* Header - Nigeria Theme (Green White Green) */
.main-header {
    background: linear-gradient(135deg, #008751 0%, #00a85e 40%, #008751 100%);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-area h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.2;
}

.logo-area .subtitle {
    font-size: 0.7rem;
    opacity: 0.6;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Views */
.view {
    display: none;
    padding: 1.5rem;
    flex: 1;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

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

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

/* Common UI Elements */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s active;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-dark);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-skip {
    background: var(--skip-color);
    color: #d81b60;
}

.btn-danger {
    background: #fc8181;
    color: white;
}

.btn-text {
    background: none;
    color: #718096;
    font-size: 0.9rem;
    text-transform: none;
    margin-top: 1rem;
}

/* Inputs */
.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-bottom: 2rem;
}

.cat-btn {
    aspect-ratio: 1.3;
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-btn:active {
    transform: scale(0.95);
}

.cat-btn.nigerian {
    background: var(--nigerian-gradient);
    color: white;
}

.cat-btn.nsfw {
    border: 2px solid #fc8181;
    background: #fff5f5;
    color: #c53030;
}

.cat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cat-name {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
}

/* Ready Screen */
.ready-screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 1.2rem;
}

.ready-team-name {
    font-size: 2rem;
    font-weight: 900;
    color: #2d3748;
}

.ready-category-badge {
    background: #edf2f7;
    color: #008751;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
}

.ready-hint {
    color: #a0aec0;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.ready-start-btn {
    margin-top: 1.5rem;
    font-size: 1.3rem;
    padding: 1.2rem 2rem;
    animation: pulse 2s infinite;
}

/* Countdown Overlay */
.countdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.countdown-overlay.active {
    display: flex;
}

.countdown-number {
    font-size: 8rem;
    font-weight: 900;
    color: white;
    opacity: 0;
    transform: scale(0.5);
}

.countdown-number.pop {
    animation: countdownPop 0.7s ease forwards;
}

.countdown-number.go {
    color: #48bb78;
}

@keyframes countdownPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Game Screen - Timer Bar */
.timer-bar {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

/* Timer Display */
.timer-display {
    text-align: center;
    margin-bottom: 0.5rem;
}

.timer-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.timer-value.warning {
    color: #e53e3e;
}

.timer-label {
    display: block;
    font-size: 0.65rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 2px;
}

/* Progress Bar */
.timer-progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.timer-progress-fill {
    height: 100%;
    width: 100%;
    background: #008751;
    border-radius: 4px;
    transition: width 1s linear;
}

.timer-progress-fill.warning {
    background: #e53e3e;
}

.game-card {
    background: var(--card-gradient);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-hard);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-badge {
    background: #edf2f7;
    color: #718096;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.main-word {
    font-size: 2.2rem;
    font-weight: 900;
    color: #2d3748;
    line-height: 1.2;
    margin: 1.5rem 0;
}

.taboo-section {
    background: rgba(237, 242, 247, 0.5);
    border-radius: 12px;
    padding: 1rem;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.taboo-section.taboo-hidden h4,
.taboo-section.taboo-hidden .taboo-list {
    display: none;
}

.taboo-section.taboo-hidden {
    background: transparent;
    padding: 0;
}

.taboo-section h4 {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.taboo-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.taboo-item {
    background: white;
    color: #e53e3e;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Taboo Toggle Button on Game Card */
.taboo-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
    align-self: center;
}

.taboo-toggle-btn:active {
    transform: scale(0.97);
}

.toggle-switch {
    display: inline-block;
    width: 32px;
    height: 18px;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    transition: left 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-switch.on {
    background: #48bb78;
}

.toggle-switch.on::after {
    left: 16px;
}

.toggle-switch.off {
    background: #cbd5e0;
}

.toggle-switch.off::after {
    left: 2px;
}

/* Game Mode Selector on Home Screen */
.game-mode-selector {
    margin-bottom: 1.5rem;
    text-align: center;
}

.game-mode-label {
    display: block;
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.game-mode-buttons {
    display: flex;
    background: #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.game-mode-btn {
    flex: 1;
    padding: 0.7rem 0.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: #718096;
}

.game-mode-btn.active {
    background: white;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-mode-btn:active {
    transform: scale(0.97);
}

.game-mode-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 0.5rem;
}

.game-controls {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0.75rem;
}

.game-controls .btn {
    padding: 1.1rem;
    border-radius: 14px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.game-controls .btn-skip {
    background: #fce4ec;
    color: #d81b60;
    border: none;
}

.game-controls .btn-success {
    background: #48bb78;
    color: white;
    border: none;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: #4a5568;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Settings Toggle */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

/* Round End Screen - Time's Up */
.round-end-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.round-end-hero h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0;
}

.round-end-subtitle {
    color: #a0aec0;
    font-size: 0.95rem;
    margin: 0;
}

/* Final Score Card */
.final-score-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    text-align: center;
    margin-bottom: 1rem;
}

.final-score-label {
    font-size: 0.7rem;
    color: #008751;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.final-score-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: #008751;
    line-height: 1.1;
}

.final-score-total {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.final-score-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.final-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.final-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.final-stat-icon.correct {
    background: rgba(72, 187, 120, 0.15);
    color: #38a169;
}

.final-stat-icon.skipped {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
}

.final-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
}

.final-stat-label {
    font-size: 0.65rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.final-stat-text {
    display: flex;
    flex-direction: column;
}

.final-stat-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
}

/* Round Summary Card */
.round-summary-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.round-summary-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.round-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.round-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.round-summary-item.correct {
    background: rgba(72, 187, 120, 0.1);
    color: #276749;
}

.round-summary-item.skipped {
    background: rgba(229, 62, 62, 0.08);
    color: #c53030;
}

.round-summary-item .result-mark {
    font-weight: 700;
    font-size: 0.85rem;
}

/* Team Scoreboard */
.scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.team-score-box {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.team-score-box h3 {
    font-size: 0.8rem;
    color: #a0aec0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.team-score-box span {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
}
