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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

body {
    background:
            linear-gradient(315deg, rgba(127, 84, 65, 0.03) 0%, rgba(127, 84, 65, 0.08) 50%, rgba(127, 84, 65, 0.12) 100%) 0 0 / 100% 100%,
            linear-gradient(90deg, #f5f0ed 25%, #f2ece8 25%, #f2ece8 50%, #f5f0ed 50%, #f5f0ed 75%, #f2ece8 75%, #f2ece8) 0 0 / 360px 360px;
}
.animate-bg {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}
.animate-bg:before {
    content: '';
    display: block;
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    transform: rotate(-30deg);
    background-image: url('/assets/common/zx.png');
    background-size: 720px 400px;
    animation: scrollBackground 30s linear infinite; /* 应用动画效果 */
}

@keyframes scrollBackground {
    0% {
        transform: rotate(-40deg) translate(0, 0);
    }
    100% {
        transform: rotate(-40deg) translate(-50%, -50%);
    }
}
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    color: #b4836c;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2em;
    color: #666;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

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

/* 开始界面 */
.intro-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.intro-card h2 {
    color: #7F5441;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8em;
}

.rules-list {
    list-style: none;
    margin-bottom: 30px;
}

.rules-list li {
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-left: 4px solid #7F5441;
    border-radius: 5px;
}

.highlight {
    color: #ff6b6b;
    font-weight: bold;
}

/* 模式选择样式 */
.mode-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.mode-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-card:hover {
    border-color: #7F5441;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(127, 84, 65, 0.2);
}

.mode-card h3 {
    color: #7F5441;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.mode-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.mode-features {
    list-style: none;
    text-align: left;
    margin: 15px 0;
    padding: 0;
}

.mode-features li {
    padding: 8px 0;
    color: #555;
    font-size: 0.9em;
    border-bottom: 1px dashed #dee2e6;
}

.mode-features li:last-child {
    border-bottom: none;
}

.mode-features li::before {
    content: '✓ ';
    color: #7F5441;
    font-weight: bold;
}

.mode-card .btn {
    width: 100%;
    margin-top: 10px;
}

.rank-preview {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.rank-preview h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #7F5441;
}

.rank-items {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.2s;
}

.rank-item:hover {
    transform: translateX(5px);
}

.rank-item.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    color: white;
}

.rank-item.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.rank-item.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.rank-item.platinum {
    background: linear-gradient(135deg, #e5e4e2 0%, #f5f5f5 100%);
    color: #333;
}

.rank-item.legend {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background-color: #7F5441;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 206, 101, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 206, 101, 0.6);
}

.btn-secondary {
    background: #fff;
    color: #7F5441;
    border: 2px solid #7F5441;
}

.btn-secondary:hover {
    background: #7F5441;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 答题界面 */
.progress-bar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffce65;
}

.progress-track {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ffce65;
    width: 0%;
    transition: width 0.3s ease;
}

.question-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.question-text {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.5;
}

.options-container {
    display: grid;
    gap: 12px;
}

.option {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.option:hover {
    background: #e9ecef;
    border-color: #ffce65;
    transform: translateX(5px);
}

.option.selected {
    background: #7F5441;
    color: white;
    border-color: #7F5441;
}
.option.selected .special-color {
    color: white !important;
}

/* 答案反馈区域 */
.answer-feedback {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in;
}

.answer-feedback.correct {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.answer-feedback.incorrect {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.feedback-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.feedback-title.correct {
    color: #155724;
}

.feedback-title.incorrect {
    color: #721c24;
}

.feedback-answer {
    margin-bottom: 10px;
    color: #333;
}

.feedback-explanation {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    color: #666;
    font-style: italic;
}

/* 答案反馈区域 */
.answer-feedback {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in;
}

.answer-feedback.correct {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.answer-feedback.incorrect {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.feedback-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.feedback-title.correct {
    color: #155724;
}

.feedback-title.incorrect {
    color: #721c24;
}

.feedback-answer {
    margin-bottom: 10px;
    color: #333;
}

.feedback-explanation {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    color: #666;
    font-style: italic;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.quiz-controls .btn {
    flex: 1;
}

/* 结果界面 */
.result-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-card h2 {
    text-align: center;
    color: #ffce65;
    margin-bottom: 30px;
    font-size: 2em;
}

.score-display {
    text-align: center;
    margin-bottom: 30px;
}

.score-number {
    font-size: 4em;
    font-weight: bold;
    color: #ffce65;
    display: inline-block;
}

.score-total {
    font-size: 2em;
    color: #999;
    display: inline-block;
}

/* 证书样式 */
.certificate {
    margin: 30px 0;
    padding: 20px;
}

.certificate-border {
    border: 8px solid #ffce65;
    border-radius: 15px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}


.certificate-content {
    text-align: center;
}

.certificate-title {
    font-size: 2em;
    color: #ffce65;
    margin-bottom: 20px;
}

.rank-badge {
    margin: 30px auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.badge-icon {
    font-size: 4em;
    margin-bottom: 10px;
}

.badge-name {
    font-size: 2em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.rank-description {
    font-size: 1.2em;
    color: #666;
    margin: 20px 0;
    line-height: 1.6;
}

.certificate-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #dee2e6;
}

.date {
    color: #999;
    margin-bottom: 10px;
}

.motto {
    color: #ffce65;
    font-style: italic;
    font-weight: bold;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.result-actions .btn {
    min-width: 150px;
}

/* 答案解析 */
.answer-review {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid #e9ecef;
}

.answer-review h3 {
    color: #ffce65;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.review-list {
    display: grid;
    gap: 15px;
}

.review-item {
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
}

.review-item.correct {
    border-left: 4px solid #28a745;
}

.review-item.incorrect {
    border-left: 4px solid #dc3545;
}

.review-question {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.review-answer {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 5px;
}

.review-explanation {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #dee2e6;
}

/* 免责声明样式 */
.disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.85em;
    color: #856404;
    line-height: 1.6;
}

.disclaimer strong {
    color: #664d03;
}

/* B站链接样式 */
.bili-link {
    color: #00a1d6;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.bili-link:hover {
    color: #0084c7;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .intro-card, .result-card {
        padding: 20px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 1.2em;
    }
    
    .option {
        font-size: 1em;
        padding: 12px 15px;
    }
    
    .score-number {
        font-size: 3em;
    }
    
    .badge-name {
        font-size: 1.5em;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}
