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

body {
    font-family: 'Microsoft YaHei', '黑体', sans-serif;
    background: linear-gradient(135deg, #e6e6fa 0%, #f0e6ff 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.artistic-decoration {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.artistic-text {
    position: absolute; top: 60px; left: 60px;
    display: flex; flex-direction: column;
    align-items: flex-start; user-select: none;
}
.text-line {
    font-family: 'Arial Black', sans-serif;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.7);
    line-height: 1; margin-bottom: 5px;
    writing-mode: vertical-rl;
}
.project-sekai { font-size: 26px; margin-bottom: 18px;
    -webkit-text-stroke: 1.8px rgba(255,255,255,0.7); }
.colorful-stage { font-size: 48px; margin-bottom: 18px;
    -webkit-text-stroke: 2.5px rgba(255,255,255,0.7); }
.feat-miku { font-size: 20px;
    -webkit-text-stroke: 1.2px rgba(255,255,255,0.7); }

#loading-page {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e6e6fa 0%, #f0e6ff 100%);
    z-index: 1000; display: flex;
    flex-direction: column; justify-content: center; align-items: center;
    transition: opacity .5s;
}
.loading-animation {
    position: absolute; bottom: 70px; right: 70px;
    width: 120px; height: 120px;
}
.loading-ring {
    position: absolute; width: 22px; height: 22px;
    border-radius: 50%; background: #fff;
    border: 3px solid #888;
    animation: ringPulse 1.5s ease-in-out infinite;
}
@keyframes ringPulse {
    0%,100% { transform: scale(.8); opacity: .5; }
    50% { transform: scale(1.2); opacity: 1; }
}

#test-container {
    display: none; width: 100%; max-width: 820px;
    min-height: 520px; background: #f8f8f8;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    position: relative; z-index: 2;
}
.test-card { display: flex; flex-direction: column; height: 100%; }

.question-section {
    background: #5CE1E6; color: #fff;
    padding: 36px 28px; min-height: 22%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
}
.question-text { font-size: 22px; font-weight: bold; margin-bottom: 8px; }
.question-counter { font-size: 16px; opacity: .9; }
.question-hint {
    font-size: 12px; opacity: .7; margin-top: 6px;
    font-style: italic;
}

.answer-section {
    flex: 1; padding: 36px 28px;
    display: flex; flex-direction: column;
    justify-content: space-between; background: #f5f0ff;
}

.slider-container {
    margin-bottom: 24px; background: #fff;
    border-radius: 14px; padding: 26px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.slider-label {
    text-align: center; font-size: 16px;
    color: #4A4A6A; margin-bottom: 16px; font-weight: bold;
}
.slider-controls {
    display: flex; align-items: center;
    justify-content: center; gap: 16px;
}
.control-btn {
    width: 42px; height: 42px; border-radius: 12px;
    border: 2px solid #e0e0e0; background: #fff;
    font-size: 22px; color: #4A4A6A; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; font-weight: bold; user-select: none;
}
.control-btn:hover { background: #f5f5f5; transform: scale(1.05); }
.control-btn:active { transform: scale(.95); }
.slider-track {
    flex: 1; height: 8px; background: #e0e0e0;
    border-radius: 4px; position: relative;
    margin: 0 10px; cursor: pointer;
}
.slider-fill {
    height: 100%; background: #5CE1E6;
    border-radius: 4px; transition: width .1s; pointer-events: none;
}
.slider-thumb {
    position: absolute; top: 50%; transform: translate(-50%,-50%);
    width: 22px; height: 22px; background: #fff;
    border: 3px solid #5CE1E6; border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transition: left .1s; pointer-events: none;
}
.slider-value {
    text-align: center; margin-top: 14px;
    font-size: 30px; color: #FF6B9D; font-weight: bold;
}
.slider-value-label {
    text-align: center; font-size: 13px;
    color: #888; margin-top: 4px;
}

.progress-bar-container {
    width: 100%; height: 6px; background: #e0e0e0;
    border-radius: 3px; margin-bottom: 20px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; background: linear-gradient(90deg, #5CE1E6, #FF6B9D);
    border-radius: 3px; transition: width .3s;
}

.navigation-buttons {
    display: flex; justify-content: space-between; margin-top: 16px;
}
.test-button {
    padding: 13px 32px; border: none; border-radius: 25px;
    font-size: 16px; font-weight: bold; cursor: pointer;
    transition: all .3s; min-width: 130px; text-align: center;
}
.primary-button {
    background: #5CE1E6; color: #fff;
    box-shadow: 0 4px 8px rgba(92,225,230,.3);
}
.primary-button:hover {
    background: #4DD0D5; transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(92,225,230,.4);
}
.secondary-button {
    background: #fff; color: #4A4A6A; border: 2px solid #e0e0e0;
}
.secondary-button:hover {
    background: #f5f5f5; transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}
.button-full { width: 100%; }

.disclaimer {
    color: #6C6C9D; font-size: 13px;
    text-align: center; margin-bottom: 22px; line-height: 1.7;
}

/* ===== 结果页 ===== */
.result-title {
    font-size: 28px; font-weight: bold;
    margin-bottom: 10px; color: #fff;
}
.result-character {
    font-size: 24px; font-weight: bold;
    margin: 8px 0; color: rgba(255,255,255,.95);
}
.result-score-badge {
    display: inline-block; padding: 6px 20px;
    background: rgba(255,255,255,.25); border-radius: 20px;
    font-size: 20px; font-weight: bold; color: #fff;
    margin-top: 8px;
}

.radar-container {
    display: flex; justify-content: center;
    margin: 20px 0; background: #fff;
    border-radius: 14px; padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.radar-svg { width: 300px; height: 300px; }

.dim-comparison {
    background: #fff; border-radius: 14px;
    padding: 20px; margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.dim-row {
    display: flex; align-items: center;
    margin-bottom: 12px; gap: 10px;
}
.dim-row:last-child { margin-bottom: 0; }
.dim-name {
    width: 60px; font-size: 13px;
    color: #4A4A6A; font-weight: bold; text-align: right;
}
.dim-bar-container {
    flex: 1; height: 22px; background: #f0f0f0;
    border-radius: 11px; position: relative; overflow: hidden;
}
.dim-bar-user {
    position: absolute; top: 0; left: 0;
    height: 50%; border-radius: 6px 6px 0 0;
    transition: width .8s; opacity: .8;
}
.dim-bar-char {
    position: absolute; bottom: 0; left: 0;
    height: 50%; border-radius: 0 0 6px 6px;
    transition: width .8s; opacity: .8;
}
.dim-values {
    width: 80px; font-size: 12px; color: #888; text-align: left;
}
.dim-legend {
    display: flex; justify-content: center;
    gap: 24px; margin-bottom: 14px; font-size: 12px; color: #666;
}
.legend-dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; margin-right: 4px; vertical-align: middle;
}

.top3-container { display: flex; gap: 12px; margin: 16px 0; }
.top3-card {
    flex: 1; background: #fff; border-radius: 12px;
    padding: 16px 12px; text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    cursor: pointer; transition: all .3s;
    border: 2px solid transparent;
}
.top3-card.active { border-color: #5CE1E6; transform: scale(1.03); }
.top3-card:hover { transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.top3-rank { font-size: 14px; color: #999; font-weight: bold; margin-bottom: 4px; }
.top3-name { font-size: 16px; font-weight: bold; color: #4A4A6A; margin-bottom: 4px; }
.top3-score { font-size: 20px; font-weight: bold; margin-bottom: 2px; }
.top3-label { font-size: 11px; color: #aaa; }

.character-info {
    margin: 16px 0; padding: 18px;
    background: #fff; border-radius: 12px;
    border-left: 5px solid #5CE1E6;
    font-size: 14px; line-height: 1.8; color: #4A4A6A;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    max-height: 240px; overflow-y: auto;
}

.insight-box {
    background: linear-gradient(135deg, #f8f4ff, #f0f8ff);
    border-radius: 12px; padding: 18px; margin: 16px 0;
    border: 1px solid rgba(92,225,230,.3);
}
.insight-title { font-size: 15px; font-weight: bold; color: #5CE1E6; margin-bottom: 10px; }
.insight-text { font-size: 13px; line-height: 1.7; color: #555; white-space: pre-wrap; }

.result-buttons { display: flex; justify-content: space-between; margin-top: 24px; }

.score-detail {
    display: flex; justify-content: center;
    gap: 20px; margin: 12px 0; flex-wrap: wrap;
}
.score-item { text-align: center; font-size: 12px; color: #888; }
.score-item-value { font-size: 18px; font-weight: bold; color: #4A4A6A; }

@media (max-width: 600px) {
    .top3-container { flex-direction: column; }
    .radar-svg { width: 260px; height: 260px; }
    .question-text { font-size: 18px; }
    .artistic-text { top: 30px; left: 30px; }
    .project-sekai { font-size: 20px; }
    .colorful-stage { font-size: 36px; }
    .feat-miku { font-size: 16px; }
}
