/* Life OS - UI Design System */
/* Based on 03-UI设计规范.md */

:root {
    /* 品牌色 */
    --primary: #2EAADC;
    --primary-light: #5CC2E8;
    --primary-dark: #1E8BA8;

    /* 功能色 */
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --info: #74B9FF;

    /* 目标类型色 */
    --career: #667EEA;
    --health: #00B894;
    --learning: #F093FB;
    --finance: #4ECDC4;
    --relationship: #FF6B6B;
    --life: #FFE66D;

    /* 浅色主题 */
    --bg: #F8F9FA;
    --surface: #FFFFFF;
    --border: #E9ECEF;
    --text: #2D3436;
    --text-secondary: #636E72;
    --text-hint: #B2BEC3;

    /* 间距 */
    --xs: 4px;
    --sm: 8px;
    --md: 12px;
    --lg: 16px;
    --xl: 24px;
    --2xl: 32px;
    --3xl: 48px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;

    /* 阴影 */
    --shadow-1: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-2: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-3: 0 8px 24px rgba(0,0,0,0.12);

    /* 字体 */
    --font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 深色主题 */
[data-theme="dark"] {
    --bg: #0D1117;
    --surface: #161B22;
    --border: #30363D;
    --text: #E6EDF3;
    --text-secondary: #8B949E;
    --text-hint: #484F58;
    --shadow-1: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-2: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-3: 0 8px 24px rgba(0,0,0,0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 应用容器 */
.app-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: var(--bg);
}

/* 顶部状态栏 */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: var(--lg);
    padding-top: var(--xl);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.greeting-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.date-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--xs);
}

.header-actions {
    display: flex;
    gap: var(--sm);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--surface);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-1);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.icon-btn .moon-icon {
    display: none;
}

[data-theme="dark"] .icon-btn .sun-icon {
    display: none;
}

[data-theme="dark"] .icon-btn .moon-icon {
    display: block;
}

.notification-btn {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 页面内容 */
.app-content {
    padding: 0 var(--lg);
    padding-bottom: 100px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 页面顶部标签栏 ========== */
.page-tabs {
    display: flex;
    background: var(--surface);
    padding: 0 var(--lg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-tabs.scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.page-tabs.scrollable::-webkit-scrollbar {
    display: none;
}

.page-tab {
    flex: 1;
    min-width: 60px;
    padding: var(--md) var(--lg);
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.page-tab:hover {
    color: var(--text);
}

.page-tab.active {
    color: var(--primary);
}

.page-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* ========== 标签内容区域 ========== */
.tab-content {
    display: none;
    padding-top: var(--md);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ========== 添加按钮悬浮 ========== */
.btn-add-float {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add-float:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(46, 170, 220, 0.4);
}

.btn-add-float svg {
    width: 24px;
    height: 24px;
}

/* ========== 频道卡片网格 ========== */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--md);
    padding: var(--md) 0;
}

.channel-card {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.channel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.channel-card .channel-icon {
    font-size: 32px;
    display: block;
    margin-bottom: var(--sm);
}

.channel-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.channel-card p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== 圈子列表 ========== */
.circle-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.circle-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.circle-item .circle-icon {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.circle-item .circle-info {
    flex: 1;
}

.circle-item .circle-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.circle-item .circle-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-small.joined {
    background: var(--success);
    color: white;
    border: none;
}

/* ========== 聊天室列表 ========== */
.chat-room-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.chat-room {
    display: flex;
    align-items: center;
    gap: var(--md);
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-room:hover {
    transform: translateX(4px);
}

.chat-room .room-icon {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-room .room-info {
    flex: 1;
}

.chat-room .room-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.chat-room .room-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.room-badge {
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px var(--lg);
}

.empty-state .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--md);
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== 生活管理 - 日程 ========== */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--lg);
}

.date-nav {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.date-arrow {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
}

.current-date {
    font-size: 16px;
    font-weight: 600;
}

.calendar-mini {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    margin-bottom: var(--lg);
    box-shadow: var(--shadow-1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--md);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 4px;
}

.calendar-days .day {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 50%;
    cursor: pointer;
}

.calendar-days .day.other {
    color: var(--text-hint);
}

.calendar-days .day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-days .day.has-event {
    position: relative;
}

.calendar-days .day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.schedule-item {
    display: flex;
    gap: var(--lg);
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.schedule-time {
    width: 60px;
    text-align: center;
}

.schedule-time .time {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.schedule-time .duration {
    font-size: 11px;
    color: var(--text-secondary);
}

.schedule-content {
    flex: 1;
}

.schedule-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.schedule-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.schedule-goal, .schedule-habit {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg);
    border-radius: 10px;
    color: var(--text-secondary);
}

/* ========== 生活管理 - 财务 ========== */
.finance-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--md);
    margin-bottom: var(--lg);
}

.finance-total {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-1);
}

.finance-total .label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.finance-total .value {
    font-size: 20px;
    font-weight: 700;
}

.finance-total .value.expense { color: var(--danger); }
.finance-total .value.income { color: var(--success); }

.budget-progress {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--lg);
    box-shadow: var(--shadow-1);
}

.budget-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--sm);
    font-size: 13px;
}

.category-list {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.category-list h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--md);
}

.category-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md) 0;
    border-bottom: 1px solid var(--border);
}

.category-item:last-child {
    border-bottom: none;
}

.category-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
}

.category-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.category-name {
    font-size: 13px;
}

.category-amount {
    font-size: 13px;
    font-weight: 600;
}

.category-bar {
    width: 60px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

.category-bar .bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.btn-add-record {
    width: 100%;
    padding: var(--lg);
    margin-top: var(--lg);
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-record:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========== 生活管理 - 健康 ========== */
.health-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--md);
    margin-bottom: var(--lg);
}

.health-card {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--md);
    box-shadow: var(--shadow-1);
}

.health-card .health-icon {
    font-size: 28px;
}

.health-card .health-info {
    flex: 1;
}

.health-card .health-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.health-card .health-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.health-card .health-change {
    font-size: 12px;
    font-weight: 600;
}

.health-change.down { color: var(--success); }
.health-change.up { color: var(--primary); }

.health-metrics {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.health-metrics h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--lg);
}

.metric-item {
    padding-bottom: var(--lg);
    margin-bottom: var(--lg);
    border-bottom: 1px solid var(--border);
}

.metric-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--md);
    font-size: 13px;
}

.metric-target {
    color: var(--text-secondary);
}

.metric-chart {
    height: 60px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    position: relative;
}

.chart-line {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: 10px;
}

.chart-point {
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, 50%);
}

.chart-point.current {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 170, 220, 0.2);
}

.sleep-quality {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.quality-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.quality-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
}

.quality-fill {
    height: 100%;
    border-radius: 3px;
}

.quality-fill.good { background: var(--success); }

.quality-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
}

/* ========== 生活管理 - 知识 ========== */
.knowledge-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--md);
    margin-bottom: var(--lg);
}

.knowledge-stats .stat-item {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-1);
}

.knowledge-stats .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.knowledge-stats .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.knowledge-search {
    margin-bottom: var(--lg);
}

.search-input {
    width: 100%;
    padding: var(--md) var(--lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--surface);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.note-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.note-card {
    background: var(--surface);
    padding: var(--lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform 0.2s;
}

.note-card:hover {
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--sm);
}

.note-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(46, 170, 220, 0.1);
    color: var(--primary);
    border-radius: 10px;
}

.note-time {
    font-size: 11px;
    color: var(--text-hint);
}

.note-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.note-card p {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片基础样式 */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--sm);
    margin-bottom: var(--md);
}

.card-icon {
    font-size: 20px;
}

.card-header h3 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.card-badge {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--border);
    padding: var(--xs) var(--sm);
    border-radius: var(--radius-full);
}

/* 今日概览卡片 */
.overview-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.primary {
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: var(--xs);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar.large {
    height: 12px;
}

.progress-bar.small {
    height: 4px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-fill.gradient {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* 目标进度卡片 */
.goal-progress-card .progress-bar {
    margin: var(--md) 0;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.goal-phases {
    display: flex;
    justify-content: space-between;
    margin: var(--lg) 0;
    position: relative;
}

.goal-phases::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.phase-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    margin-bottom: var(--sm);
}

.phase.completed .phase-dot {
    background: var(--success);
    border-color: var(--success);
}

.phase.current .phase-dot {
    background: var(--primary);
    border-color: var(--primary);
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(46, 170, 220, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(46, 170, 220, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 170, 220, 0); }
}

.phase-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

.phase.completed .phase-name,
.phase.current .phase-name {
    color: var(--text);
    font-weight: 500;
}

.phase-status {
    font-size: 10px;
    color: var(--primary);
    margin-top: 2px;
}

/* 习惯快捷打卡 */
.habits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sm);
}

.habit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.habit-item:hover {
    background: var(--border);
}

.habit-item.completed {
    background: rgba(0, 184, 148, 0.1);
}

.habit-item.completed .habit-icon {
    opacity: 0.5;
}

.habit-icon {
    font-size: 24px;
    margin-bottom: var(--xs);
}

.habit-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.habit-check {
    position: absolute;
    top: var(--xs);
    right: var(--xs);
    width: 16px;
    height: 16px;
    background: var(--success);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI月报卡片 */
.ai-report-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(46, 170, 220, 0.1), rgba(46, 170, 220, 0.05));
    border: 1px solid rgba(46, 170, 220, 0.2);
}

.ai-report-content {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.ai-report-icon {
    font-size: 32px;
}

.ai-report-text h3 {
    font-size: 16px;
    font-weight: 600;
}

.ai-report-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--xs);
}

.ai-report-arrow {
    font-size: 18px;
    color: var(--primary);
}

/* 挑战预览卡片 */
.challenge-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.challenge-preview-item:hover {
    background: var(--border);
}

.challenge-type {
    font-size: 11px;
    padding: var(--xs) var(--sm);
    background: var(--warning);
    color: #333;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.challenge-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: var(--xs) 0;
}

.challenge-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.challenge-meta span {
    margin-right: var(--xs);
}

.challenge-pot {
    text-align: right;
}

.pot-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--danger);
}

.pot-label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--md) var(--xl);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: var(--md) var(--xl);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(46, 170, 220, 0.1);
}

.btn-full {
    width: 100%;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.btn-small {
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--sm) var(--md);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: var(--primary-dark);
}

.btn-icon {
    margin-right: var(--sm);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: var(--sm) 0;
    padding-bottom: calc(var(--sm) + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--xs);
    background: none;
    border: none;
    color: var(--text-hint);
    font-size: 10px;
    cursor: pointer;
    padding: var(--sm);
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item:hover {
    color: var(--primary);
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--md) 0;
    margin-bottom: var(--md);
}

.page-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.back-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--surface);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text);
}

.header-placeholder {
    width: 36px;
}

/* AI拆分页面 */
.create-goal-card {
    background: linear-gradient(135deg, var(--surface), rgba(46, 170, 220, 0.05));
}

.create-goal-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--lg);
    text-align: center;
}

.form-group {
    margin-bottom: var(--md);
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--xs);
}

.form-input, .form-select {
    width: 100%;
    padding: var(--md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 170, 220, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--md);
}

/* AI加载动画 */
.ai-loading {
    text-align: center;
    padding: var(--3xl);
}

.ai-loading.hidden {
    display: none;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: var(--sm);
    margin-bottom: var(--lg);
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* AI计划结果 */
.ai-plan-result {
    margin-top: var(--md);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--lg);
}

.plan-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.plan-badge {
    font-size: 12px;
    padding: var(--xs) var(--sm);
    background: rgba(240, 147, 251, 0.2);
    color: var(--learning);
    border-radius: var(--radius-full);
}

.phase-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.phase-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}

.phase-card.completed {
    opacity: 0.7;
}

.phase-card.active {
    border: 2px solid var(--primary);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--lg);
    cursor: pointer;
    transition: background 0.2s ease;
}

.phase-header:hover {
    background: var(--bg);
}

.phase-info {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.phase-icon {
    width: 32px;
    height: 32px;
    background: var(--border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.phase-card.completed .phase-icon {
    background: var(--success);
    color: white;
}

.phase-card.active .phase-icon {
    background: var(--primary);
    color: white;
}

.phase-icon.rotating {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.phase-details h4 {
    font-size: 14px;
    font-weight: 600;
}

.phase-duration {
    font-size: 12px;
    color: var(--text-secondary);
}

.expand-icon {
    color: var(--text-hint);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.subtask-list {
    padding: 0 var(--lg) var(--lg);
    display: none;
}

.subtask-list.expanded {
    display: block;
}

.subtask {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-top: var(--sm);
}

.subtask.completed {
    opacity: 0.6;
}

.subtask.in-progress {
    border: 1px solid var(--primary);
}

.subtask.locked {
    opacity: 0.4;
}

.subtask-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.subtask.completed .subtask-check {
    background: var(--success);
    color: white;
}

.subtask-content {
    flex: 1;
}

.subtask-name {
    font-size: 13px;
    font-weight: 500;
    display: block;
}

.subtask-verify {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

/* 习惯追踪页面 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--md);
    margin-bottom: var(--md);
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--md);
    text-align: center;
    box-shadow: var(--shadow-1);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-desc {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: var(--xs);
}

/* 热力图 */
.heatmap-card .card-header {
    margin-bottom: var(--md);
}

.heatmap-card .card-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.heatmap-grid {
    display: flex;
    gap: var(--md);
}

.heatmap-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--text-hint);
    padding-top: 4px;
}

.heatmap-labels span {
    height: 12px;
    display: flex;
    align-items: center;
}

.heatmap-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    flex: 1;
}

.heatmap-cells .cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
}

.cell.empty {
    background: var(--border);
}

.cell.level-1 {
    background: rgba(0, 184, 148, 0.25);
}

.cell.level-2 {
    background: rgba(0, 184, 148, 0.5);
}

.cell.level-3 {
    background: rgba(0, 184, 148, 0.75);
}

.cell.level-4 {
    background: var(--success);
}

.cell.active {
    box-shadow: 0 0 0 2px var(--primary);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sm);
    margin-top: var(--md);
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-cells {
    display: flex;
    gap: 2px;
}

.legend-cells .cell {
    width: 12px;
    height: 12px;
}

/* 习惯列表 */
.habit-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.habit-card {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    transition: all 0.2s ease;
}

.habit-card:hover {
    box-shadow: var(--shadow-2);
}

.habit-icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.habit-icon-wrap .habit-icon {
    font-size: 24px;
}

.habit-details {
    flex: 1;
}

.habit-details h4 {
    font-size: 15px;
    font-weight: 600;
}

.habit-details p {
    font-size: 12px;
    color: var(--text-secondary);
}

.habit-streak {
    margin-right: var(--sm);
}

.streak-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--warning);
}

.habit-check-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.habit-check-btn svg {
    width: 20px;
    height: 20px;
    color: var(--border);
}

.habit-check-btn.done {
    background: var(--success);
    color: white;
    font-size: 16px;
}

.habit-check-btn:hover {
    transform: scale(1.1);
}

/* 社区页面 */
.user-level-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-md);
    padding: var(--lg);
    margin-bottom: var(--md);
}

.level-info {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.level-badge {
    background: rgba(255,255,255,0.2);
    padding: var(--sm) var(--md);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.level-badge.large {
    font-size: 16px;
    padding: var(--md) var(--lg);
}

.level-details {
    flex: 1;
}

.level-name {
    font-size: 16px;
    font-weight: 600;
    display: block;
}

.level-progress {
    display: flex;
    align-items: center;
    gap: var(--sm);
    margin-top: var(--xs);
}

.level-progress .progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
}

.level-progress .progress-fill {
    background: white;
}

.level-progress span {
    font-size: 11px;
    opacity: 0.8;
}

/* 红包雨通知 */
.red-packet-notice {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.1), rgba(225, 112, 85, 0.05));
    border: 1px solid rgba(225, 112, 85, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: var(--md);
    animation: shake 3s infinite;
}

@keyframes shake {
    0%, 90%, 100% { transform: translateX(0); }
    92%, 96% { transform: translateX(-3px); }
    94%, 98% { transform: translateX(3px); }
}

.red-packet-notice .red-packet-icon {
    font-size: 32px;
}

.notice-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
}

.notice-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.notice-arrow {
    color: var(--danger);
    font-size: 18px;
    margin-left: auto;
}

/* 圈子分类 */
.circle-tabs {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--md);
    overflow-x: auto;
    padding-bottom: var(--xs);
}

.circle-tab {
    padding: var(--sm) var(--md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.circle-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 圈子列表 */
.circle-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
    margin-bottom: var(--lg);
}

.circle-card {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-1);
}

.circle-card:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}

.circle-icon {
    width: 44px;
    height: 44px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.circle-info {
    flex: 1;
}

.circle-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.circle-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.circle-members {
    font-size: 11px;
    color: var(--text-hint);
}

.circle-badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.circle-badge.hot {
    background: var(--warning);
    color: #333;
}

/* 帖子列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    box-shadow: var(--shadow-1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--md);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
}

.author-level {
    font-size: 10px;
    background: var(--primary);
    color: white;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    margin-left: var(--xs);
}

.post-time {
    font-size: 11px;
    color: var(--text-hint);
}

.post-circle {
    font-size: 11px;
    padding: var(--xs) var(--sm);
    background: var(--bg);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.post-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: var(--md);
}

.post-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--md);
}

.post-image img {
    width: 100%;
    height: auto;
}

.post-actions {
    display: flex;
    gap: var(--lg);
    padding-top: var(--md);
    border-top: 1px solid var(--border);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--xs);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn:hover {
    color: var(--primary);
}

.action-btn.liked {
    color: var(--danger);
}

/* 挑战页面 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--lg) 0 var(--md);
}

.section-title h3 {
    font-size: 16px;
    font-weight: 600;
}

.my-challenge-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    box-shadow: var(--shadow-1);
    margin-bottom: var(--md);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sm);
}

.challenge-type-badge {
    font-size: 11px;
    padding: var(--xs) var(--sm);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.challenge-type-badge.early {
    background: rgba(253, 203, 110, 0.2);
    color: #B8860B;
}

.challenge-status {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.my-challenge-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--md);
}

.challenge-progress {
    display: flex;
    align-items: center;
    gap: var(--md);
    margin-bottom: var(--lg);
}

.challenge-progress .progress-bar {
    flex: 1;
}

.challenge-progress span {
    font-size: 12px;
    color: var(--text-secondary);
}

.challenge-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--lg);
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 11px;
    color: var(--text-hint);
    display: block;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    margin-top: var(--xs);
}

.info-value.highlight {
    color: var(--danger);
}

.checkin-days {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--lg);
}

.checkin-days .day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg);
    color: var(--text-secondary);
}

.checkin-days .day.completed {
    background: var(--success);
    color: white;
}

.checkin-days .day.today {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 3px rgba(46, 170, 220, 0.3);
}

/* 资格卡片 */
.qualify-card {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--success);
    margin-bottom: var(--md);
}

.qualify-icon {
    font-size: 36px;
}

.qualify-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.qualify-status {
    font-size: 12px;
    font-weight: 500;
    margin-top: var(--xs);
}

.qualify-status.success {
    color: var(--success);
}

.qualify-reason {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 挑战列表 */
.challenge-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.challenge-item .challenge-icon {
    width: 44px;
    height: 44px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.challenge-content {
    flex: 1;
}

.challenge-content h4 {
    font-size: 14px;
    font-weight: 600;
}

.challenge-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.challenge-content .challenge-meta {
    font-size: 11px;
    color: var(--text-hint);
    margin-top: var(--xs);
}

/* 个人中心页面 */
#profilePage {
    padding-top: 0;
}

.profile-header {
    position: relative;
    margin-bottom: 60px;
    min-height: 120px;
}

.profile-bg {
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.profile-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    background: var(--bg);
    padding-bottom: 10px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto var(--md);
    border: 4px solid var(--bg);
    box-shadow: var(--shadow-2);
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.profile-bio {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: var(--xs);
}

.profile-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--md);
    margin-top: var(--sm);
}

.profile-points {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-level .level-badge {
    background: var(--primary);
    color: white;
}

/* 愿景板 */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--md);
    margin-bottom: var(--lg);
}

#profilePage .section-title {
    margin-top: var(--xl);
}

.vision-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}

.vision-image {
    height: 100px;
    overflow: hidden;
}

.vision-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vision-content {
    padding: var(--md);
}

.vision-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--xs);
}

.vision-content p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: var(--sm);
}

.vision-progress {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.vision-progress .progress-bar {
    flex: 1;
}

.vision-progress span {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

/* 菜单列表 */
.menu-list {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: var(--lg);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--bg);
}

.menu-icon {
    font-size: 20px;
    margin-right: var(--md);
}

.menu-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.menu-badge {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
    margin-right: var(--sm);
}

.menu-arrow {
    color: var(--text-hint);
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--xl);
    margin: var(--lg);
    max-width: 360px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* 愿景弹窗 */
.vision-modal {
    text-align: center;
    padding: 0;
    overflow: hidden;
}

.vision-display {
    position: relative;
    height: 300px;
}

.vision-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vision-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--xl);
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    text-align: left;
}

.vision-overlay h2 {
    font-size: 20px;
    margin-bottom: var(--xs);
}

.vision-overlay p {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: var(--md);
}

.vision-progress {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.vision-progress .progress-bar {
    flex: 1;
    background: rgba(255,255,255,0.3);
}

.vision-progress .progress-fill {
    background: white;
}

.vision-modal .btn-primary {
    margin: var(--lg);
    margin-bottom: 0;
}

.vision-hint {
    font-size: 12px;
    color: var(--text-hint);
    padding-bottom: var(--lg);
}

/* 红包雨弹窗 */
.red-packet-modal {
    text-align: center;
}

.red-packet-animation {
    position: relative;
    height: 120px;
    margin-bottom: var(--lg);
}

.red-packet-icon {
    font-size: 64px;
    animation: bounce-in 0.5s ease;
}

@keyframes bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.red-packet-rain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 24px;
}

.red-packet-rain span {
    position: absolute;
    animation: fall 2s infinite;
}

.red-packet-rain span:nth-child(1) { left: 10%; animation-delay: 0s; }
.red-packet-rain span:nth-child(2) { left: 30%; animation-delay: 0.3s; }
.red-packet-rain span:nth-child(3) { left: 50%; animation-delay: 0.6s; }
.red-packet-rain span:nth-child(4) { left: 70%; animation-delay: 0.9s; }
.red-packet-rain span:nth-child(5) { left: 90%; animation-delay: 1.2s; }

@keyframes fall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100px) rotate(360deg); opacity: 0; }
}

.red-packet-modal h3 {
    font-size: 18px;
    margin-bottom: var(--sm);
}

.red-packet-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: var(--xs);
}

.red-packet-source {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--lg);
}

.red-packet-qualify {
    background: rgba(0, 184, 148, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--md);
    margin-bottom: var(--lg);
}

.qualify-badge {
    color: var(--success);
    font-weight: 600;
}

.red-packet-qualify p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--xs);
}

/* 管理后台切换按钮 */
.admin-toggle {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: var(--sm) var(--md);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-2);
    z-index: 99;
    transition: all 0.2s ease;
}

.admin-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3);
}

/* 快捷入口区域 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--sm);
    margin-bottom: var(--md);
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-1);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.quick-action-icon {
    font-size: 24px;
    margin-bottom: var(--xs);
}

.quick-action-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 任务管理页面 */
.task-filters {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--md);
    overflow-x: auto;
}

.task-filter-btn {
    padding: var(--xs) var(--md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-1);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.task-item.completed .task-checkbox {
    background: var(--success);
    border-color: var(--success);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-title {
    flex: 1;
    font-size: 14px;
}

.task-priority {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.task-priority.high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.task-priority.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.task-priority.low {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* 财务管理页面 */
.finance-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--md);
    margin-bottom: var(--md);
}

.finance-card {
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-1);
}

.finance-card-header {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--xs);
}

.finance-card-value {
    font-size: 20px;
    font-weight: 600;
}

.finance-card-value.income {
    color: var(--success);
}

.finance-card-value.expense {
    color: var(--danger);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
    font-size: 18px;
}

.transaction-details h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.transaction-details p {
    font-size: 12px;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

/* 项目管理页面 */
.project-progress {
    margin-bottom: var(--lg);
}

.progress-bar {
    height: 8px;
    background: var(--bg);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.project-card {
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sm);
}

.project-title {
    font-size: 15px;
    font-weight: 600;
}

.project-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.project-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.project-status.paused {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.project-meta {
    display: flex;
    gap: var(--md);
    font-size: 12px;
    color: var(--text-muted);
}

/* 日程管理页面 */
.calendar-mini {
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md);
}

.cal-month {
    font-weight: 600;
}

.cal-nav {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: var(--xs);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--xs);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: var(--xs);
}

.calendar-days span {
    padding: var(--xs);
    font-size: 13px;
    border-radius: 50%;
    cursor: pointer;
}

.calendar-days span.today {
    background: var(--primary);
    color: white;
}

.calendar-days span:not(.empty):hover {
    background: var(--bg);
}

.schedule-timeline {
    position: relative;
    padding-left: 60px;
}

.schedule-item {
    position: relative;
    padding: var(--md);
    padding-left: var(--lg);
    margin-bottom: var(--sm);
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.schedule-item.now {
    background: rgba(var(--primary-rgb), 0.1);
    border-left-color: var(--success);
}

.schedule-time {
    position: absolute;
    left: 0;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.schedule-content h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.schedule-content p {
    font-size: 12px;
    color: var(--text-muted);
}

/* 番茄钟 */
.pomodoro-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--lg);
}

.timer-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--md);
}

.timer-value {
    font-size: 32px;
    font-weight: 600;
    color: white;
}

.pomodoro-btn {
    padding: var(--md) var(--lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pomodoro-btn:hover {
    transform: scale(1.05);
}

.pomodoro-stats {
    display: flex;
    gap: var(--lg);
    margin-top: var(--md);
    font-size: 12px;
    color: var(--text-muted);
}

/* 联系人页面 */
.contact-stats {
    display: flex;
    justify-content: space-around;
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
}

.contact-stat {
    text-align: center;
}

.contact-stat .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.contact-stat .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.contact-reminder-item,
.contact-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sm);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.contact-info {
    flex: 1;
}

.contact-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.contact-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.contact-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
    border-radius: var(--radius-full);
}

.filter-select-small {
    padding: var(--xs) var(--sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: var(--bg);
}

/* 快捷入口区域 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sm);
    margin-bottom: var(--lg);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--md);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.quick-action-item:hover {
    background: var(--bg);
}

.quick-icon {
    font-size: 28px;
    margin-bottom: var(--xs);
}

.quick-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 任务管理页面 */
.task-tabs {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--md);
    overflow-x: auto;
    padding-bottom: var(--xs);
}

.task-tab {
    padding: var(--sm) var(--md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.task-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.task-card {
    display: flex;
    align-items: flex-start;
    gap: var(--md);
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    border-left: 3px solid transparent;
}

.task-card.priority-p0 {
    border-left-color: var(--danger);
}

.task-card.priority-p1 {
    border-left-color: var(--warning);
}

.task-card.priority-p2 {
    border-left-color: var(--info);
}

.task-card.completed {
    opacity: 0.6;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.task-checkbox:hover {
    border-color: var(--primary);
}

.task-checkbox.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-size: 12px;
}

.task-checkbox svg {
    width: 16px;
    height: 16px;
    color: var(--text-hint);
}

.task-content {
    flex: 1;
}

.task-content h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--xs);
}

.task-card.completed .task-content h4 {
    text-decoration: line-through;
}

.task-meta {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--xs);
}

.task-priority {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.task-priority.p0 {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

.task-priority.p1 {
    background: rgba(253, 203, 110, 0.2);
    color: #B8860B;
}

.task-priority.p2 {
    background: rgba(116, 185, 255, 0.2);
    color: var(--info);
}

.task-energy, .task-time {
    font-size: 11px;
    color: var(--text-hint);
}

.task-project {
    font-size: 11px;
    color: var(--primary);
}

.task-due {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-due.done {
    color: var(--success);
}

/* 项目管理页面 */
.project-board {
    display: flex;
    gap: var(--md);
    overflow-x: auto;
    padding-bottom: var(--md);
}

.project-column {
    min-width: 260px;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--md);
    box-shadow: var(--shadow-1);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md);
}

.column-title {
    font-size: 14px;
    font-weight: 600;
}

.column-count {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
}

.project-card {
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.project-card.active {
    border-left: 3px solid var(--primary);
}

.project-card.completed {
    opacity: 0.7;
}

.project-type {
    font-size: 11px;
    color: var(--primary);
    margin-bottom: var(--xs);
}

.project-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--xs);
}

.project-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--sm);
}

.project-progress {
    display: flex;
    align-items: center;
    gap: var(--sm);
    margin-bottom: var(--sm);
}

.project-progress .progress-bar {
    flex: 1;
    height: 4px;
}

.project-progress span {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
}

.project-milestone {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xs);
    font-size: 10px;
    color: var(--text-hint);
}

.milestone-done {
    color: var(--success);
}

.milestone-current {
    color: var(--primary);
}

.project-meta {
    font-size: 11px;
    color: var(--text-hint);
}

.project-result {
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}

.project-dates {
    font-size: 11px;
    color: var(--text-hint);
    margin-top: var(--xs);
}

/* 财务管理页面 */
.finance-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sm);
    margin-bottom: var(--md);
}

.finance-card {
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-1);
}

.finance-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
}

.finance-value {
    font-size: 20px;
    font-weight: 700;
    margin-top: var(--xs);
}

.finance-card.income .finance-value {
    color: var(--success);
}

.finance-card.expense .finance-value {
    color: var(--danger);
}

.finance-card.balance .finance-value.positive {
    color: var(--primary);
}

.budget-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.budget-item {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.budget-info {
    flex: 1;
}

.budget-category {
    font-size: 13px;
    font-weight: 500;
}

.budget-amount {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.budget-bar {
    width: 100px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.budget-bar .progress-fill {
    height: 100%;
    background: var(--success);
}

.budget-bar.warning .progress-fill {
    background: var(--warning);
}

.budget-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.budget-status.normal {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.budget-status.warning {
    background: rgba(253, 203, 110, 0.2);
    color: #B8860B;
}

.finance-records {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.finance-record {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--sm);
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.record-category {
    font-size: 12px;
    min-width: 60px;
}

.record-desc {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

.record-amount {
    font-size: 14px;
    font-weight: 600;
}

.finance-record.expense .record-amount {
    color: var(--danger);
}

.finance-record.income .record-amount {
    color: var(--success);
}

/* 健康管理页面 */
.health-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sm);
    margin-bottom: var(--md);
}

.health-card {
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-1);
}

.health-icon {
    font-size: 24px;
    display: block;
    margin-bottom: var(--xs);
}

.health-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.health-unit {
    font-size: 14px;
    color: var(--text-secondary);
}

.health-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: var(--xs);
}

.health-change {
    font-size: 11px;
    margin-top: var(--xs);
    display: block;
}

.health-change.down {
    color: var(--success);
}

.health-change.good {
    color: var(--success);
}

.weight-chart {
    padding: var(--md);
}

.weight-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100px;
    gap: var(--sm);
}

.weight-bar {
    flex: 1;
    background: var(--border);
    border-radius: 4px 4px 0 0;
}

.weight-bar.today {
    background: var(--primary);
}

.weight-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--sm);
    font-size: 10px;
    color: var(--text-hint);
}

.weight-target {
    display: flex;
    justify-content: space-between;
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-top: var(--md);
    font-size: 12px;
}

.exercise-stats {
    display: flex;
    justify-content: space-around;
    padding: var(--md);
    margin-bottom: var(--md);
}

.exercise-stat {
    text-align: center;
}

.exercise-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.exercise-stat .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.exercise-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sm) var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.exercise-type {
    font-size: 13px;
}

.exercise-duration {
    font-size: 12px;
    color: var(--text-secondary);
}

.exercise-date {
    font-size: 11px;
    color: var(--text-hint);
}

/* 知识管理页面 */
.knowledge-stats {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--md);
}

.knowledge-stat-card {
    flex: 1;
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-1);
}

.knowledge-stat-card .stat-icon {
    font-size: 24px;
    display: block;
    margin-bottom: var(--xs);
}

.knowledge-stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.knowledge-stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.reading-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
}

.reading-item {
    display: flex;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.book-cover {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.book-info {
    flex: 1;
}

.book-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--xs);
}

.book-author {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--sm);
}

.reading-progress {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.reading-progress .progress-bar {
    flex: 1;
    height: 4px;
}

.reading-progress span {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.note-item {
    display: flex;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.note-type {
    font-size: 20px;
}

.note-content h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: var(--xs);
}

.note-content p {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-date {
    font-size: 11px;
    color: var(--text-hint);
    display: block;
    margin-top: var(--xs);
}

/* 复盘页面 */
.review-tabs {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--md);
}

.review-tab {
    flex: 1;
    padding: var(--sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.review-tab.ai {
    background: linear-gradient(135deg, rgba(46, 170, 220, 0.1), rgba(46, 170, 220, 0.05));
    border-color: var(--primary);
    color: var(--primary);
}

.review-section {
    margin-bottom: var(--md);
}

.review-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--sm);
}

.review-list {
    padding-left: var(--md);
}

.review-list li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--xs);
    list-style: disc;
}

.review-list.gratitude li {
    color: var(--success);
}

.review-input {
    width: 100%;
    min-height: 80px;
    padding: var(--md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--md);
}

.rating-stars {
    display: flex;
    gap: var(--xs);
}

.star {
    font-size: 20px;
    opacity: 0.3;
    cursor: pointer;
}

.star.active {
    opacity: 1;
}

.rating-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.weekly-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--md);
}

.weekly-stat {
    text-align: center;
}

.weekly-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.weekly-stat .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 人脉管理页面 */
.contact-stats {
    display: flex;
    justify-content: space-around;
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
}

.contact-stat {
    text-align: center;
}

.contact-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.contact-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-reminder-item,
.contact-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sm);
}

.contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.contact-info {
    flex: 1;
}

.contact-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.contact-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
    border-radius: var(--radius-full);
}

.filter-select-small {
    padding: var(--xs) var(--sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: var(--bg);
    color: var(--text);
}

/* 日程管理页面 */
.calendar-mini {
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md);
}

.cal-month {
    font-size: 16px;
    font-weight: 600;
}

.cal-nav {
    background: var(--bg);
    border: none;
    padding: var(--sm) var(--md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--sm);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 2px;
}

.calendar-days span {
    padding: var(--sm);
    font-size: 13px;
    border-radius: var(--radius-full);
    cursor: pointer;
}

.calendar-days span.today {
    background: var(--primary);
    color: white;
}

.calendar-days span:not(.empty):hover {
    background: var(--bg);
}

.calendar-days span.empty {
    color: transparent;
}

.schedule-timeline {
    position: relative;
}

.schedule-item {
    display: flex;
    gap: var(--md);
    padding: var(--md);
    margin-bottom: var(--sm);
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.schedule-item.now {
    background: rgba(46, 170, 220, 0.1);
    border-left-color: var(--success);
}

.schedule-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 45px;
}

.schedule-content h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.schedule-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.pomodoro-card {
    text-align: center;
}

.pomodoro-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--lg);
}

.timer-circle {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--md);
    box-shadow: 0 4px 20px rgba(46, 170, 220, 0.3);
}

.timer-value {
    font-size: 36px;
    font-weight: 700;
    color: white;
}

.pomodoro-controls {
    margin-bottom: var(--md);
}

.pomodoro-btn {
    padding: var(--md) var(--xl);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pomodoro-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(46, 170, 220, 0.3);
}

.pomodoro-stats {
    display: flex;
    gap: var(--lg);
    font-size: 12px;
    color: var(--text-secondary);
}

/* 响应式适配 */
@media (min-width: 768px) {
    .app-container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    .vision-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-hint);
}

/* ========== 目标列表迷你卡片 ========== */
.goal-list-mini {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--md);
    box-shadow: var(--shadow-1);
    margin-bottom: var(--md);
}

.goal-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md);
}

.goal-list-header h3 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--xs);
}

.goal-count {
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.view-all-btn {
    font-size: 12px;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-item-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sm) var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-item-mini:last-child {
    margin-bottom: 0;
}

.goal-item-mini:hover {
    transform: translateX(4px);
}

.goal-info-mini {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.goal-emoji {
    font-size: 24px;
}

.goal-text h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.goal-status {
    font-size: 11px;
    color: var(--text-secondary);
}

.goal-progress-mini {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.goal-progress-bar {
    width: 60px;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.goal-progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.goal-percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    min-width: 35px;
}

/* ========== 今日任务区 ========== */
.today-tasks-section,
.today-tasks-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--md);
    box-shadow: var(--shadow-1);
    margin-bottom: var(--md);
}

.today-tasks-header,
.today-tasks-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md);
}

.today-tasks-header h3,
.today-tasks-card .card-header h3 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.task-source {
    font-size: 11px;
    color: var(--primary);
    background: rgba(46, 170, 220, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.task-source-tag {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(46, 170, 220, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
}

.today-task-item {
    display: flex;
    align-items: flex-start;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sm);
    border-left: 3px solid var(--primary);
}

.today-task-item:last-child {
    margin-bottom: 0;
}

.today-task-item.completed {
    opacity: 0.6;
    border-left-color: var(--success);
}

.today-task-item.from-ai {
    border-left-color: var(--primary);
}

.today-task-item.from-habit {
    border-left-color: var(--success);
}

.today-task-item.from-manual {
    border-left-color: var(--warning);
}

.task-check-mini,
.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-check-mini:hover,
.task-checkbox:hover {
    border-color: var(--primary);
}

.task-check-mini.done,
.task-checkbox.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-size: 12px;
}

.task-checkbox svg {
    width: 14px;
    height: 14px;
    color: var(--text-hint);
}

.today-task-content,
.task-info {
    flex: 1;
}

.today-task-content h4,
.task-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.today-task-item.completed .today-task-content h4,
.today-task-item.completed .task-info h4 {
    text-decoration: line-through;
}

.task-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.task-verify {
    display: block;
    font-size: 11px;
    color: var(--primary);
    margin-top: 4px;
}

.task-from-goal {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(46, 170, 220, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.task-from-goal.done {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.today-task-meta {
    display: flex;
    align-items: center;
    gap: var(--sm);
    font-size: 11px;
    color: var(--text-secondary);
}

.task-goal-link {
    color: var(--primary);
}

.task-time-est {
    color: var(--text-hint);
}

.empty-tasks {
    text-align: center;
    padding: var(--xl);
    color: var(--text-secondary);
}

.empty-tasks svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--md);
    opacity: 0.3;
}

/* ========== AI行动引擎页面 ========== */
.ai-engine-page {
    padding: var(--lg);
}

.ai-engine-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: var(--xl);
    color: white;
    text-align: center;
    margin-bottom: var(--lg);
}

.ai-engine-hero h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: var(--sm);
}

.ai-engine-hero p {
    font-size: 13px;
    opacity: 0.9;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    margin-bottom: var(--md);
}

.goal-input-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    box-shadow: var(--shadow-1);
    margin-bottom: var(--lg);
}

.goal-input-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--md);
}

.goal-form-group {
    margin-bottom: var(--md);
}

.goal-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--xs);
}

.goal-input {
    width: 100%;
    padding: var(--md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: all 0.2s ease;
}

.goal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 170, 220, 0.1);
}

.goal-type-select {
    display: flex;
    gap: var(--sm);
    flex-wrap: wrap;
}

.goal-type-btn {
    padding: var(--sm) var(--md);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-type-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.generate-btn {
    width: 100%;
    padding: var(--md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sm);
    transition: all 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 170, 220, 0.3);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--xl);
}

.ai-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-loading-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========== 目标中心页面 ========== */
.goal-center-page {
    padding: var(--lg);
}

.goal-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--lg);
}

.goal-center-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.add-goal-btn {
    padding: var(--sm) var(--md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--xs);
}

.goal-card-expandable {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    margin-bottom: var(--md);
    overflow: hidden;
}

.goal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--md);
    cursor: pointer;
    transition: background 0.2s ease;
}

.goal-card-header:hover {
    background: var(--bg);
}

.goal-card-left {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.goal-card-emoji {
    font-size: 32px;
}

.goal-card-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.goal-card-meta {
    display: flex;
    align-items: center;
    gap: var(--md);
    font-size: 12px;
    color: var(--text-secondary);
}

.goal-card-progress {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.goal-card-progress .progress-bar {
    width: 80px;
    height: 6px;
}

.goal-card-progress .progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

.goal-card-right {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.goal-status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}

.goal-status-badge.active {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.goal-status-badge.paused {
    background: rgba(253, 203, 110, 0.2);
    color: #B8860B;
}

.goal-status-badge.completed {
    background: rgba(46, 170, 220, 0.1);
    color: var(--primary);
}

.expand-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-hint);
    transition: transform 0.3s ease;
}

.goal-card-expandable.expanded .expand-icon {
    transform: rotate(180deg);
}

.goal-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.goal-card-expandable.expanded .goal-card-content {
    max-height: 1000px;
}

.goal-card-body {
    padding: 0 var(--md) var(--md);
    border-top: 1px solid var(--border);
}

.goal-path-section {
    padding-top: var(--md);
}

.goal-path-section h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--md);
    display: flex;
    align-items: center;
    gap: var(--xs);
}

.path-timeline {
    position: relative;
    padding-left: var(--lg);
}

.path-phase {
    position: relative;
    padding-bottom: var(--lg);
}

.path-phase:last-child {
    padding-bottom: 0;
}

.path-phase::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--surface);
}

.path-phase.completed::before {
    background: var(--success);
}

.path-phase.current::before {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 170, 220, 0.2);
}

.path-phase::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 16px;
    width: 2px;
    height: calc(100% - 10px);
    background: var(--border);
}

.path-phase:last-child::after {
    display: none;
}

.path-phase.completed::after {
    background: var(--success);
}

.phase-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--xs);
}

.phase-status {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: var(--sm);
}

.phase-tasks {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: var(--sm);
}

.phase-task {
    display: flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--xs) 0;
    font-size: 12px;
}

.phase-task .check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.phase-task.completed .check {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-size: 10px;
}

.phase-task.current .check {
    border-color: var(--primary);
}

/* ========== 会员页面 ========== */
.membership-page {
    padding: var(--lg);
}

.membership-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: var(--xl);
    color: white;
    text-align: center;
    margin-bottom: var(--lg);
}

.membership-hero h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--sm);
}

.membership-hero p {
    font-size: 13px;
    opacity: 0.9;
}

.membership-plans {
    display: flex;
    flex-direction: column;
    gap: var(--md);
    margin-bottom: var(--lg);
}

.plan-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    box-shadow: var(--shadow-1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.plan-card.popular {
    border-color: var(--primary);
}

.plan-card.popular::before {
    content: '最受欢迎';
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--primary);
    color: white;
    padding: 4px 40px;
    font-size: 11px;
    transform: rotate(45deg);
}

.plan-card.current {
    border-color: var(--success);
}

.plan-card.current::before {
    content: '当前方案';
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--success);
    color: white;
    padding: 4px 40px;
    font-size: 11px;
    transform: rotate(45deg);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--md);
}

.plan-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.plan-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.plan-price {
    text-align: right;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.price-value span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.price-note {
    font-size: 11px;
    color: var(--text-hint);
}

.plan-features {
    margin-bottom: var(--md);
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--xs) 0;
    font-size: 13px;
}

.plan-feature svg {
    width: 16px;
    height: 16px;
    color: var(--success);
    flex-shrink: 0;
}

.plan-feature.disabled {
    color: var(--text-hint);
}

.plan-feature.disabled svg {
    color: var(--text-hint);
}

.plan-btn {
    width: 100%;
    padding: var(--md);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-btn.primary {
    background: var(--primary);
    color: white;
    border: none;
}

.plan-btn.primary:hover {
    background: var(--primary-dark);
}

.plan-btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.plan-btn.secondary:hover {
    background: rgba(46, 170, 220, 0.1);
}

.plan-btn.current {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: default;
}

/* 权益对比表 */
.comparison-section {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    box-shadow: var(--shadow-1);
}

.comparison-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--lg);
    text-align: center;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: var(--md);
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.comparison-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
}

.comparison-table td:first-child {
    font-weight: 500;
}

.comparison-table .check {
    color: var(--success);
}

.comparison-table .cross {
    color: var(--text-hint);
}

.comparison-table .highlight {
    color: var(--primary);
    font-weight: 600;
}

/* ========== 时间投入选择 ========== */
.time-commitment-options {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.time-option {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-option:hover {
    border-color: var(--border);
}

.time-option.active {
    border-color: var(--primary);
    background: rgba(46, 170, 220, 0.05);
}

.time-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.time-info {
    flex: 1;
}

.time-title {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.time-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.time-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.time-option.active .time-check {
    background: var(--primary);
    border-color: var(--primary);
    position: relative;
}

.time-option.active .time-check::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

/* ========== AI拆分模式选择 ========== */
.split-mode-options {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}

.split-option {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.split-option:hover {
    border-color: var(--border);
}

.split-option.active {
    border-color: var(--primary);
    background: rgba(46, 170, 220, 0.05);
}

.split-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.split-info {
    flex: 1;
}

.split-title {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.split-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.split-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.split-option.active .split-check {
    background: var(--primary);
    border-color: var(--primary);
    position: relative;
}

.split-option.active .split-check::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

/* ========== 更多功能入口 ========== */
.more-features-card {
    margin-top: var(--md);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sm);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--md) var(--sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: var(--bg);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: var(--xs);
}

.feature-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

/* ========== 简单目标（不需要拆分） ========== */
.simple-goals-card {
    margin-bottom: var(--md);
}

.simple-goal-list {
    display: flex;
    flex-direction: column;
}

.simple-goal-item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: var(--md);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.simple-goal-item:last-child {
    border-bottom: none;
}

.simple-goal-item:hover {
    background: var(--bg);
}

.simple-goal-item.completed {
    opacity: 0.6;
}

.simple-goal-item .task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.simple-goal-item .task-checkbox:hover {
    border-color: var(--primary);
}

.simple-goal-item .task-checkbox.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-size: 12px;
}

.simple-goal-item .task-checkbox svg {
    width: 16px;
    height: 16px;
    color: var(--text-hint);
}

.simple-goal-item .goal-info {
    flex: 1;
}

.simple-goal-item .goal-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.simple-goal-item.completed .goal-info h4 {
    text-decoration: line-through;
}

.goal-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.goal-streak {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

/* ========== 目标卡片（可展开） ========== */
.goal-list {
    display: flex;
    flex-direction: column;
    gap: var(--md);
    margin-bottom: var(--lg);
}

.goal-stats {
    display: flex;
    justify-content: space-around;
    padding: var(--md);
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--lg);
    box-shadow: var(--shadow-1);
}

.goal-stats .goal-stat {
    text-align: center;
}

.goal-stats .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.goal-stats .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.goal-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--md);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-card:hover {
    box-shadow: var(--shadow-2);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-info {
    display: flex;
    align-items: center;
    gap: var(--md);
}

.goal-emoji {
    font-size: 28px;
}

.goal-text h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.goal-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.goal-progress-quick {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.expand-icon {
    font-size: 10px;
    color: var(--text-hint);
    transition: transform 0.3s ease;
}

.goal-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.goal-progress-bar {
    display: flex;
    align-items: center;
    gap: var(--md);
    margin-top: var(--md);
}

.goal-progress-bar .progress-bar {
    flex: 1;
    height: 6px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.goal-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.goal-card.expanded .goal-detail {
    max-height: 500px;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--md);
    padding: var(--md) 0;
    margin-top: var(--md);
    border-top: 1px solid var(--border);
}

.detail-stat {
    text-align: center;
}

.detail-stat .label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

.detail-stat .value {
    font-size: 13px;
    font-weight: 500;
}

.detail-phases {
    display: flex;
    gap: var(--xs);
    justify-content: center;
    margin: var(--md) 0;
}

.phase-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}

.phase-dot.done {
    background: var(--success);
}

.phase-dot.current {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 170, 220, 0.2);
}

.detail-actions {
    display: flex;
    gap: var(--md);
    justify-content: center;
}

/* 添加目标入口卡片 */
.add-goal-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--md);
    padding: var(--lg);
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-goal-card:hover {
    border-color: var(--primary);
    background: rgba(46, 170, 220, 0.05);
}

.add-goal-card .add-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-secondary);
}

.add-goal-card .add-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== 会员页面样式补充 ========== */
.current-membership {
    text-align: center;
    padding: var(--xl);
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--lg);
    box-shadow: var(--shadow-1);
}

.current-membership.free {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

[data-theme="dark"] .current-membership.free {
    background: linear-gradient(135deg, #1a1f25 0%, #2d3436 100%);
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--sm) var(--lg);
    background: var(--bg);
    border-radius: var(--radius-full);
    margin-bottom: var(--md);
}

.badge-icon {
    font-size: 20px;
}

.badge-text {
    font-size: 14px;
    font-weight: 600;
}

.membership-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--lg);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.plan-card.pro {
    border-color: var(--primary);
}

.plan-card.super {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.plan-recommend {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 16px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    border-radius: 0 var(--radius-md) 0 var(--radius-sm);
}

.plan-header {
    text-align: center;
    margin-bottom: var(--md);
    padding-bottom: var(--md);
    border-bottom: 1px solid var(--border);
}

.plan-icon {
    font-size: 32px;
    display: block;
    margin-bottom: var(--sm);
}

.plan-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--sm);
}

.plan-price {
    margin-bottom: var(--xs);
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.price-unit {
    font-size: 14px;
    color: var(--text-secondary);
}

.price-note {
    font-size: 11px;
    color: var(--text-hint);
}

.plan-features {
    margin-bottom: var(--lg);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--xs) 0;
    font-size: 13px;
}

.feature-check {
    color: var(--success);
    font-weight: 600;
}

.feature-item.highlight {
    color: var(--primary);
}

.feature-item.highlight strong {
    font-weight: 700;
}

.btn-premium {
    width: 100%;
    padding: var(--md);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.comparison-card {
    margin-top: var(--lg);
}

.comparison-table {
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: var(--sm) var(--md);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row.header {
    background: var(--bg);
    font-weight: 600;
}

.feature-name {
    color: var(--text-secondary);
}

.feature-col {
    text-align: center;
}

/* ========== 社区页面增强样式 ========== */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.btn-small {
    padding: var(--xs) var(--md);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--xs);
}

.sort-tabs {
    display: flex;
    gap: var(--sm);
    margin-bottom: var(--md);
    padding: 0 var(--lg);
}

.sort-tab {
    padding: var(--sm) var(--md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.channel-scroll {
    display: flex;
    gap: var(--sm);
    padding: var(--sm) var(--lg);
    overflow-x: auto;
    margin-bottom: var(--md);
    -webkit-overflow-scrolling: touch;
}

.channel-scroll::-webkit-scrollbar {
    display: none;
}

.channel-item {
    padding: var(--sm) var(--md);
    background: var(--surface);
    border-radius: var(--radius-full);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.channel-item.active {
    background: var(--primary);
    color: white;
}

.channel-item:hover {
    border-color: var(--primary);
}

/* 帖子卡片增强 */
.post-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--md);
    margin-bottom: var(--md);
    box-shadow: var(--shadow-1);
}

.post-card.pinned {
    border-left: 3px solid var(--warning);
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.05) 0%, transparent 100%);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--sm);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.avatar.official {
    background: linear-gradient(135deg, #FDCB6E, #E17055);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--xs);
}

.author-level {
    font-size: 10px;
    padding: 1px 6px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
}

.official-badge {
    font-size: 10px;
    padding: 1px 6px;
    background: linear-gradient(135deg, #FDCB6E, #E17055);
    color: white;
    border-radius: var(--radius-full);
}

.post-time {
    font-size: 11px;
    color: var(--text-hint);
}

.post-circle {
    font-size: 11px;
    padding: var(--xs) var(--sm);
    background: rgba(46, 170, 220, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
}

.post-circle.hot {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

.post-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--xs);
    line-height: 1.4;
}

.post-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--sm);
}

.post-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: var(--sm) 0;
}

.post-image img {
    width: 100%;
    height: auto;
}

.post-goal-link {
    display: flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--sm) var(--md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-top: var(--sm);
    font-size: 12px;
}

.post-goal-link.completed {
    background: rgba(0, 184, 148, 0.1);
}

.goal-icon {
    font-size: 18px;
}

.goal-progress {
    flex: 1;
    color: var(--text-secondary);
}

.goal-percent {
    font-weight: 600;
    color: var(--primary);
}

.post-goal-link.completed .goal-percent {
    color: var(--success);
}

/* 悬浮发帖按钮 */
.fab-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(46, 170, 220, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
}

.fab-btn:hover {
    transform: scale(1.1);
}

.fab-btn svg {
    width: 24px;
    height: 24px;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}
