:root {
    --primary-gradient: linear-gradient(135deg, #319a37 0%, #ffd200 100%);
    --secondary-gradient: linear-gradient(135deg, #e6302a 0%, #ffd200 100%);
    --zimbabwean-gradient: linear-gradient(135deg, #319a37 0%, #ffd200 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: #f0f2f5;
    color: var(--text-dark);
    min-height: 100vh;
    overscroll-behavior-y: none;
    /* Prevent pull-to-refresh on mobile */
}

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

/* Header - Zimbabwe Theme (Green, Yellow, Red, Black with Zimbabwe Bird) */
.main-header {
    background: linear-gradient(135deg, #319a37 0%, #ffd200 40%, #e6302a 70%, #000000 100%);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.logo-area .subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* 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.zimbabwean {
    background: var(--zimbabwean-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: #319a37;
    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-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.timer {
    font-size: 3.5rem;
    font-weight: 800;
    color: #319a37;
    font-variant-numeric: tabular-nums;
}

.timer.warning {
    color: #e53e3e;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.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 2fr;
    gap: 1rem;
}

/* 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 Details Section */
.round-details {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.details-column h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    font-weight: 600;
}

.details-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.details-column li {
    background: #f7fafc;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2d3748;
    border-left: 3px solid #319a37;
}

.details-column:last-child li {
    border-left-color: #e6302a;
}

@media (max-width: 500px) {
    .round-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
