/* css/style.css */
/* --- 关键修复：统一盒模型为 border-box --- */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* --- 基础和变量定义 --- */
:root {
    --primary-color: #007BFF;
    --primary-hover-color: #0056b3;
    --light-bg-color: #f8f9fa; /* 浅色背景，用于页脚和页面头部 */
    --text-color: #333;
    --heading-color: #1a202c;
    --light-text-color: #6c757d;
    --border-color: #e2e8f0;
    --header-height: 50px;
}

/* --- 关键修改开始 --- */
/* 确保 html 和 body 元素占据整个视口的高度 */
html, body {
    height: 100%; /* 标准视口高度 */
    /* 100dvh 是一个新的CSS单位，代表“动态视口高度”，可以更好地适应移动设备浏览器的动态UI（如地址栏） */
    min-height: 100dvh; 
}
/* --- 关键修改结束 --- */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.7;
    padding-top: var(--header-height); 
}

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

/* 让头部导航栏不受 1100px 的限制，撑满屏幕，并在左右保留一点呼吸空间 */
.main-header .container,
.main-header .nav-container {
    max-width: 100%;
    padding: 0 10px;   /* 导航栏左右各留10px */
    /*padding: 0 4vw;  使用视口宽度的百分比，屏幕越大留白越多，屏幕越小留白越少 */
}

/* --- 公共组件：导航栏 (样式无变化) --- */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9); box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 1000; backdrop-filter: blur(10px);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo-container { display: flex; align-items: center; text-decoration: none; color: var(--text-color); }
.logo-icon { height: 40px; margin-right: 10px; }
.logo-text { font-size: 20px; font-weight: bold; }
.main-nav ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; }
.main-nav li { margin-left: 25px; }
.main-nav a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s ease; }
.main-nav a:hover { color: var(--primary-color); }
.nav-link-button { background-color: var(--primary-color); color: white !important; padding: 8px 18px; border-radius: 5px; transition: background-color 0.3s ease; }
.nav-link-button:hover { background-color: var(--primary-hover-color); }
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.mobile-menu-toggle span { display: block; width: 25px; height: 3px; background-color: var(--text-color); margin: 5px 0; transition: all 0.3s ease; }

/* --- 公共组件：页脚 (更新为浅色) --- */
.main-footer {
    background-color: var(--light-bg-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}
.main-footer a { color: var(--light-text-color); text-decoration: none; }
.main-footer a:hover { color: var(--primary-color); }

/* --- 页面主要内容区域 --- */
.main-content {
    min-height: calc(100vh - var(--header-height) - 150px);
}
.page-header {
    background-color: var(--light-bg-color);
    padding: 50px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 { margin: 0; font-size: 2.8rem; color: var(--heading-color); }

/* --- 主页特定样式 (全新设计) --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* --- 关键修改开始 --- */
    /* 确保 hero-section 占据剩余的完整视口高度 */
    /* 使用 100vh 减去导航栏高度，确保背景总是填满屏幕高度 */
    height: calc(100vh - var(--header-height)); 
    /* --- 关键修改结束 --- */
    min-height: 500px;
    padding: 0 20px;
    /* 阳光明亮的渐变背景 */
    background: linear-gradient(135deg, #e0f7fa 0%, #d1c4e9 100%);
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 20px;
}
.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #374151; /* 比正文颜色稍浅 */
}
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}
.cta-button:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.features-section {
    padding: 80px 0;
    background-color: #fff;
}
.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--heading-color);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.feature-item {
    text-align: center;
    padding: 20px;
}
.feature-item .icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e9f2ff; /* 浅蓝色背景 */
    margin-bottom: 25px;
}
.feature-item svg {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}
.feature-item h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
}

/* --- 其他页面通用样式 --- */
.content-section { padding: 60px 0; }

/* 返回主页按钮 */
.back-to-home-container {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}
.back-to-home-btn {
    display: inline-block;
    background-color: var(--light-text-color);
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.back-to-home-btn:hover {
    background-color: var(--text-color);
    transform: translateY(-2px);
}

/* 使用教程页面 (新布局) */
.usage-container { max-width: 800px; margin: 0 auto; }
.usage-text-block {
    text-align: center;
    margin-bottom: 30px;
}
.usage-text-block h2 {
    font-size: 2rem;
    color: var(--heading-color);
}
.usage-text-block p {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 10px auto 0;
}
.usage-image-block {
    text-align: center;
    margin-bottom: 60px;
}
.usage-image-block img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 公告栏页面 (新布局) */
.announcement-list { max-width: 800px; margin: 0 auto; }
.announcement-item { border-bottom: 1px solid var(--border-color); padding: 30px 0; }
.announcement-item:last-child { border-bottom: none; }
.announcement-date { color: var(--light-text-color); font-size: 0.9rem; margin-bottom: 8px; }
.announcement-title { font-size: 1.6rem; margin: 0 0 10px 0; color: var(--heading-color); }
.announcement-content { margin: 0; font-size: 1.05rem; }

/* 下载页面 */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.download-card { border: 1px solid var(--border-color); border-radius: 8px; padding: 30px; text-align: center; transition: box-shadow 0.3s ease, transform 0.3s ease; }
.download-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.download-card h3 { margin-top: 0; }
.download-info { font-size: 0.9rem; color: var(--light-text-color); margin: 15px 0; }
.download-button { display: inline-block; background-color: var(--primary-color); color: white; padding: 12px 25px; text-decoration: none; border-radius: 5px; font-weight: bold; }
.download-button:hover { background-color: var(--primary-hover-color); }

/* 常见问题页面 */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-item summary { font-size: 1.2rem; font-weight: 500; padding: 20px 0; cursor: pointer; list-style: none; position: relative; padding-right: 30px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--primary-color); }
.faq-item[open] summary::after { content: '−'; }
.faq-content { padding: 0 0 20px 0; }

/* --- 手机端适配 --- */
@media (max-width: 768px) {
    .logo-text { display: none; }
    .main-nav { display: none; position: absolute; top: var(--header-height); left: 0; width: 100%; background-color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; padding: 10px 0; }
    .main-nav li { margin: 0; width: 100%; text-align: center; }
    .main-nav a { display: block; padding: 15px; border-bottom: 1px solid var(--border-color); }
    .main-nav li:last-child a { border-bottom: none; }
    .nav-link-button { margin: 10px 20px; }
    .mobile-menu-toggle { display: block; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 2.2rem; }
}

/* --- 全局通用弹窗样式 (提取自微信客服) --- */
.global-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; justify-content: center; align-items: center;
    z-index: 2000; /* 关键：必须大于 header 的 1000 */
    opacity: 0; transition: opacity 0.3s ease;
}

.global-modal-content {
    background-color: #fff; padding: 25px 35px; border-radius: 10px;
    text-align: center; position: relative;
    transform: scale(0.9); transition: transform 0.3s ease;
    width: 90%; max-width: 300px;
}

.global-modal-content h4 { margin-top: 0; font-size: 1.2em; color: #333; }
.global-modal-content p { color: #666; font-size: 0.9em; margin-bottom: 15px; }
.global-modal-content img { max-width: 200px; width: 100%; display: block; margin: 0 auto; }

.global-modal-close {
    position: absolute; top: 10px; right: 15px;
    font-size: 28px; font-weight: bold; color: #aaa;
    cursor: pointer; transition: color 0.2s;
}
.global-modal-close:hover { color: #333; }

.global-modal-overlay.show { display: flex; opacity: 1; }
.global-modal-overlay.show .global-modal-content { transform: scale(1); }

/* 淘宝手机端备用链接 */
.tb-mobile-link { display: none; margin-top: 15px; color: var(--primary-color); text-decoration: none; font-weight: bold; }
@media (max-width: 768px) { .tb-mobile-link { display: block; } }

/* --- 微信客服悬浮按钮样式 --- */
.floating-wechat-button {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 70px;
    height: 70px;
    background-color: #07c160; /* 微信绿 */
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform 0.2s ease-in-out;
    padding-top: 5px;
}

.floating-wechat-button:hover {
    transform: scale(1.1);
}

.floating-wechat-button .button-text {
    color: white;
    font-size: 12px;
    margin-top: 2px;
    font-weight: bold;
}

.floating-wechat-button svg {
    width: 26px;
    height: 26px;
}

/* 手机端悬浮按钮缩小 */
@media (max-width: 768px) {
    .floating-wechat-button {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
        padding-top: 4px;
    }
    .floating-wechat-button svg { width: 22px; height: 22px; }
    .floating-wechat-button .button-text { font-size: 10px; margin-top: 1px; }
}