* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    background-color: #F5F3EE;
    color: #1C3F57;
    height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background: #F5F3EE;
}

body {
    background: #E0DDD5;
}

#page-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 64px;
    scroll-behavior: smooth;
}

.page {
    min-height: 100%;
}

/* ---- 底部导航 ---- */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 480px;
    height: 64px;
    background: #FFFCF7;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 0.5px solid rgba(0,0,0,0.06);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
    padding-top: 4px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    gap: 2px;
    transition: opacity 0.15s;
    user-select: none;
    position: relative;
}

.nav-item:active { opacity: 0.6; }

.nav-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
}

.nav-item.active .nav-icon-wrap {
    background: #1C3F57;
}

.nav-icon {
    width: 18px;
    height: 18px;
    color: #9BA5AF;
    transition: color 0.2s;
}

.nav-item.active .nav-icon {
    color: #fff;
}

.nav-text {
    font-size: 10px;
    color: #9BA5AF;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.nav-item.active .nav-text {
    color: #1C3F57;
    font-weight: 500;
}

/* 中间闪录按钮 */
.nav-center-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -24px;
    cursor: pointer;
}

.action-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1C3F57;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(28, 63, 87, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-circle:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(28, 63, 87, 0.3);
}

.action-icon {
    width: 24px;
    height: 24px;
}

.action-text {
    font-size: 10px;
    color: #1C3F57;
    letter-spacing: 0.3px;
    margin-top: 4px;
    font-weight: 500;
}

/* ---- 通用卡片 ---- */
.card {
    background: #FFFCF7;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 0.5px solid rgba(0,0,0,0.03);
}

/* ---- 按钮 ---- */
.btn-primary {
    background: #1C3F57;
    color: #FFFCF7;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.3px;
}

.btn-primary:active {
    background: #153040;
    transform: scale(0.98);
}

.btn-secondary {
    background: #EEEBE4;
    color: #1C3F57;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-secondary:active { background: #E0DDD5; }

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

/* ---- 页头 ---- */
.page-header {
    padding: 52px 16px 16px;
    background: #F5F3EE;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1C3F57;
    letter-spacing: -0.2px;
}

/* ---- Section ---- */
.section {
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 15px;
    font-weight: 500;
    color: #1C3F57;
    margin-bottom: 10px;
}

/* ---- 空状态 ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px;
    text-align: center;
}

.empty-state .illustration {
    width: 160px;
    height: 160px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 16px;
    font-weight: 500;
    color: #1C3F57;
    margin-bottom: 8px;
}

.empty-state .empty-desc {
    font-size: 13px;
    color: #9BA5AF;
    line-height: 1.6;
}

/* ---- 标签 ---- */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}

.tag-primary { background: #EBF3FA; color: #1976D2; }
.tag-success { background: #EAF6EC; color: #2E7D32; }
.tag-warning { background: #FFF8E1; color: #F57C00; }
.tag-danger  { background: #FDECEA; color: #C62828; }
.tag-neutral { background: #EEEBE4; color: #5C6E7B; }

/* ---- 进度条 ---- */
.progress-bar {
    height: 4px;
    background: #EEEBE4;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1C3F57, #2C6280);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.progress-fill.success { background: linear-gradient(90deg, #43A047, #66BB6A); }
.progress-fill.warning { background: linear-gradient(90deg, #FB8C00, #FFA726); }
.progress-fill.danger  { background: linear-gradient(90deg, #E53935, #EF5350); }

/* ---- 筛选标签栏 ---- */
.filter-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #EEEBE4;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 7px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    color: #7B8793;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.tab-btn.active {
    background: #FFFCF7;
    color: #1C3F57;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ---- 菜单列表项 ---- */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 0.5px solid rgba(0,0,0,0.04);
}

.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #F5F3EE; }

.menu-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
    font-size: 14px;
    color: #1C3F57;
}

.menu-arrow {
    font-size: 16px;
    color: #C4C9CE;
    line-height: 1;
}

.menu-badge {
    background: #E53935;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ---- Toast & Loading ---- */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(28, 63, 87, 0.92);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.25s ease;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- 工具类 ---- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-muted { color: #9BA5AF; font-size: 12px; }

@media (min-width: 480px) {
    #app {
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
        border-radius: 0;
    }
}

/* ---- 欢迎页样式 ---- */
.welcome-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #0D1B2A 0%, #1B263B 50%, #1C3F57 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

.welcome-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
}

.welcome-logo {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, #1C3F57, #0D1B2A);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: #FFD700;
    line-height: 1;
    letter-spacing: -2px;
}

.logo-subtext {
    font-size: 10px;
    color: rgba(255, 215, 0, 0.7);
    letter-spacing: 3px;
    margin-top: 2px;
}

.logo-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 4px;
    font-weight: 500;
}

.welcome-content {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 24px;
}

.welcome-main-title {
    font-size: 42px;
    font-weight: 700;
    color: #FFFCF7;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.welcome-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.welcome-tags {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    margin-bottom: 48px;
}

.welcome-tags .tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

.welcome-action {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.welcome-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(145deg, #FFD700, #FFB700);
    color: #1C3F57;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.welcome-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.welcome-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.welcome-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.welcome-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: rgba(255, 215, 0, 0.9);
    border-color: #FFD700;
}

.welcome-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #1C3F57;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}
