* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #fff0f5 0%, #fce4ec 50%, #f8bbd0 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 32px;
}
.header .back-btn {
    display: inline-block;
    color: #e91e63;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.header .back-btn:hover { opacity: 1; }
.header .icon { font-size: 56px; margin-bottom: 12px; }
.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #c2185b;
    margin-bottom: 8px;
}
.header p {
    font-size: 15px;
    color: #ad1457;
    opacity: 0.8;
}

.author-tag-outer {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #e53e3e;
    background: rgba(255,255,255,0.7);
    border: 1px solid #fed7d7;
    border-radius: 20px;
    padding: 4px 14px;
}

/* 卡密区域 */
.card-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(233,30,99,0.1);
    text-align: center;
}
.card-section p { font-size: 14px; color: #666; margin-bottom: 12px; }
.card-input-row {
    display: flex;
    gap: 10px;
}
.card-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #f48fb1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.card-input-row input:focus { border-color: #e91e63; }
.card-input-row button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

/* 进度条 */
.progress-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(233,30,99,0.08);
}
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #888;
}
.progress-info .current { color: #e91e63; font-weight: 600; font-size: 15px; }
.progress-bar-bg {
    height: 8px;
    background: #fce4ec;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f48fb1, #e91e63);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* 题目卡片 */
.question-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(233,30,99,0.1);
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.question-number {
    font-size: 12px;
    color: #f48fb1;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.question-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin-bottom: 24px;
}
.options-list { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid #fce4ec;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    color: #444;
    transition: all 0.2s;
    width: 100%;
}
.option-btn:hover {
    border-color: #f48fb1;
    background: #fff0f5;
    transform: translateX(4px);
}
.option-btn.selected {
    border-color: #e91e63;
    background: linear-gradient(135deg, #fff0f5, #fce4ec);
    color: #c2185b;
    font-weight: 500;
}
.option-key {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fce4ec;
    color: #e91e63;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.option-btn.selected .option-key {
    background: #e91e63;
    color: #fff;
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}
.btn-prev, .btn-next, .btn-submit {
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-prev {
    background: #fce4ec;
    color: #e91e63;
    flex: 1;
}
.btn-prev:hover { background: #f8bbd0; }
.btn-next, .btn-submit {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    flex: 2;
}
.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,30,99,0.3);
}
.btn-next:disabled, .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 结果页 */
.result-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 8px 40px rgba(233,30,99,0.15);
    text-align: center;
    animation: fadeIn 0.5s ease;
}
.result-emoji { font-size: 72px; margin-bottom: 16px; }
.result-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
}
.result-subtitle {
    font-size: 15px;
    color: #888;
    margin-bottom: 24px;
}
.score-display {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    background: linear-gradient(135deg, #fff0f5, #fce4ec);
    border-radius: 50px;
    padding: 10px 28px;
    margin-bottom: 28px;
}
.score-number {
    font-size: 48px;
    font-weight: 800;
    color: #e91e63;
    line-height: 1;
}
.score-unit { font-size: 16px; color: #ad1457; }

.result-description {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    text-align: left;
    background: #fafafa;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.dimension-section { margin-bottom: 24px; }
.dimension-section h4 {
    font-size: 14px;
    color: #888;
    margin-bottom: 14px;
    text-align: left;
}
.dimension-item { margin-bottom: 10px; }
.dimension-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}
.dimension-bar-bg {
    height: 6px;
    background: #fce4ec;
    border-radius: 3px;
    overflow: hidden;
}
.dimension-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f48fb1, #e91e63);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.tags-section { margin-bottom: 24px; }
.tags-section h4 {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
    text-align: left;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.tag {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.tag.strength { background: #e8f5e9; color: #2e7d32; }
.tag.weakness { background: #fff3e0; color: #e65100; }

.advice-box {
    background: linear-gradient(135deg, #fff0f5, #fce4ec);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 28px;
    text-align: left;
}
.advice-box .advice-label {
    font-size: 12px;
    color: #e91e63;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.advice-box p { font-size: 14px; color: #555; line-height: 1.7; }

.btn-retry {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}
.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233,30,99,0.3);
}
.btn-home {
    display: block;
    text-align: center;
    color: #e91e63;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.btn-home:hover { opacity: 1; }

/* 加载 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #e91e63;
    font-size: 16px;
}
.loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #fce4ec;
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

@media (max-width: 480px) {
    .container { padding: 20px 14px 50px; }
    .question-card { padding: 24px 18px; }
    .question-text { font-size: 16px; }
    .result-card { padding: 28px 20px; }
    .score-number { font-size: 40px; }
}

/* 准备界面 */
.intro-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 8px 40px rgba(233,30,99,0.12);
    text-align: center;
    animation: fadeIn 0.4s ease;
}
.intro-emoji { font-size: 72px; margin-bottom: 16px; }
.intro-title {
    font-size: 26px;
    font-weight: 700;
    color: #c2185b;
    margin-bottom: 14px;
}
.intro-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 24px;
}
.intro-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}
.intro-tag {
    padding: 6px 14px;
    background: #fff0f5;
    border: 1px solid #f8bbd0;
    border-radius: 20px;
    font-size: 13px;
    color: #c2185b;
}
.intro-meta {
    font-size: 13px;
    color: #bbb;
    margin-bottom: 28px;
}
.card-section-inline {
    background: #fff0f5;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: center;
}
.card-section-inline p {
    font-size: 13px;
    color: #ad1457;
    margin-bottom: 10px;
}
.card-section-inline .card-input-row input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #f48fb1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    text-align: center;
}
.card-section-inline .card-input-row input:focus { border-color: #e91e63; }
.btn-start {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233,30,99,0.35);
}
