* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 700px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.screen {
    text-align: center;
}

.hidden {
    display: none;
}

/* Start Screen Styles */
.quiz-icon {
    font-size: 4rem;
    color: #764ba2;
    margin-bottom: 1rem;
}

h1 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.intro-text {
    color: #4a5568;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.rules {
    background-color: #f7fafc;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: left;
}

.rules h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules ul {
    list-style: none;
    padding-left: 1.5rem;
}

.rules li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    position: relative;
}

.rules li:before {
    content: "•";
    color: #764ba2;
    font-weight: bold;
    position: absolute;
    left: -1rem;
}

/* Button Styles */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Quiz Screen Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f7fafc;
    border-radius: 15px;
}

.timer, .score {
    font-size: 1.2rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-container {
    flex: 1;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    margin: 0 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.question-number {
    color: #718096;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#question {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.choices {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.choice-btn {
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1.1rem;
    color: #2d3748;
    position: relative;
    overflow: hidden;
}

.choice-btn:hover {
    background-color: #edf2f7;
    border-color: #667eea;
    transform: translateY(-2px);
}

.choice-btn.correct {
    background-color: #c6f6d5;
    border-color: #48bb78;
    color: #2f855a;
}

.choice-btn.wrong {
    background-color: #fed7d7;
    border-color: #f56565;
    color: #c53030;
}

/* End Screen Styles */
.result-icon {
    font-size: 5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.final-score-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.final-score {
    font-size: 4rem;
    font-weight: 700;
    margin: 1rem 0;
}

.max-score {
    font-size: 1.1rem;
    opacity: 0.9;
}

.result-message {
    color: #4a5568;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.category-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #718096;
    font-size: 0.9rem;
}

.category-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-card.selected i,
.category-card.selected h3,
.category-card.selected p {
    color: white;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.difficulty-select,
.questions-select {
    text-align: left;
}

.difficulty-select label,
.questions-select label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background-color: white;
    color: #2d3748;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover,
select:focus {
    border-color: #667eea;
    outline: none;
}

.category-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #2d3748;
}

.category-badge i {
    color: #667eea;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    font-size: 1.5rem;
    color: #667eea;
}

.category-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin: 1rem 0;
}

.end-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-secondary {
    background: #718096;
}

.btn-secondary:hover {
    background: #4a5568;
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .quiz-icon, .result-icon {
        font-size: 3rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-container {
        margin: 1rem 0;
        width: 100%;
    }
    
    #question {
        font-size: 1.2rem;
    }
    
    .choice-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
    
    .final-score {
        font-size: 3rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .end-buttons {
        flex-direction: column;
    }
    
    .category-card i {
        font-size: 2rem;
    }
}
