:root {
    --primary-color: #FF8F70; /* 暖橘色，温馨 */
    --secondary-color: #4A90E2; /* 科技蓝，辅助 */
    --bg-color: #FFF9F5; /* 极淡的米粉色背景 */
    --text-color: #333333;
    --card-bg: #FFFFFF;
    --border-radius: 16px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px; /* H5 移动端宽度限制 */
    background: var(--card-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
}

/* 顶部导航 */
.header {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #FFB9A3 0%, #FF8F70 100%);
    color: white;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

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

/* 表单步骤容器 */
.step-container {
    padding: 20px;
    display: none; /* 默认隐藏 */
    animation: fadeIn 0.5s ease;
}

.step-container.active {
    display: block;
}

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

/* 标题样式 */
h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    padding-left: 10px;
}

.description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    font-size: 1rem;
    background: #F9F9F9;
    box-sizing: border-box; /* 关键 */
    outline: none;
}

input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

/* 选项按钮组 (多选/单选) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option-btn {
    padding: 12px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    background: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.option-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(255, 143, 112, 0.3);
}

/* 底部按钮 */
.footer-buttons {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-prev {
    background: #F0F0F0;
    color: #666;
}

.btn-next, .btn-submit {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 143, 112, 0.4);
}

/* 加载页动画 */
.loading-screen {
    text-align: center;
    padding-top: 100px;
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 结果页 */
.result-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid #f0f0f0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.name-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
}

.score-badge {
    background: #FFF0EB;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.pinyin {
    color: #888;
    margin-bottom: 10px;
}

.tags span {
    display: inline-block;
    background: #F0F7FF;
    color: var(--secondary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.meaning {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    background: #F9F9F9;
    padding: 10px;
    border-radius: 8px;
}

/* Bazi info box */
.bazi-box {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* --- 访问码弹窗 (门禁系统) --- */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 249, 245, 0.95); /* 模糊遮罩 */
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.auth-card {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 143, 112, 0.15);
    text-align: center;
    border: 1px solid rgba(255, 143, 112, 0.2);
}

.auth-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.auth-title {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.auth-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
}

.code-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 2px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    margin-bottom: 20px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.code-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 143, 112, 0.1);
}

.btn-unlock {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FFB9A3 0%, #FF8F70 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 143, 112, 0.4);
    transition: transform 0.2s;
}

.btn-unlock:active {
    transform: scale(0.98);
}

.contact-kefu {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #999;
}
.contact-kefu a {
    color: var(--secondary-color);
    text-decoration: none;
}