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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #2d3561 0%, #1a1f3a 50%, #2d3561 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(147, 112, 219, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(100, 149, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

.container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3),
                0 0 1px rgba(255, 255, 255, 0.5) inset;
    max-width: 750px;
    width: 100%;
    padding: 50px;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quiz-header {
    text-align: center;
    margin-bottom: 45px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.quiz-header h1 {
    color: #1a1f3a;
    font-size: 2.75em;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #6b7280;
    font-size: 1.125em;
    font-weight: 400;
    letter-spacing: 0.2px;
    line-height: 1.6;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03) inset;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#question-container {
    min-height: 320px;
    margin-bottom: 35px;
}

#question-text {
    color: #1a1f3a;
    font-size: 1.5em;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.answer-btn {
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 22px 24px;
    font-size: 1.05em;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #374151;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1, #a855f7);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-btn:hover {
    background: #fafafa;
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.answer-btn:hover::before {
    transform: scaleY(1);
}

.answer-btn.selected {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    border-color: transparent;
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.answer-btn.selected::before {
    transform: scaleY(1);
    background: rgba(255, 255, 255, 0.2);
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;
    border: 2px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none;
}

.result-content {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-title {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    padding: 36px 40px;
    border-radius: 20px;
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin: 24px 0;
    letter-spacing: -0.5px;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.result-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: slideShine 3s infinite;
}

@keyframes slideShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.result-description {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 32px;
    border-radius: 18px;
    margin-bottom: 24px;
    line-height: 1.8;
    color: #374151;
    font-size: 1.1em;
    border: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.result-tips {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    padding: 32px;
    border-radius: 18px;
    margin-bottom: 32px;
    border: 2px solid rgba(139, 92, 246, 0.1);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
}

.result-tips h3 {
    color: #1a1f3a;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.result-tips ul {
    list-style: none;
    color: #4b5563;
    line-height: 2;
    padding-left: 0;
}

.result-tips li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 12px;
}

.result-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #8b5cf6;
    font-weight: bold;
    font-size: 1.2em;
}

#restart-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1em;
}

@media (max-width: 600px) {
    body {
        padding: 20px;
    }

    .container {
        padding: 30px 24px;
        border-radius: 20px;
    }

    .quiz-header {
        margin-bottom: 35px;
        padding-bottom: 24px;
    }

    .quiz-header h1 {
        font-size: 2em;
        letter-spacing: -0.3px;
    }

    .subtitle {
        font-size: 1em;
    }

    #question-text {
        font-size: 1.3em;
    }

    .answer-btn {
        padding: 18px 20px;
        font-size: 1em;
        border-radius: 14px;
    }

    .navigation {
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
    }

    .btn {
        width: 100%;
        padding: 14px;
    }

    .result-title {
        font-size: 1.75em;
        padding: 28px 24px;
    }

    .result-description,
    .result-tips {
        padding: 24px;
        font-size: 1em;
    }

    .result-tips h3 {
        font-size: 1.2em;
    }
}
