* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background: #08101d;
  color: #fff;
  overflow-x: hidden;
}

button, input {
  font: inherit;
}

/* ================= BACKGROUND ================= */
.wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  transition: opacity 0.5s ease;
}

/* Overlay gradient to make text legible */
.wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 16, 29, 0.5) 0%, rgba(8, 16, 29, 0.75) 100%);
  z-index: -1;
  pointer-events: none;
}

/* ================= LAYOUT ================= */
.app-container {
  display: flex;
  gap: 2rem;
  width: 100%;
  max-width: 1300px;
  height: min(850px, 90vh);
}

.sidebar {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ================= SIDEBAR ELEMENTS ================= */
.logo {
  font-size: 1.8rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 1.5rem;
}

.card-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.status-chart {
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  padding: 1rem;
  position: relative;
  height: 120px;
  margin-bottom: 1rem;
}

.status-indicator {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.1);
  padding: 4px 8px;
  border-radius: 12px;
}
.status-badge {
  background: #fff;
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 10px;
}
.status-icon {
  position: absolute;
  top: 15px;
  right: 15px;
}
.status-svg {
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 60px;
}

.see-more-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  transition: color 0.3s;
}
.see-more-link:hover { color: #fff; text-decoration: underline;}

.map-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.map-header {
  display: flex;
  justify-content: space-between;
}
.map-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  margin-left: 4px;
}
.map-dots span.active { background: #fff; }

.globe-proxy {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}
.globe {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 35% 35%, rgba(200,200,200,0.1) 0%, rgba(0,0,0,0.8) 70%),
    radial-gradient(circle at 50% 90%, rgba(217, 119, 54, 0.7) 0%, transparent 65%);
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.7), 0 10px 30px rgba(0,0,0,0.4);
}
.globe-point {
  width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 8px #fff;
}
.p1 { top: 35%; left: 30%; }
.p2 { top: 65%; left: 60%; width: 8px; height: 8px; }
.p3 { top: 50%; left: 45%; }
.map-location {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-top: 1.5rem;
}

/* ================= MAIN CONTENT ================= */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.nav-location {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-date { color: rgba(255,255,255,0.6); }
.nav-actions { display: flex; gap: 1rem; }
.btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.2); }
.nav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  padding: 0;
}
.download-btn { width: auto; border-radius: 20px; padding: 0 20px; }

/* ================= SEARCH DROPDOWN ================= */
.search-panel {
  background: rgba(10, 20, 35, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 24px;
  position: absolute;
  top: 60px; right: 0;
  width: 400px;
  z-index: 100;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.4);
}
.hidden { display: none !important; }

.form-container { display: flex; gap: 8px; margin-bottom: 1.5rem; align-items: stretch;}
.search-input-group { flex: 1; position: relative; min-width: 0; }
.search-input-group input { width: 100%; height: 100%; background: rgba(255,255,255,0.1); border: none; padding: 12px 15px; border-radius: 12px; color: #fff; outline: none; }
.icon-btn, .search-btn {
  padding: 0;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  flex-shrink: 0;
}
.autocomplete-list {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0;
  background: #111; z-index: 50; display: none;
  border-radius: 12px; overflow: hidden; border:1px solid #333;
}
.autocomplete-list.active { display: block; }
.suggestion-item {
  width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid #333; padding: 10px; color: #fff; cursor: pointer;
}
.suggestion-item:hover { background: #222; }
.quick-actions { display: flex; gap: 10px; justify-content: center; }
.toolbar-btn { background: rgba(255,255,255,0.1); border: none; color: #fff; padding: 8px 16px; border-radius: 12px; cursor: pointer; }
.toolbar-btn.active { background: #38bdf8; }

/* ================= HERO SECTION ================= */
.weather-dashboard { flex: 1; display:flex; flex-direction:column; }
.weather-dashboard:not(.active) { display: none; }
.hero-section {
  display: flex;
  gap: 2rem;
  margin-bottom: auto;
}
.hero-left { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.temp-block { display: flex; align-items: flex-end; gap: 1.5rem; margin-bottom: 1rem; }
.huge-temp { font-size: clamp(6rem, 8vw, 8.5rem); font-weight: 300; line-height: 0.9; text-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.high-low { display: flex; flex-direction: column; gap: 0.4rem; font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 0.5rem; }
.hl-btn { border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; padding: 1px 6px; font-size:0.8rem; opacity:0.8; }
.hl-val { font-weight: 500; color: #fff; }

.weather-desc { font-size: clamp(2rem, 3.5vw, 3.5rem); font-weight: 400; line-height: 1.1; color: rgba(255,255,255,0.95); margin-bottom: 1rem; text-transform: capitalize;}
.modal-btn { background: rgba(255,255,255,0.1); border: none; color:#fff; border-radius:50%; width: 34px; height: 34px; cursor:pointer;}
.modal-btn:hover { background: rgba(255,255,255,0.2); }

.hero-right { flex: 1.1; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.flavor-text { font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,0.7); max-width: 400px; text-align: left; margin-bottom: 3rem; margin-top:2rem;}
.recent-searches { width: 100%; max-width:550px;}
.recent-header { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.see-all { color: #fff; text-decoration: none; transition: 0.3s; }
.see-all:hover { opacity: 0.7;}
.recent-cards { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 10px; }
.recent-cards::-webkit-scrollbar { height: 6px; }
.recent-cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.r-card {
  min-width: 200px; background: rgba(255,255,255,0.06); border-radius: 24px; padding: 1.2rem;
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15); cursor:pointer; transition:0.3s;
}
.r-card:hover { transform:translateY(-4px); background:rgba(255,255,255,0.1); }
.r-info p { font-size: 1.15rem; font-weight: 500; margin-bottom: 4px; }
.r-info span { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.r-visual { display: flex; flex-direction:column; align-items:flex-end; gap:2px; }
.r-visual img { width: 44px; }
.r-visual strong { font-size: 1.3rem; font-weight: 400; }

/* ================= 5-DAY GRAPH ================= */
.forecast-section {
  width: 100%;
  margin-top: auto;
  position: relative;
  padding-bottom: 1rem;
}
.forecast-labels, .forecast-temps {
  display: flex; justify-content: space-between; padding: 0 5%;
  color: rgba(255,255,255,0.8); font-size: 1.05rem; z-index: 2;
}
.forecast-labels { margin-bottom: -15px; }
.forecast-temps { margin-top: -15px; font-size: 1.3rem; font-weight: 600;}

.forecast-graph { width: 100%; height: 140px; position: relative; }
.weekly-curve { width: 100%; height: 100%; overflow: visible; stroke-linecap:round;}

.curve-point { fill: #fff; cursor: pointer; transition:0.3s; opacity: 0.6; }
.curve-point:hover { r: 6; fill: #fff; opacity: 1;}
.curve-point.active { r: 7; fill: #fff; filter: drop-shadow(0 0 12px rgba(255,255,255,0.9)); opacity: 1; }

/* ================= MODAL ================= */
.details-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
  display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.details-modal[hidden] { display: none; }
.details-modal-content {
  background: rgba(15, 23, 42, 0.85); padding: 2rem; border-radius: 32px; width: 90%; max-width: 900px;
  max-height: 90vh; overflow-y: auto; border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.details-header { display:flex; justify-content: space-between; margin-bottom: 2rem; align-items:center; }
.close-modal { width: 36px; height: 36px; display:grid; place-items:center; background: rgba(255,255,255,0.1); border:none; color:#fff; border-radius:50%; font-size:16px; cursor:pointer;}

.parameter-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.2rem; margin-bottom: 2rem;}
.parameter { background: rgba(255,255,255,0.06); padding: 1.5rem 1rem; border-radius: 20px; text-align:center; border: 1px solid rgba(255,255,255,0.05); }
.parameter img { width: 44px; margin-bottom: 12px; }
.parameter p { font-size:0.9rem; color:rgba(255,255,255,0.7); margin-bottom:5px; }

.aqi-bar { width:100%; height:6px; background:rgba(255,255,255,0.2); border-radius:10px; margin-top:10px; overflow:hidden; }
.aqi-bar span { display:block; height:100%; width:0%; transition:1s ease; }

.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1.2rem; }
.detail-card { background: rgba(255,255,255,0.06); padding: 1.2rem; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.detail-card p { font-size:0.85rem; color:rgba(255,255,255,0.6); margin-bottom:5px;}
.detail-card strong { font-size:1.1rem; }

.sub-container { background: rgba(255,255,255,0.05); border-radius: 24px; padding: 2rem; text-align: center; margin: 2rem auto; backdrop-filter: blur(10px); }
