/**
 * 生命密码测评网站 - 公共样式
 * 主色调：#EF9F59（橙黄）
 * 辅助色：#FFD166（浅黄）、#A8E6CF（绿）
 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #e8e8e8;
    color: #333;
    line-height: 1.6;
    padding-bottom: 70px;
}

/* 手机容器 - 电脑端居中显示 */
.mobile-container {
    max-width: 414px;
    margin: 0 auto;
    background: #f5f5f5;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* 颜色变量 */
:root {
    --primary: #EF9F59;
    --primary-light: #FFD166;
    --secondary: #A8E6CF;
    --text-dark: #333;
    --text-gray: #666;
    --text-light: #999;
    --bg-white: #fff;
    --bg-gray: #f5f5f5;
    --border-color: #e5e5e5;
}

/* 通用按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #EF9F59 0%, #FFD166 100%);
    color: #fff;
}

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

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-large {
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
    border-radius: 30px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.card-content {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
}

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

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-light);
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--primary);
}

.radio-item span {
    font-size: 14px;
    color: var(--text-dark);
}

/* 日期选择器样式 */
.date-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-picker select {
    flex: 1;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

/* 农历/阳历切换 */
.calendar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    gap: 12px;
}

.calendar-toggle span {
    font-size: 14px;
    color: var(--text-gray);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ddd;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 12px;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #EF9F59 0%, #FFD166 100%);
    padding: 20px 16px;
    text-align: center;
    color: #fff;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 600;
}

/* Banner图片 */
.banner {
    width: 100%;
    height: auto;
    display: block;
}

/* 报告内容区域 */
.report-section {
    padding: 16px;
}

.report-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    text-align: center;
}

.report-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.report-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.report-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* 档案信息 */
.profile-card {
    background: linear-gradient(135deg, #EF9F59 0%, #FFD166 100%);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    margin-bottom: 16px;
}

.profile-card h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.profile-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-item {
    font-size: 14px;
}

.profile-item span {
    opacity: 0.9;
}

.profile-item strong {
    font-size: 18px;
    color: #fff;
}

/* G号人数字 */
.g-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* 引导图 */
.guide-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
    cursor: pointer;
}

/* 底部悬浮操作栏 */
.float-actions {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    padding: 0 16px;
    display: flex;
    gap: 12px;
    z-index: 99;
}

.float-actions .btn {
    flex: 1;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
}

.modal-content img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* 报告页面底部导航按钮 */
.report-nav-buttons {
    padding: 20px 16px;
    background: #fff;
    margin-top: 20px;
}

.report-nav-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.report-nav-row .nav-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 25px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.report-nav-row .nav-btn-primary {
    background: linear-gradient(135deg, #EF9F59 0%, #FFD166 100%);
    color: #fff;
}

.report-nav-row .nav-btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e5e5e5;
}

.report-nav-full {
    display: flex;
    margin-bottom: 20px;
}

.report-nav-full .nav-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 25px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e5e5e5;
}

.report-qr-section {
    text-align: center;
    padding: 20px;
}

.report-qr-section p {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.report-qr-section img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

/* 响应式 */
@media (max-width: 375px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 414px) {
    html {
        font-size: 16px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

/* 选中文字样式 */
::selection {
    background: var(--primary-light);
    color: var(--text-dark);
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 文字颜色 */
.text-primary {
    color: var(--primary);
}

.text-gray {
    color: var(--text-gray);
}

.text-light {
    color: var(--text-light);
}

/* 文字对齐 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* 间距 */
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}
