/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f7;
    color: #1c1c1e;
    line-height: 1.5;
    padding: 2rem 1rem;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.02);
    padding: 2rem;
}

/* 引导页 */
.guide-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.guide-container {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.guide-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #3a3a3c, #1c1c1e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1.125rem;
    color: #6c6c70;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.9375rem;
    color: #8e8e93;
    margin-bottom: 2rem;
}

/* 按钮基础 */
.btn-start, .btn-submit, .btn-copy, .btn-pk, .btn-wooden, .btn-reset, .btn-refresh-msg, #trashBtn {
    display: inline-block;
    background: #1c1c1e;
    color: white;
    border: none;
    border-radius: 48px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-start:hover, .btn-submit:hover, .btn-copy:hover, .btn-pk:hover, .btn-wooden:hover, .btn-reset:hover, .btn-refresh-msg:hover, #trashBtn:hover {
    background: #2c2c2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-start:active, .btn-submit:active, .btn-copy:active, .btn-pk:active, .btn-wooden:active, .btn-reset:active, .btn-refresh-msg:active, #trashBtn:active {
    transform: translateY(0);
}

.btn-refresh-msg, #trashBtn {
    background: #e9e9ef;
    color: #1c1c1e;
    box-shadow: none;
}

.btn-refresh-msg:hover, #trashBtn:hover {
    background: #d9d9df;
}

/* 表单 */
.form-group {
    margin-bottom: 1.75rem;
}

label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #1c1c1e;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid #d9d9df;
    background: transparent;
    transition: border-color 0.2s;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-bottom-color: #1c1c1e;
}

input[type="range"] {
    padding: 0;
    -webkit-appearance: none;
    background: transparent;
}
input[type="range"]:focus {
    outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: #e9e9ef;
    border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1c1c1e;
    margin-top: -6px;
    cursor: pointer;
}
input[type="range"]:focus::-webkit-slider-runnable-track {
    background: #ccc;
}

.hint {
    font-size: 0.75rem;
    color: #8e8e93;
    margin-top: 0.25rem;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    font-weight: normal;
}

/* 进度条 */
.progress-bar {
    background: #e9e9ef;
    border-radius: 20px;
    height: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.progress-fill {
    background: #1c1c1e;
    width: 0%;
    height: 100%;
    border-radius: 20px;
    transition: width 0.3s ease;
}

/* 结果页 */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
}
.result-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.score-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 40px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #e9e9ef;
    color: #1c1c1e;
}
.level-s { background: #e3f2e9; color: #1e6f2f; }
.level-a { background: #e3f0fc; color: #2c5f8a; }
.level-b { background: #fff0e0; color: #b35f00; }
.level-c { background: #ffe6e5; color: #b13e3e; }

/* 标签容器 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}
/* 基础标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 40px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1c1c1e;
    transition: transform 0.1s ease;
}
.tag:hover {
    transform: translateY(-1px);
}

/* 彩色标签类 */
.tag-red { background: #ffe6e5; color: #b13e3e; }
.tag-blue { background: #e3f0fc; color: #2c5f8a; }
.tag-green { background: #e3f2e9; color: #1e6f2f; }
.tag-purple { background: #f0e6ff; color: #6f42c1; }
.tag-orange { background: #fff0e0; color: #b35f00; }
.tag-cyan { background: #e0f7fa; color: #007c91; }

.analysis, .fun-facts, .personal-msg, .daily-energy, .healing-box {
    background: #f9f9fb;
    border-radius: 24px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}
.analysis h3, .fun-facts h3, .personal-msg h3, .daily-energy h3, .healing-box h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.2px;
}
.analysis p, .fun-facts p, .personal-msg p {
    margin: 0.5rem 0;
    font-size: 0.9375rem;
    color: #3a3a3c;
}
.fun-facts p {
    border-left: 2px solid #d9d9df;
    padding-left: 0.75rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}
.share-buttons button {
    flex: 1;
}
.reset-button {
    margin: 1rem 0;
}
.decompression {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f2;
}
#meritCounter {
    font-size: 0.875rem;
    color: #8e8e93;
    margin-top: 0.5rem;
}
#comfortMsg {
    margin-top: 0.75rem;
    font-style: normal;
    color: #6c6c70;
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    .container {
        padding: 1.5rem;
    }
    .share-buttons {
        flex-direction: column;
    }
}