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

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

.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.screen {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.screen.active {
    display: block;
}

/* Home Screen */
.home-content {
    text-align: center;
    padding: 20px 0;
}

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

.subtitle {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 40px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-weight: 500;
}

.feature-icon {
    font-size: 1.5rem;
}

.start-flex {
    position: relative;
    /* border: 1px solid red; */
    display: flex;
    justify-content: center;
    align-items: center;
}

#start-btn{
    width: 30%;
}

.sound-controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.sound-controls .btn {
    min-width: 140px;
}

#toggle-sound {
    font-size: 30px;
    background: none;
    border: none;
    position: absolute;
    right: 14%;
    transform: translateX(-40%) translateY(-50%);
    top: 50%;
}

@media only screen and (max-width: 768px) {
    #toggle-sound {
        transform: translateX(0) translateY(-50%);
        width: fit-content;
        right: -40px;
    }

    #start-btn{
        width: 80%;
    }

    .start-flex{
        justify-content: left;
        width: 100%;
    }
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 120px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.6);
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 30px;
}

.quiz-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.quiz-info h2 {
    color: #4a5568;
    font-size: 1.5rem;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: pulse 1s infinite;
}

.timer-container.warning {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    animation: pulse 0.5s infinite;
}

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

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.timer-icon {
    font-size: 1.2rem;
}

.timer {
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

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

.progress-text {
    font-weight: 600;
    color: #4a5568;
    min-width: 40px;
}

.question-container {
    margin-bottom: 30px;
}

#question-text {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 25px;
    line-height: 1.6;
}

.options-container {
    display: grid;
    gap: 15px;
}

.option {
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
    margin: 6px 0;
}

.option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.option.correct {
    border-color: #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
}

.option.incorrect {
    border-color: #f56565;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(229, 90, 36, 0.1));
}

.option.locked {
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.option.locked::after {
    content: '🔒';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.option.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
}

.option-label {
    font-weight: 600;
    color: #667eea;
    margin-right: 10px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

/* Hint Container */
.hint-container {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #fdcb6e;
    border-radius: 15px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
    animation: slideIn 0.3s ease-out;
}

.hint-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #856404;
}

.hint-icon {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.hint-text {
    font-style: italic;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Navigation button adjustments for hint button */
.navigation {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.navigation .btn {
    min-width: 120px;
}

/* Results Screen */
.results-content {
    text-align: center;
    padding: 20px 0;
}

.results-content h2 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 30px;
}

.score-container {
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

#score-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.score-text {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 600;
}

.results-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: 600;
}

.result-item.correct {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    color: #38a169;
}

.result-item.incorrect {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(229, 90, 36, 0.1));
    color: #e53e3e;
}

.result-icon {
    font-size: 1.2rem;
}

.answers-review {
    margin-bottom: 30px;
    text-align: left;
}

.review-item {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #e2e8f0;
}

.review-item.correct {
    border-left-color: #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05), rgba(56, 161, 105, 0.05));
}

.review-item.incorrect {
    border-left-color: #f56565;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.05), rgba(229, 90, 36, 0.05));
}

.review-question {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.review-answer {
    color: #4a5568;
    font-size: 0.9rem;
}

.review-answer.correct {
    color: #38a169;
    font-weight: 600;
}

.review-answer.incorrect {
    color: #e53e3e;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Lose Game Screen */
.lose-content {
    text-align: center;
    padding: 20px 0;
}

.lose-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.lose-content h2 {
    font-size: 2.5rem;
    color: #e53e3e;
    margin-bottom: 15px;
}

.lose-message {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 30px;
    line-height: 1.6;
}

.current-question-info {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(229, 90, 36, 0.1));
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid rgba(245, 101, 101, 0.2);
}

.current-question-info h3 {
    color: #e53e3e;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.current-question-info p {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.correct-answer-display {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    border-radius: 10px;
    padding: 15px;
    border: 2px solid rgba(72, 187, 120, 0.3);
}

.correct-label {
    font-weight: 600;
    color: #38a169;
    margin-right: 10px;
}

#lose-correct-answer {
    font-weight: 700;
    color: #38a169;
    font-size: 1.1rem;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Category Selection */
.category-selection {
    margin: 1.5rem 0;
    text-align: center;
}

.category-selection label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.category-dropdown {
    padding: 0.75rem 1rem;
    border: 2px solid #007bff;
    border-radius: 10px;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.category-dropdown:hover {
    border-color: #0056b3;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.category-dropdown:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}







/* Skeleton Loading */
.skeleton-loading {
    margin: 2rem 0;
}

.skeleton-question {
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
    animation: shimmer 1.5s infinite;
}

.skeleton-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-option {
    height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Win/Lose Messages */
.win-message {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideInDown 0.6s ease-out;
}

.win-message h2 {
    color: #28a745;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.win-subtitle {
    color: #28a745;
    font-size: 1.2rem;
    font-weight: 500;
}

.lose-message {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideInDown 0.6s ease-out;
}

.lose-message h2 {
    color: #dc3545;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.lose-subtitle {
    color: #dc3545;
    font-size: 1.2rem;
    font-weight: 500;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .screen {
        padding: 20px;
    }

    .title {
        font-size: 2rem;
    }

    .features {
        flex-direction: column;
        gap: 15px;
    }

    .quiz-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .navigation {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .results-summary {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    #score-percentage {
        font-size: 1.5rem;
    }

    .lose-icon {
        font-size: 3rem;
    }

    .lose-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 15px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    #question-text {
        font-size: 1.1rem;
    }

    .option {
        padding: 15px;
    }

    .lose-content h2 {
        font-size: 1.8rem;
    }

    .lose-message {
        font-size: 1rem;
    }
}