        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        html {
            height: 100%;
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }
        
        :root {
            /* 暗夜模式变量（默认） */
            --primary-color: #f8b6d0;
            --secondary-color: #a8d8ea;
            --accent-color: #ff9a8b;
            --completed-color: #17a2b8;
            --light-color: #fff9fb;
            --dark-color: #5d576b;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --glass-bg: rgba(255, 255, 255, 0.15);
            --glass-border: rgba(255, 255, 255, 0.2);
            --bg-color: #000;
            --text-color: #fff;
            --card-bg: rgba(255, 255, 255, 0.1);
            --card-border: rgba(255, 255, 255, 0.1);
        }
        
        :root[data-theme="light"] {
            /* 白昼模式变量 */
            --primary-color: #ff6b9d;
            --secondary-color: #4dabf7;
            --accent-color: #ff8a65;
            --completed-color: #15aabf;
            --light-color: #ffffff;
            --dark-color: #343a40;
            --success-color: #40c057;
            --warning-color: #fab005;
            --danger-color: #fa5252;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            --glass-bg: rgba(255, 255, 255, 0.7); /* 改为白色透明磨砂 */
            --glass-border: rgba(255, 255, 255, 0.8);
            --bg-color: linear-gradient(180deg, #fff0f5 0%, #ffffff 100%); /* 渐变浅粉色到白色 */
            --text-color: #212529;
            --card-bg: rgba(255, 255, 255, 0.9);
            --card-border: rgba(0, 0, 0, 0.1);
        }

        @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
            :root {
                --glass-bg: rgba(0, 0, 0, 0.55);
                --glass-border: rgba(255, 255, 255, 0.18);
                --card-bg: rgba(0, 0, 0, 0.35);
                --card-border: rgba(255, 255, 255, 0.12);
            }

            :root[data-theme="light"] {
                --glass-bg: rgba(255, 255, 255, 0.92);
                --glass-border: rgba(0, 0, 0, 0.08);
                --card-bg: rgba(255, 255, 255, 0.95);
                --card-border: rgba(0, 0, 0, 0.08);
            }
        }
        
        /* 白昼模式下隐藏角色图的蒙版 */
        :root[data-theme="light"] .character-gradient {
            background: none !important;
            display: none !important;
        }
        
        /* 白昼模式下强制背景渐变 */
        :root[data-theme="light"] body,
        :root[data-theme="light"] .play-page {
            background-color: #ffffff !important; /* 垫底白色，防止透黑 */
            background-image: linear-gradient(180deg, #fff0f5 0%, #ffffff 100%) !important;
            background-attachment: fixed !important;
            background-repeat: no-repeat !important;
        }

        /* 白昼模式下角色图正常显示 */
        :root[data-theme="light"] .character-image {
            opacity: 0.7;
        }
        
        /* 白昼模式下计时器背景和数字背景 */
        :root[data-theme="light"] .circular-timer,
        :root[data-theme="light"] .timer-circle {
            background: rgba(255, 255, 255, 0.4); /* 白色透明磨砂 */
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.6);
        }
        
        :root[data-theme="light"] .timer-text {
            background: rgba(255, 255, 255, 0.6); /* 白色透明磨砂 */
            color: var(--dark-color);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
        }
        
        /* 白昼模式下三点菜单背景 */
        :root[data-theme="light"] .menu-panel {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(0, 0, 0, 0.1);
            color: var(--dark-color);
        }
        
        :root[data-theme="light"] .menu-section-title,
        :root[data-theme="light"] .theme-name,
        :root[data-theme="light"] .character-name,
        :root[data-theme="light"] .noise-name,
        :root[data-theme="light"] .folder-title,
        :root[data-theme="light"] .dialogue-text {
            color: var(--dark-color);
        }
        
        :root[data-theme="light"] .menu-section-header {
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        /* 白昼模式下进度页样式 */
        :root[data-theme="light"] .heatmap-title,
        :root[data-theme="light"] .heatmap-metric-value,
        :root[data-theme="light"] .heatmap-metric-label,
        :root[data-theme="light"] .records-title,
        :root[data-theme="light"] .record-date,
        :root[data-theme="light"] .record-time {
            color: var(--dark-color);
        }
        
        /* 白昼模式下热力图方块添加粉色描边 */
        :root[data-theme="light"] .heatmap-cell {
            border: 1px solid rgba(255, 107, 157, 0.3); /* 粉色描边 */
        }
        
        /* 白昼模式下热力图颜色调整 */
        :root[data-theme="light"] .heatmap-cell[data-level="1"] { 
            background: rgba(255, 107, 157, 0.2); 
            border-color: rgba(255, 107, 157, 0.3);
        }
        :root[data-theme="light"] .heatmap-cell[data-level="2"] { 
            background: rgba(255, 107, 157, 0.4); 
            border-color: rgba(255, 107, 157, 0.5);
        }
        :root[data-theme="light"] .heatmap-cell[data-level="3"] { 
            background: rgba(255, 107, 157, 0.6); 
            border-color: rgba(255, 107, 157, 0.7);
        }
        :root[data-theme="light"] .heatmap-cell[data-level="4"] { 
            background: rgba(255, 107, 157, 0.8); 
            border-color: rgba(255, 107, 157, 0.9);
        }
        
        /* 白昼模式下已完成任务字体灰色 */
        :root[data-theme="light"] .task-completed {
            color: rgba(0, 0, 0, 0.5);
        }
        
        /* 白昼模式下进度页切换按钮样式 */
        :root[data-theme="light"] .view-switch {
            color: rgba(0, 0, 0, 0.6); /* 非激活状态为深灰色 */
        }
        
        :root[data-theme="light"] .view-switch.active {
            color: #d6336c; /* 激活状态为深粉色，提高对比度 */
            border-bottom-color: #d6336c;
        }

        /* 白昼模式下热力图和专注记录底衬半透明并添加模糊 */
        :root[data-theme="light"] .heatmap-container,
        :root[data-theme="light"] .records-container,
        :root[data-theme="light"] .progress-view-switcher,
        :root[data-theme="light"] .task-category {
            background: rgba(255, 255, 255, 0.3); /* 30%透明度 */
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            transition: none;
        }

        /* 白昼模式下话语条样式 */
        :root[data-theme="light"] .dialogue-item {
            background: rgba(255, 255, 255, 0.3) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border: 1px solid rgba(255, 255, 255, 0.4) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
            color: var(--dark-color) !important;
        }

        /* 白昼模式下任务列表头部样式 */
        :root[data-theme="light"] .category-header {
            background: rgba(255, 255, 255, 0.2);
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
            color: var(--dark-color);
        }

        :root[data-theme="light"] .category-title {
            color: var(--dark-color);
        }

        :root[data-theme="light"] .task-category.completed .category-header {
            background: rgba(255, 255, 255, 0.2);
        }

        /* 白昼模式下切换导航栏选中态背景 */
        :root[data-theme="light"] .view-switch.active {
            background: rgba(255, 255, 255, 0.4);
            color: var(--primary-color);
        }


        /* 白昼模式下热力图和专注记录相关文字黑色 */
        :root[data-theme="light"] .heatmap-title,
        :root[data-theme="light"] .records-title,
        :root[data-theme="light"] .heatmap-legend,
        :root[data-theme="light"] .heatmap-day,
        :root[data-theme="light"] .heatmap-weekday,
        :root[data-theme="light"] .record-info,
        :root[data-theme="light"] .no-records {
            color: #000000;
        }
        
        :root[data-theme="light"] .heatmap-metric-label,
        :root[data-theme="light"] .record-time {
            color: rgba(0, 0, 0, 0.7);
        }

        /* 白昼模式下计时器控制菜单 - 30%透明度白磨砂 */
        :root[data-theme="light"] .timer-control-panel {
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        :root[data-theme="light"] .timer-control-btn:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        /* 白昼模式下底部导航栏 */
        :root[data-theme="light"] .bottom-nav {
            background: rgba(255, 255, 255, 0.95);
            border-top: 1px solid rgba(0, 0, 0, 0.1);
        }

        :root[data-theme="light"] .nav-item {
            color: rgba(0, 0, 0, 0.6);
        }

        :root[data-theme="light"] .nav-item.active {
            color: var(--primary-color);
        }

        /* 白昼模式下主题切换确认弹窗 */
        :root[data-theme="light"] .theme-confirm-box {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            color: var(--dark-color);
        }
        
        :root[data-theme="light"] .theme-confirm-content {
            color: rgba(0, 0, 0, 0.8);
        }
        
        :root[data-theme="light"] .theme-confirm-btn.cancel {
            background: rgba(0, 0, 0, 0.05);
            color: var(--dark-color);
        }
        
        :root[data-theme="light"] .theme-confirm-btn.cancel:hover {
            background: rgba(0, 0, 0, 0.1);
        }

        body {
            background: var(--bg-color);
            color: var(--text-color);
            min-height: 100vh;
            overflow-x: hidden;
            font-size: 16px;
            line-height: 1.5;
        }

        button,
        input,
        select,
        textarea {
            font: inherit;
        }
        
        /* 播放页样式 - 作为主页面容器 */
        .play-page {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            background: var(--bg-color);
            height: var(--app-height, 100vh);
            padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
            /* iOS 滚动隔离 */
            overscroll-behavior-y: none;
        }
        
        /* 角色图片作为背景 */
        .character-image {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--app-height, 100vh);
            object-fit: cover;
            z-index: 2;
            transition: opacity 0.5s ease;
            opacity: 0.4;
        }
        
        /* 渐变遮罩层 */
        .character-gradient {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 60%;
            background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
            z-index: 3;
            pointer-events: none;
        }
        
        /* 主容器 */
        .container {
            position: relative;
            z-index: 4;
            max-width: 100%;
            margin: 0 auto;
            padding: 15px;
            padding-top: calc(70px + var(--safe-inset-top, env(safe-area-inset-top, 0px)));
            padding-left: calc(15px + env(safe-area-inset-left, 0px));
            padding-right: calc(15px + env(safe-area-inset-right, 0px));
        }
        
        /* 顶部状态栏 - 透明背景 */
        .status-bar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: calc(15px + var(--safe-inset-top, env(safe-area-inset-top, 0px))) calc(20px + env(safe-area-inset-right, 0px)) 15px calc(20px + env(safe-area-inset-left, 0px));
            background: transparent; /* 透明背景 */
            backdrop-filter: none; /* 移除模糊效果 */
            z-index: 10;
            border-bottom: none; /* 移除边框 */
        }
        

        
        .metrics-icons {
            display: flex;
            gap: 15px;
            align-items: center;
        }
        
        .metric-icon {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.9rem;
            color: var(--text-color);
            background: var(--glass-bg);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            padding: 6px 12px;
            border-radius: 20px;
            border: 1px solid var(--glass-border);
        }
        
        .metric-icon i {
            font-size: 1rem;
        }
        
        /* 三点菜单按钮 */
        .menu-button {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--glass-bg);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: var(--text-color);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.2rem;
            transition: all 0.3s ease;
            touch-action: manipulation;
        }
        
        .menu-button:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        /* 三点菜单弹出层 */
        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            -webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            z-index: 1001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .menu-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .menu-panel {
    background: rgba(30, 30, 40, 0.95);
    border-radius: 15px;
    padding: 20px;
    width: 90%;
    max-width: 350px;
    margin-top: 70px;
    margin-right: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}
        
        .menu-overlay.active .menu-panel {
            transform: translateY(0);
        }
        
        .menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .menu-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-color);
        }
        
        .menu-close {
            background: var(--glass-bg);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: var(--text-color);
            font-size: 1.2rem;
            cursor: pointer;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            touch-action: manipulation;
        }
        
        .menu-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .menu-section {
            margin-bottom: 25px;
        }
        
        .menu-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            min-height: 44px;
            padding: 12px 0;
            margin-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .menu-section-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-color);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .menu-section-title i {
            color: var(--primary-color);
        }
        
        .toggle-arrow {
            font-size: 0.9rem;
            transition: transform 0.3s ease;
        }
        
        .menu-section-content {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}
        
        .menu-section.collapsed .menu-section-content {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
        }
        
        .menu-section.collapsed .toggle-arrow {
            transform: rotate(-90deg);
        }
        
        /* 主题切换样式 */
        .theme-options {
            display: flex;
            gap: 15px;
            margin-top: 10px;
        }
        
        .theme-option {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: all 0.3s ease;
            min-height: 84px;
            touch-action: manipulation;
        }
        
        .theme-option:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .theme-option:active {
            transform: translateY(0);
        }
        
        .theme-option.active {
            background: rgba(248, 182, 208, 0.2);
            border-color: var(--primary-color);
        }
        
        .theme-option i {
            font-size: 1.5rem;
            margin-bottom: 8px;
            color: var(--primary-color);
        }
        
        .theme-name {
            font-size: 0.9rem;
            color: var(--text-color);
            font-weight: 500;
        }
        
        .character-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
        
        .character-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: all 0.3s ease;
            min-height: 92px;
            touch-action: manipulation;
        }
        
        .character-option:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .character-option:active {
            transform: translateY(0);
        }
        
        .character-option.selected {
            background: rgba(248, 182, 208, 0.2);
            border-color: var(--primary-color);
        }
        
        .character-image-small {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            object-fit: cover;
            margin-bottom: 8px;
        }
        
        .character-name {
            font-size: 0.85rem;
            color: var(--text-color);
            font-weight: 500;
        }
        
        .custom-character-btn {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px dashed rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            color: var(--text-color);
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
            transition: all 0.3s ease;
        }
        
        .custom-character-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: var(--primary-color);
        }
        
        .noise-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
        
        .noise-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .noise-option:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }
        
        .noise-option.active {
            background: rgba(168, 216, 234, 0.2);
            border-color: var(--secondary-color);
        }
        
        :root[data-theme="light"] .noise-option {
            background: rgba(249, 250, 251, 0.95);
            border-color: rgba(209, 213, 219, 0.9);
        }

        :root[data-theme="light"] .noise-option.active {
            background: rgba(191, 219, 254, 0.9);
        }
        
        .noise-icon {
            font-size: 1.5rem;
            color: var(--secondary-color);
            margin-bottom: 8px;
        }
        
        .noise-name {
            font-size: 0.85rem;
            color: var(--text-color);
            font-weight: 500;
        }
        
        .custom-noise-btn {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px dashed rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            color: var(--text-color);
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
            transition: all 0.3s ease;
        }
        
        .custom-noise-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: var(--secondary-color);
        }

        :root[data-theme="light"] .character-selector .selector-label {
            color: rgba(31, 41, 55, 0.7) !important;
        }

        :root[data-theme="light"] #selected-character {
            background: rgba(249, 250, 251, 0.95) !important;
            border: 1px solid rgba(209, 213, 219, 0.9);
        }

        :root[data-theme="light"] #character-dropdown {
            background: rgba(255, 255, 255, 0.98) !important;
            border-color: rgba(209, 213, 219, 0.9) !important;
        }
        
        /* 话语条文件夹样式 */
        .dialogue-folder {
            margin-bottom: 15px;
        }
        
        .dialogue-folder-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            cursor: pointer;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }
        
        .dialogue-folder-header:hover {
            background: rgba(255, 255, 255, 0.12);
        }
        
        .folder-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--text-color);
        }
        
        .folder-title i {
            color: var(--primary-color);
        }
        
        .folder-count {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.6);
            background: rgba(255, 255, 255, 0.1);
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        .folder-arrow {
            transition: transform 0.3s ease;
        }
        
        .dialogue-folder.collapsed .folder-arrow {
            transform: rotate(-90deg);
        }
        
        .dialogue-list {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    margin-top: 8px;
}
        
        .dialogue-folder.collapsed .dialogue-list {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
        }
        
        .dialogue-item-option {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 6px;
            margin-bottom: 6px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .dialogue-item-option:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.1);
        }
        
        .dialogue-item-option.selected {
            background: rgba(248, 182, 208, 0.1);
            border-color: var(--primary-color);
        }
        
        .dialogue-text {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.9);
            flex: 1;
            margin-right: 10px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        
        .dialogue-actions {
            display: none;
            gap: 8px;
        }
        
        .dialogue-folder.folder-edit-mode .dialogue-actions {
            display: flex;
        }
        
        .dialogue-action-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: var(--text-color);
            font-size: 0.8rem;
        }
        
        .dialogue-action-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .dialogue-action-btn.edit-btn:hover {
            background: rgba(23, 162, 184, 0.3);
            color: var(--completed-color);
        }
        
        .dialogue-action-btn.delete-btn:hover {
            background: rgba(220, 53, 69, 0.3);
            color: var(--danger-color);
        }
        
        .add-dialogue-btn {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px dashed rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            color: var(--text-color);
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
            transition: all 0.3s ease;
        }
        
        .add-dialogue-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: var(--primary-color);
        }
        
        /* 自定义输入模态框 */
        .custom-input-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }
        
        .custom-input-modal.active {
            opacity: 1;
            visibility: visible;
        }
        
        .custom-input-box {
            background: rgba(30, 30, 40, 0.95);
            border-radius: 15px;
            padding: 25px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            transform: translateY(-20px);
            transition: transform 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
        }

        :root[data-theme="light"] .custom-input-modal {
            background: rgba(255, 255, 255, 0.7);
        }

        :root[data-theme="light"] .custom-input-box {
            background: rgba(255, 255, 255, 0.96);
            border-color: rgba(0, 0, 0, 0.06);
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
        }

        :root[data-theme="light"] .custom-input-title {
            color: #111827;
        }

        :root[data-theme="light"] .custom-input-tab {
            color: rgba(31, 41, 55, 0.7);
        }

        :root[data-theme="light"] .custom-input-tab-content label,
        :root[data-theme="light"] .input-group label {
            color: rgba(31, 41, 55, 0.7);
        }

        :root[data-theme="light"] .custom-input,
        :root[data-theme="light"] .custom-name-input,
        :root[data-theme="light"] .dialogue-textarea {
            background: rgba(249, 250, 251, 0.9);
            border-color: rgba(209, 213, 219, 0.9);
            color: #111827;
        }

        :root[data-theme="light"] .custom-input-btn.cancel {
            background: rgba(243, 244, 246, 0.95);
            border-color: rgba(209, 213, 219, 0.9);
            color: #111827;
        }

        :root[data-theme="light"] .custom-noise-btn,
        :root[data-theme="light"] .file-input-label {
            background: rgba(249, 250, 251, 0.9);
            border-color: rgba(209, 213, 219, 0.9);
            color: #111827;
        }
        
        .custom-input-modal.active .custom-input-box {
            transform: translateY(0);
        }
        
        .custom-input-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-color);
            margin-bottom: 15px;
            text-align: center;
        }
        
        .custom-input-tabs {
            display: flex;
            margin-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .custom-input-tab {
            flex: 1;
            padding: 10px;
            text-align: center;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.6);
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
        }
        
        .custom-input-tab.active {
            color: var(--primary-color);
            border-bottom: 2px solid var(--primary-color);
        }
        
        .custom-input-tab-content {
            display: none;
        }
        
        .custom-input-tab-content.active {
            display: block;
        }
        
        .custom-input {
            width: 100%;
            padding: 12px 15px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            font-size: 0.95rem;
            outline: none;
            color: var(--text-color);
            margin-bottom: 15px;
        }
        
        .custom-input:focus {
            border-color: var(--primary-color);
        }
        
        .file-input-label {
            display: block;
            width: 100%;
            padding: 12px 15px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px dashed rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
            cursor: pointer;
            margin-bottom: 15px;
            transition: all 0.3s ease;
        }
        
        .file-input-label:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.5);
        }
        
        .file-input-label i {
            margin-right: 8px;
            color: var(--primary-color);
        }
        
        .file-input {
            display: none;
        }
        
        .custom-name-input {
            width: 100%;
            padding: 12px 15px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            font-size: 0.95rem;
            outline: none;
            color: var(--text-color);
            margin-bottom: 15px;
        }
        
        .custom-name-input:focus {
            border-color: var(--primary-color);
        }
        
        .custom-input-actions {
            display: flex;
            gap: 15px;
        }
        
        .custom-input-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .custom-input-btn.confirm {
            background: var(--primary-color);
            color: var(--dark-color);
        }
        
        .custom-input-btn.confirm:hover {
            background: #f5a2c5;
        }
        
        .custom-input-btn.cancel {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-color);
        }
        
        .custom-input-btn.cancel:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        /* 页面内容区域 */
        .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); }
        }
        
        /* 专注页样式 */
        .focus-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px 0;
            min-height: 60vh;
        }
        
        .timer-mode {
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
            background: var(--glass-bg);
            backdrop-filter: blur(10px);
            padding: 12px 25px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.95rem;
            border: 1px solid var(--glass-border);
            color: var(--text-color);
        }
        
        .timer-mode:hover {
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.2);
        }
        
        .timer-mode i {
            font-size: 1rem;
            color: var(--primary-color);
        }
        
        .timer-mode span {
            font-weight: 600;
            color: var(--text-color);
        }
        
        /* 修改计时器背景为高透明磨砂效果 */
        .circular-timer {
            width: 280px;
            height: 280px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.15); /* 改为高透明磨砂效果 */
            backdrop-filter: blur(20px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            margin: 20px 0;
            border: 1px solid rgba(255, 255, 255, 0.2); /* 更细的边框 */
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 
                0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1); /* 添加内阴影增加层次感 */
        }
        
        .circular-timer:hover {
            transform: scale(1.02);
            background: rgba(255, 255, 255, 0.2);
        }
        
        .timer-display {
            font-size: 3.5rem;
            font-weight: 700;
            color: var(--text-color);
            font-family: 'Courier New', monospace;
            margin-bottom: 5px;
        }
        
        .timer-label {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.8);
            font-weight: 600;
        }
        
        .timer-controls {
            display: flex;
            gap: 15px;
            margin-top: 30px;
            flex-wrap: wrap;
            justify-content: center;
        }
        
        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            touch-action: manipulation;
        }
        
        .btn-primary {
            background: var(--primary-color);
            color: var(--dark-color);
        }
        
        .btn-primary:hover {
            background: #f5a2c5;
            transform: translateY(-2px);
        }

        .btn:active {
            transform: translateY(0);
        }
        
        .btn-secondary {
            background: var(--glass-bg);
            color: var(--text-color);
            border: 1px solid var(--glass-border);
        }
        
        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }
        
        .btn-success {
            background: var(--completed-color);
            color: var(--text-color);
        }
        
        .btn-success:hover {
            background: #138496;
            transform: translateY(-2px);
        }
        
        /* 专注模式隐藏中央计时器 */
        .focus-mode .focus-container {
            display: none;
        }
        
        /* 计时器容器 - 左上角，默认隐藏，放大1/4 */
        .timer-container {
            position: fixed;
            top: 140px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: all 0.3s ease;
        }
        
        .timer-container.visible {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        
        .timer-circle {
            width: 124.44px;
            height: 58.33px;
            border-radius: 29.17px;
            background: transparent;
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            border: none;
            box-shadow: none;
            z-index: 10; /* 拉高层级作为纯透明点击区域 */
        }
        
        .timer-rail {
            position: absolute;
            width: 186.67px;
            height: 87.5px;
            border-radius: 43.75px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            z-index: 1; /* 轨道在最底层 */
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        
        .timer-ring {
            position: absolute;
            width: 186.67px;
            height: 87.5px;
            border-radius: 43.75px;
            z-index: 2; /* 容器层级调高，以便内部的小球能浮在轨道上 */
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        
        /* 修改计时器小球为柔光拖尾效果 */
        .timer-dot {
            position: absolute;
            width: 12px;
            height: 12px;
            background-color: var(--primary-color);
            border-radius: 50%;
            /* 移除之前的居中定位，使用 offset-path */
            top: 0;
            left: 0;
            transform: none;
            display: block;
            box-shadow: 
                0 0 15px rgba(248, 182, 208, 0.8),
                0 0 30px rgba(248, 182, 208, 0.4),
                0 0 45px rgba(248, 182, 208, 0.2); /* 柔光效果 */
            filter: blur(1px); /* 轻微模糊创造柔光感 */
            z-index: 3; /* 小球层级最高 */
            /* 定义胶囊路径 - 修正为边框中心线 */
            /* 
               容器: 186.67 x 87.5
               R: 43.75 -> 内缩1px = 42.75
               Top-Right Arc Start: 186.67 - 43.75 = 142.92
               Top-Left Arc End: 43.75
               Center X: 93.335
            */
            offset-path: path('M 93.335 1 L 142.92 1 A 42.75 42.75 0 0 1 142.92 86.5 L 43.75 86.5 A 42.75 42.75 0 0 1 43.75 1 Z');
            animation: move-path 10s linear infinite;
        }
        
        .timer-dot::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 20px;
            height: 20px;
            background: radial-gradient(circle, rgba(248, 182, 208, 0.4) 0%, transparent 70%);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            filter: blur(3px);
            z-index: 1;
        }
        
        /* 添加拖尾效果 */
        .timer-dot::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 30px;
            height: 30px;
            background: radial-gradient(circle, rgba(248, 182, 208, 0.2) 0%, transparent 80%);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            filter: blur(5px);
            z-index: 0;
            animation: pulse 2s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); }
            50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
        }
        
        @keyframes move-path {
            0% {
                offset-distance: 0%;
            }
            100% {
                offset-distance: 100%;
            }
        }
        
        .timer-text {
            font-size: 1rem; /* 0.9rem * 1.25 ≈ 1.125rem，这里用1rem更合适 */
            font-weight: 600;
            color: var(--text-color);
            background: rgba(0, 0, 0, 0.4);
            padding: 6px 12px; /* 5px * 1.25 = 6.25px, 10px * 1.25 = 12.5px */
            border-radius: 20px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .timer-container .timer-text {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 124.44px; /* 匹配原胶囊宽度 */
            height: 58.33px; /* 匹配原胶囊高度 */
            background: rgba(0, 0, 0, 0.4); /* 默认暗色底衬 */
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 29.17px; /* 胶囊圆角 */
            padding: 0;
            font-size: 1.2rem;
            position: absolute; /* 绝对定位在容器中心 */
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 5;
            pointer-events: none; /* 让点击穿透到顶层的 timer-circle */
        }

        :root[data-theme="light"] .timer-container .timer-text {
            background: rgba(255, 255, 255, 0.4); /* 亮色主题底衬 */
            color: var(--dark-color);
            border: 1px solid rgba(255, 255, 255, 0.6);
        }
        
        /* 计时器控制浮窗 */
        .timer-control-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: transparent;
            z-index: var(--z-popup, 1000);
            display: none;
        }
        
        .timer-control-overlay.active {
            display: block;
        }
        
        .timer-control-panel {
            position: fixed;
            top: 240px; /* 随 mini 计时器整体下移 */
            left: 50%;
            background: rgba(30, 30, 40, 0.95);
            border-radius: 15px;
            padding: 15px;
            width: 160px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
            z-index: 1000;
            transform: translateX(-50%) scale(0.9);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: all 0.3s ease;
        }
        
        .timer-control-panel.active {
            transform: translateX(-50%) scale(1);
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        
        .timer-control-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 15px;
            background: transparent;
            border: none;
            color: var(--text-color);
            width: 100%;
            text-align: left;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s ease;
            font-size: 0.95rem;
        }
        
        .timer-control-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .timer-control-btn i {
            width: 20px;
            text-align: center;
        }
        
        .timer-control-btn.pause-btn i {
            color: var(--warning-color);
        }
        
        .timer-control-btn.resume-btn i {
            color: var(--success-color);
        }
        
        .timer-control-btn.stop-btn i {
            color: var(--danger-color);
        }
        
        .timer-control-btn.cancel-btn i {
            color: rgba(255, 255, 255, 0.7);
        }
        
        /* 任务页样式 - 完整恢复 */
        .tasks-container {
            display: flex;
            flex-direction: column;
            gap: 15px;
            padding: 10px 0;
        }
        
        .task-category {
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            border-radius: 15px;

            overflow: hidden;
            border: 1px solid var(--card-border);
            box-shadow: var(--shadow);
        }
        
        /* 修改已完成任务样式 */
        .task-category.completed {
            background: var(--card-bg); /* 改为与其他任务相同 */
            border: 1px solid var(--card-border);
        }
        
        .task-category.completed .category-header {
            background: var(--glass-bg); /* 改为与其他任务相同 */
        }
        
        .category-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px;
            background: var(--glass-bg);
            color: var(--text-color);
            cursor: pointer;
            transition: background 0.3s ease;
        }
        
        .category-header:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .category-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-color);
        }
        
        .category-title i {
            font-size: 1rem;
            color: var(--primary-color);
        }
        
        .category-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .add-task-toggle {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: var(--text-color);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            touch-action: manipulation;
        }
        
        .add-task-toggle:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }
        
        .toggle-icon {
            transition: transform 0.3s ease;
        }
        
        .task-list {
    list-style-type: none;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    transition: max-height 0.5s ease;
}
        
        .task-list.collapsed {
            max-height: 0;
            overflow: hidden;
        }
        
        .task-item {
            display: flex;
            align-items: center;
            padding: 16px 18px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            transition: background 0.2s;
        }
        
        .task-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .task-item:last-child {
            border-bottom: none;
        }
        
        .task-checkbox {
            margin-right: 15px;
            transform: scale(1.3);
            accent-color: var(--primary-color);
        }
        
        .task-text {
            flex-grow: 1;
            font-size: 1rem;
            color: var(--text-color);
        }
        
        .task-completed {
            text-decoration: line-through;
            color: rgba(255, 255, 255, 0.5);
        }
        
        .add-task-form {
            display: none;
            padding: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .add-task-form.active {
            display: flex;
        }
        
        .task-input {
            flex-grow: 1;
            padding: 12px 15px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50px 0 0 50px;
            font-size: 16px;
            outline: none;
            color: var(--text-color);
        }
        
        .task-input:focus {
            border-color: var(--primary-color);
        }
        
        .add-btn {
            background: var(--primary-color);
            color: var(--dark-color);
            border: none;
            border-radius: 0 50px 50px 0;
            padding: 0 20px;
            cursor: pointer;
            font-size: 1.1rem;
            transition: background 0.3s;
            font-weight: 600;
        }
        
        .add-btn:hover {
            background: #f5a2c5;
        }
        
        /* 进度页样式 - 完整恢复 */
        .progress-container {
            padding: 10px 0;
            display: grid;
            grid-template-rows: auto 1fr;
            grid-template-columns: 100%;
        }
        
        .progress-view-switcher {
            grid-row: 1;
            grid-column: 1;
            display: flex;
            justify-content: center;
            margin-bottom: 20px;
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            overflow: hidden;
            border: 1px solid var(--card-border);
        }
        
        .view-switch {
            flex: 1;
            padding: 14px;
            text-align: center;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
            color: rgba(255, 255, 255, 0.7);
        }
        
        .view-switch:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .view-switch.active {
            color: var(--primary-color);
            border-bottom: 3px solid var(--primary-color);
            background: rgba(255, 255, 255, 0.05);
        }
        
        .progress-view {
            grid-row: 2;
            grid-column: 1;
            opacity: 0;
            pointer-events: none;
            transition: none; /* 彻底移除过渡，消除磨砂层渲染延迟 */
            z-index: 0;
            display: block !important; /* 强制显示以保证磨砂层预渲染 */
        }
        
        .progress-view.active {
            opacity: 1;
            pointer-events: auto;
            z-index: 1;
        }

        /* 白昼模式下热力图和专注记录底衬半透明并添加模糊 */
        :root[data-theme="light"] .heatmap-container,
        :root[data-theme="light"] .records-container {
            background: rgba(255, 255, 255, 0.4); /* 调整为40%透明度 */
            backdrop-filter: blur(20px); /* 稍微增强模糊以提升可读性 */
            -webkit-backdrop-filter: blur(20px);
            transition: none; /* 强制移除过渡，确保背景和模糊同时呈现，避免分离感 */
            transform: translateZ(0); /* 强制硬件加速，保持合成层 */
            will-change: transform; /* 提示浏览器优化渲染 */
        }
        
        /* 月度热力图样式 - 修改为固定横排七个格子 */
        .heatmap-container {
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            border: 1px solid var(--card-border);
            box-shadow: var(--shadow);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            touch-action: pan-x;
        }
        
        .heatmap-header {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.1);
        }
        
        .heatmap-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-color);
            text-align: center;
        }
        
        .heatmap {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        
        .heatmap-days {
            display: flex;
            margin-left: 40px;
            margin-bottom: 8px;
        }
        
        .heatmap-day {
            width: 28px;
            text-align: center;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.7);
            margin: 0 2px;
        }
        
        .heatmap-content {
            display: flex;
        }
        
        .heatmap-weekdays {
            display: flex;
            flex-direction: column;
            margin-right: 8px;
        }
        
        .heatmap-weekday {
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.7);
            margin: 2px 0;
        }
        
        .heatmap-weeks {
            display: flex;
        }
        
        .heatmap-week {
            display: flex;
            flex-direction: column;
        }
        
        .heatmap-cell {
            width: 28px;
            height: 28px;
            margin: 2px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            will-change: background-color, transform;
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        
        .heatmap-cell:hover {
            transform: scale(1.1);
        }
        
        .heatmap-cell[data-level="1"] { background: rgba(248, 182, 208, 0.3); }
        .heatmap-cell[data-level="2"] { background: rgba(248, 182, 208, 0.5); }
        .heatmap-cell[data-level="3"] { background: rgba(248, 182, 208, 0.7); }
        .heatmap-cell[data-level="4"] { background: rgba(248, 182, 208, 0.9); }
        
        .heatmap-stats {
            display: flex;
            justify-content: space-around;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .heatmap-stat {
            text-align: center;
        }
        
        .heatmap-stat-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--primary-color);
        }
        
        .heatmap-metric-label {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
            margin-top: 5px;
        }
        
        .heatmap-legend {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 20px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.8rem;
            gap: 10px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
        }
        
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            margin-right: 5px;
        }
        
        /* 背景选择滑动卡片样式 */
    .sliding-card {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80vh;
        background: #1a1a2e;
        border-radius: 20px 20px 0 0;
        z-index: var(--z-modal, 2100);
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    }
    
    .sliding-card.show {
        transform: translateY(0);
    }
    
    .card-header {
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .card-title {
        font-size: 1.1rem;
        font-weight: 500;
        color: #fff;
    }
    
    .card-back-btn, .card-add-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.2rem;
        padding: 8px;
        cursor: pointer;
        opacity: 0.8;
        transition: opacity 0.2s;
    }
    
    .card-back-btn:hover, .card-add-btn:hover {
        opacity: 1;
    }
    
    .card-content {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        padding: 15px;
    }
    
    .bg-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .bg-item {
        aspect-ratio: 9/16;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
        cursor: pointer;
        border: 2px solid transparent;
        transition: transform 0.2s;
    }
    
    .bg-item:active {
        transform: scale(0.95);
    }
    
    .bg-item.selected {
        border-color: var(--primary-color);
    }
    
    .bg-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .empty-tip {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: rgba(255,255,255,0.5);
        gap: 10px;
    }
    
    .empty-tip i {
        font-size: 2rem;
    }

    .records-container {
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}
        
        .records-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-color);
            text-align: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.1);
        }
        
        .timeline {
            position: relative;
            padding-left: 30px;
        }
        
        .timeline::before {
            content: '';
            position: absolute;
            left: 15px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--primary-color);
        }
        
        /* 修改记录信息位置，与矩形纵向中间对齐 */
        .record-item {
            position: relative;
            margin-bottom: 60px;
            padding: 0;
            margin-top: 30px;
        }
        
        .record-item::before {
            content: '';
            position: absolute;
            left: -22px;
            top: 30px; /* 向上挪两个点，与矩形纵向中间对齐 */
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary-color);
            border: 3px solid var(--bg-color);
            box-shadow: 0 0 0 2px var(--primary-color);
            z-index: 2;
        }
        
        /* 修改记录信息位置，放在矩形内部正下方 */
        .record-info {
            position: absolute;
            left: 0;
            top: 100%; /* 在矩形正下方 */
            width: 100%;
            text-align: center;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.7);
            line-height: 1.4;
            margin-top: 8px;
        }
        
        /* 修改记录日期和时间布局 */
        .record-date {
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-color);
            display: inline;
        }
        
        .record-time {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.6);
            display: inline;
            margin-left: 8px;
        }
        
        /* 调整记录时长矩形 */
        .record-duration-box {
            padding: 12px;
            background: var(--card-bg);
            border-radius: 10px;
            border-left: 4px solid var(--primary-color);
            min-height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--card-border);
            box-shadow: var(--shadow);
        }
        
        .record-duration {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--primary-color);
        }
        
        .no-records {
            text-align: center;
            padding: 40px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 1.1rem;
        }
        
        /* 倒计时设置模态框 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }
        
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .modal {
            background: rgba(30, 30, 40, 0.95);
            border-radius: 20px;
            padding: 25px;
            width: 90%;
            max-width: 350px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            transform: translateY(-20px);
            transition: transform 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
        }
        
        .modal-overlay.active .modal {
            transform: translateY(0);
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .modal-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-color);
        }
        
        .modal-close {
            background: var(--glass-bg);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: var(--text-color);
            font-size: 1.5rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .time-inputs {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 25px;
        }
        
        .time-input-group {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .time-input-group label {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 8px;
        }
        
        .modal-time-input {
            width: 80px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            font-size: 1.2rem;
            text-align: center;
            font-weight: 600;
            outline: none;
            transition: border-color 0.3s;
            color: var(--text-color);
        }
        
        .modal-time-input:focus {
            border-color: var(--primary-color);
        }
        
        .modal-actions {
            display: flex;
            gap: 15px;
        }
        
        .modal-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .modal-btn-confirm {
            background: var(--primary-color);
            color: var(--dark-color);
        }
        
        .modal-btn-confirm:hover {
            background: #f5a2c5;
        }
        
        .modal-btn-cancel {
            background: var(--glass-bg);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            color: var(--text-color);
        }
        
        .modal-btn-cancel:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        /* 主题切换确认浮窗 */
        .theme-confirm-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2002;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .theme-confirm-modal.active {
            opacity: 1;
            visibility: visible;
        }
        
        .theme-confirm-box {
            background: rgba(30, 30, 40, 0.95);
            border-radius: 15px;
            padding: 25px;
            width: 90%;
            max-width: 350px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            transform: translateY(-20px);
            transition: transform 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
        }
        
        .theme-confirm-modal.active .theme-confirm-box {
            transform: translateY(0);
        }
        
        .theme-confirm-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-color);
            margin-bottom: 15px;
            text-align: center;
        }
        
        .theme-confirm-content {
            color: rgba(255, 255, 255, 0.9);
            text-align: center;
            margin-bottom: 20px;
            font-size: 1rem;
        }
        
        .theme-confirm-content span {
            color: var(--primary-color);
            font-weight: 600;
            margin: 0 5px;
        }
        
        .theme-confirm-actions {
            display: flex;
            gap: 15px;
        }
        
        .theme-confirm-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .theme-confirm-btn.confirm {
            background: var(--primary-color);
            color: var(--dark-color);
        }
        
        .theme-confirm-btn.confirm:hover {
            opacity: 0.9;
        }
        
        .theme-confirm-btn.cancel {
            background: var(--glass-bg);
            color: var(--text-color);
        }
        
        .theme-confirm-btn.cancel:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        /* 底部导航栏 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.8);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            display: flex;
            z-index: 1000;
            height: calc(70px + env(safe-area-inset-bottom, 0px));
            padding-bottom: env(safe-area-inset-bottom, 0px);
            padding-left: env(safe-area-inset-left, 0px);
            padding-right: env(safe-area-inset-right, 0px);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.6);
            text-decoration: none;
            padding: 10px 5px;
            touch-action: manipulation;
        }
        
        .nav-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .nav-item:active {
            background: rgba(255, 255, 255, 0.08);
        }
        
        .nav-item.active {
            color: var(--primary-color);
            background: rgba(248, 182, 208, 0.1);
        }
        
        .nav-icon {
            font-size: 1.5rem;
            margin-bottom: 5px;
        }
        
        .nav-text {
            font-size: 0.8rem;
            font-weight: 600;
        }
        
        /* 话语条容器 */
        .dialogue-container {
            position: fixed;
            bottom: calc(120px + env(safe-area-inset-bottom, 0px));
            left: 0;
            width: 100%;
            height: 70px;
            z-index: 5;
            display: flex;
            justify-content: center;
            align-items: center;
            pointer-events: none;
        }
        
        .dialogue-item {
            background: rgba(0, 0, 0, 0.35);
            color: var(--text-color);
            padding: 12px 25px;
            border-radius: 25px;
            max-width: 80%;
            text-align: center;
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.6s ease;
            position: absolute;
            font-size: 0.9rem;
            font-weight: 400;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
            pointer-events: none;
        }

        @media (hover: none) and (pointer: coarse) {
            :root[data-theme="light"] body,
            :root[data-theme="light"] .play-page {
                background-attachment: scroll !important;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            * {
                transition: none !important;
                animation: none !important;
            }
        }
        
        .dialogue-item.entering {
            opacity: 1;
            transform: translateY(0);
        }
        
        .dialogue-item.leaving {
            opacity: 0;
            transform: translateY(-30px);
        }
        
        /* 上下文菜单样式 */
        .context-menu {
            position: fixed;
            background: rgba(30, 30, 40, 0.95);
            border-radius: 10px;
            padding: 8px 0;
            min-width: 120px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
            z-index: var(--z-system-alert, 3000);
            border: 1px solid rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
        }
        
        .context-menu-item {
            padding: 10px 15px;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            font-size: 0.9rem;
        }
        
        .context-menu-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .context-menu-item:active {
            background: rgba(255, 255, 255, 0.15);
        }
        
        /* 自定义滚动条 */
        ::-webkit-scrollbar {
            width: 6px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.1);
            border-radius: 10px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }
        
        /* 响应式调整 */
        @media (max-width: 380px) {
            .circular-timer {
                width: 250px;
                height: 250px;
            }
            
            .timer-display {
                font-size: 3rem;
            }
            
            .timer-controls {
                flex-direction: column;
                align-items: center;
            }
            
            .btn {
                width: 200px;
                justify-content: center;
            }
            
            .record-info {
                left: 10px;
                width: calc(100% - 20px);
                font-size: 0.75rem;
            }
            
            .record-duration {
                font-size: 0.9rem;
            }
            
            .menu-panel {
                width: 85%;
            }
            
            /* 小屏幕上缩小左上角计时器 */
            .timer-circle {
                width: 97.78px;
                height: 46.67px;
                border-radius: 23.33px;
            }
            
            .timer-rail {
                width: 146.67px;
                height: 70px;
                border-radius: 35px;
            }
            
            .timer-ring {
                width: 146.67px;
                height: 70px;
                border-radius: 35px;
            }
            
            .timer-dot {
                width: 8px;
                height: 8px;
                /* 
                   容器: 146.67 x 70
                   R: 35 -> 内缩1px = 34
                   Top-Right Arc Start: 146.67 - 35 = 111.67
                   Top-Left Arc End: 35
                   Center X: 73.335
                */
                offset-path: path('M 73.335 1 L 111.67 1 A 34 34 0 0 1 111.67 69 L 35 69 A 34 34 0 0 1 35 1 Z');
                animation: move-path 10s linear infinite;
            }
            
            .timer-text {
                font-size: 0.9rem;
                padding: 5px 10px;
            }
            
            .timer-control-panel {
                top: 220px;
                left: 50%;
            }
        }

        @media (max-height: 700px) {
            .focus-container {
                min-height: 50vh;
            }
            
            .circular-timer {
                width: 240px;
                height: 240px;
                margin: 10px 0;
            }
            
            .timer-display {
                font-size: 2.8rem;
            }
            
            .timer-container {
                top: 120px;
                left: 50%;
            }
            
            .timer-control-panel {
                top: 220px;
                left: 50%;
            }
        }
