:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --ugandan-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 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 - Uganda Theme */
.main-header {
    background: linear-gradient(135deg, #000000 0%, #FCDC04 50%, #D90000 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);
    /* Improve readability on yellow */
}

.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.ugandan {
    background: var(--ugandan-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;
}

/* Game Screen */
.timer-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.timer {
    font-size: 3.5rem;
    font-weight: 800;
    color: #5a67d8;
    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;
}

.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);
}

.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;
}