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

/* 防止文字被选中复制（输入框/文本框/可编辑区域除外） */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
/* 剪贴板条目允许点击复制，但不允许拖拽选择 */
.clip-item {
    -webkit-user-select: none;
    user-select: none;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg: #f1f5f9;
    --sidebar-bg: #1e293b;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --radius: clamp(8px, 1.2vw, 16px);
    --radius-sm: clamp(4px, 0.6vw, 8px);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --header-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --transition: all 0.2s ease;
}

html { font-size: clamp(14px, 1.2vw, 16px); }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.main-content {
    padding: clamp(12px, 2vw, 24px);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.page-section { display: none; width: 100%; overflow-x: hidden; }
.page-section.active { display: block; }

.widget-grid {
    column-gap: 12px;
    column-count: var(--widget-columns, 3);
    margin-bottom: 1.25rem;
}

.widget-card {
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(226,232,240,0.8);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    break-inside: avoid;
    margin-bottom: 12px;
    width: 100%;
}
.widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.widget-card.widget-large {
    break-inside: avoid;
}
.widget-card.widget-full {
    column-span: all;
}

.widget-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.widget-title {
    font-size: 0.875rem; font-weight: 700; color: #fff;
}
.widget-actions {
    display: flex; gap: 4px;
}
.widget-delete {
    background: none; border: none; cursor: pointer;
    padding: 3px 7px; border-radius: 5px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    color: rgba(255,255,255,0.7);
}
.widget-delete:hover { background: rgba(255,255,255,0.15); color: #fff; }
.widget-move-btn {
    background: none; border: none; cursor: pointer;
    padding: 3px 6px; border-radius: 5px;
    font-size: 0.7rem; color: rgba(255,255,255,0.85);
    transition: all 0.2s ease; line-height: 1;
}
.widget-move-btn:hover:not(:disabled) { background: rgba(255,255,255,0.18); color: #fff; }
.widget-move-btn:disabled {
    color: rgba(255,255,255,0.3); cursor: not-allowed;
}
.widget-move-btn:disabled:hover { background: none; }
.widget-icon-btn {
    background: none; border: none; cursor: pointer;
    padding: 3px 7px; border-radius: 5px;
    font-size: 0.875rem; color: rgba(255,255,255,0.85);
    transition: all 0.2s ease; line-height: 1;
}
.widget-icon-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.widget-archive-btn {
    background: none; border: none; cursor: pointer;
    padding: 3px 7px; border-radius: 5px;
    font-size: 0.875rem; color: rgba(255,255,255,0.85);
    transition: all 0.2s ease; line-height: 1;
}
.widget-archive-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

.widget-card.widget-collapsible .widget-content {
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}
.widget-card.widget-collapsible.widget-expanded .widget-content {
    max-height: none;
}
.widget-card.widget-collapsible.widget-expanded .schedule-list,
.widget-card.widget-collapsible.widget-expanded .clip-list,
.widget-card.widget-collapsible.widget-expanded .memo-list,
.widget-card.widget-collapsible.widget-expanded .todo-list {
    max-height: none;
    overflow: visible;
}
.widget-expand-btn {
    background: none; border: none; cursor: pointer;
    padding: 3px 7px; border-radius: 5px;
    font-size: 0.8rem; color: rgba(255,255,255,0.85);
    transition: transform 0.2s ease; line-height: 1;
}
.widget-expand-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.widget-card.widget-expanded .widget-expand-btn { transform: rotate(180deg); }

.clip-item-archive {
    flex-shrink: 0; width: 20px; height: 20px; border: none;
    background: rgba(99, 102, 241, 0.1); color: #6366f1;
    border-radius: 4px; cursor: pointer; font-size: 0.7rem;
    line-height: 1; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.clip-item-archive:hover { background: #6366f1; color: #fff; }

.widget-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.clock-container {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
}
.clock-display {
    font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}
.clock-date {
    font-size: 0.75rem; color: #64748b; margin-top: 4px;
}
.clock-lunar {
    font-size: 0.7rem; color: #94a3b8; margin-top: 2px;
}
.clock-alarm {
    font-size: 0.7rem; color: #ef4444; margin-top: 4px;
    font-weight: 600;
}
.clock-toggle {
    display: flex; gap: 8px; margin-top: 8px;
}
.clock-mode-btn {
    padding: 4px 10px; border: 2px solid #e2e8f0;
    background: #fff; border-radius: 8px;
    font-size: 0.7rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease;
    color: #64748b;
}
.clock-mode-btn.active {
    border-color: #667eea;
    background: #eef2ff;
    color: #4f46e5;
}
.clock-alarm-btn {
    margin-top: 10px;
    padding: 6px 16px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.clock-alarm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}
#clockCanvas {
    margin-top: 8px;
}

.calc-history {
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: right;
    min-height: 1rem;
    padding: 2px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calc-process {
    font-size: 0.85rem;
    color: #64748b;
    text-align: right;
    min-height: 1.2rem;
    padding: 2px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calculator-display {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: right;
    padding: 8px 4px;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 10px;
}
.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.calc-btn {
    padding: 10px 0;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #334155;
}
.calc-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.calc-btn:active {
    transform: scale(0.97);
}
.calc-btn.calc-op {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
    font-weight: 600;
}
.calc-btn.calc-op:hover {
    background: #e0e7ff;
}
.calc-btn.calc-clear {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
    font-weight: 600;
}
.calc-btn.calc-clear:hover {
    background: #fee2e2;
}
.calc-btn.calc-del {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fed7aa;
    font-weight: 600;
}
.calc-btn.calc-del:hover {
    background: #ffedd5;
}
.calc-btn.calc-equals {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}
.calc-btn.calc-equals:hover {
    opacity: 0.9;
}
.calc-btn.calc-zero {
    grid-column: span 1;
}

.translator-tabs {
    display: flex; gap: 6px; margin-bottom: 10px;
}
.trans-tab {
    flex: 1; padding: 7px; font-size: 0.75rem; font-weight: 600;
    border: 1px solid #e2e8f0; background: #f8fafc;
    border-radius: 8px; cursor: pointer; transition: all 0.2s ease;
    color: #64748b;
}
.trans-tab:hover { border-color: #667eea; }
.trans-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-color: transparent;
}
.trans-input, .trans-output {
    width: 100%; padding: 10px 12px;
    border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: 0.8125rem; resize: none;
    font-family: inherit; transition: all 0.2s ease;
    min-height: 80px;
}
.trans-input { background: #f8fafc; }
.trans-input:focus {
    outline: none; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    background: #fff;
}
.trans-input-wrap {
    position: relative;
}
.trans-input-actions {
    position: absolute; top: 6px; right: 6px;
    display: flex; gap: 4px;
}
.trans-action-btn {
    background: rgba(255,255,255,0.85); border: 1px solid #e2e8f0;
    border-radius: 6px; width: 26px; height: 26px;
    font-size: 0.75rem; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease; color: #64748b;
}
.trans-action-btn:hover { border-color: #667eea; color: #667eea; background: #fff; }
.trans-output-wrap {
    position: relative; margin-top: 10px;
}
.trans-output {
    background: #f1f5f9;
    color: #334155;
    margin-top: 0;
}
.trans-copy-btn {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(255,255,255,0.85); border: 1px solid #e2e8f0;
    border-radius: 6px; width: 28px; height: 28px;
    font-size: 0.8rem; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease; color: #64748b;
}
.trans-copy-btn:hover { border-color: #667eea; color: #667eea; background: #fff; }
.trans-btn {
    width: 100%; padding: 9px; margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border: none; border-radius: 10px;
    font-size: 0.8125rem; font-weight: 700;
    cursor: pointer; transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(102,126,234,0.25);
}
.trans-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102,126,234,0.35);
}

.calendar-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(196,181,253,0.3);
}
.calendar-header-right {
    display: flex; align-items: center; gap: 6px;
}
.cal-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none; color: #fff; cursor: pointer;
    font-size: 0.75rem; padding: 5px 13px; border-radius: 7px;
    transition: all 0.25s ease;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(102,126,234,0.25);
}
.cal-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102,126,234,0.35);
}
.cal-zoom-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border: none; color: #fff; cursor: pointer;
    font-size: 0.75rem; padding: 5px 8px; border-radius: 7px;
    transition: all 0.25s ease;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(245,158,11,0.25);
}
.cal-zoom-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(245,158,11,0.35);
}
.cal-month-year {
    font-weight: 800; font-size: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3px;
}
.calendar-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
    font-size: 0.6875rem; color: #94a3b8; margin-bottom: 6px; font-weight: 700;
    padding: 7px 0;
    background: linear-gradient(90deg, rgba(241,245,249,0.6), rgba(224,231,255,0.6), rgba(241,245,249,0.6));
    border-radius: 8px;
}
.calendar-weekdays span:first-child,
.calendar-weekdays span:last-child {
    color: #f87171;
}
.calendar-days {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-day {
    aspect-ratio: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; border-radius: 9px; cursor: pointer;
    font-size: 0.8125rem; color: #334155; position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border: 1px solid transparent;
}
.cal-day.other-month {
    color: #cbd5e1;
}
.cal-day.empty { cursor: default; background: transparent; }
.cal-day:hover:not(.empty):not(.today) {
    background: #eef2ff;
    transform: scale(1.06);
    border-color: #c7d2fe;
}
.cal-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; font-weight: 700;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
    transform: scale(1.05);
}
.cal-day.today .cal-day-dot { background: #fff; }
.cal-day.today.cal-day-all-done {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 4px 12px rgba(34,197,94,0.4);
}
.cal-day.selected:not(.today) {
    background: rgba(224,231,255,0.8);
    font-weight: 700; color: #4f46e5;
    border: 2px solid #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.15);
}
.cal-day.weekend:not(.today):not(.selected):not(.empty) {
    color: #f87171;
}
.cal-day.weekend:hover:not(.empty):not(.today) {
    background: #fef2f2;
}
.cal-day-all-done:not(.selected) {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
}
.cal-day-all-done:not(.selected) .cal-day-dot {
    background: rgba(255,255,255,0.8);
}
.cal-day-has-undone:not(.selected) {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}
.cal-day-has-undone:not(.selected) .cal-day-dot {
    background: rgba(255,255,255,0.8);
}
.cal-day-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    position: absolute; bottom: 5px;
    box-shadow: 0 1px 3px rgba(249,115,22,0.4);
}
.cal-day.today .cal-day-dot {
    width: 5px; height: 5px; bottom: 4px;
    box-shadow: none;
}
.cal-day.has-event::after {
    display: none;
}

.schedule-title-bar {
    margin-bottom: 12px;
    display: flex; align-items: baseline; justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.schedule-title-bar h3 {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.schedule-title-actions {
    display: flex; align-items: center; gap: 8px;
}
#scheduleDateDisplay {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 20px;
}
.schedule-add-btn-small {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border: none; border-radius: 50%;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(102,126,234,0.3);
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    padding-bottom: 2px;
}
.schedule-add-btn-small:hover {
    opacity: 0.92;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(102,126,234,0.4);
}
.schedule-list {
    overflow-y: auto; overflow-x: visible; max-height: 320px; padding-right: 4px;
    display: flex; flex-direction: column;
    gap: 0;
}
.schedule-list::-webkit-scrollbar { width: 4px; }
.schedule-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
}
.schedule-empty {
    text-align: center;
    color: #94a3b8;
    padding: 2.5rem 0;
    font-size: 0.8125rem;
}
.schedule-item {
    display: flex; align-items: stretch;
    padding: 0;
    border-radius: 10px; margin-bottom: 7px;
    background: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: visible;
    border-left: none;
    gap: 0;
}
.schedule-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(102,126,234,0.12), 0 1px 3px rgba(0,0,0,0.04);
    transform: translateY(-1px);
    background: #fff;
}
.schedule-item.completed {
    opacity: 0.55;
    background: #f8fafc;
}
.schedule-item.completed:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.schedule-item.completed .schedule-item-title {
    text-decoration: line-through;
    color: #94a3b8;
}
.schedule-priority-bar {
    width: 4px; flex-shrink: 0;
    border-radius: 10px 0 0 10px;
}
.schedule-priority-bar.priority-high {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}
.schedule-priority-bar.priority-medium {
    background: linear-gradient(180deg, #f97316, #ea580c);
}
.schedule-priority-bar.priority-low {
    background: linear-gradient(180deg, #22c55e, #16a34a);
}
.schedule-item-body {
    display: flex; align-items: center;
    padding: 8px 10px 8px 9px;
    flex: 1; min-width: 0;
    position: relative;
    overflow: visible;
}
.schedule-item-info {
    display: flex; flex-direction: column;
    gap: 3px;
    flex: 1; min-width: 0;
    max-width: calc(100% - 110px);
    overflow: visible;
}
.schedule-time {
    font-size: 0.6875rem;
    color: #667eea;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap;
    padding-top: 0;
}
.schedule-item-content {
    flex: 1; min-width: 0;
}
.schedule-item-title {
    font-size: 0.8125rem;
    color: #1e293b;
    font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}
.schedule-item-tags {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin-top: 1px;
}
.schedule-priority {
    font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 700;
    display: inline-block;
    letter-spacing: 0.3px;
}
.schedule-priority.priority-high { background: #fef2f2; color: #dc2626; }
.schedule-priority.priority-medium { background: #fff7ed; color: #ea580c; }
.schedule-priority.priority-low { background: #f0fdf4; color: #16a34a; }
.schedule-check {
    width: 1.25rem; height: 1.25rem; border-radius: 50%;
    border: 2px solid #cbd5e1; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); background: #fff;
    font-size: 0.7rem; color: transparent;
    margin-right: 0.6rem;
    font-weight: 800;
}
.schedule-check:hover {
    border-color: #667eea;
    transform: scale(1.1);
}
.schedule-check.checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent; color: #fff;
    box-shadow: 0 2px 8px rgba(102,126,234,0.4);
}
.schedule-item-repeat {
    font-size: 0.6rem; color: #64748b; font-weight: 600;
    background: #f1f5f9; padding: 2px 8px; border-radius: 10px;
    margin-top: 0;
}
.schedule-postponed-tag {
    font-size: 0.6rem; color: #f59e0b; background: #fff7ed;
    padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.schedule-item-actions {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}
.schedule-item-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px;
    min-height: 26px;
    margin-left: 3px;
    position: relative;
    z-index: 20;
}
.schedule-item-btn.danger {
    background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48;
}
.schedule-item-btn.danger:hover {
    color: #fff; background: #e11d48; border-color: #e11d48;
}
.schedule-backup-bar {
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.75rem;
}
.schedule-backup-tip {
    flex: 1; color: #92400e; font-weight: 600;
    font-size: 0.75rem;
}
.schedule-backup-btn {
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff; border: none; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.schedule-backup-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* 工作安排按钮（完整版类名） */
.schedule-item-del {
    background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48; cursor: pointer;
    font-size: 0.75rem; padding: 5px 10px; transition: all 0.2s ease;
    border-radius: 6px; flex-shrink: 0; white-space: nowrap; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; min-height: 26px; margin-left: 6px; position: relative; z-index: 20;
}
.schedule-item-del:hover { color: #fff; background: #e11d48; border-color: #e11d48; }
.schedule-item-edit {
    background: #eff6ff; border: 1px solid #bfdbfe; color: #2563eb; cursor: pointer;
    font-size: 0.75rem; padding: 5px 10px; transition: all 0.2s ease;
    border-radius: 6px; flex-shrink: 0; white-space: nowrap; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; min-height: 26px; margin-left: 3px; position: relative; z-index: 20;
}
.schedule-item-edit:hover { color: #fff; background: #2563eb; border-color: #2563eb; }
.schedule-item-undo {
    background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; cursor: pointer;
    font-size: 0.75rem; padding: 5px 10px; transition: all 0.2s ease;
    border-radius: 6px; flex-shrink: 0; white-space: nowrap; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; min-height: 26px; margin-left: 3px; position: relative; z-index: 20;
}
.schedule-item-undo:hover { color: #fff; background: #15803d; border-color: #15803d; }
.schedule-postpone-btn {
    background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; cursor: pointer;
    font-size: 0.75rem; padding: 5px 10px; border-radius: 6px; transition: all 0.2s ease;
    position: relative; flex-shrink: 0; white-space: nowrap; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; min-height: 26px; margin-left: 3px; z-index: 20;
}
.schedule-postpone-btn:hover { color: #fff; background: #c2410c; border-color: #c2410c; }
.schedule-item-time {
    font-size: 0.6875rem; color: #667eea; font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.schedule-repeat-tag {
    font-size: 0.6rem; color: #64748b; font-weight: 600;
    background: #f1f5f9; padding: 2px 8px; border-radius: 10px;
}
.postpone-dropdown {
    display: none; position: fixed; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 9999;
    min-width: 8rem; padding: 4px 0;
}
.postpone-dropdown.show { display: block; }
.postpone-option {
    display: block; width: 100%; padding: 7px 14px; background: none; border: none;
    cursor: pointer; font-size: 0.75rem; text-align: left; transition: all 0.15s ease;
    color: #475569;
}
.postpone-option:hover { background: #f1f5f9; color: #667eea; }
.postpone-custom-row {
    display: flex; gap: 4px; padding: 6px 10px; align-items: center;
    border-top: 1px solid #f1f5f9;
}
.postpone-custom-row input {
    flex: 1; padding: 4px 6px; border: 1px solid #e2e8f0;
    border-radius: 4px; font-size: 0.7rem;
}
.postpone-custom-row button {
    padding: 4px 10px; background: #667eea; color: #fff; border: none;
    border-radius: 4px; font-size: 0.7rem; cursor: pointer;
}

/* 计算器历史项 */
.calc-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 3px 8px; font-size: 0.7rem; color: #64748b;
    border-bottom: 1px dashed #e2e8f0;
}
.calc-history-item:last-child { border-bottom: none; }
.calc-history-expr { color: #94a3b8; }
.calc-history-result { color: #667eea; font-weight: 700; }

/* 剪贴板完整版样式 */
.clip-toolbar { margin-bottom: 8px; }
.clip-groups {
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.clip-group-tab {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border: 1px solid #e2e8f0; border-radius: 16px;
    background: #f8fafc; color: #64748b; cursor: pointer;
    font-size: 0.72rem; font-weight: 600; transition: all 0.2s ease;
}
.clip-group-tab:hover { border-color: #c7d2fe; color: #667eea; }
.clip-group-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-color: transparent;
}
.clip-group-cnt {
    font-size: 0.62rem; padding: 1px 6px; border-radius: 10px;
    background: rgba(255,255,255,0.25); color: inherit;
}
.clip-group-tab:not(.active) .clip-group-cnt { background: #e2e8f0; color: #64748b; }
.clip-group-del {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; border-radius: 50%;
    font-size: 0.65rem; line-height: 1;
    background: rgba(255,255,255,0.3); color: inherit;
}
.clip-group-tab:not(.active) .clip-group-del {
    background: #fee2e2; color: #dc2626;
}
.clip-group-del:hover { background: #ef4444; color: #fff; }
.clip-add-group-inline {
    padding: 4px 12px; border: 1px dashed #cbd5e1; border-radius: 16px;
    background: transparent; color: #94a3b8; cursor: pointer;
    font-size: 0.72rem; font-weight: 600; transition: all 0.2s ease;
}
.clip-add-group-inline:hover { border-color: #667eea; color: #667eea; border-style: solid; }
.clip-add-group-input {
    padding: 4px 10px; border: 2px solid #667eea; border-radius: 16px;
    font-size: 0.72rem; outline: none; min-width: 100px;
}
.clip-limit-tip {
    text-align: center; color: #94a3b8; font-size: 0.68rem;
    padding: 2px 0 6px;
}
.clip-list {
    max-height: 240px; overflow-y: auto; margin-bottom: 8px;
}
.clip-empty {
    text-align: center; color: #94a3b8; font-size: 0.75rem; padding: 20px 0;
}
.clip-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; margin-bottom: 4px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; transition: all 0.2s ease;
}
.clip-item:hover {
    background: #eef2ff; border-color: #c7d2fe;
    transform: translateX(2px);
}
.clip-item-text {
    flex: 1; min-width: 0;
    font-size: 0.78rem; color: #334155;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clip-item-del {
    background: none; border: none; color: #94a3b8; cursor: pointer;
    font-size: 0.9rem; padding: 0 4px; border-radius: 4px;
    opacity: 0; transition: all 0.2s ease; flex-shrink: 0;
}
.clip-item:hover .clip-item-del { opacity: 1; }
.clip-item-del:hover { color: #ef4444; background: #fef2f2; }
.clip-add-wrap {
    display: flex; gap: 6px;
}
.clip-add-input {
    flex: 1; padding: 7px 10px; border: 2px solid #e2e8f0;
    border-radius: 8px; font-size: 0.78rem; outline: none;
    transition: all 0.2s ease; font-family: inherit;
}
.clip-add-input:focus { border-color: #667eea; }
.clip-add-submit {
    padding: 7px 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border: none; border-radius: 8px;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease;
}
.clip-add-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(102,126,234,0.3); }
.clip-copy-tip {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(30,41,59,0.95); color: #fff; padding: 10px 20px;
    border-radius: 8px; font-size: 0.85rem; font-weight: 600;
    z-index: 99999; opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
.clip-copy-tip.show { opacity: 1; }

.memo-input-wrap {
    display: flex; gap: 10px; align-items: stretch;
    margin-bottom: 10px;
}
.memo-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid rgba(251,191,36,0.3);
    border-radius: 10px;
    font-size: 0.8125rem;
    resize: none;
    height: 44px;
    font-family: inherit;
    transition: all 0.25s ease;
    background: #fffbeb;
    line-height: 1.5;
    color: #78350f;
    min-height: auto;
}
.memo-input::placeholder {
    color: #d97706;
    opacity: 0.6;
}
.memo-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.2);
    background: #fff;
    color: #78350f;
}
.memo-add-btn {
    padding: 0 22px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    height: 44px;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
    letter-spacing: 0.3px;
    align-self: stretch;
}
.memo-add-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}
.memo-list {
    max-height: 240px;
    overflow-y: auto;
    margin-top: 0;
}
.memo-list-inner {
    display: flex; gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
}
.memo-item {
    flex: 1 1 170px; min-width: 170px; max-width: 260px;
    padding: 10px 12px 12px;
    border-radius: 10px;
    background: linear-gradient(160deg, #fef3c7 0%, #fde68a 100%);
    font-size: 0.75rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex; justify-content: space-between; align-items: flex-start;
    box-shadow: 0 2px 8px rgba(251,191,36,0.2);
    border: 1px solid rgba(251,191,36,0.3);
    min-height: 50px;
    word-break: break-word;
    line-height: 1.5;
    color: #78350f;
    font-weight: 500;
}
.memo-item:nth-child(3n) {
    background: linear-gradient(160deg, #bbf7d0 0%, #86efac 100%);
    border-color: rgba(34,197,94,0.3);
    box-shadow: 0 2px 8px rgba(34,197,94,0.2);
    color: #166534;
}
.memo-item:nth-child(3n+1) {
    background: linear-gradient(160deg, #bfdbfe 0%, #93c5fd 100%);
    border-color: rgba(59,130,246,0.3);
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
    color: #1e40af;
}
.memo-item:hover {
    transform: translateY(-2px) rotate(-0.5deg);
    box-shadow: 0 6px 16px rgba(251,191,36,0.3);
}
.memo-item:nth-child(3n):hover {
    box-shadow: 0 6px 16px rgba(34,197,94,0.3);
}
.memo-item:nth-child(3n+1):hover {
    box-shadow: 0 6px 16px rgba(59,130,246,0.3);
    transform: translateY(-2px) rotate(0.5deg);
}
.memo-content { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.memo-text {
    word-break: break-all;
    line-height: 1.5;
    font-weight: 500;
    color: #78350f;
}
.memo-item:nth-child(3n) .memo-text { color: #166534; }
.memo-item:nth-child(3n+1) .memo-text { color: #1e40af; }
.memo-time {
    font-size: 0.65rem;
    opacity: 0.6;
    font-weight: 400;
}
.memo-actions { display: flex; align-items: center; flex-shrink: 0; gap: 2px; }
.memo-del, .memo-archive {
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 0;
    transition: all 0.2s ease;
    color: rgba(120,53,15,0.6);
}
.memo-item:hover .memo-del, .memo-item:hover .memo-archive { opacity: 1; }
.memo-del:hover { background: rgba(239,68,68,0.9); color: #fff; }
.memo-archive:hover { background: rgba(59,130,246,0.9); color: #fff; }

.todo-input-wrap {
    display: flex; gap: 8px; margin-bottom: 10px;
}
.todo-input {
    flex: 1; padding: 8px 12px; border: 2px solid #e2e8f0;
    border-radius: 8px; font-size: 0.8125rem; outline: none;
    transition: all 0.2s ease; background: #f8fafc;
}
.todo-input:focus {
    border-color: #22c55e; background: #fff;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
}
.todo-add-btn {
    padding: 0 16px; background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none; border-radius: 8px; color: #fff; font-weight: 700;
    cursor: pointer; transition: all 0.2s ease; font-size: 1rem;
    width: auto;
    height: auto;
}
.todo-add-btn:hover { opacity: 0.9; transform: scale(1.02); }
.todo-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 260px;
}
.todo-empty {
    text-align: center; color: #94a3b8; padding: 2rem 0; font-size: 0.8125rem;
}
.todo-item {
    display: flex; align-items: center; padding: 8px 10px;
    background: #fff; border-radius: 8px; margin-bottom: 6px;
    border: 1px solid #e2e8f0; transition: all 0.2s ease;
    gap: 8px;
}
.todo-item:hover { border-color: #bbf7d0; background: #fff; }
.todo-item.completed { opacity: 0.6; }
.todo-item.completed .todo-text { text-decoration: line-through; color: #94a3b8; }
.todo-checkbox {
    display: none;
}
.todo-check {
    width: 1.1rem; height: 1.1rem; border-radius: 50%;
    border: 2px solid #cbd5e1; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; font-size: 0.65rem; color: transparent;
    margin-right: 8px;
}
.todo-check:hover { border-color: #22c55e; }
.todo-check.checked {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: transparent; color: #fff;
}
.todo-text-wrap { flex: 1; min-width: 0; }
.todo-text { font-size: 0.8125rem; color: #334155; }
.todo-countdown {
    font-size: 0.65rem; color: #ef4444; margin-top: 2px; font-weight: 600;
}
.todo-countdown.ok { color: #10b981; }
.todo-countdown.warn { color: #f59e0b; }
.todo-deadline-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
    white-space: nowrap;
    font-weight: 600;
}
.todo-deadline-badge.overdue {
    background: #fee2e2;
    color: #dc2626;
}
.todo-item-actions {
    display: flex; gap: 2px;
    flex-shrink: 0;
}
.todo-item-btn {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 0.7rem; padding: 2px 4px;
    border-radius: 4px; transition: all 0.2s ease;
}
.todo-item-btn:hover { color: #667eea; background: #eef2ff; }
.todo-item-btn.danger:hover {
    background: #fef2f2; color: #ef4444;
}
.todo-actions { display: flex; gap: 2px; flex-shrink: 0; }
.todo-dl-btn, .todo-archive, .todo-del {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 0.7rem; padding: 3px 5px;
    border-radius: 4px; transition: all 0.2s ease;
    opacity: 0;
}
.todo-item:hover .todo-dl-btn,
.todo-item:hover .todo-archive,
.todo-item:hover .todo-del { opacity: 1; }
.todo-dl-btn:hover { color: #667eea; background: #eef2ff; }
.todo-archive:hover { color: #667eea; background: #eef2ff; }
.todo-del:hover { color: #ef4444; background: #fef2f2; }

.quicknote-input {
    width: 100%; padding: 12px; border: 2px solid #e2e8f0;
    border-radius: 10px; font-size: 0.8125rem; resize: none;
    font-family: inherit; transition: all 0.2s ease;
    min-height: 120px; background: #f8fafc;
}
.quicknote-input:focus {
    outline: none; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    background: #fff;
}
.quicknote-save-btn {
    width: 100%; padding: 8px; margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border: none; border-radius: 8px;
    font-size: 0.75rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s ease;
}
.quicknote-save-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.quicknote-timestamp {
    text-align: right; font-size: 0.65rem; color: #94a3b8;
    margin-top: 6px;
}

.break-timer-wrap {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
    align-items: center; justify-content: center; padding: 10px;
    gap: 0;
}
.break-timer-display {
    font-size: 2.5rem; font-weight: 800; text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin: 6px 0;
    font-variant-numeric: normal;
}
.break-timer-bar {
    width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px;
    overflow: hidden; margin: 8px 0;
}
.break-timer-progress {
    height: 100%; background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px; transition: width 1s linear; width: 0%;
}
.break-timer-btns {
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
    margin-top: 10px;
    width: auto;
}
.break-timer-btn {
    padding: 6px 12px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; font-size: 0.75rem; font-weight: 600; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex: none;
}
.break-timer-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(102,126,234,0.3); }
.break-timer-btn.break-timer-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}
.break-timer-btn.break-timer-stop:hover { box-shadow: 0 4px 10px rgba(239,68,68,0.3); }
.break-timer-custom {
    display: flex; gap: 6px; align-items: center; margin-top: 8px;
    flex-wrap: wrap; justify-content: center;
    width: auto;
}
.break-timer-custom input {
    width: 70px; padding: 5px 8px; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 0.8rem; text-align: center;
    flex: none;
}

.clipboard-wrap {
    display: flex; flex-direction: column; gap: 8px;
}
.clip-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 6px; flex-wrap: wrap;
}
.clipboard-groups {
    display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0;
    margin-bottom: 0;
}
.clipboard-group-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border: 1px solid #e2e8f0; border-radius: 12px;
    background: #f8fafc; color: #64748b; font-size: 0.7rem;
    cursor: pointer; transition: all 0.2s ease;
}
.clipboard-group-tag:hover { border-color: #c7d2fe; color: #667eea; }
.clipboard-group-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-color: transparent;
}
.clip-group-cnt {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: rgba(255,255,255,0.25); border-radius: 8px;
    font-size: 0.625rem; font-weight: 700;
}
.clipboard-group-tag:not(.active) .clip-group-cnt { background: #e2e8f0; color: #64748b; }
.clipboard-group-del {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; margin-left: 2px;
    border-radius: 50%; background: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9); font-size: 0.625rem; font-weight: 700;
    cursor: pointer; transition: all 0.2s ease;
    opacity: 1;
    line-height: 1;
    padding: 0;
}
.clipboard-group-tag:not(.active) .clipboard-group-del {
    background: #e2e8f0; color: #64748b;
}
.clipboard-group-del:hover {
    background: #ef4444; color: #fff; transform: scale(1.1);
    opacity: 1;
}
.clip-actions { display: flex; gap: 4px; }
.clip-add-group-btn, .clip-add-item-btn {
    width: 26px; height: 26px; border: none; border-radius: 6px;
    cursor: pointer; font-size: 0.85rem; font-weight: 700;
    transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
}
.clip-add-group-btn { background: #f1f5f9; color: #667eea; }
.clip-add-group-btn:hover { background: #eef2ff; }
.clip-add-item-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.clip-add-item-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.clipboard-add-group {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 8px; border: 1px dashed #cbd5e1; border-radius: 12px;
    background: transparent; color: #94a3b8; font-size: 0.6875rem;
    cursor: pointer; transition: all 0.2s ease;
    margin-bottom: 0;
    gap: 4px;
}
.clipboard-add-group:hover { border-color: #667eea; color: #667eea; }
.clipboard-add-group input {
    padding: 2px 8px; border: 1px solid #667eea; border-radius: 12px;
    font-size: 0.7rem; outline: none; background: #fff;
    width: 90px; font-family: inherit;
    flex: none;
}
.clipboard-add-group button {
    display: none;
}
.clipboard-phrases {
    display: flex; flex-direction: column; gap: 5px;
    max-height: 240px; overflow-y: auto; padding-right: 2px;
}
.clipboard-phrase-item {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 10px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; transition: all 0.2s ease;
}
.clipboard-phrase-item:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #f3e8ff 100%);
    border-color: #c7d2fe; transform: translateX(2px);
}
.clipboard-phrase-text {
    flex: 1; min-width: 0; font-size: 0.75rem; color: #1e293b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.4;
}
.clipboard-phrase-del {
    flex-shrink: 0; width: 20px; height: 20px; border: none;
    background: rgba(239, 68, 68, 0.1); color: #ef4444;
    border-radius: 4px; cursor: pointer; font-size: 0.8rem;
    line-height: 1; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.clipboard-phrase-del:hover { background: #ef4444; color: #fff; }
.clip-empty {
    text-align: center; color: #94a3b8; font-size: 0.75rem;
    padding: 24px 0;
}
.clip-copy-tip {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; padding: 8px 18px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; box-shadow: 0 6px 20px rgba(102,126,234,0.35);
    opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 9999;
}
.clip-copy-tip.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.clipboard-add-phrase {
    display: flex; gap: 6px; margin-top: 6px;
}
.clipboard-add-phrase input {
    flex: 1; min-width: 0; padding: 7px 10px;
    border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 0.75rem; outline: none; background: #f8fafc;
    transition: all 0.2s ease; font-family: inherit;
}
.clipboard-add-phrase input:focus {
    border-color: #667eea; background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}
.clipboard-add-phrase button {
    padding: 7px 14px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; font-size: 0.75rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active {
    display: flex;
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.25s ease;
}
.modal.active {
    display: flex;
}
.modal.modal-lg {
    max-width: 700px;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% - 20px)) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    flex-shrink: 0;
}
.modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
}
.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}
.close-modal:hover {
    background: rgba(255, 255, 255, 0.15);
}
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}
.submit-btn {
    padding: 9px 20px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}
.import-cancel-btn {
    background: #f1f5f9;
    color: #475569;
}
.import-cancel-btn:hover {
    background: #e2e8f0;
    box-shadow: none;
}

.repeat-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.repeat-weekdays {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.repeat-weekday {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}
.repeat-weekday.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}
.repeat-monthly-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
}

.import-instructions {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.6;
}
.import-instructions code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.import-tips {
    margin-top: 8px;
}
.import-examples {
    margin-top: 8px;
}
.import-examples summary {
    cursor: pointer;
    font-weight: 600;
    color: #4f46e5;
}
.import-examples pre {
    margin-top: 6px;
    padding: 8px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.7rem;
    overflow-x: auto;
}
.import-result {
    margin-top: 10px;
    font-size: 0.8rem;
    min-height: 1.2rem;
}

.todo-deadline-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.todo-deadline-opt-btn {
    padding: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}
.todo-deadline-opt-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}
.todo-deadline-clear {
    grid-column: span 2;
    color: #dc2626;
}
.todo-deadline-clear:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.todo-archive-list,
.memo-archive-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}
.archive-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.archive-item-content {
    flex: 1;
    min-width: 0;
}
.archive-item-text {
    font-size: 0.82rem;
    color: #334155;
    word-break: break-word;
}
.archive-item-time {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 2px;
}
.archive-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.archive-restore-btn,
.archive-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}
.archive-restore-btn {
    color: #4f46e5;
}
.archive-restore-btn:hover {
    background: #eef2ff;
}
.archive-delete-btn {
    color: #dc2626;
}
.archive-delete-btn:hover {
    background: #fee2e2;
}

.break-alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.break-alert-modal.active {
    display: flex;
}
.break-alert-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    animation: breakAlertPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes breakAlertPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.break-alert-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
.break-alert-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 8px;
}
.break-alert-sub {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
}
.break-alert-btn {
    padding: 12px 40px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.break-alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.floating-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.floating-gear {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}
.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(102,126,234,0.4);
}
.floating-btn:active {
    transform: scale(0.95);
}

.manage-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.manage-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.manage-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}
.manage-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
}
.settings-info {
    flex: 1;
    min-width: 0;
}
.settings-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}
.settings-desc {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}
.settings-select {
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
}
.settings-input {
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    background: #fff;
}
.browser-picker {
    display: flex;
    gap: 6px;
    align-items: center;
}
.browser-picker .settings-input {
    flex: 1;
    min-width: 150px;
}
.browser-pick-btn,
.browser-clear-btn {
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.browser-pick-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.browser-clear-btn {
    color: #dc2626;
}
.browser-clear-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.backup-restore-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.backup-restore-icon {
    font-size: 1.3rem;
}
.backup-restore-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    flex: 1;
}
.cloud-sync-status {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: #fee2e2;
    color: #dc2626;
    font-weight: 600;
}
.cloud-sync-status.logged-in {
    background: #dcfce7;
    color: #15803d;
}
.backup-restore-body {
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 10px;
}
.cloud-sync-form .form-group {
    margin-bottom: 10px;
}
.cloud-sync-form .form-group label {
    font-size: 0.75rem;
}
.cloud-sync-btns {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.cloud-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cloud-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.cloud-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}
.cloud-btn-ghost {
    background: #fff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}
.cloud-btn-ghost:hover {
    background: #eef2ff;
}
.cloud-sync-info {
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 12px;
    text-align: center;
}
.backup-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.backup-action-btn:hover {
    border-color: #c7d2fe;
    background: #eef2ff;
    transform: translateY(-2px);
}
.backup-action-icon {
    font-size: 1.5rem;
}
.backup-action-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}
.backup-action-hint {
    font-size: 0.68rem;
    color: #64748b;
}
.cloud-sync-logout {
    margin-top: 12px;
    text-align: center;
}
.cloud-sync-logout .cloud-btn {
    flex: none;
    padding: 6px 20px;
}
.backup-result {
    margin-top: 10px;
    font-size: 0.78rem;
    min-height: 1.2rem;
    text-align: center;
}

.activate-code-wrap {
    display: flex;
    gap: 8px;
}
.activate-code-wrap .settings-input {
    flex: 1;
}
.get-code-btn {
    padding: 0 14px;
    border: none;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.get-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}
.get-code-btn:active {
    transform: translateY(0);
}

.purchase-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.purchase-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
}
.price-label {
    font-size: 0.8rem;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.price-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.price-suffix {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.purchase-features {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}
.feature-item {
    font-size: 0.8rem;
    color: #334155;
}
.qr-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.qr-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.qr-image-wrap {
    width: 200px;
    height: 200px;
    padding: 8px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.qr-tip {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ==================== 日历放大视图 ==================== */
.calendar-zoom-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(196,181,253,0.3);
}
.calendar-zoom-header .cal-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none; color: #fff; cursor: pointer;
    font-size: 0.875rem; padding: 6px 16px; border-radius: 8px;
    transition: all 0.25s ease;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(102,126,234,0.25);
}
.calendar-zoom-header .cal-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102,126,234,0.35);
}
.calendar-zoom-header .cal-month-year {
    font-weight: 800; font-size: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3px;
}
.calendar-zoom-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.calendar-zoom-days .cal-day {
    aspect-ratio: auto;
    min-height: 90px;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px;
    font-size: 0.875rem;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.calendar-zoom-days .cal-day:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    transform: translateY(-1px);
}
.calendar-zoom-days .cal-day.empty {
    background: transparent;
    cursor: default;
    min-height: 90px;
    border: none;
}
.calendar-zoom-days .cal-day.empty:hover {
    background: transparent;
    transform: none;
}
.calendar-zoom-days .cal-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}
.calendar-zoom-days .cal-day.today .cal-day-num {
    color: #fff;
}
.calendar-zoom-days .cal-day .cal-day-num {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
}
.calendar-zoom-days .cal-day.today .cal-day-num {
    color: #fff;
}
.calendar-zoom-days .cal-day.selected {
    outline: 2px solid #667eea;
    outline-offset: 1px;
}
.calendar-zoom-days .cal-day.weekend .cal-day-num {
    color: #ef4444;
}
.calendar-zoom-days .cal-day.cal-day-all-done {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}
.calendar-zoom-days .cal-day.cal-day-has-undone {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}
.calendar-zoom-days .cal-day-dot {
    display: none;
}
.cal-zoom-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    overflow: hidden;
}
.cal-zoom-schedule-item {
    font-size: 0.6875rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #eef2ff 0%, #f0e7ff 100%);
    color: #4f46e5;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-zoom-schedule-item.completed {
    opacity: 0.5;
    text-decoration: line-through;
    background: #f1f5f9;
    color: #94a3b8;
}

/* ==================== Celebration Modal ==================== */
.celebration-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 300; backdrop-filter: blur(4px);
    align-items: center; justify-content: center; flex-direction: column;
}
.celebration-modal.show { display: flex; }
.celebration-content {
    background: #fff; border-radius: 24px; padding: 48px 60px;
    text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    animation: celebrationPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90vw;
}
@keyframes celebrationPop {
    0% { transform: scale(0.4); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.celebration-icon {
    font-size: 5rem; margin-bottom: 16px;
    animation: celebrationBounce 0.6s ease-out;
}
@keyframes celebrationBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.celebration-title {
    font-size: 1.5rem; font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}
.celebration-msg {
    font-size: 0.95rem; color: #64748b; margin-bottom: 28px;
}
.celebration-btn {
    padding: 12px 40px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}
.celebration-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(34,197,94,0.4);
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    html { font-size: 14px; }

    .main-content {
        padding: 10px;
        padding-bottom: 90px;
        overflow-x: hidden;
    }

    /* 组件网格改为1列 */
    .widget-grid {
        column-count: 1 !important;
        column-gap: 10px;
    }

    .widget-card {
        margin-bottom: 10px;
        border-radius: 12px;
        -webkit-column-break-inside: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .widget-header {
        padding: 10px 12px;
    }

    .widget-content {
        padding: 10px 12px;
    }

    /* 浮动按钮 - 放在右下角，尺寸适中不遮挡 */
    .floating-actions {
        right: 16px;
        bottom: 16px;
        gap: 10px;
        z-index: 999;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }

    /* 模态框适配 */
    .modal-overlay {
        padding: 12px;
        align-items: center;
    }

    .modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90vh;
        border-radius: 16px !important;
        margin: 0;
    }

    .modal-header {
        padding: 16px 16px 12px;
    }

    .modal-body {
        padding: 0 16px 16px;
        max-height: calc(90vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 12px 16px 16px;
    }

    /* 设置表单 */
    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        display: block;
        margin-bottom: 6px;
        font-size: 0.9rem;
    }

    .settings-input {
        font-size: 16px !important;
        padding: 10px 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .settings-select {
        font-size: 16px !important;
        padding: 10px 12px;
        width: 100%;
        box-sizing: border-box;
        height: 44px;
    }

    .settings-btn, .submit-btn, .browser-pick-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-height: 42px;
    }

    /* 设置项改为垂直布局 */
    .settings-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .settings-info {
        width: 100%;
    }

    .browser-picker {
        width: 100%;
    }

    .manage-actions-row {
        flex-direction: column;
        gap: 8px;
    }

    .manage-actions-row .submit-btn {
        width: 100%;
    }

    /* 激活码区域 */
    .activate-code-wrap {
        flex-direction: column;
        gap: 8px;
    }

    .activate-code-wrap .settings-input {
        width: 100%;
    }

    .get-code-btn {
        width: 100%;
        padding: 10px;
    }

    /* 电脑端独有功能禁用样式 */
    .desktop-only-feature {
        opacity: 0.5;
        pointer-events: none;
        position: relative;
    }

    .desktop-only-feature::after {
        content: '💻 桌面端功能';
        position: absolute;
        right: 0;
        top: 0;
        background: #6366f1;
        color: white;
        font-size: 0.7rem;
        padding: 2px 8px;
        border-radius: 4px;
    }

    .web-feature-tip {
        background: #eff6ff;
        border-left: 3px solid #3b82f6;
        padding: 10px 12px;
        margin-bottom: 16px;
        border-radius: 0 6px 6px 0;
        font-size: 0.85rem;
        color: #1e40af;
    }

    /* 云同步区域 */
    .cloud-sync-form {
        gap: 10px;
    }

    .cloud-sync-btns {
        flex-direction: column;
        gap: 8px;
    }

    .cloud-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .cloud-sync-actions {
        flex-direction: column;
        gap: 8px;
    }

    .backup-restore-body {
        padding: 16px;
    }

    /* 待办清单 - 输入框占主要空间，按钮在右侧 */
    .todo-input-wrap {
        gap: 8px;
        align-items: center;
    }

    .todo-input {
        flex: 1;
        min-width: 0;
        font-size: 16px;
        height: 42px;
        box-sizing: border-box;
        padding: 0 12px;
    }

    .todo-add-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        font-size: 1.2rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .todo-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .todo-text {
        font-size: 0.9rem;
        word-break: break-all;
    }

    .todo-actions {
        gap: 4px;
        flex-shrink: 0;
    }

    .todo-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* 备忘录 - 输入框多行，按钮在下方小按钮 */
    .memo-input-wrap {
        flex-direction: column;
        gap: 8px;
    }

    .memo-input {
        width: 100%;
        font-size: 16px;
        min-height: 80px !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .memo-add-btn {
        width: auto;
        align-self: flex-end;
        padding: 8px 20px;
        height: auto;
        font-size: 0.85rem;
    }

    .memo-item {
        padding: 10px 12px;
    }

    .memo-text {
        font-size: 0.9rem;
        word-break: break-all;
    }

    /* 剪贴板 */
    .clip-groups {
        gap: 6px;
        flex-wrap: wrap;
    }

    .clip-group-tag {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .clip-add-group {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .clip-add-wrap {
        gap: 8px;
        align-items: center;
    }

    .clip-add-input {
        flex: 1;
        min-width: 0;
        font-size: 16px;
        height: 40px;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .clip-add-submit {
        padding: 0 14px;
        height: 40px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .clip-item {
        padding: 8px 10px;
        font-size: 0.85rem;
        word-break: break-all;
    }

    /* 工作安排（模态框添加，组件内无inline输入框） */

    /* 日历适配 */
    .calendar-container {
        padding: 10px;
    }

    .cal-header {
        padding: 8px 0;
    }

    .cal-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .cal-title {
        font-size: 1rem;
    }

    .cal-weekdays {
        font-size: 0.7rem;
    }

    .cal-day {
        height: 38px;
        font-size: 0.8rem;
    }

    /* 计算器适配 */
    .calc-buttons {
        gap: 6px;
    }

    .calc-btn {
        height: 44px;
        font-size: 1.1rem;
    }

    /* 时钟适配 */
    .clock-display {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    .clock-date {
        font-size: 0.85rem;
    }

    /* 番茄钟 */
    .timer-display {
        font-size: 2.5rem;
    }

    .timer-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .timer-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    /* 翻译工具 */
    .translator-container {
        gap: 10px;
    }

    .translator-lang-toggle {
        gap: 6px;
    }

    .translator-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .translator-textarea {
        min-height: 80px;
        font-size: 16px;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .translator-swap-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* 快捷笔记 */
    .quicknote-input {
        font-size: 16px !important;
        width: 100%;
        box-sizing: border-box;
    }

    /* 按钮尺寸 */
    .btn-primary, .btn-secondary, .btn-danger {
        padding: 9px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 8px;
        padding-bottom: 80px;
    }

    .widget-grid {
        column-gap: 8px;
    }

    .widget-card {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .widget-header {
        padding: 8px 10px;
    }

    .widget-title {
        font-size: 0.8rem;
    }

    .widget-content {
        padding: 8px 10px;
    }

    .clock-display {
        font-size: 2rem;
    }

    .floating-btn {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }

    .modal {
        border-radius: 14px !important;
    }

    .modal-header {
        padding: 14px 14px 10px;
    }

    .modal-body {
        padding: 0 14px 14px;
    }

    .modal-title {
        font-size: 1rem;
    }

    .calc-btn {
        height: 40px;
        font-size: 1rem;
    }
}

/* 防止iOS输入框缩放 */
@supports (-webkit-touch-callout: none) {
    .settings-input,
    .todo-input,
    .memo-input,
    .clip-input,
    .schedule-input,
    .translator-textarea,
    .quicknote-input {
        font-size: 16px !important;
    }
}

/* 防止横向滚动 */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}
