/* 全站统一样式 - 简约高端设计 */

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

/* 全局字体和背景 */
body {
    background: #f5f2ed;
    color: #4a3728;
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    min-height: 100vh;
    line-height: 1.7;
    font-weight: 400;
}

/* 主标题样式 */
.main-title, h1 {
    text-align: center;
    font-size: 1.8rem;
    color: #4a3728;
    letter-spacing: 0.15em;
    font-family: 'Noto Serif SC', serif;
    margin: 40px 0 15px 0;
    font-weight: 500;
}

.main-title .star {
    color: #b8a082;
    margin: 0 15px;
    font-size: 1rem;
}

/* 副标题样式 */
.sub-title, .subtitle {
    text-align: center;
    color: #b8a082;
    font-size: 0.9rem;
    margin: 10px 0 40px 0;
    letter-spacing: 0.08em;
    font-weight: 400;
}

/* 二级标题 */
h2 {
    font-size: 1.3rem;
    color: #4a3728;
    margin: 25px 0 18px 0;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* 三级标题 */
h3 {
    font-size: 1.1rem;
    color: #4a3728;
    margin: 20px 0 12px 0;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* 四级标题 */
h4 {
    font-size: 1rem;
    color: #4a3728;
    margin: 15px 0 10px 0;
    font-weight: 500;
}

/* 段落文字 */
p {
    color: #4a3728;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
    font-weight: 400;
}

/* 链接样式 */
a {
    color: #b8a082;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4a3728;
}

/* 卡片容器 */
.card, .section, .chart-section {
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(184,160,130,0.08);
    border: 1px solid rgba(184,160,130,0.15);
}

/* 解释框样式 */
.explanation-box {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid rgba(184,160,130,0.15);
}

/* 按钮基础样式 */
.btn, button {
    background: #b8a082;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    letter-spacing: 0.05em;
    min-height: 44px; /* 确保最小触摸目标大小 */
    min-width: 44px; /* 确保最小触摸目标大小 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover, button:hover {
    background: #a08f73;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(184,160,130,0.25);
}

/* 主要按钮 */
.btn-primary {
    background: #4a3728;
}

.btn-primary:hover {
    background: #3d2e20;
}

/* 输入框样式 */
input, textarea, select {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(184,160,130,0.2);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #4a3728;
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    transition: border-color 0.3s ease;
    min-height: 44px; /* 确保最小触摸目标大小 */
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #b8a082;
    box-shadow: 0 0 0 3px rgba(184,160,130,0.1);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(184,160,130,0.08);
}

th, td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(184,160,130,0.15);
    color: #4a3728;
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    font-size: 0.9rem;
}

th {
    background: rgba(184,160,130,0.08);
    font-weight: 500;
    color: #4a3728;
}

/* 导航样式 */
.nav, .navigation {
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(184,160,130,0.15);
    backdrop-filter: blur(10px);
}

.nav-item {
    color: #4a3728;
    font-size: 0.9rem;
    padding: 12px 18px;
    transition: color 0.3s ease;
    font-weight: 400;
}

.nav-item:hover {
    color: #b8a082;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #bfa77a;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-top: 1px solid #f0e9e0;
    background: rgba(255,255,255,0.5);
    margin-top: 50px;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 12px;
        font-size: 14px;
        line-height: 1.4; /* 缩小行间距 */
    }

    .main-title, h1 {
        font-size: 1.6rem;
        margin: 16px 0 12px 0; /* 缩小上下边距 */
        letter-spacing: 0.1em;
        line-height: 1.3; /* 缩小行间距 */
    }

    .sub-title, .subtitle {
        font-size: 0.85rem;
        margin: 8px 0 20px 0; /* 缩小上下边距 */
        line-height: 1.3; /* 缩小行间距 */
    }

    h2 {
        font-size: 1.1rem;
        margin: 16px 0 10px 0; /* 缩小上下边距 */
        line-height: 1.3; /* 缩小行间距 */
    }

    h3 {
        font-size: 1rem;
        margin: 12px 0 8px 0; /* 缩小上下边距 */
        line-height: 1.3; /* 缩小行间距 */
    }

    h4 {
        font-size: 0.95rem;
        margin: 10px 0 6px 0; /* 缩小上下边距 */
        line-height: 1.3; /* 缩小行间距 */
    }

    p {
        font-size: 0.85rem;
        line-height: 1.4; /* 缩小行间距 */
        margin-bottom: 8px; /* 缩小下边距 */
    }

    .card, .section, .chart-section {
        padding: 16px 12px; /* 缩小内边距 */
        margin-bottom: 12px; /* 缩小下边距 */
        border-radius: 12px;
    }

    .container, .content-container {
        padding: 12px; /* 缩小内边距 */
        max-width: 100%;
    }

    .btn {
        padding: 12px 20px; /* 缩小内边距 */
        font-size: 0.95rem;
        min-height: 44px; /* 缩小最小高度 */
        border-radius: 8px;
        margin-bottom: 8px; /* 缩小下边距 */
    }

    .form-control {
        padding: 12px 14px; /* 缩小内边距 */
        font-size: 0.95rem;
        min-height: 44px; /* 缩小最小高度 */
        border-radius: 8px;
        margin-bottom: 8px; /* 缩小下边距 */
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    body {
        padding: 10px;
        font-size: 13px;
        line-height: 1.3; /* 进一步缩小行间距 */
    }

    .main-title, h1 {
        font-size: 1.5rem;
        margin: 12px 0 8px 0; /* 进一步缩小边距 */
        line-height: 1.2; /* 进一步缩小行间距 */
    }

    .sub-title, .subtitle {
        font-size: 0.8rem;
        margin: 6px 0 16px 0; /* 进一步缩小边距 */
        line-height: 1.2; /* 进一步缩小行间距 */
    }

    h2 {
        font-size: 1rem;
        margin: 12px 0 6px 0; /* 进一步缩小边距 */
        line-height: 1.2; /* 进一步缩小行间距 */
    }

    h3 {
        font-size: 0.95rem;
        margin: 10px 0 6px 0; /* 进一步缩小边距 */
        line-height: 1.2; /* 进一步缩小行间距 */
    }

    p {
        font-size: 0.8rem;
        line-height: 1.3; /* 进一步缩小行间距 */
        margin-bottom: 6px; /* 进一步缩小下边距 */
    }

    .container, .content-container {
        padding: 10px; /* 进一步缩小内边距 */
    }

    .btn {
        padding: 10px 16px; /* 进一步缩小内边距 */
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 6px; /* 进一步缩小下边距 */
        min-height: 40px; /* 进一步缩小最小高度 */
    }

    .card, .section, .chart-section {
        padding: 12px 10px; /* 进一步缩小内边距 */
        margin-bottom: 10px; /* 进一步缩小下边距 */
    }

    .form-control {
        padding: 10px 12px; /* 进一步缩小内边距 */
        font-size: 0.9rem;
        min-height: 40px; /* 进一步缩小最小高度 */
        margin-bottom: 6px; /* 进一步缩小下边距 */
    }
}

/* 微信H5专用优化 */
@media (max-width: 768px) {
    /* 防止微信内置浏览器的缩放问题 */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* 优化触摸体验 */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-touch-callout: none;
    }

    /* 防止长按选择文本 */
    .no-select {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* 优化输入框在微信中的显示 */
    input, textarea, select {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
        font-size: 16px; /* 防止iOS缩放 */
    }

    /* 优化按钮在微信中的显示 */
    button, .btn {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
        min-height: 44px; /* 符合触摸标准 */
    }

    /* 微信内滚动优化 */
    .scroll-container {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }

    /* 防止微信顶部状态栏遮挡 */
    .header, .navbar {
        padding-top: env(safe-area-inset-top);
    }

    /* 防止微信底部导航遮挡 */
    .footer, .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 特殊颜色类 */
.text-primary {
    color: #4a3728;
}

.text-secondary {
    color: #b8a082;
}

.text-muted {
    color: #8a7a6a;
}

.bg-light {
    background: rgba(255,255,255,0.9);
}

.bg-card {
    background: rgba(255,255,255,0.9);
}

/* 边框颜色 */
.border-light {
    border-color: rgba(184,160,130,0.15);
}

/* 阴影效果 */
.shadow-sm {
    box-shadow: 0 2px 12px rgba(184,160,130,0.08);
}

.shadow {
    box-shadow: 0 2px 12px rgba(184,160,130,0.08);
}

.shadow-lg {
    box-shadow: 0 4px 20px rgba(184,160,130,0.12);
}
