.weather-app-wrapper { --w-bg: #1e3a8a; --w-panel: rgba(255, 255, 255, 0.08); --w-text: #f8fafc; --w-muted: rgba(255, 255, 255, 0.6); --w-border: rgba(255, 255, 255, 0.1); width: 100%; max-width: 960px; margin: 0 auto; font-family: -apple-system, system-ui, sans-serif; color: var(--w-text); background: linear-gradient(180deg, #1e40af 0%, #0f172a 100%); border-radius: 24px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); height: auto; overflow: visible; }

.w-top-bar { display: flex; gap: 12px; margin-bottom: 24px; position: relative; z-index: 50; }
.w-search-box { position: relative; flex: 1; }
.w-search-input { width: 100%; padding: 12px 16px 12px 40px; font-size: 1rem; background: rgba(0,0,0,0.2); border: 1px solid var(--w-border); border-radius: 12px; color: #fff; outline: none; transition: 0.2s; }
.w-search-input:focus { border-color: #38bdf8; background: rgba(0,0,0,0.3); }
.w-search-icon { position: absolute; left: 12px; top: 14px; opacity: 0.5; }

.w-locate-btn { width: 48px; height: 46px; display: flex; align-items: center; justify-content: center; background: rgba(56, 189, 248, 0.2); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 12px; color: #38bdf8; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.w-locate-btn:hover { background: #38bdf8; color: #fff; }

.w-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px; background: #1e293b; border: 1px solid var(--w-border); border-radius: 12px; z-index: 100; display: none; box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.w-dropdown.active { display: block; }
.w-dropdown-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--w-border); }
.w-dropdown-item:last-child { border-bottom: none; }
.w-dropdown-item:hover { background: rgba(255,255,255,0.05); }

.w-hero { text-align: center; padding: 20px 0 40px; }
#ui-city { font-size: 2rem; font-weight: 500; margin-bottom: 8px; }
.w-hero-main { display: flex; align-items: center; justify-content: center; gap: 20px; }
.w-temp { font-size: 5rem; font-weight: 200; }
#ui-icon { width: 80px; height: 80px; }
#ui-icon svg { width: 100%; height: 100%; }
.w-desc { font-size: 1.2rem; margin-top: 4px; color: #bae6fd; }
.w-hl { font-size: 1rem; margin-top: 8px; }

.w-card { background: var(--w-panel); border: 1px solid var(--w-border); border-radius: 18px; padding: 20px; margin-bottom: 20px; }
.w-card-title { font-size: 0.85rem; font-weight: 600; color: var(--w-muted); text-transform: uppercase; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

.w-hourly { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; }
.w-hourly::-webkit-scrollbar { height: 4px; }
.w-hourly::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.w-h-item { display: flex; flex-direction: column; align-items: center; min-width: 55px; }
.w-h-time { font-size: 0.85rem; margin-bottom: 8px; }
.w-h-icon { width: 32px; height: 32px; margin-bottom: 8px; }
.w-h-icon svg { width: 100%; height: 100%; }
.w-h-temp { font-size: 1rem; font-weight: 600; }
.w-h-pop { font-size: 0.75rem; color: #60a5fa; font-weight: 600; margin-bottom: 4px; height: 16px; }

.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.w-grid-item { background: var(--w-panel); border: 1px solid var(--w-border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.w-g-val { font-size: 1.5rem; font-weight: 600; margin-top: 8px; font-family: monospace; }
.w-g-unit { font-size: 0.8rem; opacity: 0.6; margin-left: 2px; }

.w-sun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.w-sun-card { display: flex; align-items: center; gap: 12px; }
.w-sun-val { font-size: 1.3rem; font-weight: 600; margin-top: 4px; }

.w-daily-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--w-border); }
.w-daily-item:last-child { border-bottom: none; padding-bottom: 0; }
.w-d-day { width: 70px; font-weight: 500; font-size: 1rem; }
.w-d-icon { width: 32px; height: 32px; flex-shrink: 0; margin: 0 16px; }
.w-d-icon svg { width: 100%; height: 100%; }
.w-d-temps { display: flex; align-items: center; flex: 1; gap: 12px; }
.w-d-min { width: 40px; text-align: right; color: var(--w-muted); font-weight: 500; }
.w-d-max { width: 40px; text-align: left; font-weight: 500; }
.w-d-bar-bg { flex: 1; height: 6px; background: rgba(0,0,0,0.3); border-radius: 4px; position: relative; overflow: hidden; }
.w-d-bar-fill { position: absolute; height: 100%; background: linear-gradient(90deg, #38bdf8, #fbbf24, #ef4444); border-radius: 4px; }

@media (max-width: 600px) { 
    .w-grid { grid-template-columns: repeat(2, 1fr); } 
    .w-temp { font-size: 4rem; } 
    .weather-app-wrapper { padding: 20px; border-radius: 16px; }
    /* 彻底修复移动端日出日落溢出，改为上下堆叠布局 */
    .w-sun-grid { grid-template-columns: 1fr; }
}