:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --background: #0f172a;
    --surface: rgba(255, 255, 255, 0.1);
    --surface-hover: rgba(255, 255, 255, 0.15);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--secondary);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -50px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* Quiz Container */
.quiz-container {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Header */
.quiz-header {
    margin-bottom: 2rem;
    text-align: center;
}

.quiz-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

/* Quiz Content */
.question-card {
    margin-bottom: 2rem;
}

#question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 600;
    color: var(--text);
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.option-btn.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #34d399;
}

.option-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: #fca5a5;
}

/* Feedback */
.feedback-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent);
    animation: slideUp 0.3s ease-out;
}

.feedback-box.success {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.feedback-box.error {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.feedback-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feedback-box p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Controls */
.controls {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--secondary);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -50px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* Quiz Container */
.quiz-container {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Header */
.quiz-header {
    margin-bottom: 2rem;
    text-align: center;
}

.quiz-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

/* Quiz Content */
.question-card {
    margin-bottom: 2rem;
}

#question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 600;
    color: var(--text);
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.option-btn.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #34d399;
}

.option-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: #fca5a5;
}

/* Feedback */
.feedback-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent);
    animation: slideUp 0.3s ease-out;
}

.feedback-box.success {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.feedback-box.error {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.feedback-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feedback-box p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Controls */
.controls {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none !important;
}

/* Start Screen */
.start-screen {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-out;
}

.start-screen h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.start-screen p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.info-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid var(--glass-border);
}

/* Results */
.results-screen {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-out;
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0%, var(--surface) 0%);
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: var(--background);
    border-radius: 50%;
}

.score-circle span {
    position: relative;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#final-msg {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.time-taken {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .quiz-container {
        padding: 1.5rem;
    }

    .quiz-header h1 {
        font-size: 1.5rem;
    }

    #question-text {
        font-size: 1.1rem;
    }

    .start-screen h1 {
        font-size: 2rem;
    }
}