/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1677FF;
    --success-color: #52C41A;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #E5E5E5;
    --bg-gray: #F5F5F5;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: #2a2a2a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* 页面容器 */
.page {
    display: none;
    min-height: 100vh;
    background-color: var(--bg-gray);
}

.page.active {
    display: block;
}

/* 占位符 */
.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 18px;
    color: var(--text-secondary);
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 56px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.back-btn,
.menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color 0.2s;
    border-radius: 50%;
}

.back-btn:active,
.menu-btn:active {
    background-color: var(--bg-gray);
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-url {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 返回按钮 */
.return-btn {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: -228px;
    height: 32px;
    padding: 0 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
    z-index: 100;
    cursor: pointer;
    transition: all 0.2s;
}

@media (max-width: 480px) {
    .return-btn {
        left: 12px;
        transform: none;
        margin-left: 0;
    }
}

.return-btn:active {
    transform: scale(0.95);
    background-color: var(--bg-gray);
}

/* 页面标题 */
.page-title {
    position: fixed;
    top: 112px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 100;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s;
    padding: 8px 0;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-item span {
    font-size: 11px;
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .header-title h1 {
        font-size: 16px;
    }

    .nav-item span {
        font-size: 10px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}