:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Background floating shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.8;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #ff007f;
    top: -100px;
    left: -100px;
    animation: float 10s infinite alternate ease-in-out;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #00f0ff;
    bottom: -50px;
    right: -50px;
    animation: float 12s infinite alternate-reverse ease-in-out;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #ffe600;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 15s infinite alternate ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.1); }
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

.quiz-container {
    width: 90%;
    max-width: 600px;
    min-height: 400px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(20px);
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

h1, h2 {
    font-weight: 800;
    margin-bottom: 1rem;
    color: #111827;
}

h1 {
    font-size: 2.5rem;
    background: -webkit-linear-gradient(45deg, #f43f5e, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#score-tracker {
    color: var(--primary);
}

/* Question */
.question-container {
    margin-bottom: 2rem;
}

.question-container h2 {
    font-size: 1.5rem;
    line-height: 1.4;
}

/* Options */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: white;
    border: 2px solid transparent;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.option-btn:active {
    transform: translateY(1px);
}

/* Option States */
.option-btn.selected {
    background: #eef2ff;
    border-color: var(--primary);
    color: var(--primary);
}

.option-btn.correct {
    background: #ecfdf5;
    border-color: var(--success);
    color: #065f46;
    animation: pulse 0.5s;
}

.option-btn.wrong {
    background: #fef2f2;
    border-color: var(--danger);
    color: #991b1b;
    animation: shake 0.5s;
}

/* Primary Button */
.primary-btn {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    align-self: center;
    margin-top: 1rem;
}

.primary-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.primary-btn.hidden {
    display: none;
}

/* Feedback Area */
.feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 1;
    transition: opacity 0.3s;
}

.feedback.hidden {
    opacity: 0;
    pointer-events: none;
}

.feedback.correct-text { color: var(--success); }
.feedback.wrong-text { color: var(--danger); }

/* End Screen */
.final-score-display {
    font-size: 4rem;
    font-weight: 800;
    background: -webkit-linear-gradient(45deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
