* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(180deg, #1a0a00 0%, #3d1f00 30%, #8B4513 60%, #D4AF37 80%, #8B4513 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.page {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(20px);
}

.cloud-1 {
    width: 200px;
    height: 60px;
    top: 10%;
    left: 5%;
    animation: floatCloud 20s ease-in-out infinite;
}

.cloud-2 {
    width: 150px;
    height: 50px;
    top: 25%;
    right: 10%;
    animation: floatCloud 25s ease-in-out infinite reverse;
}

.cloud-3 {
    width: 180px;
    height: 55px;
    top: 40%;
    left: 15%;
    animation: floatCloud 22s ease-in-out infinite;
}

@keyframes floatCloud {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

.flower {
    position: absolute;
    font-size: 40px;
    opacity: 0.3;
}

.flower-1 {
    top: 15%;
    right: 5%;
    color: #D4AF37;
    animation: rotateFlower 10s linear infinite;
}

.flower-2 {
    bottom: 20%;
    left: 8%;
    color: #FF69B4;
    animation: rotateFlower 12s linear infinite reverse;
}

.flower-3 {
    top: 60%;
    right: 15%;
    color: #FFD700;
    animation: rotateFlower 15s linear infinite;
}

@keyframes rotateFlower {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lantern {
    position: absolute;
    width: 60px;
    height: 80px;
    background: linear-gradient(180deg, #DC143C, #8B0000);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.5);
}

.lantern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: #D4AF37;
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 15px;
    background: #D4AF37;
}

.lantern-1 {
    top: 5%;
    left: 5%;
    animation: swingLantern 3s ease-in-out infinite;
}

.lantern-2 {
    top: 5%;
    right: 5%;
    animation: swingLantern 3.5s ease-in-out infinite reverse;
}

@keyframes swingLantern {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.captcha-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 245, 235, 0.98) 100%);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(212, 175, 55, 0.1);
    text-align: center;
    position: relative;
    border: 3px solid #D4AF37;
    overflow: hidden;
}

.captcha-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8B0000, #D4AF37, #8B0000);
}

.captcha-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37, #8B0000, #D4AF37);
}

.beauty-section {
    position: relative;
    margin-bottom: 20px;
}

.beauty-image {
    width: 180px;
    height: 220px;
    border-radius: 15px;
    object-fit: cover;
    border: 4px solid #D4AF37;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.beauty-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #8B0000;
    border-radius: 20px;
    pointer-events: none;
    z-index: 0;
}

.beauty-frame::before,
.beauty-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #D4AF37;
}

.beauty-frame::before {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

.beauty-frame::after {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
}

.title-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-decoration-left,
.title-decoration-right {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4AF37);
}

.title-decoration-right {
    background: linear-gradient(90deg, #D4AF37, transparent);
}

.main-title {
    font-size: 42px;
    font-weight: bold;
    color: #8B0000;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
    letter-spacing: 8px;
}

.sub-title {
    font-size: 24px;
    font-weight: normal;
    color: #D4AF37;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.desc {
    font-size: 15px;
    color: #666;
}

.captcha-box {
    margin-bottom: 20px;
}

.captcha-label {
    display: block;
    font-size: 17px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

#captcha-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #D4AF37;
    border-radius: 10px;
    text-align: center;
    outline: none;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.8);
}

#captcha-input:focus {
    border-color: #8B0000;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.2);
}

#captcha-input::placeholder {
    color: #999;
}

.footer-decoration {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.corner-pattern {
    color: #D4AF37;
    font-size: 16px;
    opacity: 0.6;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px 30px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #D4AF37;
}

.btn-secondary:hover:not(:disabled) {
    background: #fff;
    border-color: #8B0000;
    color: #8B0000;
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    color: #DC143C;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
}

.decorative-line {
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    margin: 20px auto 0;
}

.quiz-header {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8B0000, #D4AF37);
    transition: width 0.3s ease;
}

.question-count {
    text-align: right;
    color: #fff;
    font-size: 16px;
}

.quiz-container {
    flex: 1;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.question-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    padding: 18px 20px;
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-item:hover {
    background: #fff9f0;
    border-color: #D4AF37;
}

.option-item.selected {
    background: linear-gradient(135deg, #fff5e6, #fff0d4);
    border-color: #8B0000;
    color: #8B0000;
}

.option-item .option-letter {
    width: 30px;
    height: 30px;
    background: #D4AF37;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.option-item.selected .option-letter {
    background: #8B0000;
}

.option-item .option-text {
    font-size: 16px;
    line-height: 1.5;
}

.quiz-footer {
    width: 100%;
    max-width: 500px;
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.quiz-footer .btn-primary, .quiz-footer .btn-secondary {
    flex: 1;
}

.result-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    padding: 25px;
    text-align: center;
}

.result-title {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.result-content {
    padding: 30px;
}

.avatar-container {
    text-align: center;
    margin-bottom: 25px;
}

.result-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #D4AF37;
    object-fit: cover;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.result-info {
    text-align: center;
    margin-bottom: 30px;
}

.result-level {
    font-size: 36px;
    font-weight: bold;
    color: #8B0000;
    margin-bottom: 15px;
}

.result-description {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

.result-stats {
    margin-bottom: 30px;
}

.stat-item {
    margin-bottom: 15px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.stat-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #8B0000, #D4AF37);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.result-quote {
    background: linear-gradient(135deg, #fff5e6, #fff0d4);
    border-left: 4px solid #D4AF37;
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

.quote-text {
    font-size: 16px;
    color: #666;
    font-style: italic;
    line-height: 1.8;
}

.result-footer {
    background: #f8f8f8;
    padding: 15px;
    text-align: center;
}

.result-tips {
    font-size: 14px;
    color: #999;
}

.result-actions {
    width: 90%;
    max-width: 450px;
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.result-actions .btn-primary, .result-actions .btn-secondary {
    flex: 1;
}

@media (max-width: 480px) {
    .captcha-container {
        padding: 25px 20px;
        width: 95%;
        max-width: 360px;
    }
    
    .beauty-image {
        width: 150px;
        height: 180px;
    }
    
    .main-title {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .sub-title {
        font-size: 20px;
    }
    
    .desc {
        font-size: 14px;
    }
    
    .lantern {
        width: 40px;
        height: 55px;
    }
    
    .flower {
        font-size: 30px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-title {
        font-size: 18px;
    }
    
    .option-item {
        padding: 14px 15px;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .result-level {
        font-size: 28px;
    }
    
    .result-avatar {
        width: 120px;
        height: 120px;
    }
}