
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        :root {
            --primary: #3498db;
            --primary-light: #e1f0fa;
            --secondary: #f8f9fa;
            --text: #333;
            --light-text: #666;
            --border: #ddd;
            --shadow: rgba(0, 0, 0, 0.1);
            --success: #2ecc71;
            --danger: #e74c3c;
            --partial: #f5c2e4;
            --disabled: #bbb;
            --weather-bg: #f1f9ff;
            --reflection-bg: #fff8e6;
            --success-bg: #f0f9eb;
            --gratitude-bg: #fef6f6;
            --task-bg: #f6f9ff;
            --input-bg: #f8f9fa;
        }
        
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
            color: var(--text);
            min-height: 100vh;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: background 0.3s ease;
        }
        
        .app-container {
            width: 100%;
            max-width: 1000px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 10px 30px var(--shadow);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-height: 95vh;
        }
        
        header {
            background: var(--primary);
            color: white;
            padding: 25px 30px;
            text-align: center;
            position: relative;
            transition: background 0.3s ease;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .app-title {
            font-size: 2.2rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        .date-weather {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 15px;
            width: 100%;
        }
        
        .current-date {
            font-size: 1.1rem;
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 20px;
            margin-bottom: 10px;
        }
        
        .weather-container {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 20px;
        }
        
        .weather-icon {
            font-size: 1.4rem;
        }
        
        .weather-select {
            background: transparent;
            border: none;
            border-bottom: 2px solid rgba(255,255,255,0.5);
            color: white;
            font-size: 1rem;
            outline: none;
            cursor: pointer;
            appearance: none;
            padding-right: 20px;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right center;
            background-size: 16px;
        }
        
        .weather-select option {
            color: #333;
            background: white;
        }
        
        .theme-selector {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 8px;
        }
        
        .theme-color {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid white;
            transition: transform 0.2s;
        }
        
        .theme-color:hover {
            transform: scale(1.1);
        }
        
        .theme-blue { background: #3498db; }
        .theme-pink { background: #e84393; }
        .theme-purple { background: #9b59b6; }
        .theme-green { background: #2ecc71; }
        
        .main-content {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        .journal-container {
            padding: 30px;
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            width: 100%;
        }
        
        .section {
            margin-bottom: 30px;
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            transition: background 0.3s ease;
        }
        
        .section-title {
            font-size: 1.4rem;
            margin-bottom: 20px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--primary-light);
        }
        
        .section-title i {
            background: var(--primary-light);
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }
        
        .sub-section-title {
            font-size: 1.2rem;
            margin: 20px 0 15px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .sub-section-title i {
            background: var(--primary-light);
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-size: 0.9rem;
        }
        
        .checklist {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
        }
        
        .check-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 15px;
            background: var(--secondary);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .check-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px var(--shadow);
        }
        
        .checkbox {
            width: 24px;
            height: 24px;
            min-width: 24px;
            border: 2px solid var(--border);
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
        }
        
        .checkbox.checked {
            background: var(--success);
            color: white;
            border-color: var(--success);
        }
        
        .checkbox.crossed {
            background: var(--danger);
            color: white;
            border-color: var(--danger);
        }
        
        .checkbox.partial {
            background: var(--partial);
            color: white;
            border-color: var(--partial);
        }
        
        .text-input, .textarea-input {
            width: 100%;
            padding: 15px;
            border: 2px solid var(--border);
            border-radius: 10px;
            font-size: 1rem;
            transition: border-color 0.3s;
            margin-bottom: 10px;
            background: white;
        }
        
        .textarea-input {
            min-height: 100px;
            resize: vertical;
        }
        
        .tasks-textarea {
            min-height: 120px;
        }
        
        .text-input:focus, .textarea-input:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .reflection-section {
            background: var(--reflection-bg);
        }
        
        .success-section {
            background: var(--success-bg);
        }
        
        .gratitude-section {
            background: var(--gratitude-bg);
        }
        
        .tasks-section {
            background: var(--task-bg);
        }
        
        .tabs {
            display: flex;
            background: var(--secondary);
            border-radius: 12px;
            overflow: hidden;
            margin: 20px 30px 0;
        }
        
        .tab {
            flex: 1;
            text-align: center;
            padding: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .tab.active {
            background: var(--primary);
            color: white;
        }
        
        .history-view {
            display: none;
            padding: 30px;
            flex-direction: column;
            height: 100%;
            overflow-y: auto;
            width: 100%;
        }
        
        .history-view.active {
            display: flex;
        }
        
        .calendar-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .calendar-title {
            font-size: 1.4rem;
            font-weight: 600;
            color: var(--primary);
        }
        
        .calendar-controls button {
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 8px 15px;
            cursor: pointer;
            font-weight: 600;
            transition: background 0.3s;
        }
        
        .calendar-controls button:hover {
            background: #2980b9;
        }
        
        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
            margin-bottom: 20px;
        }
        
        .calendar-header {
            text-align: center;
            font-weight: 600;
            padding: 10px;
            color: var(--primary);
        }
        
        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
        }
        
        .calendar-day.empty {
            background: transparent;
            cursor: default;
        }
        
        .calendar-day.has-entry {
            background: var(--primary);
            color: white;
            font-weight: 600;
        }
        
        .calendar-day.no-entry {
            background: var(--secondary);
            color: var(--light-text);
        }
        
        .calendar-day.today {
            border: 2px solid var(--primary);
        }
        
        .calendar-day:hover:not(.empty) {
            transform: scale(1.05);
            box-shadow: 0 4px 8px var(--shadow);
        }
        
        .entry-display {
            flex: 1;
            background: var(--secondary);
            border-radius: 15px;
            padding: 25px;
            overflow-y: auto;
            width: 100%;
        }
        
        .entry-date {
            text-align: center;
            margin-bottom: 25px;
            font-size: 1.3rem;
            color: var(--primary);
            font-weight: 600;
        }
        
        .entry-weather {
            text-align: center;
            margin-bottom: 20px;
            font-size: 1.1rem;
            color: var(--light-text);
        }
        
        .entry-section {
            margin-bottom: 25px;
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }
        
        .entry-title {
            font-size: 1.2rem;
            color: var(--primary);
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--primary-light);
        }
        
        .entry-content {
            padding-left: 20px;
        }
        
        .entry-item {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }
        
        .entry-text {
            line-height: 1.6;
            margin-bottom: 15px;
            white-space: pre-wrap;
        }
        
        .entry-tasks {
            padding-left: 20px;
        }
        
        .entry-task {
            margin-bottom: 8px;
            position: relative;
            padding-left: 25px;
        }
        
        .entry-task::before {
            content: "•";
            position: absolute;
            left: 0;
            color: var(--primary);
            font-size: 1.2rem;
        }
        
        .footer {
            text-align: center;
            padding: 25px;
            background: var(--primary-light);
            color: var(--text);
            font-size: 1.1rem;
            font-weight: 500;
        }
        
        .footer a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .footer a:hover {
            text-decoration: underline;
            color: #2980b9;
        }
        
        .save-status {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--success);
            color: white;
            padding: 10px 20px;
            border-radius: 30px;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 1000;
        }
        
        @media (max-width: 768px) {
            .app-container {
                min-height: 95vh;
            }
            
            .header-content {
                flex-direction: column;
                gap: 15px;
            }
            
            .theme-selector {
                position: static;
                margin-top: 15px;
            }
            
            .checklist {
                grid-template-columns: 1fr 1fr;
            }
            
            .calendar-grid {
                gap: 4px;
            }
        }
        
        /* Theme Overrides */
        .theme-pink {
            --primary: #e84393;
            --primary-light: #fce4ec;
            --reflection-bg: #fff0f6;
            --success-bg: #fce7f3;
            --gratitude-bg: #fdf2f8;
            --task-bg: #fdf4ff;
        }
        
        .theme-purple {
            --primary: #9b59b6;
            --primary-light: #f3e5f5;
            --reflection-bg: #f5eef8;
            --success-bg: #f0e6f5;
            --gratitude-bg: #f7f1fa;
            --task-bg: #f4f1fd;
        }
        
        .theme-green {
            --primary: #2ecc71;
            --primary-light: #e8f5e9;
            --reflection-bg: #edf7ee;
            --success-bg: #ebf7ed;
            --gratitude-bg: #f0faf1;
            --task-bg: #eef9f0;
        }
        
        .no-data-message {
            color: var(--light-text);
            font-style: italic;
            text-align: center;
            padding: 20px;
        }
        
        .fixed-width-container {
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
        }
        
        .legend {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 20px 0;
            flex-wrap: wrap;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.9rem;
        }
        
        .legend-box {
            width: 16px;
            height: 16px;
            border-radius: 3px;
        }
        
        .legend-checked {
            background: var(--success);
        }
        
        .legend-crossed {
            background: var(--danger);
        }
        
        .legend-partial {
            background: var(--partial);
        }
        
        .editable-check-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 15px;
            background: var(--input-bg);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        /* 优化可编辑文本框样式 - 修复移动端问题 */
        .editable-input {
            flex: 1;
            border: none;
            background: transparent;
            padding: 8px;
            font-size: 1rem;
            border-bottom: 1px solid var(--border);
            transition: border-color 0.3s;
            /* 添加宽度限制 */
            width: calc(100% - 40px); 
            box-sizing: border-box;
        }
        
        .editable-input:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .note-section {
            background: #f9f3ff;
            border-left: 4px solid #9b59b6;
        }
        
        /* 针对移动设备进一步优化 */
        @media (max-width: 480px) {
            .editable-input {
                /* 在超小屏幕上进一步调整 */
                width: calc(100% - 35px);
                padding: 8px 6px;
                font-size: 0.95rem;
            }
            
            .editable-check-item {
                padding: 10px 12px;
            }
        }
