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

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

#app {
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 20px auto;
}

body.dark-mode #app {
    background-color: #2a2a2a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

header {
    width: 100%;
}

main {
    flex: 1;
    padding-top: 200px;
}

#progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #666666;
}

#quiz-filters-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

#quiz-filters-container .filter-group {
    margin-bottom: 0;
}

body.dark-mode #progress-container {
    color: #cccccc;
}

#jump-input {
    width: 68px;
    padding: 6px 8px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

body.dark-mode #jump-input {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555555;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333333;
}

body.dark-mode h1 {
    color: #ffffff;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333333;
}

body.dark-mode h2 {
    color: #ffffff;
}

.btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 10px auto;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #007bff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#filters-container {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-align: left;
}

body.dark-mode #filters-container {
    border-color: #555555;
    background-color: #333333;
}

#filters-title {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    font-size: 0.95rem;
    color: #555555;
}

body.dark-mode .filter-group label {
    color: #cccccc;
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #ffffff;
    color: #333333;
}

body.dark-mode .filter-group select {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555555;
}

#question-container {
    margin-bottom: 20px;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background-color: #f8f9fa;
    color: #333333;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

body.dark-mode .option-btn {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555555;
}

.option-btn:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

body.dark-mode .option-btn:hover {
    background-color: #454545;
    border-color: #0056b3;
}

.option-btn.correct {
    background-color: #4CAF50;
    color: #ffffff;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

body.dark-mode .option-btn.correct {
    background-color: #66BB6A;
    border-color: #66BB6A;
    box-shadow: 0 0 15px rgba(102, 187, 106, 0.8);
}

.option-btn.incorrect {
    background-color: #F44336;
    color: #ffffff;
    border-color: #F44336;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

body.dark-mode .option-btn.incorrect {
    background-color: #EF5350;
    border-color: #EF5350;
    box-shadow: 0 0 15px rgba(239, 83, 80, 0.8);
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

#explanation-container {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
}

body.dark-mode #explanation-container {
    background-color: #3a3a3a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#explanation-container.hidden {
    opacity: 0;
    display: none;
}

#explanation-text {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #555555;
}

body.dark-mode #explanation-text {
    color: #c0c0c0;
}

#resume-screen p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #666666;
}

body.dark-mode #resume-screen p {
    color: #cccccc;
}

#navigation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

#navigation-buttons .btn {
    flex: 1;
    max-width: 150px;
    margin: 0;
}

#prev-btn:disabled,
#next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .theme-toggle {
    background-color: #3a3a3a;
    border-color: #555555;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    #app {
        margin: 10px auto;
        padding: 20px 15px;
    }
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.2rem;
    }
    #quiz-filters-container {
        grid-template-columns: 1fr;
    }
    .btn {
        padding: 12px 15px;
        font-size: 1rem;
    }
    .option-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    #navigation-buttons {
        flex-direction: column;
        gap: 8px;
    }
    #navigation-buttons .btn {
        max-width: 100%;
    }
    #progress-container {
        font-size: 1rem;
    }
    #jump-input {
        width: 58px;
        padding: 5px 6px;
        font-size: 0.85rem;
    }
    #resume-screen p {
        font-size: 0.9rem;
    }
}


/* Footer Styles */

.footer {
    width: 100%;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-top: auto;
}

body.dark-mode .footer {
    background-color: #262626;
    border-top-color: #404040;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333333;
}

body.dark-mode .footer h3 {
    color: #ffffff;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #ffffff;
    color: #007bff;
    border: 2px solid #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

body.dark-mode .social-icon {
    background-color: #3a3a3a;
    border-color: #0056b3;
    color: #0056b3;
}

.social-icon:hover {
    background-color: #007bff;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

body.dark-mode .social-icon:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.5);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.footer-text {
    font-size: 0.9rem;
    color: #666666;
}

body.dark-mode .footer-text {
    color: #aaaaaa;
}

@media (max-width: 480px) {
    .footer {
        padding: 20px 15px;
    }
    .social-icons {
        gap: 12px;
    }
    .social-icon {
        width: 36px;
        height: 36px;
    }
    .social-icon svg {
        width: 20px;
        height: 20px;
    }
    .footer h3 {
        font-size: 1rem;
    }
    .footer-text {
        font-size: 0.85rem;
    }
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}