:root {
    --primary-color: #0B6B66;
    --primary-light: #34B3A8;
    --accent-color: #6E60E7;
    --accent-light: #F8F5FF;
    --text-dark: #1F2937;
    --text-secondary: #4B5563;
    --text-gray: #9CA3AF;
    --radius-normal: 14px;
    --radius-large: 20px;
    --shadow-light: 0 4px 12px rgba(0,0,0,0.05);
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: linear-gradient(135deg, #F0FCFB, #E9F5F9, #F5F2FF); 
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px 15px;
    color: var(--text-dark);
}

.page { 
    background: rgba(255,255,255,0.9); 
    backdrop-filter: blur(20px);
    padding: 24px; 
    border-radius: var(--radius-large); 
    box-shadow: 0 8px 24px rgba(0,0,0,0.06); 
    width: 100%;
    max-width: 420px; 
    animation: fadeIn 0.5s ease-out;
}

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

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.back-btn, .menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-large);
    color: white;
    margin-bottom: 24px;
}
.main-title {
    font-size: 48px;
    margin-bottom: 8px;
}
.sub-title {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 8px;
}
.desc {
    font-size: 14px;
    opacity: 0.9;
}

.version-cards {
    margin-bottom: 28px;
}
.card {
    background: white;
    padding: 22px;
    border-radius: var(--radius-normal);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    border: 2px solid #f3f4f6;
}
.card.active {
    border-color: var(--accent-color);
}
.card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.hot {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 600;
}
.check {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
}

.start-btn, .restart-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--radius-normal);
    background: var(--accent-color);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin: 16px 0;
    transition: 0.3s;
}
.start-btn:hover {
    transform: translateY(-2px);
}

.guide-text, .history-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin: 12px 0;
    display: block;
    text-decoration: none;
}

.notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: var(--radius-normal);
    margin-top: 20px;
    cursor: pointer;
}

.quiz-progress {
    margin: 0 0 20px 0;
}
.progress-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}
#progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    display: block;
}

#options button {
    display: block;
    width: 100%;
    padding: 18px;
    margin: 12px 0;
    border: 1px solid #eee;
    border-radius: var(--radius-normal);
    background: white;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}
#options button:hover {
    border-color: var(--accent-color);
    background: var(--accent-light);
}
#options button.selected {
    border-color: var(--accent-color);
    background: var(--accent-color) !important;
    color: white !important;
    font-weight: 600;
}

/* 核心修复：上下一题按钮 大小完全一致 */
.quiz-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.quiz-buttons button {
    flex: 1;
    flex-basis: 0;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.quiz-buttons .prev-btn {
    background: #f1f1f1;
    color: #333;
}
.quiz-buttons .next-btn {
    background: #6E60E7;
    color: white;
}
.quiz-buttons button:disabled {
    background: #ccc !important;
    color: #999 !important;
    cursor: not-allowed;
}
.quiz-buttons button:hover:not(:disabled) {
    opacity: 0.9;
}

.result-tag {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.result-img { 
    width: 100%; 
    border-radius: var(--radius-large); 
    margin: 16px 0; 
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    object-fit: cover;
}
#res-name { 
    font-size: 30px; 
    font-weight: 800; 
    margin: 8px 0 4px 0;
    text-align: center;
}
#res-title { 
    font-size: 17px; 
    color: var(--accent-color); 
    margin: 0 0 12px 0;
    font-weight: 600;
    text-align: center;
}
.result-desc { 
    font-size: 15px; 
    color: var(--text-secondary); 
    line-height: 1.7; 
    text-align: justify; 
    margin: 0 0 20px 0;
}

.social-btn{
    width:100%;
    padding:16px;
    margin:8px 0;
    border-radius:var(--radius-normal);
    background: var(--accent-light);
    color:var(--accent-color);
    border:none;
    font-weight:600;
    cursor:pointer;
}
.match-text {
    padding: 16px;
    background: #f9fafb;
    border-radius: var(--radius-normal);
    font-size: 15px;
    line-height: 1.8;
    margin: 12px 0;
}

.qrcode-box {
    text-align: center;
    margin: 24px 0;
}
.qrcode-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:999;
}
.modal-content{
    background:white;
    width:90%;
    max-width:400px;
    border-radius:20px;
    max-height:80vh;
    overflow-y:auto;
}
.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px;
    border-bottom:1px solid #eee;
}
.close-btn{
    background:none;
    border:none;
    font-size:24px;
    cursor:pointer;
}
.report-item{
    padding:16px;
    border-bottom:1px solid #eee;
}
.empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.chart-box {
    width: 100%;
    height: 260px;
    margin: 20px 0;
    background: white;
    border-radius: var(--radius-normal);
    padding: 10px;
    box-shadow: var(--shadow-light);
}
#personalityChart {
    width: 100% !important;
    height: 100% !important;
}
