:root {
    --text-main: #1f2937; --text-sub: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.95); --glass-border: rgba(0, 0, 0, 0.03);
    --card-hover: #ffffff;
    --accent: #3b82f6; --sidebar-width: 210px;
    --modal-bg: rgba(255, 255, 255, 0.98);
    --modal-pane-bg: #f8fafc;
    --modal-border: #e2e8f0;
    --modal-text: #1f2937;
    --modal-text-sub: #64748b;
    --card-shadow-hover: rgba(0, 0, 0, 0.08); 
}

body.dark-mode {
    --text-main: #f1f5f9; --text-sub: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.8); --glass-border: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(51, 65, 85, 1);
    --modal-bg: rgba(15, 23, 42, 0.98);
    --modal-pane-bg: rgba(30, 41, 59, 0.8);
    --modal-border: rgba(255, 255, 255, 0.1);
    --modal-text: #f8fafc;
    --modal-text-sub: #94a3b8;
    --card-shadow-hover: rgba(0, 0, 0, 0.5); 
    /* 🚨 核心修复 1：恢复黑夜模式下的字体颜色反转保护，防止看不见 */
    --cat-font-color: var(--text-main);
    --sidebar-font-color: var(--text-sub);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body, html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; height: 100%; width: 100vw; overflow-x: hidden; transition: background-color 0.3s ease; }

.background-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; animation: fadeIn 1.5s ease forwards; }
.mask-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes catFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.app-layout { display: flex; height: 100vh; width: 100%; }

.sidebar { width: var(--sidebar-width); background: var(--glass-bg); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; overflow-y: auto; z-index: 10; padding: 30px 0; }

.logo-area { display: flex; justify-content: center; align-items: center; text-align: center; padding: 0 15px 25px; font-weight: bold; margin-bottom: 5px; }
.logo-area .text-logo { font-size: var(--logo-size, 24px); color: var(--logo-color, #3498db); }
.logo-area img { height: var(--logo-size, 24px); width: auto; border-radius: 6px; }
.custom-svg-logo svg { width: var(--logo-size, 24px); height: var(--logo-size, 24px); fill: var(--logo-color, #3498db); }

.cat-nav-item { margin: 4px 12px; padding: 12px 15px; font-size: var(--sidebar-font-size); color: var(--sidebar-font-color); font-weight: 500; border-radius: 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.2s ease; }
.cat-nav-item:hover { background: rgba(59, 130, 246, 0.08); color: var(--accent); }
.cat-nav-item.active { background: var(--accent); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); font-weight: bold; }
.cat-svg-icon { display: flex; align-items: center; justify-content: center; }
.cat-svg-icon svg { width: 1.2em; height: 1.2em; fill: currentColor; }

.main-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 30px 40px; scroll-behavior: smooth; position: relative;}
.content-wrapper { display: block; max-width: 1400px; margin: 0 auto; width: 100%; position: relative;}

.top-controls { display: flex; justify-content: flex-end; gap: 15px; margin-bottom: 25px; width: 100%;}
.control-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 8px 16px; border-radius: 20px; cursor: pointer; color: var(--text-main); text-decoration: none; font-size: 14px; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.02);}
.control-btn:hover { background: var(--card-hover); }

.right-widgets { float: right; width: 280px; margin-left: 30px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 15px; position: relative; z-index: 5;}
.left-tools { margin-right: 310px; margin-bottom: 25px; }

.search-wrapper { position: relative; width: 100%; max-width: 800px; margin: 0 auto 20px; display: flex; background: var(--glass-bg); border-radius: 20px; border: 1px solid var(--glass-border); box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: all 0.3s; align-items: center; z-index: 100; height: 40px;}
.search-wrapper:focus-within { box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1); transform: translateY(-1px); border-color: rgba(59, 130, 246, 0.5); }

.engine-trigger { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px; height: 100%; cursor: pointer; color: var(--text-main); font-weight: bold; font-size: 14px; user-select: none; }
.engine-trigger-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.engine-trigger-icon svg, .engine-trigger-icon img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; }
.fallback-icon { font-size: 13px; font-weight: bold; background: rgba(59, 130, 246, 0.1); color: var(--primary); display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: 50%; }

.engine-trigger svg.arrow { width: 10px; height: 10px; fill: var(--text-sub); transition: transform 0.3s; margin-left: 2px;}
.engine-trigger.active svg.arrow { transform: rotate(180deg); }
.search-divider { width: 1px; height: 18px; background: var(--glass-border); margin: 0 10px 0 5px; }

.engine-dropdown { position: absolute; top: 48px; left: 10px; background: var(--glass-bg); border-radius: 12px; box-shadow: 0 10px 35px rgba(0,0,0,0.1); padding: 8px; width: 140px; display: none; flex-direction: column; gap: 2px; opacity: 0; transform: translateY(-10px); transition: all 0.2s; border: 1px solid var(--glass-border);}
.engine-dropdown.show { display: flex; opacity: 1; transform: translateY(0); }
.engine-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--text-main); font-size: 13px; transition: background 0.2s; }
.engine-item:hover { background: var(--card-hover); color: var(--accent); }
.engine-item-text { display: flex; align-items: center; gap: 10px; }
.engine-item-icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.engine-item-icon svg, .engine-item-icon img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; }
.active-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: none;}
.engine-item.active .active-dot { display: block; }

.search-form { flex: 1; display: flex; align-items: center; height: 100%; padding: 0 20px 0 15px; }
.search-input { width: 100%; height: 100%; border: none; background: transparent; font-size: 14px; color: var(--text-main); outline: none; }
.search-input::placeholder { color: var(--text-sub); }

.world-clocks { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; max-width: 800px; margin-left: auto; margin-right: auto;}
.clock-item { background: var(--glass-bg); border-radius: 10px; padding: 8px 15px; text-align: center; min-width: 70px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.clock-city { font-size: 11px; color: var(--text-sub); margin-bottom: 2px; font-weight: 600; letter-spacing: 1px; }
.clock-time { font-size: 14px; color: var(--text-main); font-weight: bold; font-family: "Segoe UI Mono", monospace; }

.translate-trigger { width: 100%; max-width: 800px; margin: 0 auto; background: var(--glass-bg); border-radius: 12px; padding: 12px 20px; color: var(--text-sub); font-size: 13px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.translate-trigger:hover { background: var(--card-hover); color: var(--accent); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.1); }

.sticky-widget { background: var(--glass-bg); border-radius: 16px; padding: 18px 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; display: flex; flex-direction: column; position: relative; overflow: hidden; border: 1px solid var(--glass-border);}
.sticky-widget:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.08);}

.w-bg-sunny { background: linear-gradient(135deg, rgba(253, 224, 71, 0.15) 0%, var(--glass-bg) 100%); }
.w-bg-cloudy { background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, var(--glass-bg) 100%); }
.w-bg-rainy { background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, var(--glass-bg) 100%); }
.w-bg-snowy { background: linear-gradient(135deg, rgba(226, 232, 240, 0.4) 0%, var(--glass-bg) 100%); }
.w-bg-foggy { background: linear-gradient(135deg, rgba(203, 213, 225, 0.3) 0%, var(--glass-bg) 100%); }

.w-top-part { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; position: relative; z-index: 2;}
.w-top-left { display: flex; flex-direction: column; }
.w-wea-city { font-size: 18px; font-weight: bold; color: var(--text-main); }
.w-wea-desc { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.w-top-right { display: flex; align-items: center; gap: 8px; }
.w-wea-icon { font-size: 34px; line-height: 1; }
.w-wea-temp { font-size: 32px; font-weight: 900; color: var(--text-main); font-family: "Segoe UI", sans-serif; line-height: 1;}

.w-bottom-part { display: flex; justify-content: space-between; border-top: 1px dashed rgba(0,0,0,0.06); padding-top: 12px; position: relative; z-index: 2;}
body.dark-mode .w-bottom-part { border-top-color: rgba(255,255,255,0.1); }
.w-fc-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.w-fc-day { font-size: 11px; color: var(--text-sub); }
.w-fc-icon { font-size: 16px; }
.w-fc-temp { font-size: 11px; color: var(--text-main); font-weight: bold; }
.w-fc-today { transform: scale(1.1); font-weight: bold;}
.w-fc-today .w-fc-day { color: var(--accent); }

.wea-warning-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; color: #fff; margin-left: 4px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.wea-warning-banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 15px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.warning-Blue { background-color: #3b82f6; color: #fff; }
.warning-Yellow { background-color: #eab308; color: #fff; }
.warning-Orange { background-color: #f97316; color: #fff; }
.warning-Red { background-color: #ef4444; color: #fff; }
.warning-White { background-color: var(--glass-bg); color: var(--text-main); border: 1px solid var(--border); }
.warning-Black { background-color: #0f172a; color: #fff; }

.calendar-widget { padding: 20px; }
.c-cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.c-cal-title { font-size: 15px; font-weight: bold; color: var(--text-main); }
.c-cal-lunar-day { font-size: 12px; color: var(--accent); font-weight: bold; background: rgba(59, 130, 246, 0.1); padding: 5px 10px; border-radius: 6px;}
.c-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.c-cal-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 34px; border-radius: 8px; transition: all 0.2s;}
.c-cal-day { font-size: 14px; color: var(--text-main); font-weight: 600;}
.c-cal-lunar { font-size: 10px; color: var(--text-sub); transform: scale(0.9); white-space: nowrap;}

.c-cal-cell.today { background: var(--accent); transform: scale(1.08); box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35); position: relative; z-index: 2;}
.c-cal-cell.today .c-cal-day, .c-cal-cell.today .c-cal-lunar { color: white; font-weight: bold; }
.c-cal-cell.holiday .c-cal-lunar { color: #ef4444; font-weight: bold; }
.c-cal-cell.term .c-cal-lunar { color: #10b981; font-weight: bold; }
.c-cal-cell.other-month { opacity: 0.2; }

.category-container { display: block; width: 100%; }
.category { display: block; margin-bottom: 25px; transition: opacity 0.4s ease, transform 0.4s ease; }
.category.hide { display: none; }
.category.fade-in { animation: catFadeIn 0.5s forwards; }

/* 🚨 核心修复 2：接回被误删的 var(--cat-font-size) 和 var(--cat-font-color) */
.category-title { font-size: var(--cat-font-size); color: var(--cat-font-color); margin-bottom: 6px; padding-bottom: 2px; display: flex; align-items: center; gap: 8px; font-weight: bold;}
.category-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

.grid-container { display: block; }

.site-card { 
    display: inline-flex; width: var(--card-width); height: var(--card-height); 
    margin: 0 12px 12px 0; vertical-align: top;
    background: var(--glass-bg); border-radius: 12px; padding: 0 15px; align-items: center; 
    text-decoration: none; transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); 
    box-shadow: 0 2px 6px rgba(0,0,0,0.02); border: none; 
}
.site-card:hover { transform: translateY(-4px); background: var(--card-hover); box-shadow: 0 12px 24px var(--card-shadow-hover); }
body.dark-mode .site-card { border: 1px solid rgba(255,255,255,0.05); box-shadow: none;}
body.dark-mode .site-card:hover { box-shadow: 0 8px 25px var(--card-shadow-hover); }

.site-icon, .site-icon-svg { height: calc(var(--card-height) * 0.55); width: calc(var(--card-height) * 0.55); max-width: 50px; max-height: 50px; min-width: 24px; min-height: 24px; border-radius: 50%; margin-right: 12px; flex-shrink: 0; background: #fff; }
.site-icon { object-fit: contain; padding: 2px; }
.site-icon-svg { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); }
.site-icon-svg svg { width: 100%; height: 100%; object-fit: contain; }

.site-info { display: flex; flex-direction: column; overflow: hidden; flex: 1; justify-content: center;}
.site-title { color: var(--text-main); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-desc { color: var(--text-sub); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none;} 
.empty-tip { display: block; color: var(--text-sub); font-size: 14px; font-style: italic; opacity: 0.8; margin-bottom: 15px;}

.site-footer { display: flow-root; text-align: center; padding: 30px 20px; margin-top: 40px; color: var(--text-sub); font-size: 13px; line-height: 1.8; clear: both;}

.modal-base { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s; padding: 20px; }
.modal-base.active { opacity: 1; visibility: visible; }
.modal-box { width: 100%; max-width: 900px; background: var(--modal-bg); border: 1px solid var(--modal-border); border-radius: 20px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); transform: translateY(20px); transition: all 0.3s; position: relative;}
.modal-base.active .modal-box { transform: translateY(0); }
.close-btn-abs { position: absolute; right: 20px; top: 20px; font-size: 28px; color: var(--modal-text-sub); line-height: 1; cursor: pointer; transition: color 0.2s; z-index: 10;}
.close-btn-abs:hover { color: #ef4444; }

.translate-header { padding: 20px 24px; border-bottom: 1px solid var(--modal-border); display: flex; justify-content: space-between; align-items: center;}
.translate-header-title { display: flex; align-items: center; gap: 8px; color: var(--modal-text); font-weight: bold; font-size: 16px; }
.trans-body { display: flex; flex-direction: row; position: relative; height: 350px; background: transparent; }
.trans-pane-wrap { flex: 1; display: flex; flex-direction: column; position: relative; }
.trans-pane { flex: 1; padding: 24px; background: transparent; border: none; color: var(--modal-text); font-size: 18px; line-height: 1.6; resize: none; outline: none; transition: background 0.2s;}
.trans-pane::placeholder { color: var(--modal-text-sub); opacity: 0.6; }
.trans-divider-line { width: 1px; background: var(--modal-border); height: 100%; }

.trans-btn-float { 
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: white; 
    border: 6px solid var(--modal-bg); cursor: pointer; display: flex; align-items: center; justify-content: center; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: all 0.2s ease; z-index: 10; padding: 0;
}
.trans-btn-float:hover { transform: translate(-50%, -50%) scale(1.05); background: #2563eb; }
.trans-btn-float:active { transform: translate(-50%, -50%) scale(0.95); }
.trans-btn-float svg { width: 24px; height: 24px; fill: currentColor; }
.trans-btn-float .text-mobile { display: none; } 

.trans-action-btn { position: absolute; bottom: 15px; right: 15px; width: 32px; height: 32px; border-radius: 8px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-sub); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.04); transition: all 0.2s; z-index: 10; backdrop-filter: blur(5px);}
.trans-action-btn:hover { color: var(--accent); background: var(--card-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.trans-action-btn svg { width: 16px; height: 16px; fill: currentColor; }

.weather-detail-layout { display: flex; gap: 30px; padding: 30px;}
.w-det-left { flex: 1; background: var(--modal-pane-bg); border-right: 1px solid var(--modal-border); padding-right: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--modal-text); border-radius: 16px;}
.w-det-icon { font-size: 80px; margin-bottom: 20px; }
.w-det-temp { font-size: 60px; font-weight: 800; font-family: "Segoe UI", sans-serif; line-height: 1; margin-bottom: 10px;}
.w-det-city { font-size: 24px; font-weight: bold; margin-bottom: 5px; display:flex; align-items:center; gap:8px;}
.w-det-desc { font-size: 16px; color: var(--modal-text-sub); }
.w-det-right { flex: 2; display: flex; flex-direction: column; max-height: 450px; overflow-y: auto; overflow-x: hidden; padding-right: 10px; min-width: 0;}
.hourly-title { font-weight: bold; margin: 10px 0; color: var(--modal-text); font-size: 15px;}

.w-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 15px; }
.w-stat-card { background: rgba(0,0,0,0.03); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; transition: background 0.2s;}
body.dark-mode .w-stat-card { background: rgba(255,255,255,0.03); }
.w-stat-card:hover { background: rgba(59, 130, 246, 0.08); }
.w-stat-title { font-size: 11px; color: var(--text-sub); display: flex; align-items: center; gap: 4px; }
.w-stat-value { font-size: 15px; font-weight: bold; color: var(--text-main); }

.hourly-scroll-container { 
    display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 12px; 
    padding: 12px 4px 15px 4px; 
    margin-bottom: 15px; border-bottom: 1px dashed var(--modal-border); 
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent;
    min-height: 130px; align-items: center; cursor: grab;
}
.hourly-scroll-container:active { cursor: grabbing; }
.hourly-scroll-container::-webkit-scrollbar { height: 6px; display: block; }
.hourly-scroll-container::-webkit-scrollbar-track { background: transparent; }
.hourly-scroll-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
body.dark-mode .hourly-scroll-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }

.hourly-item { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    gap: 8px; min-width: 65px; min-height: 105px; padding: 10px; border-radius: 12px; 
    background: rgba(0,0,0,0.03); flex-shrink: 0; transition: background 0.2s;
}
body.dark-mode .hourly-item { background: rgba(255,255,255,0.03); }
.hourly-item:hover { background: rgba(59, 130, 246, 0.08); }
.h-time { font-size: 12px; color: var(--modal-text-sub); }
.h-icon { font-size: 22px; }
.h-temp { font-size: 14px; font-weight: bold; color: var(--modal-text); }
.h-pop { font-size: 11px; color: #3b82f6; font-weight: bold; margin-top: -4px; height: 14px;} 

.w-day-row { display: flex; align-items: center; justify-content: space-between; background: transparent; color: var(--modal-text); padding: 12px 10px; border-bottom: 1px solid rgba(0,0,0,0.03);}
.w-day-date { width: 120px; font-size: 14px; font-weight: 500; }
.w-day-icon { font-size: 20px; width: 40px; text-align: center; }
.w-day-bar { flex: 1; margin: 0 15px; height: 6px; background: rgba(127,140,141,0.2); border-radius: 3px; position: relative;}
.w-day-bar-fill { position: absolute; height: 100%; background: linear-gradient(90deg, #3b82f6, #ef4444); border-radius: 3px; }
.w-day-temp-range { width: 90px; text-align: right; font-size: 14px; font-family: monospace; }

.lunar-detail-layout { display: flex; gap: 20px; padding: 30px; color: var(--modal-text);}
.l-det-left { width: 260px; border-right: 1px solid var(--modal-border); padding-right: 30px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.l-det-date { font-size: 16px; color: var(--modal-text-sub); margin-bottom: 10px; font-weight: bold;}
.l-det-day { font-size: 80px; font-weight: bold; font-family: "Segoe UI", sans-serif; line-height: 1; color: var(--accent); margin-bottom: 10px;}
.l-det-lunar { font-size: 18px; font-weight: bold; margin-bottom: 20px; }
.yiji-box { display: flex; width: 100%; gap: 10px; }
.yiji-item { flex: 1; background: var(--modal-pane-bg); padding: 12px; border-radius: 12px; }
.yiji-icon.yi { display: inline-block; width: 28px; height: 28px; line-height: 28px; background: #10b981; color: white; border-radius: 50%; font-weight: bold; margin-bottom: 8px;}
.yiji-icon.ji { display: inline-block; width: 28px; height: 28px; line-height: 28px; background: #ef4444; color: white; border-radius: 50%; font-weight: bold; margin-bottom: 8px;}
.yiji-text { font-size: 12px; color: var(--modal-text-sub); line-height: 1.6; }

.l-det-right { flex: 1; background: transparent; padding-left: 10px; }
.l-big-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;}
.l-btn { background: transparent; border: 1px solid var(--modal-border); color: var(--modal-text); padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: background 0.2s; font-weight: bold;}
.l-btn:hover { background: var(--modal-pane-bg); }
.l-month-title { font-size: 20px; font-weight: bold; }

.l-big-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.l-big-th { padding: 10px 0; color: var(--modal-text-sub); font-weight: bold; }
.l-big-cell { height: 60px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; border: 1px solid transparent;}
.l-big-cell:hover { background: var(--modal-pane-bg); border-color: var(--modal-border); }
.l-big-cell.active { border-color: var(--accent); background: rgba(59, 130, 246, 0.05); }
.l-big-day { font-size: 16px; font-weight: bold; color: var(--modal-text); }
.l-big-lunar { font-size: 11px; color: var(--modal-text-sub); margin-top: 2px;}

@media (max-width: 1024px) {
    .modal-box { max-height: 85vh; overflow-y: auto !important;}
    .weather-detail-layout, .lunar-detail-layout { flex-direction: column; padding: 20px;}
    .w-det-left, .l-det-left { width: 100%; border-right: none; border-bottom: 1px solid var(--modal-border); padding: 0 0 20px 0; margin-bottom: 20px;}
    .w-det-right, .l-det-right { padding: 0; max-height: none; overflow: visible;} 
}

@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar { width: 100vw; border-right: none; border-bottom: 1px solid var(--glass-border); padding: 10px 15px; display: flex; flex-direction: row; overflow-x: auto; white-space: nowrap; height: auto; align-items: center; }
    .logo-area { border-bottom: none; margin-bottom: 0; padding: 0 15px 0 0; margin-right: 10px; border-right: 1px solid var(--glass-border); }
    .cat-nav-item { margin: 0 5px; padding: 10px 15px; border-radius: 20px; font-size: 14px;}
    
    .main-content { padding: 20px 15px; width: 100vw; }
    .right-widgets { float: none; width: 100%; margin-left: 0; margin-bottom: 20px; flex-direction: column; gap: 15px;}
    .left-tools { margin-right: 0; margin-bottom: 15px; }
    
    .search-wrapper { border-radius: 20px; height: 40px;}
    .engine-trigger { padding: 0 5px 0 15px; font-size: 14px; }
    
    .grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .site-card { display: flex; width: 100%; margin: 0; }
    .site-desc { display: none; } 
    
    .modal-box { padding: 20px; border-radius: 16px; margin: auto; }
    .trans-body { flex-direction: column !important; height: auto; background: transparent; border: none;}
    .trans-pane-wrap { flex: none; }
    .trans-pane { height: 160px; border-radius: 12px; background: var(--modal-pane-bg); border: 1px solid var(--modal-border); margin: 0;}
    .trans-pane:first-child { border-bottom: none; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 30px;}
    .trans-pane:last-child { border-top: none; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 30px;}
    .trans-divider-line { display: none; }
    
    .trans-btn-float { 
        position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) !important; 
        width: auto; height: 42px; border-radius: 21px; padding: 0 24px; gap: 6px;
        border: 4px solid var(--modal-bg); box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
    }
    .trans-btn-float:active { transform: translate(-50%, -50%) scale(0.95) !important; }
    .trans-btn-float svg { display: none; } 
    .trans-btn-float .text-mobile { display: block; font-size: 14px; font-weight: bold; letter-spacing: 2px;}
    
    .trans-action-btn { bottom: 15px; right: 10px; }
}