* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"><circle cx="20" cy="20" r="2"/><path d="M10 40 L30 40 M20 35 L20 45"/><circle cx="80" cy="20" r="5" fill="rgba(255,255,255,0.02)"/><path d="M60 60 Q70 50 80 60 Q70 70 60 60"/></g></svg>');
    background-size: 150px 150px;
    background-repeat: repeat;
    animation: float 25s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER STYLES ===== */
.quiz-header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.quiz-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== PROGRESS BAR ===== */
.progress-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 10%;
}

.progress-text {
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== START SCREEN ===== */
.start-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 50px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.start-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

.start-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #f1f5f9;
}

.start-card p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    line-height: 1.6;
}

.quiz-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-icon {
    font-size: 1.5rem;
}

/* ===== QUIZ SCREEN ===== */
.quiz-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* ===== TIMER STYLES ===== */
.timer-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.timer-circle {
    position: relative;
}

.timer-svg {
    transform: rotate(-90deg);
}

#timer-progress {
    stroke-dasharray: 157;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 600;
    color: #6366f1;
}

/* ===== QUESTION STYLES ===== */
.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.question-number {
    font-size: 0.9rem;
    color: #8b5cf6;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5;
    color: #f1f5f9;
    margin-bottom: 0;
}

/* ===== ANSWERS STYLES ===== */
.answers-container {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.answer-btn {
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.answer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #6366f1;
    transform: translateX(5px);
}

.answer-btn:hover::before {
    left: 100%;
}

.answer-btn.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #e0e7ff;
}

.answer-btn.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #d1fae5;
    animation: correctPulse 0.6s ease-out;
}

.answer-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fecaca;
    animation: wrongShake 0.6s ease-out;
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-next,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.btn-next {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    width: 100%;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== RESULT SCREEN ===== */
.result-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 50px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: celebrate 1s ease-out;
}

@keyframes celebrate {
    0% {
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

.result-card h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #f1f5f9;
}

.score-display {
    margin-bottom: 40px;
}

.final-score {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.score-label {
    font-size: 1.1rem;
    color: #cbd5e1;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-message {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: #cbd5e1;
    font-size: 1.1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .progress-bar {
        width: 150px;
    }

    .start-card,
    .quiz-card,
    .result-card {
        padding: 30px 20px;
        margin: 20px 0;
    }

    .start-card h2 {
        font-size: 2rem;
    }

    .quiz-info {
        grid-template-columns: 1fr;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .final-score {
        font-size: 3rem;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-next,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .quiz-header h1 {
        font-size: 1.4rem;
    }

    .start-card h2 {
        font-size: 1.6rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .answer-btn {
        padding: 15px;
        font-size: 0.9rem;
    }

    .final-score {
        font-size: 2.5rem;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Poppins', sans-serif;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
        color: white;
        min-height: 100vh;
        position: relative;
        overflow-x: hidden;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"><circle cx="20" cy="20" r="2"/><path d="M10 40 L30 40 M20 35 L20 45"/><circle cx="80" cy="20" r="5" fill="rgba(255,255,255,0.02)"/><path d="M60 60 Q70 50 80 60 Q70 70 60 60"/></g></svg>');
        background-size: 150px 150px;
        background-repeat: repeat;
        animation: float 25s ease-in-out infinite;
        z-index: -1;
    }

    @keyframes float {

        0%,
        100% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-15px);
        }
    }

    /* ===== CONTAINER ===== */
    .container {
        max-width: 900px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .quiz-header {
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 20px 0;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .logo-section {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .logo {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    }

    .quiz-header h1 {
        font-size: 1.8rem;
        font-weight: 600;
        background: linear-gradient(135deg, #60a5fa, #a78bfa);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .progress-section {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .progress-bar {
        width: 200px;
        height: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        overflow: hidden;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #6366f1, #8b5cf6);
        border-radius: 4px;
        transition: width 0.3s ease;
        width: 10%;
    }

    .progress-text {
        font-weight: 600;
        color: #cbd5e1;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 40px 0;
        min-height: calc(100vh - 120px);
        display: flex;
        align-items: center;
    }

    .screen {
        display: none;
        animation: fadeIn 0.5s ease-out;
    }

    .screen.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .start-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 25px;
        padding: 50px;
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    }

    .start-icon {
        font-size: 4rem;
        margin-bottom: 20px;
        animation: bounce 2s infinite;
    }

    @keyframes bounce {

        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateY(0);
        }

        40% {
            transform: translateY(-20px);
        }

        60% {
            transform: translateY(-10px);
        }
    }

    .start-card h2 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 15px;
        color: #f1f5f9;
    }

    .start-card p {
        font-size: 1.2rem;
        color: #cbd5e1;
        margin-bottom: 30px;
        line-height: 1.6;
    }

    .quiz-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        margin: 30px 0;
    }

    .info-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 20px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .info-icon {
        font-size: 1.5rem;
    }

    /* ===== QUIZ SCREEN ===== */
    .quiz-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 25px;
        padding: 40px;
        max-width: 700px;
        margin: 0 auto;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
        position: relative;
    }

    /* ===== TIMER STYLES ===== */
    .timer-container {
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }

    .timer-circle {
        position: relative;
    }

    .timer-svg {
        transform: rotate(-90deg);
    }

    #timer-progress {
        stroke-dasharray: 157;
        stroke-dashoffset: 0;
        transition: stroke-dashoffset 1s linear;
    }

    .timer-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.2rem;
        font-weight: 600;
        color: #6366f1;
    }

    .question-container {
        text-align: center;
        margin-bottom: 30px;
    }

    .question-number {
        font-size: 0.9rem;
        color: #8b5cf6;
        font-weight: 600;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .question-text {
        font-size: 1.4rem;
        font-weight: 500;
        line-height: 1.5;
        color: #f1f5f9;
        margin-bottom: 0;
    }

    /* ===== ANSWERS STYLES ===== */
    .answers-container {
        display: grid;
        gap: 15px;
        margin-bottom: 30px;
    }

    .answer-btn {
        padding: 20px;
        border: 2px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.05);
        color: white;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: left;
        position: relative;
        overflow: hidden;
    }

    .answer-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
    }

    .answer-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: #6366f1;
        transform: translateX(5px);
    }

    .answer-btn:hover::before {
        left: 100%;
    }

    .answer-btn.selected {
        background: rgba(99, 102, 241, 0.2);
        border-color: #6366f1;
        color: #e0e7ff;
    }

    .answer-btn.correct {
        background: rgba(16, 185, 129, 0.2);
        border-color: #10b981;
        color: #d1fae5;
        animation: correctPulse 0.6s ease-out;
    }

    .answer-btn.wrong {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
        color: #fecaca;
        animation: wrongShake 0.6s ease-out;
    }

    @keyframes correctPulse {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.02);
        }

        100% {
            transform: scale(1);
        }
    }

    @keyframes wrongShake {

        0%,
        100% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-5px);
        }

        75% {
            transform: translateX(5px);
        }
    }

    .answer-btn:disabled {
        cursor: not-allowed;
        opacity: 0.7;
    }

    /* ===== BUTTONS ===== */
    .btn-primary,
    .btn-next,
    .btn-secondary {
        padding: 15px 30px;
        border: none;
        border-radius: 50px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-block;
        text-align: center;
    }

    .btn-primary {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: white;
        box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
    }

    .btn-next {
        background: linear-gradient(135deg, #10b981, #059669);
        color: white;
        box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
        width: 100%;
    }

    .btn-next:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
    }

    .btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

    /* ===== RESULT SCREEN ===== */
    .result-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 25px;
        padding: 50px;
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    }

    .result-icon {
        font-size: 4rem;
        margin-bottom: 20px;
        animation: celebrate 1s ease-out;
    }

    @keyframes celebrate {
        0% {
            transform: scale(0) rotate(0deg);
        }

        50% {
            transform: scale(1.2) rotate(180deg);
        }

        100% {
            transform: scale(1) rotate(360deg);
        }
    }

    .result-card h2 {
        font-size: 2.2rem;
        font-weight: 700;
        margin-bottom: 30px;
        color: #f1f5f9;
    }

    .score-display {
        margin-bottom: 40px;
    }

    .final-score {
        font-size: 4rem;
        font-weight: 700;
        background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 10px;
    }

    .score-label {
        font-size: 1.1rem;
        color: #cbd5e1;
    }

    .result-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }

    .stat-item {
        padding: 20px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .stat-number {
        font-size: 2rem;
        font-weight: 700;
        color: #6366f1;
        margin-bottom: 5px;
    }

    .stat-label {
        font-size: 0.9rem;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .result-message {
        font-size: 1.1rem;
        color: #cbd5e1;
        margin-bottom: 30px;
        line-height: 1.6;
    }

    .result-actions {
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* ===== LOADING OVERLAY ===== */
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border: 4px solid rgba(255, 255, 255, 0.1);
        border-left: 4px solid #6366f1;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 20px;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    .loading-overlay p {
        color: #cbd5e1;
        font-size: 1.1rem;
    }

    /* ===== RESPONSIVE DESIGN ===== */
    @media (max-width: 768px) {
        .container {
            padding: 0 15px;
        }

        .header-content {
            flex-direction: column;
            text-align: center;
        }

        .progress-bar {
            width: 150px;
        }

        .start-card,
        .quiz-card,
        .result-card {
            padding: 30px 20px;
            margin: 20px 0;
        }

        .start-card h2 {
            font-size: 2rem;
        }

        .quiz-info {
            grid-template-columns: 1fr;
        }

        .question-text {
            font-size: 1.2rem;
        }

        .final-score {
            font-size: 3rem;
        }

        .result-stats {
            grid-template-columns: 1fr;
        }

        .result-actions {
            flex-direction: column;
        }

        .btn-primary,
        .btn-next,
        .btn-secondary {
            width: 100%;
        }
    }

    @media (max-width: 480px) {
        .quiz-header h1 {
            font-size: 1.4rem;
        }

        .start-card h2 {
            font-size: 1.6rem;
        }

        .question-text {
            font-size: 1.1rem;
        }

        .answer-btn {
            padding: 15px;
            font-size: 0.9rem;
        }

        .final-score {
            font-size: 2.5rem;
        }
    }

    /* ===== CUSTOM SCROLLBAR ===== */
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(99, 102, 241, 0.5);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(99, 102, 241, 0.7);
    }
}
