* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: linear-gradient(135deg, #001e4d, #3a0ca3);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app {
    background: #fff;
    width: 90%;
    max-width: 700px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: #001e4d;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

.welcome-screen, .quiz-container, .results-screen {
    padding: 30px;
}

.welcome-content {
    text-align: center;
}

.welcome-content h2 {
    color: #001e4d;
    margin-bottom: 15px;
    font-size: 28px;
}

.welcome-content p {
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}

.category-selection, .difficulty-selection {
    margin-bottom: 25px;
    text-align: left;
}

.category-selection h3, .difficulty-selection h3 {
    color: #001e4d;
    margin-bottom: 15px;
    font-size: 18px;
}

.categories, .difficulties {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.category-btn, .difficulty-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-btn:hover, .difficulty-btn:hover {
    background: #e0e0e0;
}

.category-btn.active, .difficulty-btn.active {
    background: #001e4d;
    color: white;
}

.start-btn {
    background: #001e4d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.start-btn:hover {
    background: #00308a;
    transform: translateY(-2px);
}

.quiz-container {
    display: none;
}

.progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 25px;
    overflow: hidden;
}

.progress {
    background: #001e4d;
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.question-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.difficulty-badge, .category-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.difficulty-badge {
    background: #e6f7ff;
    color: #1890ff;
}

.category-badge {
    background: #f6ffed;
    color: #52c41a;
}

.quiz h2 {
    font-size: 20px;
    color: #001e4d;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

#answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.btn {
    background: #fff;
    color: #222;
    font-weight: 500;
    width: 100%;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn:hover:not([disabled]) {
    background: #f8f9fa;
    border-color: #001e4d;
}

.btn:disabled {
    cursor: no-drop;
}

.option-letter {
    background: #f0f0f0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hint-btn {
    background: transparent;
    border: 1px solid #001e4d;
    color: #001e4d;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hint-btn:hover {
    background: #001e4d;
    color: white;
}

.navigation {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-btn:hover:not(:disabled) {
    background: #001e4d;
    color: white;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#next-btn {
    background: #001e4d;
    color: white;
}

.results-screen {
    display: none;
    text-align: center;
}

.results-header {
    margin-bottom: 30px;
}

.results-header i {
    font-size: 50px;
    color: #ffd700;
    margin-bottom: 15px;
}

.results-header h2 {
    color: #001e4d;
    font-size: 28px;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #001e4d;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.score-circle::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid white;
}

#final-score {
    font-size: 36px;
    font-weight: 700;
}

.score-label {
    font-size: 14px;
    opacity: 0.8;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-label {
    color: #555;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: #f0f0f0;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #e0e0e0;
}

.action-btn.primary {
    background: #001e4d;
    color: white;
}

.action-btn.primary:hover {
    background: #00308a;
}

.hint-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: #001e4d;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.correct {
    background: #d4edda;
    border-color: #c3e6cb;
}

.incorrect {
    background: #f8d7da;
    border-color: #f5c6cb;
}

/* Responsive design */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .categories, .difficulties {
        justify-content: center;
    }
    
    .quiz-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .navigation {
        width: 100%;
        justify-content: space-between;
    }
    
    .score-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .results-actions {
        flex-direction: column;
    }
}
