@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    background: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    width: 100%;
    max-width: 800px;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.screen {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
#welcome-screen {
    text-align: center;
}

#welcome-screen h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.stat i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 2rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

#question-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

#question-type {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

#options-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option {
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.option:hover {
    background: #e2e8f0;
}

.option.selected {
    background: #e0e7ff;
    border-color: var(--primary-color);
}

.option.correct {
    background: #dcfce7;
    border-color: var(--success-color);
}

.option.incorrect {
    background: #fee2e2;
    border-color: var(--error-color);
}

#text-input-container input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

#text-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

/* Results Screen */
.results-container {
    text-align: center;
    margin: 2rem 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 8px solid var(--primary-color);
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scoreIn 1s ease;
}

.score-number {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#score-percentage {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.score-text {
    color: var(--text-secondary);
}

.score-details {
    display: grid;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-item i {
    font-size: 1.2rem;
}

.detail-item i.correct {
    color: var(--success-color);
}

.detail-item i.incorrect {
    color: var(--error-color);
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-dark);
}

.btn.secondary {
    background: var(--secondary-color);
}

.btn.secondary:hover {
    background: #475569;
}

.btn.submit {
    background: var(--success-color);
}

.btn.submit:hover {
    background: #16a34a;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scoreIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* To Make Responsive Design */
@media (max-width: 640px) {
    .container {
        min-height: 100vh;
        border-radius: 0;
    }

    .screen {
        padding: 1.5rem;
    }

    #welcome-screen h1 {
        font-size: 2rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

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

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

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

    .quiz-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .screen {
        padding: 1rem;
    }

    #welcome-screen h1 {
        font-size: 1.8rem;
    }

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

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

/* Question Count Selector */
.question-count-selector {
    margin: 2rem 0;
    text-align: center;
}

.question-count-selector p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.count-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.count-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.count-btn:hover {
    background: var(--primary-color);
    color: white;
}

.count-btn.selected {
    background: var(--primary-color);
    color: white;
}

/* Review Screen */
#review-screen {
    max-height: 90vh;
    overflow-y: auto;
}

.review-item {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.review-item h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.review-question-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.review-options {
    display: grid;
    gap: 0.8rem;
}

.review-option {
    padding: 0.8rem;
    border-radius: var(--border-radius);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-option.correct {
    background: #dcfce7;
    border: 1px solid var(--success-color);
}

.review-option.incorrect {
    background: #fee2e2;
    border: 1px solid var(--error-color);
}

.review-option.user-selected {
    border: 2px solid var(--primary-color);
}

.review-option i {
    font-size: 1rem;
}

.review-option i.fa-check {
    color: var(--success-color);
}

.review-option i.fa-times {
    color: var(--error-color);
}

.review-fill {
    margin-top: 1rem;
}

.review-fill p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.review-fill .answer {
    font-weight: 500;
    color: var(--text-primary);
}

.review-navigation {
    margin-top: 2rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .count-options {
        flex-direction: column;
    }

    .count-btn {
        width: 100%;
    }

    .review-item {
        padding: 1rem;
    }
} 