/* ────────────────────────────────────────────────────────── PolyWeather Map — Premium Dark Theme ────────────────────────────────────────────────────────── */ :root { /* Core palette */ --bg-primary: #0a0e1a; --bg-secondary: #111827; --bg-card: rgba(17, 24, 39, 0.85); --bg-glass: rgba(15, 23, 42, 0.75); --border-glass: rgba(99, 102, 241, 0.15); --border-subtle: rgba(255, 255, 255, 0.06); /* Text */ --text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b; /* Accents */ --accent-cyan: #22d3ee; --accent-blue: #6366f1; --accent-green: #34d399; --accent-orange: #fb923c; --accent-red: #f87171; --accent-yellow: #fbbf24; --accent-purple: #a78bfa; /* Risk colors */ --risk-high: #ef4444; --risk-medium: #f59e0b; --risk-low: #22c55e; /* Spacing */ --panel-width: 560px; --header-height: 56px; --sidebar-width: 200px; /* Effects */ --glass-blur: 20px; --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5); --shadow-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.3); --shadow-glow-blue: 0 0 20px rgba(99, 102, 241, 0.3); --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } /* ── Reset & Base ── */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); overflow: hidden; height: 100vh; width: 100vw; } /* ── Map ── */ #map { width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; } /* Remove Leaflet default styling for cleaner look */ .leaflet-control-attribution { background: var(--bg-glass) !important; color: var(--text-muted) !important; backdrop-filter: blur(8px); border: 1px solid var(--border-subtle) !important; font-size: 10px !important; border-radius: 6px !important; padding: 2px 8px !important; } .leaflet-control-attribution a { color: var(--text-secondary) !important; } .leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-lg) !important; } .leaflet-control-zoom a { background: var(--bg-glass) !important; color: var(--text-primary) !important; backdrop-filter: blur(12px) !important; border: 1px solid var(--border-glass) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 16px !important; border-radius: 8px !important; transition: var(--transition); } .leaflet-control-zoom a:hover { background: rgba(99, 102, 241, 0.2) !important; border-color: var(--accent-blue) !important; } /* ── Header ── */ #header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: linear-gradient( 180deg, rgba(10, 14, 26, 0.95) 0%, rgba(10, 14, 26, 0.7) 100% ); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-glass); } .brand { display: flex; align-items: baseline; gap: 12px; } .brand h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .subtitle { font-size: 12px; font-weight: 400; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; } .header-right { display: flex; align-items: center; gap: 12px; } .live-badge { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); font-size: 11px; font-weight: 600; color: var(--accent-green); letter-spacing: 1px; } .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); animation: pulse 2s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); } 50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } } .refresh-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border-glass); background: var(--bg-glass); color: var(--text-secondary); font-size: 18px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; } .refresh-btn:hover { background: rgba(99, 102, 241, 0.15); border-color: var(--accent-blue); color: var(--text-primary); } .refresh-btn.spinning { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* ── City List Sidebar ── */ .city-list { position: fixed; top: calc(var(--header-height) + 12px); left: 12px; width: var(--sidebar-width); max-height: calc(100vh - var(--header-height) - 24px); z-index: 900; background: var(--bg-glass); backdrop-filter: blur(var(--glass-blur)); border: 1px solid var(--border-glass); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); } .city-list-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); font-size: 13px; font-weight: 600; color: var(--text-secondary); } .city-count { background: var(--accent-blue); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; } .city-list-items { overflow-y: auto; flex: 1; padding: 4px; } .city-list-items::-webkit-scrollbar { width: 4px; } .city-list-items::-webkit-scrollbar-track { background: transparent; } .city-list-items::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 2px; } .city-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: var(--transition); font-size: 13px; font-weight: 500; color: var(--text-secondary); border: 1px solid transparent; } .city-item:hover { background: rgba(99, 102, 241, 0.08); color: var(--text-primary); border-color: var(--border-glass); } .city-item.active { background: rgba(99, 102, 241, 0.15); color: var(--text-primary); border-color: var(--accent-blue); } .city-item .risk-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .city-item .risk-dot.high { background: var(--risk-high); box-shadow: 0 0 6px var(--risk-high); } .city-item .risk-dot.medium { background: var(--risk-medium); box-shadow: 0 0 6px var(--risk-medium); } .city-item .risk-dot.low { background: var(--risk-low); box-shadow: 0 0 6px var(--risk-low); } .city-item .city-temp { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent-cyan); opacity: 0; transition: var(--transition); } .city-item .city-temp.loaded { opacity: 1; } /* ── Detail Panel ── */ .detail-panel { position: fixed; top: 0; right: 0; width: var(--panel-width); height: 100vh; z-index: 950; background: linear-gradient( 180deg, rgba(10, 14, 26, 0.92) 0%, rgba(15, 23, 42, 0.95) 100% ); backdrop-filter: blur(24px); border-left: 1px solid var(--border-glass); box-shadow: -10px 0 60px rgba(0, 0, 0, 0.5); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; overflow: hidden; } .detail-panel.visible { transform: translateX(0); } .panel-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-subtle); position: relative; flex-shrink: 0; } .panel-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-glass); background: transparent; color: var(--text-muted); font-size: 14px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; } .panel-close:hover { background: rgba(248, 113, 113, 0.15); border-color: var(--accent-red); color: var(--accent-red); } .panel-title-area h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; } .panel-meta { display: flex; align-items: center; gap: 10px; } .risk-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px; letter-spacing: 0.5px; } .risk-badge.high { background: rgba(239, 68, 68, 0.15); color: var(--risk-high); border: 1px solid rgba(239, 68, 68, 0.3); } .risk-badge.medium { background: rgba(245, 158, 11, 0.15); color: var(--risk-medium); border: 1px solid rgba(245, 158, 11, 0.3); } .risk-badge.low { background: rgba(34, 197, 94, 0.15); color: var(--risk-low); border: 1px solid rgba(34, 197, 94, 0.3); } .local-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; } .panel-body { overflow-y: auto; flex: 1; padding: 0 20px 24px; } .panel-body::-webkit-scrollbar { width: 4px; } .panel-body::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 2px; } .panel-body section { padding: 18px 0; border-bottom: 1px solid var(--border-subtle); } .panel-body section:last-child { border-bottom: none; } .panel-body h3 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; letter-spacing: 0.3px; } /* ── Hero Section ── */ .hero-section { text-align: center; padding-top: 12px !important; } .hero-temp { display: flex; align-items: flex-start; justify-content: center; gap: 2px; margin-bottom: 16px; } .hero-value { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; background: linear-gradient(135deg, #fff 30%, var(--accent-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .hero-unit { font-size: 20px; font-weight: 400; color: var(--text-muted); margin-top: 8px; } .hero-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; } .hero-item { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px 8px; text-align: center; } .hero-item .label { display: block; font-size: 10px; color: var(--text-muted); margin-bottom: 4px; } .hero-item .value { display: block; font-size: 16px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; } .hero-item .value.highlight { color: var(--accent-cyan); text-shadow: 0 0 12px rgba(34, 211, 238, 0.3); } .hero-sub { font-size: 12px; color: var(--text-muted); display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; } .hero-sub span { white-space: nowrap; } /* ── Chart Section ── */ .chart-wrapper { height: 180px; position: relative; background: rgba(255, 255, 255, 0.02); border-radius: 12px; border: 1px solid var(--border-subtle); padding: 12px; } .chart-legend { display: flex; justify-content: center; gap: 16px; margin-top: 8px; font-size: 11px; color: var(--text-muted); } /* ── Probability Bars ── */ .prob-bars { display: flex; flex-direction: column; gap: 8px; } .prob-row { display: flex; align-items: center; gap: 10px; } .prob-label { width: 80px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; flex-shrink: 0; } .prob-bar-track { flex: 1; height: 28px; background: rgba(255, 255, 255, 0.04); border-radius: 8px; overflow: hidden; position: relative; } .prob-bar-fill { height: 100%; border-radius: 8px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); display: flex; align-items: center; padding-left: 10px; font-size: 12px; font-weight: 600; color: white; min-width: 40px; } .prob-bar-fill.rank-0 { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); box-shadow: 0 0 12px rgba(99, 102, 241, 0.3); } .prob-bar-fill.rank-1 { background: linear-gradient( 90deg, rgba(99, 102, 241, 0.6), rgba(34, 211, 238, 0.5) ); } .prob-bar-fill.rank-2 { background: rgba(99, 102, 241, 0.3); } .prob-bar-fill.rank-3 { background: rgba(99, 102, 241, 0.15); } /* ── Model Bars ── */ .model-bars { display: flex; flex-direction: column; gap: 6px; } .model-row { display: flex; align-items: center; gap: 10px; font-size: 12px; } .model-name { width: 80px; text-align: right; color: var(--text-muted); font-weight: 500; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .model-bar-track { flex: 1; height: 20px; background: rgba(255, 255, 255, 0.03); border-radius: 6px; position: relative; overflow: hidden; } .model-bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue)); transition: width 0.6s ease-out; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; font-weight: 600; color: white; } .model-bar-fill.deb { background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green)); box-shadow: 0 0 8px rgba(34, 211, 238, 0.3); } .model-deb-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-cyan); box-shadow: 0 0 6px var(--accent-cyan); z-index: 2; } /* ── Forecast Table ── */ .forecast-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; } .forecast-day { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px; text-align: center; transition: var(--transition); } .forecast-day:hover { border-color: var(--border-glass); background: rgba(255, 255, 255, 0.05); } .forecast-day .f-date { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; } .forecast-day .f-temp { font-size: 18px; font-weight: 700; color: var(--text-primary); } .forecast-day.today { border-color: var(--accent-blue); background: rgba(99, 102, 241, 0.08); } .forecast-day.today .f-date { color: var(--accent-cyan); } .sun-info { margin-top: 10px; font-size: 12px; color: var(--text-muted); display: flex; gap: 16px; justify-content: center; } /* ── AI Section ── */ .ai-box { background: rgba(99, 102, 241, 0.06); border: 1px solid rgba(99, 102, 241, 0.15); border-radius: 12px; padding: 16px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; } .ai-placeholder { color: var(--text-muted); font-style: italic; } /* ── Risk Section ── */ .risk-info { font-size: 12px; color: var(--text-secondary); line-height: 1.8; } .risk-info .risk-row { display: flex; gap: 8px; } .risk-info .risk-label { color: var(--text-muted); min-width: 60px; } /* ── Custom Map Markers ── */ .city-marker { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.2s ease; } .city-marker:hover { transform: scale(1.15); z-index: 1000 !important; } .marker-bubble { min-width: 44px; padding: 4px 10px; border-radius: 12px; font-family: "Inter", sans-serif; font-size: 13px; font-weight: 700; text-align: center; color: white; white-space: nowrap; position: relative; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); border: 1.5px solid rgba(255, 255, 255, 0.15); } .marker-bubble::after { content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 6px solid; border-top-color: inherit; } .marker-bubble.risk-high { background: linear-gradient(135deg, #dc2626, #ef4444); border-color: rgba(239, 68, 68, 0.5); } .marker-bubble.risk-high::after { border-top-color: #ef4444; } .marker-bubble.risk-medium { background: linear-gradient(135deg, #d97706, #f59e0b); border-color: rgba(245, 158, 11, 0.5); } .marker-bubble.risk-medium::after { border-top-color: #f59e0b; } .marker-bubble.risk-low { background: linear-gradient(135deg, #059669, #10b981); border-color: rgba(16, 185, 129, 0.5); } .marker-bubble.risk-low::after { border-top-color: #10b981; } .marker-name { font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); margin-top: 2px; white-space: nowrap; } /* Marker glow animation for selected city */ .city-marker.selected .marker-bubble { animation: markerGlow 2s ease-in-out infinite; } @keyframes markerGlow { 0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); } 50% { box-shadow: 0 4px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(99, 102, 241, 0.2); } } /* ── Loading Overlay ── */ .loading-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 14, 26, 0.7); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-size: 14px; color: var(--text-secondary); } .loading-overlay.hidden { display: none; } .loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border-glass); border-top-color: var(--accent-cyan); border-radius: 50%; animation: spin 0.8s linear infinite; } .hidden { display: none !important; } /* ── Trend badge ── */ .trend-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; } .trend-badge.rising { background: rgba(34, 197, 94, 0.12); color: var(--accent-green); border: 1px solid rgba(34, 197, 94, 0.25); } .trend-badge.falling { background: rgba(248, 113, 113, 0.12); color: var(--accent-red); border: 1px solid rgba(248, 113, 113, 0.25); } .trend-badge.stagnant { background: rgba(251, 191, 36, 0.12); color: var(--accent-yellow); border: 1px solid rgba(251, 191, 36, 0.25); } .trend-badge.mixed { background: rgba(167, 139, 250, 0.12); color: var(--accent-purple); border: 1px solid rgba(167, 139, 250, 0.25); } .dead-market { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; background: rgba(248, 113, 113, 0.15); color: var(--accent-red); border: 1px solid rgba(248, 113, 113, 0.3); animation: deadPulse 2s ease-in-out infinite; } @keyframes deadPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } } /* ── Responsive ── */ @media (max-width: 900px) { .city-list { display: none; } .detail-panel { width: 100%; } :root { --panel-width: 100%; } } @media (max-width: 600px) { .subtitle { display: none; } .brand h1 { font-size: 16px; } .hero-value { font-size: 42px; } .hero-details { grid-template-columns: repeat(3, 1fr); gap: 4px; } .hero-item .value { font-size: 14px; } }