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

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #eef2f7;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ─── AUTH MODAL ─────────────────────────────────────── */
#auth-overlay {
  position: fixed; inset: 0;
  background: url('vizja-bg.jpg') center center / contain no-repeat, #ffffff;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

#auth-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
}

.auth-modal {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  position: relative; z-index: 1;
}

.auth-logo {
  font-size: 1.6rem; font-weight: 700;
  color: #1a1a2e; text-align: center;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  border: 1px solid #e0e0e0; border-radius: 8px;
  overflow: hidden; margin-bottom: 24px;
}

.auth-tab {
  flex: 1; padding: 10px;
  background: transparent; border: none;
  font-size: 0.9rem; font-weight: 500;
  color: #666; cursor: pointer; transition: all 0.2s;
}
.auth-tab.active { background: #e87722; color: #fff; }

.auth-modal input {
  width: 100%; padding: 12px 14px;
  border: 1px solid #ddd; border-radius: 8px;
  font-size: 0.95rem; margin-bottom: 12px;
  outline: none; transition: border-color 0.2s; color: #1a1a2e;
}
.auth-modal input:focus { border-color: #e87722; }
.auth-modal input::placeholder { color: #aaa; }

.auth-btn {
  width: 100%; padding: 13px;
  background: #e87722; color: #fff;
  border: none; border-radius: 8px;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; margin-top: 4px; transition: background 0.2s;
}
.auth-btn:hover { background: #cf6710; }
.auth-error { margin-top: 12px; font-size: 0.85rem; color: #e53e3e; text-align: center; min-height: 20px; }

/* ─── TOPBAR ─────────────────────────────────────────── */
.topbar {
  background: #1c1c1e;
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; gap: 20px;
}
.topbar-left { flex-shrink: 0; }
.logo { color: #fff; font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.topbar-center { flex: 1; max-width: 560px; position: relative; }

.search-wrap {
  display: flex; align-items: center;
  background: #fff; border-radius: 8px;
  overflow: hidden; height: 36px;
}
.search-icon { padding: 0 10px; color: #888; font-size: 0.9rem; flex-shrink: 0; }
.search-wrap input {
  flex: 1; border: none; outline: none;
  font-size: 0.9rem; padding: 0 6px; color: #1a1a2e; background: transparent;
}
.search-wrap button {
  padding: 0 16px; height: 36px;
  background: #e87722; color: #fff;
  border: none; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background 0.2s;
}
.search-wrap button:hover { background: #cf6710; }

.search-error {
  position: absolute; left: 0; top: 40px;
  font-size: 0.8rem; color: #ff6b6b;
  background: #2a2a2e; padding: 4px 10px;
  border-radius: 4px; white-space: nowrap; z-index: 10;
}

.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }
.username-badge { color: #ccc; font-size: 0.85rem; }

/* ─── THEME TOGGLE ───────────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none; font-size: 0.85rem;
}
.toggle-switch {
  width: 36px; height: 20px; background: #555;
  border-radius: 20px; position: relative;
  transition: background 0.3s;
}
.toggle-thumb {
  width: 14px; height: 14px; background: #fff;
  border-radius: 50%; position: absolute;
  top: 3px; left: 3px; transition: left 0.3s;
}
body.dark .toggle-switch { background: #e87722; }
body.dark .toggle-thumb { left: 19px; }

/* ─── LANG DROPDOWN ──────────────────────────────────── */
.lang-dropdown { position: relative; }
.flag-img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; }

.lang-current {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; background: rgba(255,255,255,0.08);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 7px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; width: auto; transition: background 0.2s;
}
.lang-current:hover { background: rgba(255,255,255,0.15); }
.lang-arrow { font-size: 0.7rem; opacity: 0.7; transition: transform 0.2s; }
.lang-dropdown.open .lang-arrow { transform: rotate(180deg); }

.lang-options {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #2a2a2e; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; overflow: hidden; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); min-width: 100px;
}
.lang-dropdown.open .lang-options { display: block; }
.lang-options button {
  display: block; width: 100%; padding: 9px 14px;
  background: transparent; color: #ddd;
  border: none; border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem; cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.lang-options button:last-child { border-bottom: none; }
.lang-options button:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ─── DARK MODE ──────────────────────────────────────── */
body.dark { background: #0f1117; color: #e0e0e0; }
body.dark .nav-tabs { background: #16192a; border-bottom-color: #2a2d40; }
body.dark .nav-tab { color: #999; }
body.dark .nav-tab.active { color: #e87722; }
body.dark .nav-tab:hover { color: #e87722; }
body.dark .card { background: #1e2130; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
body.dark .card-title { color: #6b7280; }
body.dark .cw-city { color: #f0f0f0; }
body.dark .cw-date { color: #6b7280; }
body.dark .cw-temp { color: #f0f0f0; }
body.dark .cw-desc { color: #9ca3af; }
body.dark .cw-right { border-left-color: #2a2d40; }
body.dark .cw-detail-row { border-bottom-color: #2a2d40; }
body.dark .cw-detail-row span { color: #6b7280; }
body.dark .cw-detail-row strong { color: #f0f0f0; }
body.dark .cw-bottom { border-top-color: #2a2d40; }
body.dark .forecast-item { background: #252840; }
body.dark .fc-date { color: #6b7280; }
body.dark .fc-desc { color: #9ca3af; }
body.dark .fc-temps { color: #f0f0f0; }
body.dark .uv-item { background: #252840; }
body.dark .uv-date { color: #f0f0f0; }
body.dark .uv-row { color: #9ca3af; }
body.dark .uv-row strong { color: #f0f0f0; }
body.dark .fav-item { border-bottom-color: #2a2d40; }
body.dark .fav-name { color: #f0f0f0; }
body.dark .btn-fav-edit { background: #2a2d40; color: #ccc; }
body.dark .btn-fav-edit:hover { background: #353850; }
body.dark .news-item { border-bottom-color: #2a2d40; }
body.dark .news-title { color: #e0e0e0; }
body.dark .news-time { color: #6b7280; }
body.dark .placeholder-msg { color: #6b7280; }
body.dark .empty-msg { color: #6b7280; }
.btn-logout {
  padding: 7px 14px;
  background: rgba(255,255,255,0.1); color: #ccc;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px; font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s; white-space: nowrap; width: auto;
}
.btn-logout:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ─── NAV TABS ───────────────────────────────────────── */
.nav-tabs {
  background: #fff;
  border-bottom: 2px solid #eee;
  display: flex; padding: 0 24px;
}
.nav-tab {
  padding: 14px 20px;
  background: transparent; border: none;
  font-size: 0.82rem; font-weight: 600;
  color: #666; cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px; letter-spacing: 0.5px;
  transition: color 0.2s, border-color 0.2s; width: auto;
}
.nav-tab.active { color: #e87722; border-bottom-color: #e87722; }
.nav-tab:hover { color: #e87722; }

/* ─── PAGE BODY ──────────────────────────────────────── */
.page-body {
  max-width: 1200px; margin: 24px auto;
  padding: 0 20px;
  display: grid; grid-template-columns: 1fr 320px;
  gap: 20px; align-items: start;
}
.main-col { min-width: 0; }

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: #fff; border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 16px;
}
.card-title {
  font-size: 0.78rem; font-weight: 600; color: #888;
  letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.source-badge {
  font-size: 0.7rem; background: #eef2f7; color: #555;
  padding: 2px 8px; border-radius: 20px;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}

/* ─── CURRENT WEATHER ────────────────────────────────── */
.current-weather-card { padding: 24px; }
.cw-top { display: flex; gap: 32px; flex-wrap: wrap; }
.cw-left { flex: 1; min-width: 200px; }
.cw-city { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; }
.cw-date { font-size: 0.85rem; color: #888; margin-top: 2px; margin-bottom: 16px; }
.cw-icon-temp { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cw-icon { font-size: 3.5rem; line-height: 1; }
.cw-temp { font-size: 4rem; font-weight: 700; color: #1a1a2e; line-height: 1; }
.cw-desc { font-size: 1rem; color: #555; text-transform: capitalize; margin-top: 4px; }
.cw-right {
  flex: 1; min-width: 200px;
  border-left: 1px solid #f0f0f0; padding-left: 32px;
  display: flex; flex-direction: column; justify-content: center;
}
.cw-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.9rem;
}
.cw-detail-row:last-child { border-bottom: none; }
.cw-detail-row span { color: #888; }
.cw-detail-row strong { color: #1a1a2e; font-weight: 600; }
.cw-bottom {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 12px;
}
.btn-add-fav {
  padding: 9px 18px;
  background: #fff7f0; color: #e87722;
  border: 1px solid #f5c89a; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; width: auto;
}
.btn-add-fav:hover { background: #fdebd0; }
.fav-msg { font-size: 0.85rem; color: #27ae60; }
.fav-msg.error { color: #e53e3e; }

/* ─── UV GRID ────────────────────────────────────────── */
.uv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.uv-item { background: #f8fafc; border-radius: 10px; padding: 14px; font-size: 0.85rem; }
.uv-date { font-weight: 600; color: #1a1a2e; margin-bottom: 8px; font-size: 0.8rem; }
.uv-row { display: flex; justify-content: space-between; padding: 3px 0; color: #555; }
.uv-row strong { color: #1a1a2e; }

/* ─── FORECAST GRID ──────────────────────────────────── */
.forecast-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.forecast-item { background: #f8fafc; border-radius: 10px; padding: 16px 12px; text-align: center; }
.fc-date { font-size: 0.78rem; font-weight: 600; color: #888; margin-bottom: 8px; }
.fc-icon { font-size: 2rem; margin-bottom: 8px; }
.fc-desc { font-size: 0.72rem; color: #666; text-transform: capitalize; margin-bottom: 8px; min-height: 32px; }
.fc-temps { font-size: 0.9rem; font-weight: 600; color: #1a1a2e; }
.fc-temps span { color: #888; font-weight: 400; }
.fc-humid { font-size: 0.75rem; color: #4a90d9; margin-top: 4px; }

/* ─── FAVORITES ──────────────────────────────────────── */
.fav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid #f5f5f5;
}
.fav-item:last-child { border-bottom: none; }
.fav-info { cursor: pointer; }
.fav-info:hover .fav-name { color: #e87722; }
.fav-name { font-weight: 600; font-size: 0.95rem; color: #1a1a2e; transition: color 0.2s; }
.fav-label { font-size: 0.78rem; color: #e87722; margin-top: 2px; }
.fav-actions { display: flex; gap: 8px; }
.btn-fav-edit {
  padding: 6px 12px; background: #f0f4f8; color: #555;
  border: none; border-radius: 6px; font-size: 0.8rem;
  cursor: pointer; width: auto; transition: background 0.2s;
}
.btn-fav-edit:hover { background: #e2e8f0; }
.btn-fav-del {
  padding: 6px 12px; background: #fff0f0; color: #e53e3e;
  border: 1px solid #fcc; border-radius: 6px; font-size: 0.8rem;
  cursor: pointer; width: auto; transition: background 0.2s;
}
.btn-fav-del:hover { background: #ffe0e0; }

/* ─── NEWS SIDEBAR ───────────────────────────────────── */
.news-card { padding: 20px; }
.news-item {
  display: flex; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #f5f5f5;
  text-decoration: none; color: inherit; cursor: pointer;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover .news-title { color: #e87722; }
.news-img {
  width: 72px; height: 56px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0; background: #eee;
}
.news-content { flex: 1; min-width: 0; }
.news-source { font-size: 0.68rem; font-weight: 600; color: #e87722; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.news-title {
  font-size: 0.82rem; font-weight: 600; color: #1a1a2e;
  line-height: 1.35; transition: color 0.2s;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-time { font-size: 0.72rem; color: #aaa; margin-top: 4px; }
.news-loading { color: #aaa; font-size: 0.85rem; text-align: center; padding: 20px 0; }
.news-error { color: #e53e3e; font-size: 0.82rem; text-align: center; padding: 12px 0; }

/* ─── MISC ───────────────────────────────────────────── */
.placeholder-msg { text-align: center; color: #aaa; padding: 60px 20px; font-size: 1rem; }
.empty-msg { text-align: center; color: #aaa; padding: 40px 20px; font-size: 0.9rem; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 860px) {
  .page-body { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .forecast-grid { grid-template-columns: repeat(3, 1fr); }
  .uv-grid { grid-template-columns: repeat(2, 1fr); }
  .cw-right { border-left: none; padding-left: 0; border-top: 1px solid #f0f0f0; padding-top: 16px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .forecast-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── RADAR MAP ──────────────────────────────────────── */
.radar-card { padding-bottom: 0; overflow: hidden; }
.radar-layer-btns {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 0 20px 12px;
}

/* ─── RADAR ANIMATION CONTROLS ──────────────────────── */
.radar-anim-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 12px;
}
.anim-play-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: #e87722; color: #fff; border: none;
  font-size: 0.9rem; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.anim-play-btn:hover { background: #cf6710; }
.anim-slider {
  flex: 1; height: 4px; accent-color: #e87722; cursor: pointer;
}
.anim-time-label {
  font-size: 0.78rem; font-weight: 600; color: #e87722;
  min-width: 42px; text-align: right;
}
body.dark .anim-time-label { color: #e87722; }
.radar-btn {
  padding: 6px 16px; border: 1.5px solid #e87722;
  border-radius: 20px; background: transparent;
  color: #e87722; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.radar-btn.active, .radar-btn:hover {
  background: #e87722; color: #fff;
}
#radar-map {
  width: 100%; height: 480px;
  border-radius: 0 0 12px 12px;
}
body.dark .radar-btn { border-color: #e87722; color: #e87722; }
body.dark .radar-btn.active, body.dark .radar-btn:hover { background: #e87722; color: #fff; }

/* ─── RADAR LEGEND ───────────────────────────────────────── */
.radar-legend {
  padding: 0 20px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.legend-label {
  font-size: 0.78rem; font-weight: 600; color: #666;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.legend-bar {
  height: 14px; border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}
.legend-stops {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: #888;
}
body.dark .legend-label { color: #aaa; }
body.dark .legend-stops { color: #888; }
body.dark .legend-bar { border-color: rgba(255,255,255,0.08); }

/* ─── WEATHER ANIMATIONS ─────────────────────────────────── */
.current-weather-card { position: relative; overflow: hidden; }
.weather-anim {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
  border-radius: 12px; z-index: 0;
}
.current-weather-card .cw-top,
.current-weather-card .cw-bottom { position: relative; z-index: 1; }

/* Rain */
.anim-rain { background: linear-gradient(135deg, rgba(100,140,220,0.07) 0%, transparent 60%); }
.anim-storm { background: linear-gradient(135deg, rgba(40,40,80,0.1) 0%, transparent 60%); }
.rain-drop {
  position: absolute; top: -20px; width: 1.5px;
  background: linear-gradient(to bottom, transparent, rgba(130,170,255,0.75));
  border-radius: 2px;
  animation: rain-fall linear infinite;
}
@keyframes rain-fall {
  0%   { transform: translateY(0) rotate(8deg); opacity: 1; }
  100% { transform: translateY(200px) rotate(8deg); opacity: 0.4; }
}

/* Lightning */
.lightning {
  position: absolute; inset: 0;
  background: rgba(255,255,200,0.18);
  opacity: 0;
  animation: lightning-flash 4.5s ease-in-out infinite;
}
@keyframes lightning-flash {
  0%,88%,92%,96%,100% { opacity: 0; }
  89%,91%,94%,95% { opacity: 1; }
}

/* Snow */
.anim-snow { background: linear-gradient(135deg, rgba(200,220,255,0.08) 0%, transparent 60%); }
.snow-flake {
  position: absolute; top: -20px;
  color: rgba(190,215,255,0.85);
  animation: snow-fall linear infinite;
}
@keyframes snow-fall {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
  50%  { transform: translateY(50%) translateX(18px) rotate(180deg); opacity: 0.85; }
  100% { transform: translateY(115%) translateX(-10px) rotate(360deg); opacity: 0; }
}

/* Clear / Sun */
.anim-sun { background: radial-gradient(circle at 85% 15%, rgba(255,210,50,0.12) 0%, transparent 55%); }
.sun-circle {
  position: absolute; right: 28px; top: 18px;
  width: 56px; height: 56px;
  background: radial-gradient(circle, rgba(255,225,70,0.55), rgba(255,180,30,0.15));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: sun-pulse 3.5s ease-in-out infinite;
}
.sun-rays {
  position: absolute; width: 88px; height: 88px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,210,50,0.22) 0deg, transparent 10deg, transparent 30deg);
  animation: sun-rotate 14s linear infinite;
}
@keyframes sun-pulse {
  0%,100% { box-shadow: 0 0 18px rgba(255,210,50,0.3); transform: scale(1); }
  50%      { box-shadow: 0 0 36px rgba(255,210,50,0.5); transform: scale(1.1); }
}
@keyframes sun-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Clear Night / Stars */
.anim-night { background: radial-gradient(circle at 75% 25%, rgba(80,90,180,0.08) 0%, transparent 60%); }
.star {
  position: absolute;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  animation: star-twinkle ease-in-out infinite;
}
@keyframes star-twinkle {
  0%,100% { opacity: 0.25; transform: scale(1); }
  50%     { opacity: 1;    transform: scale(1.6); }
}

/* Clouds */
.anim-clouds { background: linear-gradient(135deg, rgba(160,175,200,0.07) 0%, transparent 60%); }
.cloud-shape {
  position: absolute; left: -140px;
  width: 130px; height: 44px;
  background: rgba(175,190,215,0.45);
  border-radius: 50px;
  animation: cloud-drift linear infinite;
}
.cloud-shape::before {
  content: ''; position: absolute; top: -22px; left: 18px;
  width: 64px; height: 54px;
  background: rgba(175,190,215,0.45); border-radius: 50%;
}
.cloud-shape::after {
  content: ''; position: absolute; top: -14px; left: 52px;
  width: 44px; height: 38px;
  background: rgba(175,190,215,0.4); border-radius: 50%;
}
@keyframes cloud-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 220px)); }
}

/* Fog */
.anim-fog { background: rgba(200,205,220,0.06); }
.fog-layer {
  position: absolute; left: -100%;
  width: 300%; height: 22px;
  background: linear-gradient(to right, transparent, rgba(200,205,225,0.5), transparent);
  border-radius: 50%;
  animation: fog-drift ease-in-out infinite alternate;
}
@keyframes fog-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(8%); }
}

/* Dark mode tweaks */
body.dark .cloud-shape,
body.dark .cloud-shape::before,
body.dark .cloud-shape::after { background: rgba(100,115,140,0.35); }
body.dark .rain-drop { background: linear-gradient(to bottom, transparent, rgba(100,140,220,0.7)); }
body.dark .snow-flake { color: rgba(180,200,240,0.8); }

/* ─── TEAM PAGE ──────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 8px 0 4px;
}
.member-card {
  display: flex; flex-direction: column; align-items: center;
  background: #f7f9fc;
  border-radius: 14px; padding: 24px 16px 20px;
  border: 1px solid #eaeef4;
  transition: transform 0.2s, box-shadow 0.2s;
}
.member-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.09);
}
.member-photo-wrap {
  position: relative;
  width: 100px; height: 100px;
  border-radius: 50%; overflow: hidden;
  margin-bottom: 16px;
  border: 3px solid #e87722;
  background: #eef2f7;
  display: flex; align-items: center; justify-content: center;
}
.member-photo {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.member-photo-placeholder {
  font-size: 2.2rem; color: #bbb;
}
.member-name {
  font-size: 1rem; font-weight: 700;
  color: #1a1a2e; text-align: center;
  margin-bottom: 6px;
}
.member-index {
  font-size: 0.82rem; font-weight: 500;
  color: #e87722; letter-spacing: 0.5px;
  background: rgba(232,119,34,0.1);
  padding: 3px 12px; border-radius: 20px;
}

body.dark .member-card { background: #1e2130; border-color: #2a2f45; }
body.dark .member-name { color: #e8eaf0; }
body.dark .member-photo-wrap { border-color: #e87722; background: #252a3a; }
body.dark .member-photo-placeholder { color: #555; }

@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ─── AUTOCOMPLETE ───────────────────────────────────────── */
.autocomplete-dropdown {
  position: absolute; left: 0; right: 0; top: 42px;
  background: #fff; border: 1px solid #e0e0e0;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200; overflow: hidden; max-height: 240px; overflow-y: auto;
}
.ac-item {
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid #f5f5f5; transition: background 0.15s;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.selected { background: #fff7f0; }
.ac-name { font-size: 0.88rem; color: #1a1a2e; }
body.dark .autocomplete-dropdown { background: #1e2130; border-color: #2a2d40; }
body.dark .ac-item { border-bottom-color: #2a2d40; }
body.dark .ac-item:hover, body.dark .ac-item.selected { background: #252840; }
body.dark .ac-name { color: #e0e0e0; }

/* ─── HOURLY STRIP ───────────────────────────────────────── */
#hourly-card { overflow: hidden; }
.hourly-strip {
  display: flex; gap: 3px; overflow-x: auto;
  padding: 2px 0 6px; scrollbar-width: thin;
  width: 100%;
}
.hourly-strip::-webkit-scrollbar { height: 3px; }
.hourly-strip::-webkit-scrollbar-track { background: transparent; }
.hourly-strip::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.hourly-item {
  display: flex; flex-direction: column; align-items: center;
  min-width: 40px; padding: 5px 3px; border-radius: 7px;
  background: #f8fafc; flex-shrink: 0; transition: background 0.2s;
}
.hourly-item.hourly-now { background: #fff3e8; border: 1.5px solid #e87722; }
.hourly-time { font-size: 0.6rem; color: #888; font-weight: 500; margin-bottom: 3px; }
.hourly-now .hourly-time { color: #e87722; font-weight: 700; }
.hourly-icon { font-size: 1rem; margin-bottom: 2px; }
.hourly-precip { font-size: 0.58rem; color: #4a90d9; min-height: 12px; margin-bottom: 1px; }
.hourly-temp { font-size: 0.75rem; font-weight: 700; color: #1a1a2e; }
body.dark .hourly-item { background: #252840; }
body.dark .hourly-item.hourly-now { background: #2d2010; border-color: #e87722; }
body.dark .hourly-time { color: #6b7280; }
body.dark .hourly-temp { color: #f0f0f0; }

/* ─── 10-DAY FORECAST ────────────────────────────────────── */
.tenday-list {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 320px; overflow-y: auto;
  scrollbar-width: thin;
}
.tenday-list::-webkit-scrollbar { width: 4px; }
.tenday-list::-webkit-scrollbar-track { background: transparent; }
.tenday-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.tenday-row {
  display: grid; grid-template-columns: 60px 36px 1fr 60px 200px;
  align-items: center; gap: 12px; padding: 7px 8px;
  border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.tenday-row:hover { background: #f8fafc; }
.tenday-row.tenday-selected { background: #fff3e8; }
.td-day { font-size: 0.85rem; font-weight: 600; color: #1a1a2e; }
.td-icon { font-size: 1.4rem; text-align: center; }
.td-desc { font-size: 0.78rem; color: #666; }
.td-precip { font-size: 0.72rem; color: #4a90d9; text-align: right; }
.td-precip-val { white-space: nowrap; }
.td-temps { display: flex; align-items: center; gap: 8px; }
.td-min { font-size: 0.82rem; color: #888; font-weight: 500; min-width: 28px; text-align: right; }
.td-max { font-size: 0.82rem; color: #1a1a2e; font-weight: 700; min-width: 28px; }
.td-bar-wrap { flex: 1; height: 6px; background: #e8eef4; border-radius: 3px; position: relative; }
.td-bar { position: absolute; height: 100%; background: linear-gradient(to right, #4a90d9, #e87722); border-radius: 3px; }
body.dark .tenday-row:hover { background: #252840; }
body.dark .tenday-row.tenday-selected { background: #2d2010; }
body.dark .td-day { color: #f0f0f0; }
body.dark .td-desc { color: #9ca3af; }
body.dark .td-max { color: #f0f0f0; }
body.dark .td-min { color: #6b7280; }
body.dark .td-bar-wrap { background: #2a2d40; }
@media (max-width: 600px) {
  .tenday-row { grid-template-columns: 48px 30px 1fr 48px 120px; gap: 6px; }
  .td-desc { display: none; }
}

/* ─── MOON CARD ───────────────────────────────────────────── */
.moon-card-full { padding: 0 !important; overflow: hidden; }
.moon-img-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 320px; overflow: hidden; background: #03050e; }
.moon-real-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: none; transition: opacity 0.3s; }
.moon-real-img.loaded { display: block; }
.moon-img-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; background: #03050e; transition: opacity 0.3s; }
.moon-overlay-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 16px 12px; background: linear-gradient(transparent, rgba(3,5,14,0.85)); }
.moon-phase-name { font-size: 1rem; font-weight: 700; color: #fff; }
.moon-date-label { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* Day scrubber */
.moon-day-bar { display: flex; border-bottom: 1px solid #f0f0f0; }
.moon-day-btn { flex: 1; padding: 8px 4px; text-align: center; cursor: pointer; font-size: 0.7rem; font-weight: 600; color: #888; border: none; background: none; transition: background 0.15s, color 0.15s; }
.moon-day-btn:hover { background: #f5f5f5; color: #333; }
.moon-day-btn.active { color: #e87722; border-bottom: 2px solid #e87722; }
.moon-day-btn .mdb-emoji { font-size: 1rem; display: block; margin-bottom: 2px; }

/* Hour slider */
.moon-hour-wrap { padding: 10px 16px 4px; }
.moon-hour-slider { width: 100%; accent-color: #e87722; cursor: pointer; }
.moon-hour-labels { display: flex; justify-content: space-between; font-size: 0.6rem; color: #aaa; margin-top: 2px; padding: 0 2px; }

.moon-details { padding: 4px 16px 12px; }
.moon-detail-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: #555; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.moon-detail-row:last-child { border-bottom: none; }
.moon-detail-row strong { color: #1a1a2e; font-weight: 600; }

body.dark .moon-day-bar { border-bottom-color: #2a2d40; }
body.dark .moon-day-btn { color: #6b7280; }
body.dark .moon-day-btn:hover { background: #252840; color: #ccc; }
body.dark .moon-day-btn.active { color: #e87722; }
body.dark .moon-detail-row { color: #9ca3af; border-bottom-color: #2a2d40; }
body.dark .moon-detail-row strong { color: #f0f0f0; }
body.dark .moon-hour-labels { color: #4b5563; }
.moon-left { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
#moon-canvas { border-radius: 50%; background: #0a0e1a; box-shadow: 0 0 24px rgba(180,160,100,0.18); }
.moon-right { flex: 1; }
.moon-phase-name { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; margin-bottom: 2px; }
.moon-date-label { font-size: 0.78rem; color: #888; margin-bottom: 12px; }
.moon-details { display: flex; flex-direction: column; gap: 6px; }
.moon-detail-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: #555; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.moon-detail-row strong { color: #1a1a2e; font-weight: 600; }
.moon-weekly { padding: 12px 0 0; border-top: 1px solid #f0f0f0; }

/* Day selector row */
.moon-scrubber-days { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid #e8e8e8; margin-bottom: 8px; }
.msc-day { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 2px; cursor: pointer; transition: background 0.15s; gap: 2px; }
.msc-day:hover { background: #f5f5f5; }
.msc-day.msc-selected { background: #1a1a2e; }
.msc-day-label { font-size: 0.6rem; font-weight: 700; color: #888; letter-spacing: 0.02em; }
.msc-day.msc-selected .msc-day-label { color: #e87722; }
.msc-day-emoji { font-size: 1.1rem; }

/* Hour bar */
.moon-hour-bar { display: flex; align-items: flex-end; gap: 0; background: #f8fafc; border-radius: 6px; padding: 4px 4px 0; overflow: hidden; }
.msc-hour { flex: 1; display: flex; flex-direction: column; align-items: center; cursor: pointer; padding-bottom: 4px; position: relative; }
.msc-tick { width: 1px; height: 8px; background: #ccc; margin-bottom: 2px; border-radius: 1px; }
.msc-hour:nth-child(6n+1) .msc-tick { height: 14px; background: #aaa; }
.msc-hour-sel .msc-tick { background: #e87722; height: 16px; width: 2px; }
.msc-hour-now .msc-tick { background: #4a90d9; }
.msc-hlabel { font-size: 0.5rem; color: #aaa; position: absolute; bottom: 0; white-space: nowrap; }
.msc-hour-sel .msc-hlabel { color: #e87722; font-weight: 700; font-size: 0.55rem; }

body.dark .moon-phase-name { color: #f0f0f0; }
body.dark .moon-date-label { color: #6b7280; }
body.dark .moon-detail-row { color: #9ca3af; border-bottom-color: #2a2d40; }
body.dark .moon-detail-row strong { color: #f0f0f0; }
body.dark .moon-weekly { border-top-color: #2a2d40; }
body.dark .moon-scrubber-days { border-color: #2a2d40; }
body.dark .msc-day:hover { background: #252840; }
body.dark .msc-day.msc-selected { background: #1a1a2e; }
body.dark .moon-hour-bar { background: #1e2130; }
body.dark .msc-tick { background: #3a3d50; }
body.dark #moon-canvas { box-shadow: 0 0 28px rgba(200,180,120,0.25); }
