* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    max-width: 700px;
    width: 90%;
    position: relative;
}

.screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: none;
    animation: slideIn 0.5s ease-out;
    position: relative;
}

.screen.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: inherit;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(-2px);
}

.developer-badge {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
}

.welcome-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #666;
    font-weight: 500;
}

.settings-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

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

.setting-group {
    text-align: left;
}

.setting-group label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.setting-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.setting-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.quit-cross {
    position: absolute;
    top: -17.5px;
    right: -17.5px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.quit-cross:hover {
    background: #ff4757;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

.quit-cross:active {
    transform: scale(0.95);
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.progress-info {
    flex: 1;
    min-width: 200px;
}

#question-counter {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.timer-container {
    text-align: center;
}

.timer {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: pulse 1s infinite;
}

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

.timer-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
}

.question-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.question {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.answer-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.answer-input {
    width: 150px;
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.answer-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.score-display {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 1rem;
}

.feedback {
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback.show {
    opacity: 1;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.feedback.timeout {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

/* Results Screen */
.results-content {
    text-align: center;
}

.achievement {
    font-size: 3rem;
    margin-bottom: 1rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.final-score {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.percentage {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 1rem;
}

.performance-message {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.performance-message.excellent {
    background: #d4edda;
    color: #155724;
}

.performance-message.good {
    background: #cce5ff;
    color: #004085;
}

.performance-message.needs-practice {
    background: #fff3cd;
    color: #856404;
}

.results-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    text-align: left;
}

.results-details h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.results-breakdown {
    display: grid;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    font-size: 0.9rem;
}

.result-item.correct {
    border-left-color: #28a745;
}

.result-item.incorrect {
    border-left-color: #dc3545;
}

.result-item.timeout {
    border-left-color: #ffc107;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
    
    .screen {
        padding: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .welcome-content h1 {
        font-size: 1.75rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .question {
        font-size: 2rem;
    }
    
    .game-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .timer {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .answer-section {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .answer-input {
        width: 100%;
        max-width: 200px;
    }
    
    .final-score {
        font-size: 2.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 1rem;
    }
    
    .welcome-content h1 {
        font-size: 1.5rem;
    }
    
    .question {
        font-size: 1.75rem;
    }
    
    .final-score {
        font-size: 2rem;
    }
    
    .results-content h2 {
        font-size: 1.5rem;
    }
} 