/* 禅释 · 此刻 - 优化版样式表 */

/* ========================================
   基础变量与重置
   ======================================== */

:root {
    /* 禅意色彩系统 */
    --zen-brown: #8B7355;
    --zen-beige: #D4C4A8;
    --zen-gold: #C9A96E;
    --zen-cream: #F5F0E8;
    --zen-white: #FAF8F3;
    --zen-dark: #3D3229;
    --zen-gray: #8A8A8A;
    --zen-light-gray: #E8E4DC;
    --zen-primary: var(--zen-brown);
    --zen-text: #6B5D4F;
    --zen-border: #E0D8C8;
    --zen-primary-light: var(--zen-beige);
    
    /* 情绪色彩 */
    --mood-anxiety: #E8A87C;
    --mood-anger: #E27D6B;
    --mood-tired: #A8C0D8;
    --mood-empty: #B8B8B8;
    --mood-lost: #C5B8D4;
    
    /* 功能色彩 */
    --success: #7CB87C;
    --warning: #E8C87C;
    --error: #D88C8C;
    
    /* 布局变量 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-sm: 0 1px 3px rgba(61, 50, 41, 0.08);
    --shadow-md: 0 4px 12px rgba(61, 50, 41, 0.12);
    --shadow-lg: 0 8px 24px rgba(61, 50, 41, 0.16);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-serif: 'Songti SC', 'SimSun', 'STSong', serif;
}

/* 深色模式变量 */
[data-theme="dark"] {
    --zen-cream: #2D2924;
    --zen-white: #3D3830;
    --zen-dark: #F5F0E8;
    --zen-gray: #A8A8A8;
    --zen-light-gray: #4D4840;
    --zen-primary: var(--zen-gold);
    --zen-text: #C8BFB0;
    --zen-border: #4D4840;
    --zen-dark-secondary: #353028;
    --zen-border-dark: #5A544C;
    --zen-primary-light: #DFCFA0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--zen-cream);
    color: var(--zen-dark);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ========================================
   页面加载动画
   ======================================== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--zen-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-circle {
    width: 48px;
    height: 48px;
    border: 3px solid var(--zen-light-gray);
    border-top-color: var(--zen-brown);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loader-text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--zen-gray);
}

/* ========================================
   屏幕管理
   ======================================== */

.screen {
    display: none;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateX(0);
    animation: screenFadeIn 0.6s ease;
}

@keyframes screenFadeIn {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 返回时的动画 */
.screen.screen-exit {
    animation: screenFadeOut 0.5s ease;
}

@keyframes screenFadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* ========================================
   启动画面
   ======================================== */

#splash-screen {
    background: linear-gradient(160deg, var(--zen-cream) 0%, #EDE8DC 50%, #E5DFD0 100%);
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

[data-theme="dark"] #splash-screen {
    background: linear-gradient(160deg, #2D2924 0%, #2A2520 50%, #25211C 100%);
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 320px;
    width: 100%;
}

.zen-circle {
    width: 120px;
    height: 120px;
    border: 2px solid var(--zen-brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    position: relative;
    animation: breathe 4s ease-in-out infinite;
}

.zen-inner {
    width: 96px;
    height: 96px;
    border: 1px solid var(--zen-beige);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zen-symbol {
    font-size: 40px;
    opacity: 0.8;
}

.zen-symbol-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

.app-title {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 12px;
    color: var(--zen-brown);
    margin-bottom: 8px;
    font-family: var(--font-serif);
}

.app-subtitle {
    font-size: 18px;
    color: var(--zen-gray);
    letter-spacing: 6px;
    margin-bottom: 20px;
}

.app-tagline {
    font-size: 14px;
    color: var(--zen-gray);
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.8;
}

.splash-actions {
    width: 100%;
}

.splash-hint {
    margin-top: 16px;
    font-size: 12px;
    color: var(--zen-gray);
    opacity: 0.6;
}

.splash-footer {
    position: absolute;
    bottom: 24px;
}

.version {
    font-size: 12px;
    color: var(--zen-gray);
    opacity: 0.5;
}

.icp {
    font-size: 11px;
    color: var(--zen-gray);
    opacity: 0.4;
    margin-top: 4px;
}

.main-icp {
    text-align: center;
    font-size: 11px;
    color: var(--zen-gray);
    opacity: 0.35;
    padding: 12px 0 4px;
}

/* ========================================
   按钮系统
   ======================================== */

.btn-primary {
    width: 100%;
    padding: 16px 32px;
    background: var(--zen-brown);
    color: var(--zen-white);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    letter-spacing: 2px;
}

.btn-primary:hover {
    background: var(--zen-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-submit {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--zen-brown);
    color: var(--zen-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    flex-shrink: 0;
    font-size: 20px;
    align-self: center;
}

.btn-submit:hover {
    background: var(--zen-gold);
    transform: scale(1.05);
}

.btn-icon {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control {
    padding: 16px 48px;
    background: var(--zen-brown);
    color: var(--zen-white);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    min-width: 160px;
}

.btn-control:hover {
    background: var(--zen-gold);
    transform: translateY(-2px);
}

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

.btn-back {
    padding: 8px 12px;
    background: var(--zen-cream);
    border: 1.5px solid var(--zen-beige);
    border-radius: var(--radius-md);
    color: var(--zen-brown);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.btn-back:hover {
    transform: translateX(-4px);
    background: var(--zen-beige);
}

.btn-back .back-icon {
    font-size: 20px;
    font-weight: bold;
}

.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--zen-brown);
    color: var(--zen-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.btn-send:hover {
    background: var(--zen-gold);
    transform: scale(1.05);
}

.send-icon {
    font-size: 20px;
    margin-left: 2px;
}

/* ========================================
   主界面布局
   ======================================== */

#main-screen {
    background: var(--zen-cream);
}

/* 顶部状态栏 - 极简设计 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    min-width: 60px;
}

.status-center {
    flex: 1;
    text-align: center;
}

.app-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--zen-brown);
    letter-spacing: 2px;
}

.mood-indicator {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--zen-cream);
    border-radius: var(--radius-xl);
}

.mood-text {
    font-size: 13px;
    color: var(--zen-gray);
}

.streak-counter {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    background: var(--zen-cream);
    border-radius: var(--radius-xl);
}

.streak-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--zen-brown);
}

.streak-label {
    font-size: 12px;
    color: var(--zen-gray);
}

/* 可滚动内容区 */
.scrollable-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.scrollable-content::-webkit-scrollbar {
    width: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: var(--zen-beige);
    border-radius: 2px;
}

/* 功能图标图片 */
.func-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* 导航图标图片 */
.nav-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 4px;
}

/* 情绪标签图标 - 统一去掉背景 */
.tag-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* 所有情绪按钮背景透明 */
.tag-btn[data-mood="焦虑"],
.tag-btn[data-mood="愤怒"],
.tag-btn[data-mood="疲惫"],
.tag-btn[data-mood="空虚"],
.tag-btn[data-mood="迷茫"],
.tag-btn[data-mood="孤独"] {
    background: transparent !important;
}

/* 疲惫图标特殊处理 - 放大 */
.tag-btn[data-mood="疲惫"] .tag-icon-img {
    width: 48px;
    height: 48px;
    margin: -4px;
}
.mood-tooltip {
    display: none !important;
}

.streak-tooltip {
    display: none !important;
}

/* 主题切换按钮 */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--zen-dark);
    font-size: 13px;
    padding: 4px 8px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(139, 115, 85, 0.1);
}

.theme-icon {
    font-size: 16px;
}

.theme-label {
    font-size: 12px;
}

/* 同步状态 */
.sync-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--zen-gray);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: rgba(124, 184, 124, 0.1);
}

.sync-icon {
    font-size: 14px;
    animation: spin 1s linear infinite;
}

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

.sync-status.synced {
    background: rgba(124, 184, 124, 0.2);
    color: var(--success);
}

.sync-status.synced .sync-icon {
    animation: none;
}

/* 深色模式 */
[data-theme="dark"] .theme-toggle {
    color: var(--zen-cream);
}

[data-theme="dark"] .sync-status {
    background: rgba(124, 184, 124, 0.2);
    color: var(--zen-cream);
}

/* ========================================
   情绪输入区
   ======================================== */

.mood-input-section {
    padding: 20px;
    background: var(--zen-white);
    margin: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
}

.section-date {
    font-size: 13px;
    color: var(--zen-gray);
}

.quick-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-tags-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.tag-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    border: 1.5px solid var(--zen-light-gray);
    border-radius: var(--radius-md);
    background: var(--zen-white);
    color: var(--zen-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 80px;
    flex: 1;
    max-width: 100px;
}

/* 疲惫按钮去掉白色背景 */
.tag-btn[data-mood="疲惫"] {
    background: transparent !important;
    border: 1.5px solid var(--mood-tired) !important;
    box-shadow: none !important;
}

.tag-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.tag-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--zen-dark);
}

.master-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.master-image-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    animation: breathe-glow 6s ease-in-out infinite;
}

@keyframes breathe-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(139, 115, 85, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 115, 85, 0.4);
    }
}

.master-dialogue {
    width: 100%;
    max-width: 300px;
}

.dialogue-bubble {
    background: var(--zen-white);
    border: 1.5px solid var(--zen-beige);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    position: relative;
}

/* 情绪标签激活状态 */
.tag-btn[data-mood="焦虑"].active {
    background: rgba(232, 168, 124, 0.2);
    border-color: var(--mood-anxiety);
}

.tag-btn[data-mood="愤怒"].active {
    background: rgba(226, 125, 107, 0.2);
    border-color: var(--mood-anger);
}

.tag-btn[data-mood="疲惫"] {
    background: transparent !important;
    border: 1.5px solid var(--mood-tired) !important;
    box-shadow: none !important;
}

.tag-btn[data-mood="疲惫"]:hover {
    background: rgba(168, 192, 216, 0.1) !important;
    border-color: var(--mood-tired) !important;
}

.tag-btn[data-mood="疲惫"].active {
    background: rgba(168, 192, 216, 0.2) !important;
    border-color: var(--mood-tired) !important;
}

/* 疲惫图标去掉背景 */
.tag-btn[data-mood="疲惫"] .tag-icon-img {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.tag-btn[data-mood="空虚"].active {
    background: rgba(184, 184, 184, 0.2);
    border-color: var(--mood-empty);
}

.tag-btn[data-mood="迷茫"].active {
    background: rgba(197, 184, 212, 0.2);
    border-color: var(--mood-lost);
}

.mood-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

#mood-text {
    flex: 1;
    height: 80px;
    padding: 12px 16px;
    border: 2px solid var(--zen-light-gray);
    border-radius: var(--radius-md);
    background: var(--zen-cream);
    font-size: 15px;
    resize: none;
    transition: var(--transition-normal);
    font-family: var(--font-sans);
}

#mood-text:focus {
    outline: none;
    border-color: var(--zen-brown);
}

#mood-text::placeholder {
    color: var(--zen-gray);
    opacity: 0.6;
}

/* AI洞察卡片表情图标 */
.insight-mood-emoji {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-right: 8px;
}

/* ========================================
   AI 导师区
   ======================================== */

.master-section {
    padding: 24px 20px;
    text-align: center;
}

.master-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.master-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.master-avatar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(139, 115, 85, 0.15);
    border-radius: 50%;
    animation: breathe-ring 6s ease-in-out infinite;
}

.master-avatar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(139, 115, 85, 0.08);
    border-radius: 50%;
    animation: breathe-ring 6s ease-in-out infinite 2s;
}

@keyframes breathe-ring {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.1;
    }
}

.master-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.3) 0%, transparent 70%);
    animation: glow 4s infinite;
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

.master-image {
    position: relative;
    font-size: 48px;
    line-height: 80px;
}

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

.master-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 4px;
}

.master-title {
    font-size: 13px;
    color: var(--zen-gray);
}

.master-dialogue {
    max-width: 400px;
    margin: 0 auto;
}

.dialogue-bubble {
    background: var(--zen-white);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.dialogue-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--zen-white);
}

.dialogue-text {
    font-size: 16px;
    color: var(--zen-brown);
    font-style: italic;
    line-height: 1.8;
    font-family: var(--font-serif);
}

/* ========================================
   每日洞察
   ======================================== */

.daily-insight {
    padding: 20px;
    background: var(--zen-white);
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.insight-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--zen-dark);
}

.insight-badge {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--zen-cream);
    color: var(--zen-gray);
    border-radius: var(--radius-xl);
}

.insight-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: var(--zen-cream);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.insight-item:hover {
    background: var(--zen-light-gray);
}

.insight-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.reflection-text {
    font-size: 14px;
    color: var(--zen-dark);
    line-height: 1.6;
}

.buddhist-quote,
.wisdom-quote {
    font-size: 14px;
    color: var(--zen-brown);
    font-style: italic;
    line-height: 1.6;
    font-family: var(--font-serif);
}

.micro-action {
    font-size: 14px;
    color: var(--zen-gray);
    line-height: 1.6;
}

/* ========================================
   核心功能区
   ======================================== */

.core-functions {
    padding: 0 16px 16px;
}

.functions-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 12px;
    padding-left: 4px;
}

.functions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.func-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--zen-white);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.func-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.func-btn:active {
    transform: translateY(-1px);
}

.func-icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--zen-cream);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: var(--transition-normal);
}

.func-btn:hover .func-icon-wrapper {
    background: var(--zen-beige);
}

.func-icon {
    font-size: 28px;
}

.func-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 4px;
}

.func-desc {
    font-size: 12px;
    color: var(--zen-gray);
}

/* ========================================
   今日统计
   ======================================== */

.today-stats {
    padding: 0 16px 16px;
}

.stats-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 12px;
    padding-left: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--zen-white);
    padding: 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

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

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--zen-brown);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--zen-gray);
}

/* ========================================
   底部导航
   ======================================== */

.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 8px 0 24px;
    background: var(--zen-white);
    box-shadow: 0 -2px 10px rgba(61, 50, 41, 0.06);
    z-index: 10;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--zen-gray);
    transition: var(--transition-normal);
    padding: 4px 16px;
    position: relative;
}

.nav-btn.active {
    color: var(--zen-brown);
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--zen-brown);
    border-radius: 2px;
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* ========================================
   对话界面
   ======================================== */

#chat-screen {
    background: var(--zen-cream);
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.chat-title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.chat-avatar {
    font-size: 36px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-info h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--zen-dark);
    display: inline;
    margin-right: 8px;
}

.chat-status {
    font-size: 12px;
    color: var(--success);
    display: inline;
}

.chat-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    margin-right: 4px;
}

.btn-menu {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--zen-gray);
    font-size: 20px;
    cursor: pointer;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: messageIn 0.3s ease;
}

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

.message.system {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 32px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-content {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    font-size: 15px;
    line-height: 1.6;
}

.message.user .message-content {
    background: var(--zen-brown);
    color: var(--zen-white);
}

.message.system .message-content {
    border-top-left-radius: 4px;
}

.message.user .message-content {
    border-top-right-radius: 4px;
}

/* 建议芯片 */
.chat-suggestions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}

.chat-suggestions::-webkit-scrollbar {
    height: 4px;
}

.chat-suggestions::-webkit-scrollbar-thumb {
    background: var(--zen-beige);
    border-radius: 2px;
}

.suggestion-chip {
    padding: 10px 16px;
    background: var(--zen-white);
    border: 1px solid var(--zen-light-gray);
    border-radius: var(--radius-xl);
    font-size: 13px;
    color: var(--zen-dark);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 44px;
    transition: var(--transition-normal);
}

.suggestion-chip:hover {
    background: var(--zen-cream);
    border-color: var(--zen-brown);
}

/* 输入区 */
/* AI回复风格选择器 — 滑动胶囊 */
.chat-style-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--zen-white);
    border-top: 1px solid var(--zen-light-gray);
    flex-shrink: 0;
}

.style-label {
    font-size: 13px;
    color: var(--zen-gray);
    white-space: nowrap;
    flex-shrink: 0;
}

.style-pill {
    flex: 1;
    position: relative;
    display: flex;
    background: var(--zen-cream);
    border-radius: 24px;
    padding: 3px;
    max-width: 260px;
}

.style-indicator {
    position: absolute;
    top: 3px;
    left: 33.33%;
    width: calc(100% / 3 - 6px);
    height: calc(100% - 6px);
    background: var(--zen-brown);
    border-radius: 22px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.25);
    z-index: 0;
}

.style-pill .style-option {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 8px 0;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--zen-gray);
    cursor: pointer;
    transition: color 0.35s ease;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    border-radius: 22px;
}

.style-pill .style-option.active {
    color: var(--zen-white);
    font-weight: 600;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 10px 16px 24px;
    background: var(--zen-white);
    border-top: none;
    flex-shrink: 0;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--zen-light-gray);
    border-radius: var(--radius-xl);
    background: var(--zen-cream);
    font-size: 15px;
    resize: none;
    max-height: 120px;
    font-family: var(--font-sans);
    transition: var(--transition-normal);
}

#chat-input:focus {
    outline: none;
    border-color: var(--zen-brown);
}

#chat-input::placeholder {
    color: var(--zen-gray);
    opacity: 0.6;
}

/* ========================================
   日记界面
   ======================================== */

#journal-screen {
    background: var(--zen-cream);
}

.journal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.journal-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
}

.btn-filter {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--zen-brown);
    font-size: 14px;
    cursor: pointer;
}

.journal-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.journal-summary {
    margin-bottom: 20px;
}

.summary-card {
    background: var(--zen-white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.summary-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 16px;
}

.mood-chart {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;
    color: var(--zen-gray);
}

.chart-placeholder p {
    font-size: 14px;
}

/* 日记条目 */
.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.journal-entry {
    background: var(--zen-white);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.journal-entry:hover {
    box-shadow: var(--shadow-md);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.entry-date {
    font-size: 13px;
    color: var(--zen-gray);
}

.entry-mood {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--zen-cream);
    border-radius: var(--radius-xl);
    font-size: 14px;
}

.entry-text {
    color: var(--zen-dark);
    line-height: 1.6;
    margin-bottom: 12px;
}

.entry-ai-summary {
    font-size: 13px;
    color: var(--zen-brown);
    font-style: italic;
    padding-top: 12px;
    border-top: 1px solid var(--zen-light-gray);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--zen-gray);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 14px;
    opacity: 0.7;
}

/* ========================================
   冥想界面
   ======================================== */

#meditation-screen {
    background: linear-gradient(180deg, #E8E0D0 0%, var(--zen-cream) 100%);
}

[data-theme="dark"] #meditation-screen {
    background: linear-gradient(180deg, #3D3830 0%, #2D2924 100%);
}

.meditation-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.meditation-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
}

.btn-info {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--zen-gray);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meditation-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

/* 冥想类型选择 */
.meditation-types {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.meditation-type {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: var(--zen-white);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.meditation-type:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.meditation-type.active {
    border-color: var(--zen-brown);
    background: var(--zen-cream);
}

.type-duration {
    font-size: 32px;
    font-weight: 700;
    color: var(--zen-brown);
    line-height: 1;
}

.type-unit {
    font-size: 12px;
    color: var(--zen-gray);
    margin-bottom: 4px;
}

.type-name {
    font-size: 14px;
    color: var(--zen-dark);
    font-weight: 500;
}

/* 冥想视觉 */
.meditation-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.breath-container {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breath-circle {
    width: 200px;
    height: 200px;
    border: 3px solid var(--zen-brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 2.5s ease-in-out;
    position: relative;
    z-index: 2;
    background: rgba(245, 240, 232, 0.8);
    transform: scale(1);
}

.breath-circle.inhale {
    transform: scale(1.15);
    border-color: var(--zen-gold);
}

.breath-circle.hold {
    transform: scale(1.15);
    border-color: var(--zen-gold);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.3);
    animation: hold-pulse 2s ease-in-out infinite;
}

.breath-circle.exhale {
    transform: scale(1);
    border-color: var(--zen-brown);
}

.breath-circle.rest {
    transform: scale(1);
    border-color: rgba(139, 115, 85, 0.5);
    background: rgba(245, 240, 232, 0.6);
}

@keyframes hold-pulse {
    0%, 100% { box-shadow: 0 0 24px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.55); }
}

.breath-inner {
    text-align: center;
}

.breath-text {
    font-size: 48px;
    color: var(--zen-brown);
    font-weight: 300;
    transition: var(--transition-slow);
}

/* 游客提示 */
.guest-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--zen-cream);
    border-bottom: 1px solid var(--zen-light-gray);
    font-size: 14px;
    color: var(--zen-gray);
}

.guest-hint.show {
    display: flex;
}

.hint-icon {
    font-size: 16px;
}

.btn-hint-login {
    padding: 4px 12px;
    background: var(--zen-brown);
    color: var(--zen-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
}
.breath-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--zen-beige);
    border-radius: 50%;
    opacity: 0;
    transition: all 2.5s ease-in-out;
}

.ring-1 {
    width: 220px;
    height: 220px;
}

.ring-2 {
    width: 260px;
    height: 260px;
}

.ring-3 {
    width: 300px;
    height: 300px;
}

.breath-circle.inhale ~ .breath-rings .ring,
.breath-circle.hold ~ .breath-rings .ring {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1.2);
}

.breath-guide {
    margin-top: 24px;
    color: var(--zen-gray);
    font-size: 15px;
    text-align: center;
}

/* 冥想控制 */
.meditation-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 0;
}

.timer-display {
    font-size: 48px;
    color: var(--zen-brown);
    font-weight: 300;
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   冥想完成过渡动画
   ======================================== */

.meditation-complete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(245, 240, 232, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.meditation-complete-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.complete-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
}

.complete-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 2px solid var(--zen-beige);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    animation: ring-expand 2s ease-out forwards;
}

.complete-ring-2 {
    animation-delay: 0.3s;
    width: 160px;
    height: 160px;
    border-color: rgba(212, 196, 168, 0.5);
}

@keyframes ring-expand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.complete-icon {
    font-size: 48px;
    position: relative;
    z-index: 1;
    animation: complete-breathe 2s ease-in-out infinite;
}

@keyframes complete-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.complete-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--zen-dark);
    letter-spacing: 4px;
    margin: 0;
}

.complete-duration {
    font-size: 36px;
    font-weight: 300;
    color: var(--zen-brown);
    margin: 0;
}

.complete-message {
    font-size: 14px;
    color: var(--zen-gray);
    letter-spacing: 2px;
    margin: 0;
}

/* 深色模式 */
[data-theme="dark"] .meditation-complete-overlay {
    background: rgba(45, 41, 36, 0.95);
}

[data-theme="dark"] .complete-title {
    color: var(--zen-cream);
}

/* ========================================
   提醒界面
   ======================================== */

#reminder-screen {
    background: var(--zen-cream);
}

.reminder-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.reminder-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
}

.btn-add {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--zen-brown);
    color: var(--zen-white);
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.btn-add:hover {
    background: var(--zen-gold);
    transform: scale(1.05);
}

.reminder-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.reminder-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--zen-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.reminder-item:hover {
    box-shadow: var(--shadow-md);
}

.reminder-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.reminder-content {
    flex: 1;
}

.reminder-text {
    font-size: 15px;
    color: var(--zen-dark);
    margin-bottom: 4px;
    font-style: italic;
}

.reminder-time {
    font-size: 13px;
    color: var(--zen-gray);
}

/* 开关 */
.reminder-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.reminder-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--zen-light-gray);
    border-radius: 28px;
    transition: var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--zen-white);
    border-radius: 50%;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.reminder-toggle input:checked + .toggle-slider {
    background: var(--zen-brown);
}

.reminder-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.reminder-info {
    padding: 16px;
    background: var(--zen-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.reminder-info p {
    font-size: 14px;
    color: var(--zen-gray);
    line-height: 1.6;
}

/* ========================================
   个人中心
   ======================================== */

#profile-screen {
    background: var(--zen-cream);
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.profile-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
}

.btn-settings {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--zen-gray);
    font-size: 20px;
    cursor: pointer;
}

.profile-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 个人卡片 */
.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--zen-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: var(--zen-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon {
    font-size: 32px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 4px;
}

.profile-level {
    font-size: 14px;
    color: var(--zen-gray);
}

/* 统计卡片 */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stats .stat-card {
    background: var(--zen-white);
    padding: 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.profile-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.profile-stats .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--zen-brown);
    margin-bottom: 4px;
}

.profile-stats .stat-label {
    font-size: 13px;
    color: var(--zen-gray);
}

/* 菜单 */
.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-group {
    background: var(--zen-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.menu-title {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--zen-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--zen-cream);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    color: var(--zen-dark);
    transition: var(--transition-normal);
    border-bottom: 1px solid var(--zen-light-gray);
}

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

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

.menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.menu-label {
    flex: 1;
}

.menu-arrow {
    color: var(--zen-gray);
    font-size: 18px;
}

.menu-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.menu-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* ========================================
   通知系统
   ======================================== */

.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.notification {
    padding: 16px 20px;
    background: var(--zen-dark);
    color: var(--zen-white);
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
    box-shadow: var(--shadow-lg);
    animation: notificationIn 0.3s ease, notificationOut 0.3s ease 2.7s;
    pointer-events: auto;
}

@keyframes notificationIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notificationOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ========================================
   对话框
   ======================================== */

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 50, 41, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 1;
    visibility: visible;
    transition: var(--transition-normal);
}

.dialog-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.dialog-content {
    background: var(--zen-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
    animation: dialogIn 0.3s ease;
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
    margin-bottom: 12px;
}

.dialog-message {
    font-size: 15px;
    color: var(--zen-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-dialog-cancel,
.btn-dialog-confirm {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-dialog-cancel {
    background: transparent;
    border: 1px solid var(--zen-light-gray);
    color: var(--zen-gray);
}

.btn-dialog-cancel:hover {
    background: var(--zen-cream);
}

.btn-dialog-confirm {
    background: var(--zen-brown);
    border: none;
    color: var(--zen-white);
}

.btn-dialog-confirm:hover {
    background: var(--zen-gold);
}

/* ========================================
   AI洞察卡片样式
   ======================================== */

.ai-insight-card {
    background: linear-gradient(135deg, #F5F0E8 0%, #EDE6D6 100%);
    border: 1px solid #D4C4A8;
    border-radius: 16px;
    padding: 20px;
    margin: 16px;
    position: relative;
    box-shadow: 0 4px 16px rgba(139, 115, 85, 0.15);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.insight-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #D4C4A8;
}

.insight-mood-icon {
    font-size: 24px;
}

.insight-mood-text {
    font-size: 16px;
    font-weight: 600;
    color: #5C4A32;
    flex: 1;
}

.insight-badge {
    background: #8B7355;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.insight-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 12px;
}

.section-label {
    display: inline-block;
    background: #8B7355;
    color: white;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 6px;
}

.section-content {
    color: #5C4A32;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

.btn-close-insight {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #8B7355;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.btn-close-insight:hover {
    background: rgba(139, 115, 85, 0.1);
}

/* AI洞察卡片 — 深色模式 */
[data-theme="dark"] .ai-insight-card {
    background: linear-gradient(135deg, #3D3830 0%, #353028 100%);
    border-color: #5A544C;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .insight-card-header {
    border-bottom-color: #5A544C;
}

[data-theme="dark"] .insight-mood-text {
    color: var(--zen-dark);
}

[data-theme="dark"] .insight-badge {
    background: var(--zen-gold);
    color: #3D3229;
}

[data-theme="dark"] .insight-section {
    background: rgba(61, 56, 48, 0.6);
}

[data-theme="dark"] .section-label {
    background: var(--zen-gold);
    color: #3D3229;
}

[data-theme="dark"] .section-content {
    color: #D8CFC0;
}

[data-theme="dark"] .btn-close-insight {
    color: var(--zen-gold);
}

[data-theme="dark"] .btn-close-insight:hover {
    background: rgba(201, 169, 110, 0.15);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 380px) {
    .app-title {
        font-size: 32px;
        letter-spacing: 8px;
    }
    
    .functions-grid {
        gap: 8px;
    }
    
    .func-btn {
        padding: 20px 12px;
    }
    
    .stats-grid {
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    #app {
        max-width: 414px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(61, 50, 41, 0.1);
    }
    
    body {
        background: #E5DFD0;
    }
}

/* ========================================
   动画工具类
   ======================================== */

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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

.scale-in {
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

.invisible {
    opacity: 0;
    pointer-events: none;
}

/* 选中状态 */
.selected {
    border-color: var(--zen-brown) !important;
    background: var(--zen-beige) !important;
}

/* 禁用状态 */
.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 禅师头像 */
.chat-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* 消息头像 */
.message-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

/* 主页禅师图标 */
.master-image-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* 关于页面 */
.about-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 52px;
    background: var(--zen-white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.about-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--zen-dark);
}

.about-container {
    padding: 20px 24px 40px;
    max-width: 100%;
    margin: 0 auto;
    overflow-y: auto;
    flex: 1;
    box-sizing: border-box;
}

.about-logo {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 10px;
}

.about-zen-circle {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-zen-circle .zen-inner {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.about-zen-circle .zen-symbol-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.about-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--zen-dark);
    margin: 0 0 6px;
}

.about-version {
    font-size: 12px;
    color: var(--zen-gray);
    margin: 0;
}

.about-section {
    margin-bottom: 24px;
    padding: 0 4px;
}

.about-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--zen-dark);
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--zen-primary);
    display: inline-block;
}

.about-description {
    font-size: 13px;
    line-height: 1.7;
    color: var(--zen-text);
    margin: 0;
    padding: 12px 14px;
    background: var(--zen-cream);
    border-radius: 10px;
    border-left: 3px solid var(--zen-primary);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-feature-item {
    display: flex;
    gap: 14px;
    padding: 16px 16px 16px 14px;
    background: var(--zen-white);
    border-radius: 12px;
    border-left: 3px solid var(--zen-gold);
    box-shadow: var(--shadow-sm);
}

.feature-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, var(--zen-gold), var(--zen-brown));
    color: white;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--zen-dark);
    margin: 0 0 6px;
}

.feature-content p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--zen-gray);
    margin: 0;
}

.about-footer {
    text-align: center;
    margin-top: 28px;
    padding: 16px 0 30px;
    border-top: 1px solid var(--zen-border);
}

.about-footer p {
    font-size: 11px;
    color: var(--zen-gray);
    margin: 0 0 4px;
}

.about-tagline {
    font-size: 12px;
    color: var(--zen-primary);
    font-style: italic;
}

/* 深色模式适配 */
[data-theme="dark"] .about-title {
    color: var(--zen-cream);
}

[data-theme="dark"] .about-section-title {
    color: var(--zen-cream);
}

[data-theme="dark"] .about-description {
    background: var(--zen-dark-secondary);
    color: var(--zen-cream);
}

[data-theme="dark"] .about-feature-item {
    background: var(--zen-white);
    border-left-color: var(--zen-gold);
}

[data-theme="dark"] .feature-content h4 {
    color: var(--zen-dark);
}

[data-theme="dark"] .feature-content p {
    color: #B0A89E;
}

[data-theme="dark"] .about-footer {
    border-top-color: var(--zen-border-dark);
}

[data-theme="dark"] .about-footer p {
    color: var(--zen-gray);
}

[data-theme="dark"] .about-tagline {
    color: var(--zen-primary-light);
}

