/**
 * 5G健康 V5.0 H5生产版 - CSS样式重置
 * 移动端优先，统一基础样式
 * 
 * @author 5G健康开发团队
 * @version 5.0.0
 */

/* ========== CSS Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, 
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1A1A1A;
    background: #F5F7FA;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========== 移动端容器 ========== */
.mobile-container {
    max-width: 414px;
    margin: 0 auto;
    background: var(--bg-primary, #F5F7FA);
    min-height: 100vh;
    padding-bottom: 70px;
    position: relative;
}

/* ========== 页面容器 ========== */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

.page.page-enter {
    animation: pageFadeIn 0.25s ease forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== 链接和按钮重置 ========== */
a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

select {
    font-family: inherit;
    font-size: 16px;
    outline: none;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    height: auto;
    min-height: 44px;
}

/* ========== 列表样式重置 ========== */
ul, ol {
    list-style: none;
}

/* ========== 图片样式 ========== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 217, 0.3);
    border-radius: 2px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ========== 禁用选中文本 ========== */
.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* ========== 页面Loading过渡效果 ========== */
.page-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.2s ease;
}

.page-loading-fade {
    opacity: 0;
    pointer-events: none;
}

.page-loading-spinner {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.page-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary, #4A8BDB);
    animation: pageLoadingBounce 1.2s ease-in-out infinite;
}

.page-loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.page-loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes pageLoadingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.page-loading-text {
    font-size: 13px;
    color: #999;
}