:root {
    --primary-color: #4A90E2;
    --secondary-color: #F5A623;
    --success-color: #7ED321;
    --error-color: #D0021B;
    --text-color: #333;
    --bg-color: #F8F9FA;
    --font-family: 'Comic Neue', 'Comic Sans MS', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.mode-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-btn {
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    background-color: #eee;
    color: #666;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: bold;
}

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

.question-box {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow wrapping for logic puzzles */
}

.logic-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    gap: 0.5rem;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

input[type="tel"] {
    font-size: 2rem;
    padding: 0.5rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    width: 150px;
    text-align: center;
}

button {
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #357ABD;
}

.secondary-btn {
    background-color: #999;
}

.secondary-btn:hover {
    background-color: #777;
}

.feedback {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 2rem;
}

.success {
    color: var(--success-color);
}

.error {
    color: var(--error-color);
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .question-box {
        font-size: 2.5rem;
    }

    input[type="tel"] {
        width: 100px;
    }
}