/* ===== 纸条交换 - 用户端样式 ===== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #333333;
    --text-light: #999999;
    --text-secondary: #666666;
    --border: #eaeaea;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 16px;
    --nav-height: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== 通用组件 ===== */
.container { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* 页面视图 */
.page-view {
    display: none;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    animation: pageIn 0.35s ease;
}
.page-view.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 顶部导航 ===== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 16px 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-bar h1 { font-size: 20px; font-weight: 700; }
.top-bar .sub { font-size: 12px; opacity: 0.8; margin-top: 2px; }

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--card);
    display: flex;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    z-index: 200;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.3s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-item .nav-icon { font-size: 22px; line-height: 1; }
.nav-item.active { color: var(--primary); }
.nav-item.center-btn {
    position: relative;
    top: -14px;
}
.nav-item.center-btn .nav-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

/* ===== 首页 ===== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 30px 20px 40px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -5%; right: -5%;
    height: 40px;
    background: var(--bg);
    border-radius: 50% 50% 0 0;
}
.hero-banner h2 { font-size: 26px; margin-bottom: 8px; }
.hero-banner p { opacity: 0.85; font-size: 14px; }

.stats-row {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    margin-top: -20px;
    position: relative;
    z-index: 10;
}
.stat-card {
    flex: 1;
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.stat-card .icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
}
.stat-card.male .icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.stat-card.female .icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card .num { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-card .label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.section-title {
    padding: 20px 16px 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

/* 纸条卡片 */
.note-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
}
.note-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}
.note-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.note-card .cover {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: linear-gradient(135deg, #e8ecf1, #d4dbe6);
    display: block;
}

/* 卡片轮播 */
.cover-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3/4;
}
.cover-carousel .carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.4s ease;
}
.cover-carousel .carousel-track img {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.cover-carousel .carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.cover-carousel .carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}
.cover-carousel .carousel-dots .dot.active {
    background: #fff;
    width: 16px;
    border-radius: 3px;
}
.note-card .info {
    padding: 10px 12px;
}
.note-card .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.note-card .school {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
}
.note-card .meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    gap: 6px;
}
.gender-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.gender-tag.male { background: rgba(79,172,254,0.15); color: #4facfe; }
.gender-tag.female { background: rgba(240,147,251,0.15); color: #f093fb; }

/* ===== 抽取盒子页面 ===== */
.box-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 24px 20px;
    color: #fff;
    text-align: center;
}
.box-header.male-box { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.box-header.female-box { background: linear-gradient(135deg, #f093fb, #f5576c); }
.box-header h2 { font-size: 22px; margin-bottom: 4px; }
.box-header p { font-size: 13px; opacity: 0.85; }

.draw-options {
    display: flex;
    gap: 10px;
    padding: 20px 16px;
    flex-wrap: wrap;
}
.draw-btn {
    flex: 1;
    min-width: 90px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.draw-btn:hover, .draw-btn.selected { border-color: var(--primary); background: rgba(102,126,234,0.05); }
.draw-btn .times { font-size: 20px; font-weight: 700; color: var(--primary); }
.draw-btn .price { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.draw-btn .free-tag {
    display: inline-block;
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 6px;
}

.draw-action {
    padding: 10px 16px 20px;
}
.draw-action .btn-draw {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.draw-action .btn-draw:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102,126,234,0.4); }

/* 抽取结果 */
.draw-result-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.draw-result-card {
    background: var(--card);
    border-radius: 24px;
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(60px) scale(0.95); } to { opacity: 1; transform: none; } }

.draw-result-card .result-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 24px;
    text-align: center;
    color: #fff;
    border-radius: 24px 24px 0 0;
}
.draw-result-card .result-header h3 { font-size: 20px; }
.draw-result-card .result-body { padding: 20px; }
.result-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}
.result-photos img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}
.result-info-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.result-info-row:last-child { border: none; }
.result-info-row .label { color: var(--text-light); width: 80px; flex-shrink: 0; }
.result-info-row .value { color: var(--text); font-weight: 600; }
.result-close {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
}

/* ===== 放纸条页面 ===== */
.form-section {
    background: var(--card);
    border-radius: var(--radius);
    margin: 12px 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.form-section .form-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    background: var(--card);
}
.form-input:focus { border-color: var(--primary); }
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: var(--card);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}
.form-select:focus { border-color: var(--primary); }

/* 性别选择 */
.gender-selector {
    display: flex;
    gap: 12px;
}
.gender-option {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.gender-option .icon { font-size: 28px; margin-bottom: 6px; }
.gender-option.selected.male { border-color: #4facfe; background: rgba(79,172,254,0.08); }
.gender-option.selected.female { border-color: #f093fb; background: rgba(240,147,251,0.08); }

/* 照片上传 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.photo-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: var(--bg);
    cursor: pointer;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-item .remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px; height: 22px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.photo-add {
    aspect-ratio: 1;
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    gap: 4px;
}
.photo-add:hover { border-color: var(--primary); color: var(--primary); }
.photo-add .plus { font-size: 28px; }

.submit-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 20px 16px;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102,126,234,0.4); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== 我的页面 ===== */
.profile-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 30px 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}
.profile-header .avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
}
.profile-header .nickname { font-size: 20px; font-weight: 700; }
.profile-header .school { font-size: 13px; opacity: 0.8; margin-top: 2px; }

.profile-stats {
    display: flex;
    background: var(--card);
    margin: -10px 16px 0;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}
.profile-stats .stat {
    flex: 1;
    text-align: center;
}
.profile-stats .stat-val { font-size: 22px; font-weight: 700; color: var(--primary); }
.profile-stats .stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.menu-section {
    background: var(--card);
    border-radius: var(--radius);
    margin: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text);
}
.menu-item:last-child { border: none; }
.menu-item:hover { background: rgba(0,0,0,0.02); }
.menu-item .menu-icon { font-size: 20px; margin-right: 12px; width: 24px; text-align: center; display: flex; align-items: center; justify-content: center; }
.menu-item .menu-icon-img { width: 20px; height: 20px; display: inline-block; }
.menu-item .menu-text { flex: 1; font-size: 15px; }
.menu-item .menu-arrow { color: var(--text-light); font-size: 14px; }

/* ===== 登录弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

/* 认证弹窗样式 */
.auth-modal {
    position: relative;
    background: #fff;
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 400px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: authSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 自定义滚动条 */
.auth-modal::-webkit-scrollbar {
    width: 6px;
}

.auth-modal::-webkit-scrollbar-track {
    background: transparent;
}

.auth-modal::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.auth-modal::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

@keyframes authSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s;
}

.auth-close:hover {
    background: #e8e8e8;
    color: #666;
    transform: rotate(90deg);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    margin-bottom: 12px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.auth-btn-wechat {
    width: 100%;
    padding: 14px;
    border: 2px solid #07c160;
    background: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #07c160;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.auth-btn-wechat:hover {
    background: #07c160;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(7, 193, 96, 0.3);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

.auth-divider span {
    padding: 0 16px;
}

.auth-modal .form-group {
    margin-bottom: 14px;
}

.auth-modal .form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fafafa;
}

.auth-modal .form-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-modal .form-input::placeholder {
    color: #bbb;
}

.auth-btn-primary {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: #764ba2;
}

.avatar-upload-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-bottom: 16px;
}

.avatar-upload-inline img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}

.avatar-upload-inline:hover img {
    border-color: #667eea;
    transform: scale(1.05);
}

.avatar-upload-hint {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.form-label-inline {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.gender-selector-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gender-option-modern {
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.gender-option-modern:hover {
    border-color: #d0d0d0;
    background: #fff;
}

.gender-option-modern.male.selected {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.08);
    color: #4facfe;
}

.gender-option-modern.female.selected {
    border-color: #f093fb;
    background: rgba(240, 147, 251, 0.08);
    color: #f093fb;
}

.gender-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.gender-option-modern span:last-child {
    font-size: 13px;
    font-weight: 600;
}

.modal-card {
    background: var(--card);
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    animation: slideUp 0.4s;
}
.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 30px 24px;
    text-align: center;
    color: #fff;
}
.modal-header .logo { font-size: 40px; margin-bottom: 10px; }
.modal-header h2 { font-size: 22px; }
.modal-body { padding: 24px; }
.modal-body .form-group { margin-bottom: 16px; }
.modal-body .form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.modal-body .btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}
.modal-body .btn-wechat {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #07c160;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}
.modal-body .switch-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-light);
}
.modal-body .switch-link a {
    color: var(--primary);
    text-decoration: none;
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.3s;
    white-space: nowrap;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== 子页面样式 ===== */
.subpage-card {
    max-width: 400px;
    width: 95%;
}
.record-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.record-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.record-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.record-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.record-item:last-child { border-bottom: none; }
.record-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.record-info { flex: 1; }
.record-name { font-size: 14px; font-weight: 600; color: var(--text); }
.record-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.record-contact { font-size: 12px; color: var(--primary); }
.record-earning { font-size: 14px; color: #10b981; font-weight: 600; }

/* 钱包 */
.wallet-balance {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}
.wallet-label { font-size: 13px; opacity: 0.8; }
.wallet-amount { font-size: 32px; font-weight: 700; margin-top: 8px; }
.wallet-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.wallet-stat {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.wallet-stat .stat-value { font-size: 20px; font-weight: 700; color: var(--text); }
.wallet-stat .stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.btn-withdraw {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}
.wallet-records h4 {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 12px;
}
.wallet-record-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.wallet-record-item:last-child { border-bottom: none; }
.wallet-record-amount { color: #10b981; font-weight: 600; font-size: 15px; margin-top: 4px; }
.wallet-record-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* 我的纸条 */
.my-note-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.my-note-item:last-child { border-bottom: none; }
.my-note-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.my-note-info { flex: 1; }
.my-note-status { display: flex; gap: 8px; margin-bottom: 6px; }
.my-note-stats { font-size: 12px; color: var(--text-light); }
.my-note-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 头像上传 */
.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}
.avatar-upload img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 8px;
}
.avatar-hint {
    font-size: 12px;
    color: var(--primary);
}

/* ===== 加载 ===== */
.loading-spinner {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}
.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 24px; height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 翻牌动画 ===== */
.flip-card {
    perspective: 1000px;
    width: 200px; height: 280px;
    margin: 0 auto;
}
.flip-card-inner {
    position: relative;
    width: 100%; height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.flip-card-front {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 60px;
}
.flip-card-back {
    transform: rotateY(180deg);
    background: var(--card);
    box-shadow: var(--shadow);
}
.flip-card-back img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* 列表页面 */
.list-page { padding: 16px; }
.list-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}
.list-item .avatar {
    width: 48px; height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg);
}
.list-item .content { flex: 1; }
.list-item .content .title { font-size: 15px; font-weight: 600; }
.list-item .content .desc { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.list-item .amount { font-size: 16px; font-weight: 700; color: var(--success); }

/* ===== 自适应 ===== */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .note-grid { gap: 10px; padding: 0 12px; }
    .note-card .info { padding: 8px 10px; }
    .note-card .name { font-size: 13px; }
    .note-card .school { font-size: 10px; }
    .gender-tag { font-size: 10px; padding: 2px 6px; }
    .note-card .meta span:last-child { font-size: 10px; }
    
    .home-banner { padding: 30px 20px; }
    .home-banner h1 { font-size: 24px; }
    .home-banner p { font-size: 13px; }
    
    .box-header { padding: 20px 16px; }
    .box-header h2 { font-size: 20px; }
    .box-header p { font-size: 12px; }
    
    .profile-header { padding: 24px 20px; }
    .profile-header .avatar { width: 60px; height: 60px; }
    .profile-header .nickname { font-size: 18px; }
    
    .bottom-nav { padding-bottom: var(--safe-bottom); }
}

@media (min-width: 768px) {
    .container { max-width: 500px; }
    .note-grid { grid-template-columns: repeat(3, 1fr); }
    .bottom-nav { max-width: 500px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
}

@media (min-width: 1024px) {
    body { background: linear-gradient(135deg, #667eea22, #764ba222); }
    .page-view { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; box-shadow: 0 0 40px rgba(0,0,0,0.1); }
}
