/* ============================================================
   css/common.css - 全站公共样式
   兼容：苹果 Safari / 安卓自带浏览器 / 电脑浏览器
   ============================================================ */

/* ===== 1. 全站自适应（核心） ===== */
html {
    background: #f5f5f5;
    -webkit-text-size-adjust: 100%;   /* 禁止 iOS 自动放大字体 */
    -ms-text-size-adjust: 100%;
}

body {
    max-width: 480px;
    min-width: 320px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    background: #f5f5f5;
    position: relative;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;  /* iOS 顺滑滚动 */
    -webkit-tap-highlight-color: transparent; /* 安卓点击高亮去除 */
}

/* 电脑端居中显示（宽度 > 480px 时） */
@media screen and (min-width: 481px) {
    body {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
        min-height: 100vh;
    }
}

/* 安卓小屏兜底（宽度 ≤ 480px 时，铺满屏幕） */
@media screen and (max-width: 480px) {
    body {
        max-width: 100%;
    }
}

/* ===== 2. 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
body { background: #f5f5f5; padding-bottom: 60px; }

img { max-width: 100%; display: block; }
a { text-decoration: none; }
button { outline: none; }

/* ===== 3. 底部导航栏 ===== */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
}
.footer-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #666;
    text-decoration: none;
    gap: 3px;
}
.footer-nav a.active { color: #e74c3c; }
.footer-nav a svg { width: 22px; height: 22px; }

/* ===== 4. 底部版权区 ===== */
.copyright {
    text-align: center;
    font-size: 11px;
    color: #999;
    padding: 20px 0 80px;
    line-height: 1.8;
}
.copyright-links { margin-bottom: 5px; }
.copyright-links a { color: #999; text-decoration: none; margin: 0 5px; }
.copyright-links span { color: #ddd; }

/* ===== 5. 弹窗通用 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-box {
    background: #fff;
    width: 80%;
    max-width: 340px;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.modal-box h3 { margin-bottom: 15px; color: #e74c3c; font-size: 16px; }
.modal-box img { width: 200px; height: 200px; object-fit: contain; border: 1px solid #eee; margin: 0 auto; }
.modal-box p { font-size: 13px; color: #666; margin: 10px 0; }
.modal-box button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 10px;
    cursor: pointer;
}