* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:  linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.header {
    background: var(--card-bg);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items:  center;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight:  700;
    color: #6366f1;
}

.header-info {
    display:  flex;
    gap: 40px;
}

.timer-display,
.score-display {
    text-align: center;
}

.timer-label,
.score-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
}

.timer,
.score {
    font-size: 24px;
    font-weight:  700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    margin-top: 5px;
}

/* Main Content */
.main-content {
    min-height: 70vh;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Section */
.welcome-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.welcome-section h2 {
    font-size: 32px;
    margin-bottom:  10px;
}

.welcome-section p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.quiz-setup {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left:  auto;
    margin-right:  auto;
}

.setup-group {
    margin-bottom: 15px;
}

.setup-group label {
    display: block;
    margin-bottom: 8px;
    font-weight:  600;
}

.setup-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.setup-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size:  16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Quiz Container */
.quiz-container {
    background: var(--card-bg);
    border-radius:  15px;
    padding:  40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    transition: width 0.3s;
    width: 0%;
}

.question-section {
    margin-bottom: 30px;
}

.question-number {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.question-text {
    font-size:  24px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Options */
.options-section {
    margin-bottom: 40px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.option-button {
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.option-button:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(5px);
}

.option-button.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.option-button.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.2);
}

.option-button.incorrect {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.2);
}

/* Quiz Actions */
.quiz-actions {
    display: flex;
    gap: 15px;
    justify-content:  space-between;
}

.quiz-actions .btn {
    flex: 1;
}

/* Results Container */
.results-container {
    background: var(--card-bg);
    border-radius:  15px;
    padding:  40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.score-circle {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.circle-content {
    width: 200px;
    height: 200px;
    border-radius:  50%;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.final-score {
    font-size: 60px;
    font-weight:  700;
}

.final-total {
    font-size: 24px;
    opacity: 0.9;
}

/* Results Stats */
.results-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.stat {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight:  700;
    color: var(--primary-color);
}

/* Results Detail */
.results-detail {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.results-detail h3 {
    margin-bottom: 20px;
}

.answers-review {
    display: grid;
    gap: 15px;
}

.answer-item {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid;
}

.answer-item.correct {
    border-left-color: var(--success-color);
}

.answer-item.incorrect {
    border-left-color: var(--danger-color);
}

.answer-item-number {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.answer-item-question {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.answer-item-your,
.answer-item-correct {
    font-size: 14px;
    margin-bottom: 5px;
}

.answer-item-correct {
    color: var(--success-color);
    font-weight: 600;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius:  8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification.success {
    background: var(--success-color);
    color: white;
}

.notification.error {
    background: var(--danger-color);
    color: white;
}

.notification.warning {
    background: var(--warning-color);
    color: white;
}

/* Responsive */
@media (max-width:  768px) {
    .header-content {
        flex-direction: column;
    }

    .welcome-section {
        padding: 30px 20px;
    }

    .quiz-container {
        padding: 20px;
    }

    .question-text {
        font-size: 18px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .quiz-actions .btn {
        width: 100%;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }

    .results-container {
        padding: 20px;
    }
}