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

:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-hover: rgba(255, 255, 255, 0.85);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #a1a1a6;
    --border-color: rgba(0, 0, 0, 0.08);
    --accent-color: #007aff;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg-primary: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-glass: rgba(44, 44, 46, 0.72);
    --bg-glass-hover: rgba(58, 58, 60, 0.85);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* 动态背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 122, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 15s ease-in-out infinite;
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 122, 255, 0.1) 0%, transparent 70%);
}

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

/* ====== 动画关键帧 ====== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(0.5deg); }
    75% { transform: translateY(3px) rotate(-0.5deg); }
}

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

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

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 122, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 122, 255, 0.6);
    }
}

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

@keyframes numberChange {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes progressFill {
    from { width: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 122, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 122, 255, 0.6), 0 0 60px rgba(102, 126, 234, 0.4);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

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

/* ====== 顶部菜单栏 ====== */
.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.menu-title:hover {
    transform: scale(1.02);
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-icon-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-icon-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

[data-theme="dark"] .menu-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-icon:hover {
    transform: scale(1.2) rotate(15deg);
}

/* ====== 主内容区 ====== */
.main-content {
    padding: 60px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ====== 时间显示 ====== */
.time-display {
    text-align: center;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
    animation: fadeInUp 0.8s ease-out, floatGentle 6s ease-in-out infinite;
}

.time-main {
    font-size: 72px;
    font-weight: 200;
    color: var(--text-primary);
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
    transition: all var(--transition-slow);
    cursor: default;
    position: relative;
    display: inline-block;
}

.time-main:hover {
    transform: scale(1.02);
    text-shadow: 0 0 60px rgba(0, 122, 255, 0.4);
}

.time-main::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.time-main:hover::after {
    width: 100%;
}

.time-date {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
    animation: fadeIn 1s ease-out 0.3s both;
    transition: all 0.3s ease;
}

.time-date:hover {
    color: var(--text-primary);
}

/* ====== 搜索栏 ====== */
.search-container {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 12px;
}

.search-wrapper input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-sm);
}

.search-wrapper input:focus {
    background: var(--bg-glass-hover);
    box-shadow: var(--shadow-md), 0 0 0 4px rgba(0, 122, 255, 0.15), 0 0 30px rgba(102, 126, 234, 0.2);
    transform: scale(1.01);
    border-color: var(--accent-color);
}

.search-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-tertiary);
    transition: all var(--transition-normal);
}

.search-wrapper input:focus ~ .search-icon {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.2);
    animation: wiggle 0.5s ease;
}

.engine-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.engine-btn {
    padding: 6px 16px;
    font-size: 13px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.engine-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.engine-btn:hover::before {
    left: 100%;
}

.engine-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-sm);
}

.engine-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.engine-manage-btn {
    display: block;
    margin: 8px auto 0;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.engine-manage-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* ====== 区块标题 ====== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease-out;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.section-header h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.section-header:hover h3::after {
    width: 100%;
}

.add-shortcut-btn,
.add-widget-btn {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.add-shortcut-btn:hover,
.add-widget-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.add-shortcut-btn:active,
.add-widget-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ====== 快捷方式网格 ====== */
.shortcuts-section {
    margin-bottom: 32px;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.shortcut-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: cardEnter 0.5s ease-out backwards;
}

.shortcut-card:nth-child(1) { animation-delay: 0.1s; }
.shortcut-card:nth-child(2) { animation-delay: 0.15s; }
.shortcut-card:nth-child(3) { animation-delay: 0.2s; }
.shortcut-card:nth-child(4) { animation-delay: 0.25s; }
.shortcut-card:nth-child(5) { animation-delay: 0.3s; }
.shortcut-card:nth-child(6) { animation-delay: 0.35s; }
.shortcut-card:nth-child(7) { animation-delay: 0.4s; }
.shortcut-card:nth-child(8) { animation-delay: 0.45s; }

.shortcut-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shortcut-card:hover::before {
    opacity: 1;
}

.shortcut-card:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(102, 126, 234, 0.15);
    border-color: rgba(0, 122, 255, 0.3);
}

.shortcut-card:active {
    transform: translateY(-4px) scale(0.98);
}

.shortcut-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
}

.shortcut-card:hover .shortcut-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.shortcut-icon img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.shortcut-fallback {
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.shortcut-icon img:not([style*="display: none"]) + .shortcut-fallback {
    display: none;
}

.shortcut-name {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.shortcut-card:hover .shortcut-name {
    color: var(--accent-color);
}

.shortcut-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff3b30;
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcut-card:hover .shortcut-delete {
    opacity: 1;
    transform: scale(1);
}

.shortcut-delete:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.5);
}

/* ====== 小组件网格 ====== */
.widgets-section {
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out 0.25s both;
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.widget-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 16px;
    position: relative;
    min-height: 120px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardEnter 0.5s ease-out backwards;
    overflow: hidden;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.widget-card:nth-child(1) { animation-delay: 0.1s; }
.widget-card:nth-child(2) { animation-delay: 0.15s; }
.widget-card:nth-child(3) { animation-delay: 0.2s; }
.widget-card:nth-child(4) { animation-delay: 0.25s; }

.widget-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(102, 126, 234, 0.1);
    border-color: rgba(0, 122, 255, 0.2);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.widget-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.widget-card:hover .widget-icon {
    transform: scale(1.2);
    animation: wiggle 0.5s ease;
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.widget-delete {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.8);
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.widget-card:hover .widget-delete {
    opacity: 1;
    transform: scale(1);
}

.widget-delete:hover {
    background: #ff3b30;
    transform: scale(1.2);
}

.widget-content {
    font-size: 13px;
    color: var(--text-secondary);
    animation: fadeIn 0.5s ease-out;
}

/* ====== 天气组件 ====== */
.weather-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weather-icon {
    font-size: 48px;
    animation: floatGentle 4s ease-in-out infinite;
}

.weather-temp {
    font-size: 42px;
    font-weight: 300;
    color: var(--text-primary);
}

.weather-info {
    flex: 1;
}

.weather-desc {
    font-size: 14px;
    color: var(--text-primary);
}

.weather-city {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ====== 笔记组件 ====== */
.notes-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 13px;
    color: var(--text-primary);
    resize: none;
    outline: none;
    font-family: inherit;
    transition: all 0.3s ease;
}

.notes-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .notes-textarea {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .notes-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
}

/* ====== 待办组件 ====== */
.todo-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.todo-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

[data-theme="dark"] .todo-input {
    background: rgba(255, 255, 255, 0.06);
}

.todo-list {
    list-style: none;
    max-height: 120px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.todo-item:hover {
    background: rgba(0, 0, 0, 0.02);
    padding-left: 4px;
}

[data-theme="dark"] .todo-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.todo-item input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.todo-item input[type="checkbox"]:hover {
    transform: scale(1.2);
}

.todo-item.done span {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.todo-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.todo-item:hover .todo-delete {
    opacity: 1;
}

.todo-delete:hover {
    color: #ff3b30;
    transform: scale(1.2);
}

/* ====== 监控组件 ====== */
.monitor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.monitor-label {
    width: 50px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.monitor-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .monitor-bar {
    background: rgba(255, 255, 255, 0.1);
}

.monitor-fill {
    height: 100%;
    background: linear-gradient(90deg, #34c759, #30d158);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: progressFill 0.5s ease-out;
}

.monitor-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.monitor-fill.warning {
    background: linear-gradient(90deg, #ff9500, #ff9f0a);
}

.monitor-fill.critical {
    background: linear-gradient(90deg, #ff3b30, #ff453a);
}

.monitor-value {
    width: 60px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.monitor-uptime {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

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

.monitor-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.monitor-refresh-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.monitor-refresh-btn:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.05);
}

.monitor-refresh-btn.loading {
    opacity: 0.6;
    pointer-events: none;
    animation: spin 1s linear infinite;
}

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

/* ====== 课程表组件 ====== */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

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

.schedule-week {
    font-size: 12px;
    color: var(--accent-color);
    background: rgba(0, 122, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.schedule-today {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.schedule-course {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.schedule-course.current {
    background: rgba(0, 122, 255, 0.08);
    border-left-color: var(--accent-color);
}

.schedule-course:hover {
    background: rgba(0, 0, 0, 0.06);
    border-left-color: var(--accent-color);
    transform: translateX(4px);
}

[data-theme="dark"] .schedule-course {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .schedule-course:hover {
    background: rgba(255, 255, 255, 0.08);
}

.schedule-period {
    font-size: 11px;
    color: var(--accent-color);
    white-space: nowrap;
    font-weight: 600;
}

.schedule-info {
    flex: 1;
}

.schedule-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.schedule-detail {
    font-size: 11px;
    color: var(--text-tertiary);
}

.schedule-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-tertiary);
}

.schedule-edit-btn {
    font-size: 12px;
    color: var(--accent-color);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 课表管理 */
.schedule-tabs-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.schedule-table-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.schedule-tab-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedule-tab-btn:hover {
    background: var(--bg-glass);
}

.schedule-tab-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.schedule-tab-btn.add {
    color: var(--accent-color);
    border-style: dashed;
}

.schedule-content-inner {
    padding: 16px;
}

.schedule-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.schedule-grid-view {
    overflow-x: auto;
}

.schedule-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.schedule-grid-table th,
.schedule-grid-table td {
    border: 1px solid var(--border-color);
    padding: 8px 4px;
    text-align: center;
    min-width: 80px;
}

.schedule-grid-table th {
    background: var(--bg-glass);
    font-weight: 500;
    position: sticky;
    top: 0;
}

.schedule-grid-table .period-cell {
    background: var(--bg-glass);
    font-weight: 500;
    min-width: 60px;
}

.schedule-grid-table .time-small {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.schedule-grid-table .course-cell {
    height: 60px;
    vertical-align: middle;
    cursor: pointer;
    transition: background 0.2s ease;
}

.schedule-grid-table .course-cell:hover {
    background: rgba(0, 122, 255, 0.05);
}

.schedule-grid-table .course-cell.has-course:hover {
    background: rgba(0, 122, 255, 0.1);
}

.course-block {
    padding: 4px;
}

.course-block .course-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.course-block .course-loc {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* 时间表设置 */
.time-slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-slot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.time-slot-item .period-label {
    width: 50px;
    font-weight: 500;
    color: var(--text-primary);
}

.time-slot-item input[type="time"] {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
}

/* 表单行 */
.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* 按钮样式 */
.btn-danger {
    background: #ff3b30 !important;
    color: white !important;
    border-color: #ff3b30 !important;
}

.btn-danger:hover {
    background: #ff453a !important;
}

/* iCal 导入样式 */
.ical-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.ical-upload-area:hover,
.ical-upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(0, 122, 255, 0.05);
}

.ical-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ical-upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ical-upload-hint {
    font-size: 12px;
    color: var(--text-tertiary);
}

.ical-paste-area textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 12px;
    resize: vertical;
}

.ical-paste-area textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.schedule-edit-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

/* ====== 弹窗 ====== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-window {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 20px 60px rgba(0, 0, 0, 0.2);
    min-width: 360px;
    max-width: 90vw;
    overflow: hidden;
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.hide .modal-window {
    animation: modalOut 0.3s ease forwards;
}

.modal-window.large {
    min-width: 560px;
}

.modal-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
}

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

.modal-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff5f57;
    border: none;
    color: transparent;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #ff3b30;
    color: white;
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 16px;
}

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .form-group input {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .form-group input:focus {
    background: rgba(255, 255, 255, 0.08);
}

.btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #0066d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

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

.btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ====== 小组件选择器 ====== */
.widget-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.widget-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.widget-option:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-sm);
}

.widget-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.widget-option.disabled:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: none;
}

[data-theme="dark"] .widget-option {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .widget-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.widget-option-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.widget-option:hover .widget-option-icon {
    transform: scale(1.2) rotate(10deg);
}

.widget-option-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.widget-option-info p {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ====== 课程表弹窗 ====== */
.schedule-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.schedule-tab {
    padding: 8px 16px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.schedule-tab:hover {
    background: rgba(0, 0, 0, 0.08);
}

.schedule-tab.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.schedule-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.schedule-panel.active {
    display: block;
}

.schedule-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.schedule-form input,
.schedule-form select {
    padding: 10px 12px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.schedule-form input:focus,
.schedule-form select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

[data-theme="dark"] .schedule-form input,
[data-theme="dark"] .schedule-form select {
    background: rgba(255, 255, 255, 0.06);
}

.schedule-list {
    max-height: 200px;
    overflow-y: auto;
}

.schedule-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.schedule-list-item:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(4px);
}

.schedule-list-item span {
    color: var(--text-primary);
}

.schedule-list-item .day {
    color: var(--accent-color);
    font-weight: 500;
}

.schedule-list-item .del-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #ff3b30;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.schedule-list-item .del-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#schedule-json {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    font-size: 12px;
    font-family: 'SF Mono', Monaco, monospace;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
}

#schedule-json:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.json-example {
    margin: 10px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
}

.json-example code {
    font-family: 'SF Mono', Monaco, monospace;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    .main-content {
        padding: 56px 16px 24px;
    }
    
    .menu-bar {
        height: 32px;
        padding: 0 12px;
    }
    
    .menu-title {
        font-size: 13px;
    }
    
    .menu-icon-btn {
        font-size: 14px;
        padding: 4px 6px;
    }
    
    .menu-icon {
        font-size: 14px;
    }
    
    /* 时间显示 */
    .time-display {
        margin-bottom: 16px;
    }
    
    .time-main {
        font-size: 56px;
        letter-spacing: -1px;
    }
    
    .time-main:hover {
        transform: none;
        text-shadow: none;
    }
    
    .time-main:hover::after {
        width: 0;
    }
    
    .time-date {
        font-size: 14px;
    }
    
    /* 搜索栏 */
    .search-container {
        margin-bottom: 24px;
    }
    
    .search-wrapper input {
        padding: 12px 16px 12px 44px;
        font-size: 15px;
    }
    
    .search-icon {
        left: 14px;
        font-size: 15px;
    }
    
    .engine-switcher {
        gap: 6px;
        padding: 0 4px;
    }
    
    .engine-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .engine-manage-btn {
        font-size: 13px;
    }
    
    /* 区块标题 */
    .section-header {
        margin-bottom: 12px;
    }
    
    .section-header h3 {
        font-size: 17px;
    }
    
    .add-shortcut-btn,
    .add-widget-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    /* 快捷方式 */
    .shortcuts-section {
        margin-bottom: 24px;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .shortcut-card {
        padding: 14px 8px;
        border-radius: var(--radius-md);
    }
    
    .shortcut-card::before {
        display: none;
    }
    
    .shortcut-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .shortcut-card:active {
        transform: scale(0.96);
        background: var(--bg-glass-hover);
    }
    
    .shortcut-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .shortcut-icon img {
        width: 28px;
        height: 28px;
    }
    
    .shortcut-fallback {
        font-size: 18px;
    }
    
    .shortcut-name {
        font-size: 11px;
    }
    
    .shortcut-delete {
        width: 18px;
        height: 18px;
        font-size: 11px;
        top: 4px;
        right: 4px;
    }
    
    /* 小尺寸模式 */
    .shortcuts-grid.small {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }
    
    .shortcuts-grid.small .shortcut-card {
        padding: 10px 6px;
    }
    
    .shortcuts-grid.small .shortcut-icon {
        width: 32px;
        height: 32px;
    }
    
    .shortcuts-grid.small .shortcut-icon img {
        width: 24px;
        height: 24px;
    }
    
    .shortcuts-grid.small .shortcut-name {
        font-size: 10px;
    }
    
    /* 小组件 */
    .widgets-section {
        margin-bottom: 24px;
    }
    
    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .widget-card {
        padding: 14px;
        min-height: auto;
    }
    
    .widget-card:hover {
        transform: none;
    }
    
    .widget-header {
        margin-bottom: 10px;
    }
    
    .widget-icon {
        font-size: 16px;
    }
    
    .widget-title {
        font-size: 13px;
    }
    
    .widget-content {
        font-size: 12px;
    }
    
    /* 监控组件 */
    .monitor-item {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .monitor-label {
        width: 40px;
        font-size: 11px;
    }
    
    .monitor-bar {
        height: 5px;
    }
    
    .monitor-value {
        width: 50px;
        font-size: 11px;
    }
    
    .monitor-uptime {
        font-size: 10px;
        margin-top: 6px;
        padding-top: 6px;
    }
    
    /* 课程表 */
    .schedule-course {
        padding: 8px;
        gap: 8px;
    }
    
    .schedule-period {
        font-size: 10px;
    }
    
    .schedule-name {
        font-size: 12px;
    }
    
    .schedule-detail {
        font-size: 10px;
    }
    
    .schedule-edit-btn {
        font-size: 11px;
    }
    
    /* 笔记和待办 */
    .notes-textarea,
    .todo-input {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .todo-item {
        font-size: 12px;
        padding: 5px 0;
    }
    
    /* 倒计时 */
    .countdown-number {
        font-size: 40px;
    }
    
    .countdown-label {
        font-size: 13px;
    }
    
    .countdown-event {
        font-size: 12px;
    }
    
    /* 计时器 */
    .timer-display {
        font-size: 32px;
    }
    
    /* 时钟 */
    .clock-time {
        font-size: 40px;
    }
    
    .clock-date {
        font-size: 12px;
    }
    
    /* 名言 */
    .quote-text {
        font-size: 13px;
    }
    
    .quote-author {
        font-size: 11px;
    }
    
    /* 弹窗 */
    .modal {
        align-items: flex-end;
        padding: 0;
    }
    
    .modal-window {
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 85vh;
        animation: slideUp 0.3s ease-out;
    }
    
    .modal-window.large {
        min-width: 100%;
    }
    
    .modal-titlebar {
        padding: 12px 14px;
    }
    
    .modal-title {
        font-size: 13px;
    }
    
    .modal-close {
        width: 22px;
        height: 22px;
    }
    
    .modal-body {
        padding: 16px;
        max-height: calc(85vh - 120px);
    }
    
    .modal-footer {
        padding: 12px 14px;
        gap: 8px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 13px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    /* 小组件选择器 */
    .widget-picker-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .widget-option {
        padding: 12px;
    }
    
    .widget-option-icon {
        font-size: 20px;
    }
    
    .widget-option-info h4 {
        font-size: 13px;
    }
    
    .widget-option-info p {
        font-size: 10px;
    }
    
    /* 课程表弹窗 */
    .schedule-tabs {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .schedule-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .schedule-form {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .schedule-form input,
    .schedule-form select {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .schedule-form input:nth-child(3),
    .schedule-form input:nth-child(4),
    .schedule-form input:nth-child(5),
    .schedule-form button {
        grid-column: 1 / -1;
    }
    
    .schedule-list {
        max-height: 150px;
    }
    
    .schedule-list-item {
        padding: 8px;
        font-size: 11px;
        gap: 8px;
    }
    
    #schedule-json {
        min-height: 120px;
        font-size: 11px;
        padding: 10px;
    }
    
    .json-example {
        font-size: 10px;
        padding: 8px;
    }
    
    /* 搜索引擎管理 */
    .engine-list {
        margin-bottom: 12px;
    }
    
    .engine-item {
        padding: 8px 10px;
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .engine-item-name {
        min-width: 60px;
        font-size: 12px;
    }
    
    .engine-item-url {
        font-size: 10px;
    }
    
    .engine-add-form {
        flex-direction: column;
        gap: 6px;
    }
    
    .engine-add-form input {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .engine-tip {
        font-size: 10px;
        margin-top: 8px;
    }
}

/* ====== 超小屏幕 (小于 375px) ====== */
@media (max-width: 374px) {
    .main-content {
        padding: 52px 12px 20px;
    }
    
    .time-main {
        font-size: 44px;
    }
    
    .time-date {
        font-size: 12px;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .shortcut-card {
        padding: 10px 6px;
    }
    
    .shortcut-icon {
        width: 32px;
        height: 32px;
    }
    
    .shortcut-icon img {
        width: 24px;
        height: 24px;
    }
    
    .shortcut-name {
        font-size: 10px;
    }
    
    .shortcuts-grid.small {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .engine-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .section-header h3 {
        font-size: 15px;
    }
}

/* ====== 横屏手机 ====== */
@media (max-width: 896px) and (orientation: landscape) {
    .main-content {
        padding: 40px 20px 20px;
    }
    
    .menu-bar {
        height: 28px;
    }
    
    .time-display {
        margin-bottom: 12px;
    }
    
    .time-main {
        font-size: 40px;
    }
    
    .search-container {
        margin-bottom: 16px;
    }
    
    .widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal {
        align-items: center;
    }
    
    .modal-window {
        max-width: 90vw;
        max-height: 80vh;
        border-radius: var(--radius-lg);
        animation: modalIn 0.3s ease-out;
    }
}

/* ====== 触摸设备优化 ====== */
@media (hover: none) and (pointer: coarse) {
    /* 移除 hover 效果，改用 active */
    .shortcut-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .shortcut-card:active {
        transform: scale(0.96);
        background: var(--bg-glass-hover);
    }
    
    .widget-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .widget-card:active {
        background: var(--bg-glass-hover);
    }
    
    .engine-btn:hover {
        transform: none;
    }
    
    .engine-btn:active {
        transform: scale(0.95);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.96);
    }
    
    /* 删除按钮始终显示 */
    .shortcut-delete,
    .widget-delete,
    .todo-delete {
        opacity: 0.6;
    }
    
    .shortcut-card:hover .shortcut-delete,
    .widget-card:hover .widget-delete,
    .todo-item:hover .todo-delete {
        opacity: 0.6;
    }
    
    .shortcut-delete:active,
    .widget-delete:active,
    .todo-delete:active {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ====== 安全区域适配 (iPhone X 等) ====== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
    
    .modal-window {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ====== 小尺寸快捷方式 ====== */
.shortcuts-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
}

.shortcuts-grid.small .shortcut-card {
    padding: 12px 8px;
}

.shortcuts-grid.small .shortcut-icon {
    width: 36px;
    height: 36px;
}

.shortcuts-grid.small .shortcut-icon img {
    width: 24px;
    height: 24px;
}

.shortcuts-grid.small .shortcut-name {
    font-size: 11px;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ====== 选中文本美化 ====== */
::selection {
    background: rgba(0, 122, 255, 0.3);
    color: inherit;
}

/* ====== 加载动画 ====== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* ====== 工具提示 ====== */
[title] {
    position: relative;
}

/* ====== 错误状态 ====== */
.widget-error {
    color: var(--text-tertiary);
    text-align: center;
    padding: 20px;
    animation: shake 0.5s ease;
}

/* ====== 倒计时组件 ====== */
.countdown-display {
    text-align: center;
    padding: 10px;
}

.countdown-number {
    font-size: 48px;
    font-weight: 200;
    color: var(--text-primary);
    line-height: 1;
    animation: breathe 3s ease-in-out infinite;
}

.countdown-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.countdown-event {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* ====== 计时器组件 ====== */
.timer-display {
    font-size: 36px;
    font-weight: 200;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.timer-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

/* ====== 名言组件 ====== */
.quote-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
    font-style: italic;
}

.quote-author {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: right;
}

/* ====== 时钟组件 ====== */
.clock-time {
    font-size: 48px;
    font-weight: 200;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.clock-date {
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 4px;
}

/* ====== 天气组件 ====== */
.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.weather-city {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.weather-refresh-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.weather-refresh-btn:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.05);
}

.weather-refresh-btn.loading {
    opacity: 0.6;
    pointer-events: none;
    animation: spin 1s linear infinite;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.weather-icon {
    font-size: 48px;
}

.weather-temp {
    font-size: 36px;
    font-weight: 300;
    color: var(--text-primary);
}

.weather-desc {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.weather-details {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.weather-change-city {
    text-align: center;
    font-size: 11px;
    color: var(--accent-color);
    margin-top: 12px;
    cursor: pointer;
}

.weather-change-city:hover {
    text-decoration: underline;
}

/* ====== 新闻组件 ====== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.news-item:hover {
    background: var(--bg-glass-hover);
    transform: translateX(4px);
}

.news-icon {
    font-size: 18px;
}

.news-name {
    font-size: 13px;
    font-weight: 500;
}

.news-manage {
    text-align: center;
    font-size: 11px;
    color: var(--accent-color);
    margin-top: 12px;
    cursor: pointer;
}

.news-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 4px 0;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.news-source-item:hover {
    background: var(--bg-glass-hover);
}

/* ====== 股票组件 ====== */
.stock-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stock-loading {
    text-align: center;
    color: var(--text-tertiary);
    padding: 20px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.stock-symbol {
    font-size: 11px;
    color: var(--text-tertiary);
}

.stock-data {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

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

.stock-change {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.stock-change.up {
    color: #34c759;
    background: rgba(52, 199, 89, 0.1);
}

.stock-change.down {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.stock-manage {
    text-align: center;
    font-size: 11px;
    color: var(--accent-color);
    margin-top: 12px;
    cursor: pointer;
}

.stock-edit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin: 4px 0;
}

.stock-add-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ====== 音乐播放器组件 ====== */
.music-empty {
    text-align: center;
    padding: 20px;
}

.music-empty-icon {
    font-size: 48px;
    opacity: 0.5;
}

.music-empty-text {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.music-player {
    text-align: center;
}

.music-cover {
    font-size: 48px;
    margin: 12px 0;
}

.music-info {
    margin-bottom: 12px;
}

.music-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.music-artist {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.music-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-glass);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.1);
}

.music-play-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
    background: var(--accent-gradient);
    color: white;
}

.music-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 12px 0;
}

[data-theme="dark"] .music-progress {
    background: rgba(255, 255, 255, 0.1);
}

.music-progress-bar {
    height: 100%;
    width: 30%;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.music-manage {
    text-align: center;
    font-size: 11px;
    color: var(--accent-color);
    cursor: pointer;
}

.music-track-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin: 4px 0;
}

.music-playlist {
    margin-bottom: 8px;
}

/* ====== 表单输入统一样式 ====== */
input[type="date"],
input[type="time"] {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="date"]:focus,
input[type="time"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* ====== 淡入动画类 ====== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

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

.bounce-in {
    animation: bounceIn 0.5s ease-out;
}
.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    min-width: 100px;
}

.quick-access-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.quick-access-btn .quick-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.quick-access-btn .quick-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* 暗色主题 */
.dark .quick-access-btn {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quick-access-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.quick-access-btn:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-access-btn .quick-icon {
    font-size: 24px;
}

.quick-access-btn .quick-label {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.quick-access-btn .quick-arrow {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* 侧边悬浮快捷入口 */
.sidebar-shortcuts {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sidebar-btn:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
}

.sidebar-btn .sidebar-icon {
    font-size: 22px;
    line-height: 1;
}

.sidebar-btn .sidebar-label {
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-btn:hover .sidebar-label {
    opacity: 1;
}

/* 移动端隐藏侧边栏 */
@media (max-width: 768px) {
    .sidebar-shortcuts {
        display: none;
    }
}

/* 右侧悬浮快捷入口 */
.sidebar-right {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

/* 移动端隐藏右侧栏 */
@media (max-width: 768px) {
    .sidebar-right {
        display: none;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-nav-item:active {
    transform: scale(0.95);
    background: var(--border-color);
}

.mobile-nav-icon {
    font-size: 24px;
    line-height: 1;
}

.mobile-nav-label {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
    
    /* 隐藏侧边栏 */
    .sidebar-shortcuts,
    .sidebar-right {
        display: none !important;
    }
    
    /* 时间显示优化 */
    .time-main {
        font-size: 48px;
    }
    
    /* 搜索栏优化 */
    .search-container {
        margin-bottom: 20px;
    }
    
    .search-wrapper input {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .engine-switcher {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 快捷方式优化 */
    .shortcuts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .shortcut-card {
        padding: 16px 8px;
    }
    
    .shortcut-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .shortcut-name {
        font-size: 12px;
    }
    
    /* 小组件优化 */
    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* 模态框优化 */
    .modal-window {
        width: 92%;
        margin: 10px auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    /* 课程表优化 */
    .schedule-widget {
        font-size: 12px;
    }
    
    .schedule-item {
        padding: 8px 10px;
    }
}

/* 小屏幕手机 */
@media (max-width: 374px) {
    .time-main {
        font-size: 40px;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mobile-nav {
        gap: 32px;
    }
}

/* 横屏模式 */
@media (max-width: 896px) and (orientation: landscape) {
    .time-display {
        margin-bottom: 12px;
    }
    
    .time-main {
        font-size: 36px;
    }
    
    .mobile-nav {
        padding: 4px 0;
    }
    
    .mobile-nav-icon {
        font-size: 20px;
    }
    
    .mobile-nav-label {
        font-size: 10px;
    }
}

/* ==================== 移动端底部导航栏 ==================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-color);
    padding: 8px 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    justify-content: center;
    gap: 16px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.mobile-nav-item:active {
    transform: scale(0.97);
    background: var(--bg-glass-hover);
}

.mobile-nav-icon {
    font-size: 20px;
    line-height: 1;
}

.mobile-nav-label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 90px;
    }
    
    /* 隐藏侧边栏 */
    .sidebar-shortcuts,
    .sidebar-right {
        display: none !important;
    }
    
    /* 时间显示优化 */
    .time-display {
        margin-bottom: 20px;
    }
    
    .time-main {
        font-size: 52px;
    }
    
    .time-date {
        font-size: 14px;
    }
    
    /* 搜索栏优化 */
    .search-container {
        margin-bottom: 24px;
    }
    
    .search-wrapper input {
        font-size: 16px;
        padding: 14px 16px 14px 44px;
    }
    
    .engine-switcher {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
    }
    
    .engine-btn {
        padding: 6px 14px;
    }
    
    /* 快捷方式优化 */
    .shortcuts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .shortcut-card {
        padding: 16px 8px;
    }
    
    .shortcut-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .shortcut-name {
        font-size: 12px;
        margin-top: 8px;
    }
    
    /* 小组件优化 */
    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* 区块标题 */
    .section-header h3 {
        font-size: 16px;
    }
    
    /* 模态框优化 */
    .modal-window {
        width: 92%;
        margin: 20px auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    /* 菜单栏 */
    .menu-bar {
        height: 44px;
    }
    
    .menu-title {
        font-size: 15px;
    }
}

/* 小屏幕手机 */
@media (max-width: 374px) {
    .time-main {
        font-size: 44px;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mobile-nav-item {
        padding: 8px 16px;
    }
    
    .mobile-nav-icon {
        font-size: 18px;
    }
    
    .mobile-nav-label {
        font-size: 13px;
    }
}

/* ==================== iPad 适配 ==================== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* 侧边栏调整 */
    .sidebar-shortcuts {
        left: 16px;
    }
    
    .sidebar-right {
        right: 16px;
    }
    
    .sidebar-btn {
        width: 52px;
        height: 52px;
    }
    
    .sidebar-btn .sidebar-icon {
        font-size: 20px;
    }
    
    /* 主内容区 */
    .main-content {
        padding: 60px 80px 32px;
    }
    
    /* 时间显示 */
    .time-main {
        font-size: 72px;
    }
    
    /* 快捷方式 */
    .shortcuts-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    /* 小组件 */
    .widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Pro / 横屏 */
@media (min-width: 1024px) and (max-width: 1366px) {
    .main-content {
        padding: 60px 100px 32px;
    }
    
    .time-main {
        font-size: 80px;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 横屏手机 */
@media (max-width: 896px) and (orientation: landscape) {
    .time-display {
        margin-bottom: 12px;
    }
    
    .time-main {
        font-size: 36px;
    }
    
    .mobile-nav {
        padding: 6px 16px;
    }
    
    .mobile-nav-item {
        padding: 6px 14px;
    }
    
    .main-content {
        padding-bottom: 70px;
    }
}
