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

/* ── BODY ───────────────────────────────────────────────────────────────────── */
body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  background: #0a0608;
  overflow-x: hidden;
}

/* ── PARTICLE LAYER ─────────────────────────────────────────────────────────── */
.particles-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ── APP SHELL ──────────────────────────────────────────────────────────────── */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  padding: 2.5rem 1.5rem 14rem; /* bottom space for landscape */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;

  /* Default: African night sky — deep, warm, not cold */
  background-image: linear-gradient(
    135deg,
    #0e0804 0%, #1a1008 17%, #241608 34%,
    #1e1206 50%, #160e06 67%, #0e0a04 84%, #08060202 100%
  );
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
  transition: background-image 1.8s ease, color 0.8s ease;
  color: #f0ede8;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 30%; }
  50%       { background-position: 100% 70%; }
}

/* ── HEADER ─────────────────────────────────────────────────────────────────── */
.app-header {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0.95;
  text-shadow: 0 2px 20px rgba(255,150,50,0.3);
}

.search-container {
  flex: 1;
  display: flex;
  border-radius: 50px;
  overflow: hidden;
  background: rgba(255, 200, 100, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 180, 80, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-container:focus-within {
  border-color: rgba(255, 180, 80, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 160, 50, 0.1);
}

.search-container input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.85rem 1.4rem;
  color: inherit;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
}

.search-container input::placeholder { opacity: 0.45; }

.search-container button {
  background: rgba(255, 180, 80, 0.15);
  border: none;
  padding: 0 1.2rem;
  color: inherit;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
}

.search-container button:hover { background: rgba(255, 180, 80, 0.3); }

/* ── WEATHER ICON ───────────────────────────────────────────────────────────── */
.icon-wrap {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 40px rgba(255,150,50,0.25));
}

.weather-svg {
  width: 100%;
  height: 100%;
  animation: breathe 3.8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.07); }
}

/* Sun */
.sun-core  { animation: sunPulse 3.8s ease-in-out infinite; transform-origin: 60px 60px; }
.sun-aura  { animation: auraExpand 3.8s ease-in-out infinite; transform-origin: 60px 60px; }
.sun-aura2 { animation: auraExpand 3.8s ease-in-out infinite 0.6s; transform-origin: 60px 60px; }
.sun-inner { animation: sunPulse 3.8s ease-in-out infinite reverse; transform-origin: 60px 60px; }
.sun-rays  { animation: spin 28s linear infinite; transform-origin: 60px 60px; }

@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.14); opacity: 0.88; }
}
@keyframes auraExpand {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%       { transform: scale(1.22); opacity: 0.45; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Clouds */
.cloud-front { animation: cloudFloat 5.5s ease-in-out infinite; }
.cloud-back  { animation: cloudFloat 5.5s ease-in-out infinite 2s; }
.cloud-body  { animation: cloudFloat 5.5s ease-in-out infinite; }

@keyframes cloudFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Rain drops */
.drop.d1 { animation: rainfall 1.5s ease-in infinite 0s; }
.drop.d2 { animation: rainfall 1.5s ease-in infinite 0.38s; }
.drop.d3 { animation: rainfall 1.5s ease-in infinite 0.76s; }
.drop.d4 { animation: rainfall 1.5s ease-in infinite 1.12s; }
.drop.d5 { animation: drizzleFall 2.2s ease-in infinite 0.2s; }
.drop.d6 { animation: drizzleFall 2.2s ease-in infinite 1.1s; }
.drop.d7 { animation: drizzleFall 2.2s ease-in infinite 1.8s; }

@keyframes rainfall {
  0%   { opacity: 0; transform: translateY(-8px); }
  20%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(22px); }
}
@keyframes drizzleFall {
  0%   { opacity: 0; transform: translateY(-5px) scale(0.6); }
  25%  { opacity: 0.85; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(18px) scale(0.8); }
}

/* Lightning */
.lightning { animation: flash 4.5s ease-in-out infinite; }
@keyframes flash {
  0%, 78%, 100%  { opacity: 0; filter: none; }
  80%, 84%       { opacity: 1; filter: drop-shadow(0 0 12px #f4e03c) drop-shadow(0 0 28px rgba(244,224,60,0.5)); }
  82%            { opacity: 0.3; }
}

/* Snowflakes */
.flake.f1 { animation: snowFloat 3.2s ease-in-out infinite 0s; }
.flake.f2 { animation: snowFloat 3.2s ease-in-out infinite 0.8s; }
.flake.f3 { animation: snowFloat 3.2s ease-in-out infinite 1.6s; }
.flake.f4 { animation: snowFloat 3.2s ease-in-out infinite 2.4s; }
@keyframes snowFloat {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  20%  { opacity: 1; }
  80%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(20px) rotate(200deg); }
}

/* Mist */
.mist-line.ml1 { animation: mistDrift 5.5s ease-in-out infinite 0s; }
.mist-line.ml2 { animation: mistDrift 5.5s ease-in-out infinite 1.1s reverse; }
.mist-line.ml3 { animation: mistDrift 5.5s ease-in-out infinite 2.2s; }
.mist-line.ml4 { animation: mistDrift 5.5s ease-in-out infinite 3.3s reverse; }
.mist-line.ml5 { animation: mistDrift 5.5s ease-in-out infinite 4.4s; }
@keyframes mistDrift {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50%       { transform: translateX(12px); opacity: 1; }
}

/* Fog */
.fog-line.fl1 { animation: fogDrift 8s ease-in-out infinite 0s; }
.fog-line.fl2 { animation: fogDrift 8s ease-in-out infinite 1.6s reverse; }
.fog-line.fl3 { animation: fogDrift 8s ease-in-out infinite 3.2s; }
.fog-line.fl4 { animation: fogDrift 8s ease-in-out infinite 4.8s reverse; }
.fog-line.fl5 { animation: fogDrift 8s ease-in-out infinite 6.4s; }
@keyframes fogDrift {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50%       { transform: translateX(18px); opacity: 0.9; }
}

/* ── POEM / QUOTE ───────────────────────────────────────────────────────────── */
.poem {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.55rem;
  line-height: 1.7;
  text-align: center;
  max-width: 540px;
  opacity: 0.92;
  min-height: 3.5rem;
  transition: opacity 0.5s ease;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.poem.fading { opacity: 0; }

/* ── WEATHER CARD ───────────────────────────────────────────────────────────── */
.card {
  display: none;
  width: 100%;
  max-width: 640px;
  background: rgba(255, 200, 100, 0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 30px;
  padding: 2.2rem 2.5rem;
  border: 1px solid rgba(255, 180, 80, 0.15);
  box-shadow: 0 12px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,200,100,0.08);
  transition: opacity 0.3s;
}

.card.loading { opacity: 0.4; pointer-events: none; }
.card-location { margin-bottom: 1rem; }

.card h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

#mood-label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 0.45rem;
}

.temp-row {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 180, 80, 0.12);
}

#temp {
  font-family: "Cormorant Garamond", serif;
  font-size: 5.2rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -3px;
}

.temp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 0.5rem;
}

#weather-desc {
  font-size: 0.95rem;
  opacity: 0.78;
  text-transform: capitalize;
}

#current-date {
  font-size: 0.76rem;
  opacity: 0.42;
  font-weight: 300;
}

.details {
  display: flex;
  gap: 1.6rem;
  font-size: 0.84rem;
  opacity: 0.6;
}

/* ── SUGGESTIONS ────────────────────────────────────────────────────────────── */
.suggestions {
  display: none;
  width: 100%;
  max-width: 640px;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.suggestion-block {
  background: rgba(255, 190, 80, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 22px;
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(255, 180, 80, 0.12);
  transition: transform 0.35s ease, background 0.35s ease;
  min-height: 120px;
}

.suggestion-block:hover {
  transform: translateY(-5px);
  background: rgba(255, 190, 80, 0.1);
}

.suggestion-block h3 {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 0.8rem;
}

.suggestion-block p {
  font-size: 0.88rem;
  line-height: 1.72;
  opacity: 0.88;
  transition: opacity 0.48s ease;
  min-height: 2.5rem;
}

.suggestion-block p.fading { opacity: 0; }

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
.app-footer {
  font-size: 0.75rem;
  opacity: 0.3;
  text-align: center;
  font-weight: 300;
}
.app-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.7;
}

/* ── AFRICAN LANDSCAPE SILHOUETTE ───────────────────────────────────────────── */
.landscape-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 10;
  height: 220px;
}

.landscape-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── PARTICLES ──────────────────────────────────────────────────────────────── */
.particle { position: absolute; pointer-events: none; }

/* Stars */
.p-star {
  width: 2px;
  height: 2px;
  background: rgba(255, 245, 220, 0.9);
  border-radius: 50%;
  animation: twinkle ease-in-out infinite;
  box-shadow: 0 0 3px rgba(255,245,200,0.6);
}
@keyframes twinkle {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50%       { opacity: 0.15; transform: scale(0.5); }
}

/* Shooting star */
.shooting-star {
  position: absolute;
  width: 120px;
  height: 1.5px;
  background: linear-gradient(to right, transparent, rgba(255,240,180,0.9), transparent);
  border-radius: 2px;
  animation: shoot linear forwards;
  transform: rotate(-25deg);
  transform-origin: left center;
}
@keyframes shoot {
  0%   { transform: rotate(-25deg) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  70%  { opacity: 0.8; }
  100% { transform: rotate(-25deg) translateX(300px); opacity: 0; }
}

/* Rain */
.p-rain, .p-storm {
  width: 1.5px;
  height: 24px;
  background: linear-gradient(to bottom, transparent, rgba(130,185,230,0.65));
  border-radius: 2px;
  animation: pRain linear infinite;
}
.p-storm {
  background: linear-gradient(to bottom, transparent, rgba(100,130,210,0.7));
  height: 28px;
}
@keyframes pRain {
  0%   { transform: translateY(-30px) rotate(12deg); opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(110vh) rotate(12deg); opacity: 0; }
}

/* Drizzle */
.p-drizzle {
  width: 3.5px;
  height: 3.5px;
  background: rgba(130,200,160,0.55);
  border-radius: 50%;
  animation: pDrizzle ease-in infinite;
}
@keyframes pDrizzle {
  0%   { transform: translateY(-20px); opacity: 0; }
  12%  { opacity: 0.8; }
  88%  { opacity: 0.6; }
  100% { transform: translateY(110vh); opacity: 0; }
}

/* Snow */
.p-snow {
  width: 5px;
  height: 5px;
  background: rgba(215,232,255,0.78);
  border-radius: 50%;
  animation: pSnow ease-in infinite;
}
@keyframes pSnow {
  0%   { transform: translateY(-20px) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translateY(50vh) translateX(18px); }
  90%  { opacity: 0.75; }
  100% { transform: translateY(110vh) translateX(-12px); opacity: 0; }
}

/* Sparkle (African fireflies / sunset dust) */
.p-sparkle {
  width: 5px;
  height: 5px;
  background: rgba(255,210,60,0.8);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,200,50,0.5);
  animation: pSparkle ease-out infinite;
}
@keyframes pSparkle {
  0%   { transform: translateY(0) scale(0.3); opacity: 0; }
  20%  { opacity: 1; transform: translateY(-20px) scale(1); }
  60%  { opacity: 0.5; }
  100% { transform: translateY(-75px) scale(0.2); opacity: 0; }
}

/* Mist */
.p-mist {
  width: 90px;
  height: 9px;
  background: rgba(100,175,130,0.15);
  border-radius: 12px;
  filter: blur(5px);
  animation: pMist ease-in-out infinite alternate;
}
@keyframes pMist {
  0%   { transform: translateX(-22px); opacity: 0.22; }
  100% { transform: translateX(22px); opacity: 0.62; }
}

/* Fog */
.p-fog {
  width: 130px;
  height: 12px;
  background: rgba(140,140,140,0.13);
  border-radius: 14px;
  filter: blur(7px);
  animation: pFog ease-in-out infinite alternate;
}
@keyframes pFog {
  0%   { transform: translateX(-28px); opacity: 0.16; }
  100% { transform: translateX(28px); opacity: 0.45; }
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .app-header { flex-direction: column; align-items: stretch; gap: 0.8rem; }
  .brand { text-align: center; }
  .suggestions { grid-template-columns: 1fr; }
  .card h1 { font-size: 2.5rem; }
  #temp { font-size: 4rem; }
  .icon-wrap { width: 150px; height: 150px; }
  .poem { font-size: 1.3rem; }
  .landscape-wrap { height: 150px; }
  .app { padding-bottom: 10rem; }
}
