/* ========== 公共样式 - 从表单提交页面提取 ========== */

/* 全局样式重置 */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* 禁止横向滚动 */
    -webkit-overflow-scrolling: touch;
}

body {
    padding: 0;
    margin: 0;
    width: 100%;
    min-height: 100%;
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none; /* 禁止文本选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow-y: auto; /* 允许垂直滚动 */
    overflow-x: hidden; /* 禁止横向滚动 */
    position: relative; /* 确保body可以正常布局 */
    transition: none; /* 禁用过渡效果，避免抖动 */
}

/* ========== 页头导航栏样式 ========== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    background-color: white;
    padding: 0.5rem 0;
    align-items: center;
    min-height: 70px;
    height: 70px;
}

.navbar > .container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    height: 100%;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    max-width: 243px;
    object-fit: contain;
}

/* ========== TabBar 底部导航栏样式 ========== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 58px;
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-sizing: border-box;
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    color: #666666;
    transition: color 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tabbar-item.active {
    color: #3a7bd5;
}

.tabbar-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    display: block;
    object-fit: contain;
}

.tabbar-text {
    font-size: 12px;
    line-height: 1;
    display: block;
}

/* ========== PC端宽度限制 - 740px居中显示 ========== */
@media (min-width: 768px) {
    .page-container {
        max-width: 740px;
        margin: 0 auto;
        box-shadow: none;
        position: relative;
    }
    
    body {
        background-color: #ffffff;
    }
    
    /* PC端TabBar居中定位 */
    .tabbar {
        max-width: 740px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* ========== 底部信息样式 ========== */
.footer {
    text-align: center;
    padding: 0 20px 80px; /* 顶部padding为0，底部padding为TabBar留出空间（58px + 22px间距） */
    margin: 0; /* 恢复为0，通过减少上部模块的margin-bottom来调整间距 */
    color: #999;
    background-color: #f5f7f9;
    width: 100%;
    box-sizing: border-box;
}

/* PC端footer宽度限制，与页面内容对齐 */
@media (min-width: 768px) {
    .footer {
        max-width: 740px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px 80px; /* PC端也保持足够的底部空间 */
    }
}

.footer-stats {
    font-size: 14px;
    margin-bottom: 8px;
    margin-top: 0; /* 重置p标签默认上边距 */
    margin-left: 0; /* 重置p标签默认左边距 */
    margin-right: 0; /* 重置p标签默认右边距 */
    padding: 0; /* 重置p标签默认内边距 */
    color: #999;
}

/* 备案信息样式 */
.footer-icp {
    font-size: 14px;
    margin-bottom: 8px;
    margin-top: 0; /* 重置p标签默认上边距 */
    margin-left: 0; /* 重置p标签默认左边距 */
    margin-right: 0; /* 重置p标签默认右边距 */
    padding: 0; /* 重置p标签默认内边距 */
    color: #999;
}

.footer-icp a {
    display: inline;
    color: #999;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-icp a:hover {
    color: #3a7bd5;
    text-decoration: underline;
}

.footer-icp a:visited {
    color: #999;
}

.footer-time {
    font-size: 14px;
    margin-bottom: 0; /* 最后一项不需要底部间距 */
    margin-top: 0; /* 重置p标签默认上边距 */
    margin-left: 0; /* 重置p标签默认左边距 */
    margin-right: 0; /* 重置p标签默认右边距 */
    padding: 0; /* 重置p标签默认内边距 */
    opacity: 0.8;
    color: #999;
}

/* ========== 屏幕阅读器专用样式（SEO和无障碍优化） ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}