:root {
    --primary-color: #4a90e2;
    --secondary-color: #2ecc71;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f1c40f;
    --card-bg: rgba(255, 255, 255, 0.98);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.container:hover {
    box-shadow: var(--hover-shadow);
}

.screen {
    display: none;
    padding: 35px;
    animation: fadeIn 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Welcome Screen */
#welcome-screen h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 35px;
    font-size: 2.8em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rules-card {
    background: var(--background-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.rules-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.rules-card h2 {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.8em;
}

.rules-card ul {
    list-style: none;
    margin-bottom: 30px;
}

.rules-card li {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1em;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.rules-card li:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(5px);
}

.rules-card i {
    color: var(--primary-color);
    font-size: 1.2em;
}

/* Quiz Screen */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    gap: 20px;
}

.timer {
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    transition: var(--transition);
}

.timer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.progress-container {
    flex-grow: 1;
    margin-left: 20px;
}

.progress-text {
    margin-bottom: 8px;
    font-size: 1em;
    font-weight: 500;
}

.progress-bar {
    height: 10px;
    background: var(--background-color);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    width: 0%;
    transition: width 0.5s ease;
}

.question-container {
    margin: 35px 0;
}

.question-container h2 {
    margin-bottom: 25px;
    font-size: 1.4em;
    line-height: 1.5;
}

.options-container {
    display: grid;
    gap: 15px;
}

.option {
    padding: 18px 25px;
    background: var(--background-color);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1em;
    position: relative;
    overflow: hidden;
}

.option:hover {
    background: #e8f0fe;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.option.selected {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.option.selected:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    gap: 20px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

#submit-btn {
    background: var(--success-color);
    color: white;
    min-width: 160px;
    padding: 12px 30px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

#submit-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.question-palette {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.question-palette h3 {
    margin-bottom: 20px;
    font-size: 1.3em;
}

#question-indicators {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.indicator {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--background-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.indicator.answered {
    background: var(--success-color);
    color: white;
}

.indicator.current {
    border: 3px solid var(--primary-color);
    font-weight: 600;
}

/* Result Screen */
.result-card {
    background: var(--background-color);
    padding: 30px;
    border-radius: var(--border-radius);
    margin: 25px 0;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}

.result-item:last-child {
    border-bottom: none;
}

.final-score {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--primary-color);
    padding: 20px 0;
}

.result-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 35px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: var(--text-color);
}

.modal-content p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: #666;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    transition: var(--transition);
    background: var(--background-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn.primary-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn.primary-btn:hover {
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        border-radius: var(--border-radius);
    }

    .screen {
        padding: 25px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
    }

    .timer {
        width: 100%;
        justify-content: center;
    }

    .progress-container {
        margin-left: 0;
        width: 100%;
    }

    .navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
    }

    #submit-btn {
        width: 100%;
        justify-content: center;
    }

    .btn {
        padding: 12px 20px;
        font-size: 1em;
    }

    .modal-content {
        padding: 25px;
    }

    .result-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Answers Modal */
.answers-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
}

.answers-list {
    margin: 20px 0;
    text-align: left;
}

.answer-item {
    background: var(--background-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.answer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.answer-item h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.answer-item .options {
    display: grid;
    gap: 10px;
    margin-left: 25px;
}

.answer-item .option {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1em;
    cursor: default;
    background: white;
}

.answer-item .option.correct {
    background: var(--success-color);
    color: white;
}

.answer-item .option.selected {
    background: var(--error-color);
    color: white;
}

.answer-item .option.selected.correct {
    background: var(--success-color);
}

/* Scrollbar Styling */
.answers-content::-webkit-scrollbar {
    width: 8px;
}

.answers-content::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.answers-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.answers-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .answers-content {
        padding: 20px;
        width: 95%;
    }

    .answer-item {
        padding: 15px;
    }

    .answer-item h4 {
        font-size: 1em;
    }

    .answer-item .options {
        margin-left: 15px;
    }
} 