:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #ff3131;
    --primary-hover: #d02727;
    --secondary: #ebca4d;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --success: #10b981;
    --error: #ef4444;
}

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

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', Open Sans, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    position: relative;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

/* Glassmorphism base */
.glass-card {
    background: rgba(1, 91, 150, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background decorative blobs */
body::before, body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: float 10s ease-in-out infinite alternate;
}

body::before {
    background: rgba(239, 68, 68, 0.4);
    top: -100px;
    left: -100px;
}

body::after {
    background: rgba(59, 130, 246, 0.3);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

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

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

.screen.active, .screen:not(.hidden) {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ef4444, #60a5fa);
    -webkit-background-clip: text;
    color: transparent;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
    word-break: break-word;
}

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

.highlight {
    color: #fbbf24;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 9999px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(239, 68, 68, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Quiz Screen Specifics */
.quiz-header {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.progress-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fca5a5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    .glass-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.2rem;
    }
    .option-btn {
        font-size: 1rem;
        padding: 1rem;
        min-height: 60px;
    }
    .app-container {
        padding: 0.5rem;
    }
    .primary-btn, .secondary-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.option-btn:active {
    transform: scale(0.98);
}

/* Correct/Incorrect animations */
@keyframes correctFlash {
    0% { background: rgba(255, 255, 255, 0.05); }
    50% { background: rgba(16, 185, 129, 0.4); border-color: #10b981; }
    100% { background: rgba(255, 255, 255, 0.05); }
}

@keyframes wrongFlash {
    0% { background: rgba(255, 255, 255, 0.05); }
    50% { background: rgba(239, 68, 68, 0.4); border-color: #ef4444; }
    100% { background: rgba(255, 255, 255, 0.05); }
}

.option-btn.correct {
    animation: correctFlash 0.5s ease;
}

.option-btn.wrong {
    animation: wrongFlash 0.5s ease;
}

/* Results Screen Specifics */
.score-display {
    font-size: 4rem;
    font-weight: 700;
    margin: 2rem 0;
    background: linear-gradient(135deg, #fbcfe8, #a78bfa);
    -webkit-background-clip: text;
    color: transparent;
}

.status {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    padding: 1rem;
    border-radius: 12px;
}

.status.pass {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status.fail {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
