﻿@charset "UTF-8";

/* ==================== 田园系风格 - 全局变量 ==================== */
:root {
    /* 主色调：田园绿+暖棕 */
    --primary: #6B8E5A;
    --primary-light: #8FAB7A;
    --primary-dark: #4A6B3E;
    --primary-start: #6B8E5A;
    --primary-end: #8FAB7A;
    --gradient: linear-gradient(135deg, #6B8E5A, #8FAB7A);
    --gradient-h: linear-gradient(90deg, #6B8E5A, #8FAB7A);
    /* 田园背景色 */
    --bg-primary: #F5F0E6;
    --bg-secondary: #EDE5D3;
    --bg-card: #FFFDF7;
    /* 卡片背景 */
    --glass-bg: rgba(255, 253, 247, 0.85);
    --glass-bg-light: rgba(255, 253, 247, 0.6);
    --card-bg: rgba(255, 255, 255, 0.9);
    --page-bg: #F5F0E6;
    /* 边框 */
    --glass-border: rgba(139, 115, 85, 0.15);
    --border-color: rgba(139, 115, 85, 0.2);
    --divider-color: rgba(139, 115, 85, 0.1);
    /* 阴影 */
    --glass-shadow: 0 2px 12px rgba(139, 115, 85, 0.12);
    --glass-shadow-lg: 0 4px 24px rgba(139, 115, 85, 0.18);
    --card-shadow: 0 2px 12px rgba(139, 115, 85, 0.1);
    /* 圆角 */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    /* 文字颜色：浅色主题 */
    --text-primary: #3D3528;
    --text-secondary: #7A6F5E;
    --text-muted: #A89B86;
    --text-dark: #3D3528;
    --text-dark-secondary: #7A6F5E;
    /* 语义化颜色 */
    --success: #5B9A4E;
    --warning: #D4912C;
    --danger: #C85A4E;
    --info: #6B8E5A;
    /* 语义背景 */
    --success-bg: rgba(91, 154, 78, 0.1);
    --warning-bg: rgba(212, 145, 44, 0.1);
    --danger-bg: rgba(200, 90, 78, 0.1);
    --info-bg: rgba(107, 142, 90, 0.1);
    --transition: all 0.3s ease;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    /* 图片URL */
    --img-base: /assets/images;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* ==================== 通用组件 ==================== */
/* 页面背景容器：田园浅色底 */
.gradient-bg {
    background: var(--bg-primary);
    min-height: 100vh;
    position: relative;
}

/* 田园纹理装饰 */
.gradient-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--img-base)/card_texture.jpg;
    background-image: url('/assets/images/card_texture.jpg');
    background-size: 200px;
    background-repeat: repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

/* 玻璃卡片：暖白背景+轻阴影+清晰轮廓 */
.glass-card {
    background: var(--card-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.glass-card-light {
    background: var(--card-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow);
    padding: 16px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(107, 142, 90, 0.3);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px rgba(107, 142, 90, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: var(--bg-card);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:active {
    background: var(--primary-light);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-xs);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.glass-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.glass-input::placeholder {
    color: var(--text-muted);
}

.glass-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(107, 142, 90, 0.15);
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row .glass-input {
    flex: 1;
}

.input-row .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(91, 154, 78, 0.2);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(212, 145, 44, 0.2);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(200, 90, 78, 0.2);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(107, 142, 90, 0.2);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(139, 115, 85, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ==================== 登录/注册页 ==================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: url('/assets/images/auth_bg.jpg') center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(245, 240, 230, 0.85) 0%, rgba(245, 240, 230, 0.75) 50%, rgba(237, 229, 211, 0.8) 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 253, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo .logo-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: block;
    box-shadow: 0 4px 16px rgba(107, 142, 90, 0.25);
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.auth-logo p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    background: rgba(139, 115, 85, 0.08);
    border-radius: var(--radius-xs);
    padding: 3px;
}

.auth-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tabs .tab.active {
    background: var(--gradient);
    color: #fff;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .btn-primary {
    width: 100%;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.copyright {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: var(--text-secondary);
}

.app-container {
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 70px;
}

.app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/card_texture.jpg');
    background-size: 200px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.page {
    display: none;
    position: relative;
    z-index: 1;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
    position: relative;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-header .icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* ==================== 底部Tab导航 ==================== */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 253, 247, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -2px 12px rgba(139, 115, 85, 0.06);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-item .tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
}

.tab-item .tab-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.5;
    transition: var(--transition);
}

.tab-item.active {
    color: var(--primary);
}

.tab-item.active .tab-icon img {
    opacity: 1;
}

.tab-item.active .tab-icon {
    transform: scale(1.1);
}

/* ==================== 任务页 ==================== */
.task-card {
    background: var(--card-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 18px;
    margin-bottom: 12px;
}

.task-card .task-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.task-card .task-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.task-card .task-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-card .task-reward {
    font-size: 16px;
    font-weight: 600;
    color: var(--warning);
}

.task-card .task-reward small {
    font-size: 12px;
    font-weight: 400;
}

.task-progress {
    margin-bottom: 10px;
}

.task-progress .progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ==================== 矿机页 ==================== */
.mining-summary {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mining-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: url('/assets/images/mining_banner.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.mining-summary h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
}

.mining-summary .mining-income {
    font-size: 32px;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 4px;
    position: relative;
}

.mining-summary .mining-income small {
    font-size: 14px;
    font-weight: 400;
}

.mining-summary .mining-count {
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
}

.miner-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.miner-card .miner-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(107, 142, 90, 0.2);
}

.miner-card .miner-info {
    flex: 1;
    min-width: 0;
}

.miner-card .miner-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.miner-card .miner-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.miner-card .miner-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.miner-card .miner-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px 4px;
    color: var(--text-primary);
}

/* ==================== 交易市场页 ==================== */
.trade-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.trade-actions .btn {
    flex: 1;
}

.listing-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 18px;
    margin-bottom: 12px;
}

.listing-card .listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.listing-card .listing-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.listing-card .listing-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.listing-card .listing-username {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.listing-card .listing-time {
    font-size: 12px;
    color: var(--text-muted);
}

.listing-card .listing-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.listing-card .listing-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--warning);
}

.listing-card .listing-price small {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.listing-card .listing-amount {
    text-align: right;
}

.listing-card .listing-amount .label {
    font-size: 12px;
    color: var(--text-muted);
}

.listing-card .listing-amount .value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== 我的页面 ==================== */
.user-header {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.user-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url('/assets/images/profile_bg.jpg') center/cover no-repeat;
    opacity: 0.12;
}

.user-header .user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 3px solid var(--primary-light);
    overflow: hidden;
    color: #fff;
    position: relative;
    box-shadow: 0 4px 16px rgba(107, 142, 90, 0.2);
}

.user-header .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-header .user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    position: relative;
}

.user-header .user-id {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    position: relative;
}

.user-header .member-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(107, 142, 90, 0.25);
    position: relative;
}

.user-wallet {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wallet-item {
    text-align: center;
}

.wallet-item .wallet-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.wallet-item .wallet-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.wallet-item .wallet-value.gem {
    color: var(--warning);
}

.wallet-item .wallet-value.balance {
    color: var(--info);
}

.menu-list {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--divider-color);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: var(--bg-secondary);
}

.menu-item .menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.menu-item .menu-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.menu-item .menu-icon.purple { background: rgba(107, 142, 90, 0.12); }
.menu-item .menu-icon.blue { background: rgba(76, 142, 255, 0.12); }
.menu-item .menu-icon.green { background: rgba(91, 154, 78, 0.12); }
.menu-item .menu-icon.orange { background: rgba(212, 145, 44, 0.12); }
.menu-item .menu-icon.red { background: rgba(200, 90, 78, 0.12); }
.menu-item .menu-icon.pink { background: rgba(200, 90, 78, 0.12); }

.menu-item .menu-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.menu-item .menu-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== 弹窗样式 - 田园系 ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(61, 53, 40, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    animation: slideUp 0.3s ease;
    box-shadow: 0 -4px 24px rgba(139, 115, 85, 0.2);
}

.modal-content.center {
    border-radius: var(--radius);
    margin: auto;
    max-height: 90vh;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 8px 32px rgba(139, 115, 85, 0.25);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.2);
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(200, 90, 78, 0.12);
    color: var(--danger);
    border-color: rgba(200, 90, 78, 0.3);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
}

.modal-footer .btn {
    flex: 1;
}

.ad-modal {
    text-align: center;
}

.ad-modal .ad-timer {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0;
}

.ad-modal .ad-status {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 记录列表页 ==================== */
.records-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 16px;
    padding-bottom: 20px;
}

.records-page .page-nav {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    margin-bottom: 16px;
}

.records-page .page-nav .back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    margin-right: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.records-page .page-nav h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.record-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.record-card .record-info {
    flex: 1;
}

.record-card .record-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.record-card .record-time {
    font-size: 12px;
    color: var(--text-muted);
}

.record-card .record-amount {
    font-size: 16px;
    font-weight: 600;
    text-align: right;
}

.record-card .record-amount.income {
    color: var(--success);
}

.record-card .record-amount.expense {
    color: var(--danger);
}

.record-card .record-amount.frozen {
    color: var(--warning);
}

/* ==================== 会员等级详情页 ==================== */
.member-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 16px;
    padding-bottom: 20px;
}

.member-page .page-nav {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    margin-bottom: 16px;
}

.member-page .page-nav .back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    margin-right: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.member-page .page-nav h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.member-current {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 16px;
}

.member-current .member-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 20px rgba(107, 142, 90, 0.3);
}

.member-current .member-level-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.member-upgrade {
    margin: 16px 0;
}

.member-upgrade .upgrade-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.member-upgrade .progress-bar {
    height: 10px;
    background: rgba(139, 115, 85, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.member-upgrade .progress-bar .fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 5px;
}

.member-benefits {
    margin-bottom: 16px;
}

.member-benefits h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.benefit-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--divider-color);
    font-size: 13px;
    color: var(--text-primary);
}

.benefit-item:last-child {
    border-bottom: none;
}

.benefit-item .benefit-icon {
    margin-right: 10px;
    font-size: 16px;
}

.benefit-item .benefit-text {
    flex: 1;
}

.team-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.team-stat-item {
    text-align: center;
    padding: 16px 8px;
}

.team-stat-item .stat-num {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.team-stat-item .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.parent-info {
    padding: 16px;
    margin-bottom: 16px;
}

.parent-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.parent-info .parent-detail {
    display: flex;
    align-items: center;
    gap: 12px;
}

.parent-info .parent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.parent-info .parent-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.parent-info .parent-id {
    font-size: 12px;
    color: var(--text-muted);
}

.levels-preview {
    margin-bottom: 16px;
}

.levels-preview h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.level-preview-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider-color);
}

.level-preview-item:last-child {
    border-bottom: none;
}

.level-preview-item .level-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    background: rgba(139, 115, 85, 0.06);
}

.level-preview-item .level-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.level-preview-item .level-require {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== 推广中心 ==================== */
.promo-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 16px;
    padding-bottom: 20px;
}

.promo-summary {
    text-align: center;
    padding: 24px;
    margin-bottom: 16px;
}

.promo-summary .promo-code {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 20px;
    background: rgba(139, 115, 85, 0.06);
    border-radius: var(--radius-xs);
    display: inline-block;
    margin: 12px 0;
    color: var(--text-primary);
}

.promo-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.promo-stat-item {
    text-align: center;
    padding: 16px 8px;
}

.promo-stat-item .stat-num {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.promo-stat-item .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== 加载和提示 ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 115, 85, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(61, 53, 40, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 115, 85, 0.25);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(61, 53, 40, 0.3);
}

.toast.show {
    opacity: 1;
}

.pull-refresh {
    text-align: center;
    padding: 12px;
    font-size: 13px;
    color: var(--text-muted);
    display: none;
}

.load-more {
    text-align: center;
    padding: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== 响应式适配 ==================== */
@media screen and (min-width: 481px) {
    .app-container,
    .auth-page,
    .records-page,
    .member-page,
    .promo-page {
        max-width: 480px;
        margin: 0 auto;
    }

    .tab-bar {
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: none !important;
    }

    .modal-content {
        border-radius: var(--radius);
    }

    .modal-overlay {
        align-items: center;
    }
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.15);
    border-radius: 2px;
}

/* ==================== 钱包弹窗 ==================== */
.wallet-detail {
    padding: 10px 0;
}

.wallet-detail .wallet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--divider-color);
}

.wallet-detail .wallet-row:last-child {
    border-bottom: none;
}

.wallet-detail .wallet-row .row-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.wallet-detail .wallet-row .row-value {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.glass-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 15px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6F5E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.glass-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.code-btn {
    white-space: nowrap;
    padding: 12px 16px;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-xs);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(139, 115, 85, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch.active::after {
    left: 22px;
}

.page-hidden {
    display: none !important;
}

.page-active,
.page.active {
    display: block !important;
}

.tab-item.active,
.tab-item.nav-active {
    color: var(--primary) !important;
}
.tab-item.active .tab-icon,
.tab-item.nav-active .tab-icon {
    transform: scale(1.1);
}

/* ==================== 折扣卡悬浮按钮 ==================== */
.discount-fab {
    position: fixed;
    right: 16px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    z-index: 150;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.discount-fab .fab-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(107, 142, 90, 0.3);
    transition: transform 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.discount-fab:active .fab-img {
    transform: scale(0.92);
}

.discount-fab .fab-label {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #fff;
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    font-weight: 500;
}

/* 折扣卡弹窗 */
.discount-card-modal {
    text-align: center;
}

.discount-card-modal .dc-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(107, 142, 90, 0.25);
}

.discount-card-modal .dc-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.discount-card-modal .dc-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.discount-card-modal .dc-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(139, 115, 85, 0.06);
    border: 1px solid rgba(139, 115, 85, 0.12);
    border-radius: var(--radius-xs);
    margin-bottom: 8px;
}

.discount-card-modal .dc-info-item .dc-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.discount-card-modal .dc-info-item .dc-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

.discount-card-modal .dc-status {
    margin: 12px 0;
    padding: 10px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    border: 1px solid transparent;
}

.discount-card-modal .dc-status.active {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(91, 154, 78, 0.3);
}

.discount-card-modal .dc-status.expired {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(200, 90, 78, 0.3);
}
