@import url('https://fonts.googleapis.com/css2?family=Balsamiq+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Commissioner:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&display=swap');

/* =========================================================
   GLOBAL RESET
========================================================= */

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

/* =========================================================
   DEFAULT / THEME VARIABLES
========================================================= */

:root {
  /* Accent */
  --accent: #65d9ff;
  --accent-2: #8b7cff;

  /* Text */
  --text-primary: #172033;
  --text-secondary: #374151;
  --text-muted: #6b7280;

  /* Glass */
  --glass: rgba(255, 255, 255, 0.48);
  --glass-border: rgba(255, 255, 255, 0.68);

  /* Input */
  --input-bg: rgba(255, 255, 255, 0.72);
  --input-text: #172033;
  --placeholder: #6b7280;

  /* Button */
  --button-bg: #172033;
  --button-text: #ffffff;
  --button-hover: #2d3a52;

  /* Shadows */
  --card-shadow: rgba(70, 45, 20, 0.18);

  /* Icons */
  --icon-color: #f59e0b;
}

/* =========================================================
   BODY
========================================================= */

body {
  min-height: 100vh;

  font-family: 'Comfortaa', cursive;

  color: var(--text-primary);

  background: linear-gradient(135deg, #f6d365, #fda085);

  overflow-x: hidden;

  position: relative;

  transition:
    background 1.5s ease,
    color 0.8s ease;
}

/* =========================================================
   🌞 DAY THEME
========================================================= */

body[data-time="day"] {
  --text-primary: #172033;
  --text-secondary: #374151;
  --text-muted: #5b6472;

  --glass: rgba(255, 255, 255, 0.48);
  --glass-border: rgba(255, 255, 255, 0.68);

  --input-bg: rgba(255, 255, 255, 0.72);
  --input-text: #172033;
  --placeholder: #6b7280;

  --button-bg: #172033;
  --button-text: #ffffff;
  --button-hover: #2d3a52;

  --card-shadow: rgba(70, 45, 20, 0.18);

  --icon-color: #f59e0b;
  --bg-color: rgba(246, 246, 250, 0.98);


  color: var(--text-primary);
}

/* =========================================================
   🌙 NIGHT THEME
========================================================= */

body[data-time="night"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;

  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);

  --input-bg: rgba(255, 255, 255, 0.08);
  --input-text: #f9fafb;
  --placeholder: #9ca3af;

  --button-bg: #f9fafb;
  --button-text: #111827;
  --button-hover: #dbe3ee;

  --card-shadow: rgba(0, 0, 0, 0.45);

  --icon-color: #facc15;
    
  --bg-color: rgba(20, 20, 30, 0.98);

  color: var(--text-primary);
}

/* locaton overlay */
/* =========================================================
   LOCATION PERMISSION OVERLAY
========================================================= */

.location-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    background: #ffffff;

    z-index: 999999;

    text-align: center;

    padding: 20px;
}

.location-loader {
    width: min(90%, 420px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.location-loader h2 {
    margin: 25px 0 10px;

    font-size: 1.5rem;
    font-weight: 700;

    color: #172033;
}

.location-loader p {
    margin: 0;

    max-width: 360px;

    font-size: 1rem;
    line-height: 1.6;

    color: #6b7280;
}

/* Spinner */

.spinner {
    width: 55px;
    height: 55px;

    border: 5px solid #e5e7eb;
    border-top-color: #172033;

    border-radius: 50%;

    animation: locationSpinner 0.8s linear infinite;
}

@keyframes locationSpinner {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
/* siggestion css
 */

.search-wrapper {
  position: relative;
  width: 100%;
  z-index: 9999;
}

#suggestions {
  position: absolute;
  top: calc(100% + 20px);
  left: 0px;
  right: 0;
  padding: 20px;

  display: none;

  background: rgba(20, 20, 30, 0.98);
  color: white;

  border-radius: 12px;

  overflow: hidden;

  z-index: 1;

  backdrop-filter: blur(10px);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  .suggestion-item{
    margin: 10px;
  }
}
/* =========================================
   CURRENT WEATHER AQI CIRCLE
========================================= */
.current-aqi {
  position: absolute;
  top: 1px;
  left: 1px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;

  z-index: 20;
}

.aqi-circle {
  width: 58px;
  height: 58px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: rgba(255, 255, 255, 0.25);

  border: 5px solid #22c55e;

  transition:
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    transform 0.3s ease;
}

.aqi-circle span {
  font-size: 16px;
  font-weight: 800;
  color: #172033;
}

#currentAqiLabel {
  font-size: 9px;
  font-weight: 700;
}
/* lightgreen — Good */
.aqi-circle.aqi-good {
  border-color: lightgreen;

  box-shadow:
    0 0 8px #22c55e,
    0 0 20px rgba(34, 197, 94, 0.6);

  animation: greenGlow 2s infinite;
}

/* green — Moderate */
.aqi-circle.aqi-moderate {
  border-color: green;

  box-shadow:
    0 0 8px #7fc910,
    0 0 20px rgba(144, 177, 100, 0.6);

  animation: greenGlow 2s infinite;
}

/* orange — Sensitive */
.aqi-circle.aqi-unhealthy {
  border-color: orange;

  box-shadow:
    0 0 8px #856c21,
    0 0 20px rgba(234, 179, 8, 0.6);

  animation: yellowGlow 2s infinite;
}

/* RED — Unhealthy */
.aqi-circle.aqi-danger {
  border-color: #a80202;

  box-shadow:
    0 0 10px #640303,
    0 0 25px rgba(239, 68, 68, 0.7);

  animation: redGlow 1.5s infinite;
}

/* =========================================
   AQI ANIMATIONS
========================================= */
@keyframes greenGlow {
  0%,
  100% {
    box-shadow: 0 0 8px #22c55e;
  }

  50% {
    box-shadow: 0 0 25px #22c55e;
  }
}

@keyframes orangeGlow {
  0%,
  100% {
    box-shadow: 0 0 8px #f97316;
  }

  50% {
    box-shadow: 0 0 25px #f97316;
  }
}

@keyframes yellowGlow {
  0%,
  100% {
    box-shadow: 0 0 8px #eab308;
  }

  50% {
    box-shadow: 0 0 25px #eab308;
  }
}

@keyframes redGlow {
  0%,
  100% {
    box-shadow: 0 0 10px #ef4444;
  }

  50% {
    box-shadow: 0 0 30px #ef4444;
  }
}
/* =====================================================
   SUNRISE / SUNSET
   ===================================================== */

.sun-times {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 35px;
  padding-top: 25px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  border-top:4px solid var(--glass-border);
  background: var(--glass);
  /* border-top: 1px solid var(--glass-border); */

  legend{
    font-weight: 900;
  }
}

.sun-time {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sun-time.sunrise {
  text-align: left;
}

.sun-time.sunset {
  text-align: right;
}

.sun-animation ,.moon-animation{
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  color: #fbbf24;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.7));
}

.sun-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sun-info span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sun-info strong {
  font-size: 1.05rem;
  color: var(--text-primary);
}


.sun-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.sun-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sun-time {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sun-column:last-child .sun-time {
    justify-content: flex-end;
}

/* .moon-animation {
    color:var(--icon-color);
    filter: drop-shadow(0 0 10px rgba(180, 190, 255, 0.45));
} */
.aqi-section {
  margin-top: 30px;
}

.aqi-card {
  padding: 25px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
}

.aqi-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 25px;
}

.aqi-icon {
  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  font-size: 25px;

  background: rgba(101, 217, 255, 0.15);

  animation: aqiPulse 2s ease-in-out infinite;
}

.aqi-main span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.aqi-main h3 {
  margin: 3px 0;
  font-size: 2rem;
}

.aqi-main p {
  margin: 0;
  color: var(--text-secondary);
}

.aqi-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.aqi-item {
  padding: 15px;

  border-radius: 14px;

  background: var(--glass);

  display: flex;
  flex-direction: column;
  gap: 5px;
}

.aqi-item span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.aqi-item strong {
  font-size: 1.2rem;
}

.aqi-item small {
  color: var(--text-secondary);
}

@keyframes aqiPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 700px) {
  .aqi-details {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   WEATHER BACKGROUNDS
========================================================= */

/* ---------- CLEAR ---------- */

body[data-time="day"][data-weather="clear"] {
  background: linear-gradient(135deg, #f6d365, #fda085);
}

body[data-time="night"][data-weather="clear"] {
  background: linear-gradient(135deg, #000000, #050505);
}

/* ---------- PARTLY CLOUDY ---------- */

body[data-time="day"][data-weather="partly-cloudy"] {
  background: linear-gradient(135deg, #8ec5e8, #f6d365);
}

body[data-time="night"][data-weather="partly-cloudy"] {
  background: linear-gradient(135deg, #101827, #26364d);
}

/* ---------- CLOUDY ---------- */

body[data-time="day"][data-weather="cloudy"] {
  background: linear-gradient(135deg, #9fb4c7, #d8e1e8);
}

body[data-time="night"][data-weather="cloudy"] {
  background: linear-gradient(135deg, #1b2533, #303b4b);
}

/* ---------- FOG ---------- */

body[data-time="day"][data-weather="fog"] {
  background: linear-gradient(135deg, #aebbc4, #dce3e7);
}

body[data-time="night"][data-weather="fog"] {
  background: linear-gradient(135deg, #171c22, #303841);
}

/* ---------- RAIN ---------- */

body[data-time="day"][data-weather="rain"] {
  background: linear-gradient(135deg, #5f7f98, #8faabd);
}

body[data-time="night"][data-weather="rain"] {
  background: linear-gradient(135deg, #0b1624, #1c3548);
}

/* ---------- SNOW ---------- */

body[data-time="day"][data-weather="snow"] {
  background: linear-gradient(135deg, #9ec5df, #e6f2f8);
}

body[data-time="night"][data-weather="snow"] {
  background: linear-gradient(135deg, #101923, #293b4d);
}

/* ---------- THUNDERSTORM ---------- */

body[data-time="day"][data-weather="storm"] {
  background: linear-gradient(135deg, #46566b, #69788a);
}

body[data-time="night"][data-weather="storm"] {
  background: linear-gradient(135deg, #070b12, #1b2432, #101722);
}

/* =========================================================
   ATMOSPHERIC BACKGROUND
========================================================= */

body::before,
body::after {
  content: "";

  position: fixed;

  width: 350px;
  height: 350px;

  border-radius: 50%;

  filter: blur(90px);

  opacity: 0.25;

  pointer-events: none;

  z-index: -2;
}

body::before {
  background: var(--accent);

  top: -120px;
  left: -120px;

  animation: floatGlow 8s ease-in-out infinite alternate;
}

body::after {
  background: var(--accent-2);

  bottom: -150px;
  right: -120px;

  animation: floatGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(60px, 40px) scale(1.2);
  }
}

/* =========================================================
   HEADER
========================================================= */

header {
  text-align: center;
  


  padding: 55px 20px 35px;

  animation: fadeDown 0.8s ease forwards;
}

header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);

  font-weight: 800;

  color: var(--text-primary);

  transition: color 0.6s ease;
}
header p {
  margin-top: 10px;

  color: var(--text-secondary);

  font-size: 0.95rem;
}


/* Day heading */

body[data-time="day"] header h1 {
  background: linear-gradient(90deg, #172033, #7c4a03, #172033);

  background-size: 200% auto;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: shineText 5s linear infinite;
}

/* Night heading */

body[data-time="night"] header h1 {
  background: linear-gradient(90deg, #ffffff, #65d9ff, #ffffff);

  background-size: 200% auto;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: shineText 5s linear infinite;
}


@keyframes shineText {
  to {
    background-position: 200% center;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   MAIN
========================================================= */

main {
  width: min(1200px, 92%);

  margin: auto;
}
nav{
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 2vh;
  margin: 0 auto;
  min-height: 10vh;
}
nav ul{
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-width: 80vw;
}
nav ul li{
  list-style: none;
  
}
nav a{
  color: var(--text-primary);
  text-decoration:none;

}

@media (max-width:650px) {
  nav ul{
    min-width: 80vw;
  }
  
}
/* =========================================================
   SEARCH
========================================================= */

.search-section {
  display: flex;

  justify-content: center;

  margin-bottom: 35px;
}

#searchForm {
  width: min(650px, 100%);

  display: flex;

  padding: 7px;

  background: var(--glass);

  border: 1px solid var(--glass-border);

  border-radius: 18px;

  backdrop-filter: blur(18px);

  box-shadow: 0 15px 40px var(--card-shadow);

  transition: 0.3s ease;
  position: relative;
}

#searchForm:focus-within {
  border-color: var(--icon-color);

  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.1),
    0 15px 45px var(--card-shadow);
}

#cityInput {
  flex: 1;

  border: none;

  outline: none;

  background: transparent;

  color: var(--input-text);

  padding: 15px 18px;

  font-size: 1rem;
}

#cityInput::placeholder {
  color: var(--placeholder);
}

#searchForm button {
  border: none;

  cursor: pointer;

  padding: 0 25px;

  border-radius: 13px;

  font-weight: 700;

  color: var(--button-text);

  background: var(--button-bg);
  position: absolute;
  right: 0;
  width: 30%;
  height: 80%;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.4s ease,
    color 0.4s ease;
}

#searchForm button:hover {
  transform: translateY(-2px);

  background: var(--button-hover);

  box-shadow: 0 8px 25px var(--card-shadow);
}

#searchForm button:active {
  transform: scale(0.96);
}

/* =========================================================
   ERROR
========================================================= */

#errorMessage {
  text-align: center;

  color: #991b1b;

  min-height: 24px;

  margin-bottom: 15px;
}

body[data-time="night"] #errorMessage {
  color: #fca5a5;
}

/* =========================================================
   SECTION HEADINGS
========================================================= */

section h2 {
  margin-bottom: 18px;

  font-size: 1.35rem;

  font-weight: 700;

  color: var(--text-primary);
}

/* =========================================================
   CURRENT WEATHER
========================================================= */

.current-weather {
  margin-bottom: 45px;
}

.weather-card {
  position: relative;

  overflow: hidden;

  padding: 35px;
  z-index: -1;

  border-radius: 28px;

  background: var(--glass);

  border: 1px solid var(--glass-border);

  backdrop-filter: blur(20px);

  box-shadow: 0 25px 60px var(--card-shadow);

  text-align: center;

  animation: cardAppear 0.8s ease;

  transition:
    background 0.8s ease,
    border-color 0.8s ease,
    box-shadow 0.8s ease;
}

.weather-card::before {
  content: "";

  position: absolute;

  width: 180px;
  height: 180px;

  background: rgba(101, 217, 255, 0.12);

  border-radius: 50%;

  filter: blur(40px);

  top: -90px;
  right: -50px;
}

.weather-card h3 {
  font-size: 2rem;

  position: relative;

  color: var(--text-primary);
}

#cityName{
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
}
#countryName {
  color: var(--text-secondary);

  margin-top: 6px;
}

#weatherIcon {
  font-size: 80px;
  display: flex;
  align-items: center;
  justify-content: center;

  margin: 20px 0;

  color: var(--icon-color);

  filter: drop-shadow(0 0 18px rgba(250, 204, 21, 0.55));

  animation: iconFloat 3s ease-in-out infinite;
}

#temperature {
  font-size: clamp(3.5rem, 10vw, 6rem);

  font-weight: 800;

  line-height: 1;

  color: var(--text-primary);

  transition: color 0.6s ease;
  text-shadow: 2px 2px 2px gray;
}

#feelsLike {
  margin-top: 12px;

  color: var(--text-secondary);
}
.bar_values{
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 10px;
 

  legend{
    font-weight: 900;
    font-size: small;
    margin-bottom: 10px;
  }

}


.humidity,.wind,.pressure{
  border: 1px solid var(--glass-border);
  border-top: 4px solid var(--glass-border);
  background: var(--glass);
  border-radius: 5px;

}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}


/* MOVING SUN */


/* ============================================================
   SUN & MOON TRACKER
   ============================================================ */

.sun-tracker ,.regional_time{
  width: 100%;

  margin-top: 20px;

  padding: 20px;

  border-radius: 20px;

  background: var(--glass);

  border: 1px solid var(--glass-border);

  backdrop-filter: blur(10px);

  -webkit-backdrop-filter: blur(10px);

  overflow: hidden;
  text-align: center;
}
.regional_time{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* ============================================================
   TRACKER TITLE
   ============================================================ */

.sun-tracker h3 {
  margin: 0 0 15px;

  text-align: center;

  font-size: 17px;

  font-weight: 600;
}

/* ============================================================
   MAIN TRACK AREA
   ============================================================ */

.sun-track {
  position: relative;

  width: 100%;

  height: 190px;

  overflow: hidden;
}

/* ============================================================
   SUN ARC
   ============================================================ */

.sun-path {
  position: absolute;

  width: 280px;

  height: 280px;

  left: 50%;

  bottom: -215px;

  transform: translateX(-50%);

  border: 2px dashed rgba(0, 0, 0, 0.28);

  border-radius: 50%;

  z-index: 1;
}

/* ============================================================
   MOON ARC
   ============================================================ */

.moon-path {
  position: absolute;

  width: 280px;

  height: 280px;

  left: 50%;

  bottom: -215px;

  transform: translateX(-50%);

  border: 2px dashed rgba(220, 230, 255, 0.2);

  border-radius: 50%;

  z-index: 1;
}

/* ============================================================
   SUN / MOON TRAILS
   ============================================================ */

/* ==============================
   CELESTIAL TRAIL CONTAINER
============================== */

.celestial-trail {
  position: absolute;

  /* IMPORTANT */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  pointer-events: none;

  z-index: 3;
}

/* SUN TRAIL DOTS */

.sun-trail-dot {
  position: absolute;

  background: #ffc107;

  border-radius: 50%;

  box-shadow:
    0 0 6px rgba(255, 193, 7, 0.9),
    0 0 12px rgba(255, 193, 7, 0.5);

  pointer-events: none;
}

/* MOON TRAIL DOTS */

.moon-trail-dot {
  position: absolute;

  border-radius: 50%;

  box-shadow:
    0 0 6px rgba(220, 230, 255, 0.9),
    0 0 12px rgba(220, 230, 255, 0.5);

  pointer-events: none;
}

/* ============================================================
   SUN TRAIL
   ============================================================ */

.sun-trail {
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.8);
}

/* ============================================================
   MOON TRAIL
   ============================================================ */

/* ============================================================
   SUN / MOON POSITION
   ============================================================ */

.sun-position {
  position: absolute;

  width: 40px;

  height: 40px;

  display: flex;

  align-items: center;

  justify-content: center;

  z-index: 5;

  transition:
    left 1s ease,
    top 1s ease;
}

/* ============================================================
   SUN ICON
   ============================================================ */

.sun-position i {
  font-size: 30px;

  color: #ffc107;

  filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.9))
    drop-shadow(0 0 15px rgba(255, 193, 7, 0.55));
}

/* ============================================================
   MOON ICON
   ============================================================ */

.sun-position.moon i {
  color: #e9ecff;

  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9))
    drop-shadow(0 0 15px rgba(180, 200, 255, 0.65));
}

/* ============================================================
   MOUNTAIN LANDSCAPE
   ============================================================ */

.mountains {
  position: absolute;

  left: 0;

  bottom: 0;

  width: 100%;

  height: 70px;

  z-index: 4;

  pointer-events: none;
}

/* ============================================================
   BASE MOUNTAIN
   ============================================================ */

.mountain {
  position: absolute;

  bottom: -20px;

  background: rgba(20, 25, 35, 0.85);

  transform: rotate(45deg);
}

/* ============================================================
   LEFT MOUNTAIN
   ============================================================ */

.mountain-left {
  width: 105px;

  height: 105px;

  left: -30px;

  bottom: -65px;
}

/* ============================================================
   CENTER MOUNTAIN
   ============================================================ */

.mountain-center {
  width: 135px;

  height: 135px;

  left: 50%;

  bottom: -95px;

  transform: translateX(-50%) rotate(45deg);
}

/* ============================================================
   RIGHT MOUNTAIN
   ============================================================ */

.mountain-right {
  width: 115px;

  height: 115px;

  right: -35px;

  bottom: -70px;
}

/* ============================================================
   HORIZON LABELS
   ============================================================ */

.horizon-label {
  position: absolute;

  bottom: 5px;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 3px;

  z-index: 6;

  font-size: 10px;

  opacity: 0.75;
}

/* ============================================================
   SUNRISE LABEL
   ============================================================ */

.sunrise-label {
  left: 3%;
}

/* ============================================================
   SUNSET LABEL
   ============================================================ */

.sunset-label {
  right: 3%;
}

/* ============================================================
   MOUNTAIN ICON
   ============================================================ */

.horizon-label i {
  font-size: 17px;

  opacity: 0.8;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {
  .sun-track {
    height: 170px;
  }

  .sun-path,
  .moon-path {
    width: 240px;

    height: 240px;

    bottom: -190px;
  }
}
/* =========================================================
   HOURLY FORECAST
========================================================= */

#hourlyContainer {
  display: flex;

  gap: 15px;

  overflow-x: auto;

  padding: 8px 4px 20px;

  scroll-behavior: smooth;
}

#hourlyContainer::-webkit-scrollbar {
  height: 7px;
}

#hourlyContainer::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

#hourlyContainer::-webkit-scrollbar-thumb {
  background: #111111;
  border-radius: 20px;
}

#hourlyContainer::-webkit-scrollbar-thumb:hover {
  background: #000000;
}

.hourly-card {
  flex: 0 0 165px;

  padding: 22px 15px;

  text-align: center;

  border-radius: 20px;

  background: var(--glass);

  border: 1px solid var(--glass-border);

  backdrop-filter: blur(15px);

  box-shadow: 0 10px 30px var(--card-shadow);

  transition:
    transform 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.hourly-card:hover {
  transform: translateY(-8px);

  background: var(--forecast-hover, rgba(255, 255, 255, 0.2));

  border-color: rgba(101, 217, 255, 0.4);

  box-shadow: 0 15px 35px var(--card-shadow);
}

.hourly-card h3 {
  margin: 12px 0;

  font-size: 1.35rem;

  color: var(--text-primary);
}

.hourly-card p {
  color: var(--text-secondary);

  font-size: 0.85rem;

  margin-top: 7px;
}

/* Match the daily forecast's icon/probability row and detail grid. */
.hourly-card .weather-icon {
  margin-top: 8px;
}

.hourly-card .weather-icon h4,.daily-card h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  text-shadow: 1px 1px 1px gray;
}

.hourly-card .weather-description {
  min-height: 34px;
  margin-bottom: 12px;
}

.hourly-card .hourly-details {
  margin-top: 10px;
}

.hourly-card .detail-box {
  min-height: 68px;
}

.weather-icon {
  height: 70px;
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-around;

  font-size: 38px;

  color: var(--icon-color);

  filter: drop-shadow(0 0 10px rgba(101, 217, 255, 0.35));
 
}
/* ==============================
   CUSTOM WEATHER ICON
============================== */

.custom-weather-icon {
  position: relative;

  width: 70px;
  height: 70px;

  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ==============================
   CLOUD
============================== */

.custom-weather-icon .fa-cloud {
  color: #000000;
  font-size: 42px;

  position: absolute;
  left: 50%;
  top: 5px;

  transform: translateX(-50%);
}

/* ==============================
   RAIN DROPLETS
============================== */

.rain-drops {
  position: absolute;

  top: 38px;
  left: 8px;

  display: flex;
  gap: 3px;
}

.rain-drops .fa-droplet {
  color: #2196f3;
  font-size: 12px;
  margin: 0 auto;

}
.heavy-rain-icon .rain-drops {
  left: 4px;
  gap: 2px;
  margin: 0 auto;
}

.heavy-rain-icon .rain-drops .fa-droplet {
  color: #2196f3;
  font-size: 11px;
  margin: 0 auto;
}
.overcast-icon {
  color: #808080;
}

/* ==============================
   THUNDERSTORM
============================== */

.thunder-icon .fa-bolt {
  position: absolute;

  top: 27px;
  left: 27px;

  color: #ffd21f;
  font-size: 30px;
}

/* ==========================================
   DAILY FORECAST CONTAINER
========================================== */

.daily-section h2 {
  margin-top: 20px;
}

#dailyContainer {
  /* width: 100%;

  display: grid;

  grid-template-columns: repeat(5, minmax(200px, 1fr));

  gap: 18px;

  padding: 10px 0px; */

    display: flex;

  gap: 15px;

  overflow-x: auto;

  padding: 8px 4px 20px;

  scroll-behavior: smooth;
}


#dailyContainer::-webkit-scrollbar {
  height: 7px;
}

#dailyContainer::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

#dailyContainer::-webkit-scrollbar-thumb {
  background: #111111;
  border-radius: 20px;
}

#dailyContainer::-webkit-scrollbar-thumb:hover {
  background: #000000;
}

/* ==========================================
   DAILY CARD
========================================== */

.daily-card {
    flex: 0 0 165px;

  padding: 20px 15px;

  border-radius: 20px;

  background: var(--glass);

  border: 1px solid rgba(255, 255, 255, 0.18);

  backdrop-filter: blur(10px);

  -webkit-backdrop-filter: blur(10px);

  text-align: center;

  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

/* HOVER */

.daily-card:hover {
  transform: translateY(-5px);

  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   DATE
========================================== */

.daily-date {
  margin: 0;

  font-size: 17px;

  font-weight: 700;
}

/* ==========================================
   MAIN WEATHER ICON
========================================== */

.daily-card .weather-icon {
  /* margin: 18px 0 10px; */

  font-size: 42px;
}

/* ==========================================
   WEATHER DESCRIPTION
========================================== */

.weather-description {
  margin-bottom: 15px;

  font-size: 14px;

  opacity: 0.8;
}

/* ==========================================
   SIX MINI CARDS GRID
========================================== */

.daily-details {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 8px;
}

/* ==========================================
   MINI CARD
========================================== */

.detail-box {
  min-height: 80px;

  padding: 9px 5px;

  border-radius: 11px;

  background: var(--glass);

  border: 1px solid rgba(255, 255, 255, 0.1);

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;
}

/* ==========================================
   MINI CARD ICON
========================================== */

.detail-box i {
  font-size: 17px;

  margin-bottom: 5px;
}

/* ==========================================
   LABEL
========================================== */

.detail-box small {
  font-size: 10px;

  opacity: 0.65;

  margin-bottom: 3px;
}

/* ==========================================
   VALUE
========================================== */

.detail-box strong {
  font-size: 12px;

  font-weight: 600;
}

/* ==========================================
   SUNSET
========================================== */

/* ONLY affects sunset inside daily forecast cards */
.daily-card .sunset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  opacity: 0.8;
}

.daily-card .sunset i {
  font-size: 14px;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1100px) {
  #dailyContainer {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 700px) {
  #dailyContainer {
    grid-template-columns: repeat(2, minmax(150px, 1fr));

    gap: 12px;
  }

  .daily-card {
    padding: 15px 10px;
  }
}

/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 450px) {
  #dailyContainer {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CARD ANIMATION
========================================================= */

@keyframes cardAppear {
  from {
    opacity: 0;

    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;

    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   WEATHER EFFECTS SYSTEM
========================================================= */

#weatherEffects {
  position: fixed;

  inset: 0;

  pointer-events: none;

  overflow: hidden;

  z-index: -1;
}

/* =========================================================
   RAIN
========================================================= */

.rain-drop {
  position: absolute;

  top: -30px;

  width: 2px;
  height: 25px;

  background: linear-gradient(to bottom, transparent, rgba(180, 225, 255, 0.9));

  animation: rainFall linear infinite;

  transform: rotate(12deg);
}

@keyframes rainFall {
  to {
    transform: translate3d(-80px, 110vh, 0) rotate(12deg);
  }
}

/* =========================================================
   SNOW
========================================================= */

.snowflake {
  position: absolute;

  top: -20px;

  color: rgba(255, 255, 255, 0.9);

  font-size: 14px;

  filter: blur(0.3px);

  animation:
    snowFall linear infinite,
    snowDrift ease-in-out infinite;
}

@keyframes snowFall {
  to {
    transform: translateY(110vh);
  }
}

@keyframes snowDrift {
  0%,
  100% {
    margin-left: 0;
  }

  50% {
    margin-left: 60px;
  }
}

/* =========================================================
   FOG
========================================================= */

.fog-layer {
  position: absolute;

  width: 200%;
  height: 45%;

  left: -50%;

  background: radial-gradient(
    ellipse,
    rgba(220, 230, 235, 0.16),
    transparent 70%
  );

  filter: blur(25px);

  animation: fogMove 18s ease-in-out infinite alternate;
}

@keyframes fogMove {
  from {
    transform: translateX(-5%);
  }

  to {
    transform: translateX(10%);
  }
}

/* =========================================================
   CLOUDS
========================================================= */

.cloud {
  position: absolute;

  width: 180px;
  height: 60px;

  border-radius: 100px;

  background: rgba(210, 225, 240, 0.08);

  filter: blur(2px);

  animation: cloudMove linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";

  position: absolute;

  border-radius: 50%;

  background: inherit;
}

.cloud::before {
  width: 90px;
  height: 90px;

  left: 30px;
  bottom: 15px;
}

.cloud::after {
  width: 70px;
  height: 70px;

  right: 30px;
  bottom: 10px;
}

@keyframes cloudMove {
  from {
    transform: translateX(-250px);
  }

  to {
    transform: translateX(calc(100vw + 250px));
  }
}

/* =========================================================
   🌞 SUN
========================================================= */

.sun-glow {
  position: fixed;

  top: -120px;
  right: -120px;

  width: 320px;
  height: 320px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255, 238, 130, 1) 0%,
    rgba(255, 210, 70, 0.8) 25%,
    rgba(255, 190, 50, 0.35) 45%,
    rgba(255, 190, 50, 0.08) 65%,
    transparent 75%
  );

  filter: blur(2px);

  pointer-events: none;

  z-index: 0;

  animation: sunPulse 5s ease-in-out infinite;
}

@keyframes sunPulse {
  0%,
  100% {
    transform: scale(1);

    opacity: 0.75;
  }

  50% {
    transform: scale(1.08);

    opacity: 1;
  }
}

.sun-glow::before {
  content: "";

  position: absolute;

  width: 500px;
  height: 500px;

  top: -90px;
  left: -90px;

  border-radius: 50%;

  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 230, 120, 0.12) 0deg 8deg,
    transparent 8deg 18deg
  );

  filter: blur(8px);

  animation: sunRotate 40s linear infinite;
}

@keyframes sunRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   LIGHT PARTICLES
========================================================= */

.light-particle {
  position: absolute;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: rgba(255, 230, 150, 0.8);

  box-shadow: 0 0 12px rgba(255, 220, 100, 0.7);

  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  from {
    transform: translateY(110vh);

    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  to {
    transform: translateY(-10vh);

    opacity: 0;
  }
}

/* =========================================================
   🌙 MOON
========================================================= */

.moon-glow {
  position: fixed;

  top: -80px;
  right: -80px;

  width: 260px;
  height: 260px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    #ffffff 0%,
    #e8f1ff 25%,
    rgba(190, 215, 255, 0.45) 45%,
    rgba(130, 170, 230, 0.12) 65%,
    transparent 75%
  );

  /* box-shadow:
    0 0 40px rgba(220, 235, 255, 0.7),
    0 0 100px rgba(150, 190, 255, 0.35); */

  pointer-events: none;

  z-index: 0;

  animation: moonGlow 6s ease-in-out infinite;
}

@keyframes moonGlow {
  0%,
  100% {
    transform: scale(1);

    opacity: 0.85;
  }

  50% {
    transform: scale(1.04);

    opacity: 1;
  }
}

/* =========================================================
   ⚡ LIGHTNING
========================================================= */

.lightning {
  position: fixed;

  inset: 0;

  background: rgba(255, 255, 255, 0.85);

  opacity: 0;

  pointer-events: none;

  animation: lightningFlash 6s infinite;
}

@keyframes lightningFlash {
  0%,
  92%,
  100% {
    opacity: 0;
  }

  93% {
    opacity: 0.75;
  }

  94% {
    opacity: 0;
  }

  95% {
    opacity: 0.45;
  }

  96% {
    opacity: 0;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
  header {
    padding-top: 20px;
  }

  #searchForm button {
    padding: 0 17px;
  }

  .weather-card {
    padding: 28px 18px;
  }

  #weatherIcon {
    font-size: 65px;
  }

  .hourly-card {
    flex-basis: 145px;
  }

  #dailyContainer {
    grid-template-columns: 1fr;
  }



  .sun-glow {
    width: 240px;
    height: 240px;

    top: -100px;
    right: -100px;
  }

  .moon-glow {
    width: 210px;
    height: 210px;

    top: -70px;
    right: -70px;
  }
}

/* ===========
ADS SECTION
============== */

#ads {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    box-sizing: border-box;

    legend{
      text-align: center;
    }
}

#ads img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}
@media (min-width:500px) {
  #ads img{
    height: 50vh;
  }
}

/* alerts

*/

/* =========================================
   WEATHER ALERTS
========================================= */

.weather-alerts {
    width: 100%;
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;

    background: var(--glass);
    border: 1px solid var(--glass-border);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-sizing: border-box;
    position: relative;
    z-index: -1;
}


/* =========================================
   HEADER
========================================= */

.alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 15px;
}


.alerts-title {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 17px;
    font-weight: 600;
}


.alerts-title i {
    font-size: 17px;
}


/* =========================================
   STATUS
========================================= */

.alerts-status {
    font-size: 12px;
    opacity: 0.65;
}

.alerts-container{
  border: 1px solid var(--text-muted);
  border-radius: 18px;
}

/* =========================================
   LOADING
========================================= */

.alerts-loading {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 15px;

    font-size: 13px;
    opacity: 0.7;
}


/* =========================================
   NO ALERT
========================================= */

.no-alerts {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 15px;

    border-radius: 12px;

    background: rgba(80, 200, 120, 0.08);

    font-size: 13px;
}


.no-alerts i {
    font-size: 18px;
}


/* =========================================
   ALERT CARD
========================================= */

.alert-card {
    padding: 16px;

    margin-bottom: 20px;

    border-radius: 14px;

    background:var(--glass);

    border: 1px solid rgba(255, 255, 255, 0.09);
}


.alert-card:last-child {
    margin-bottom: 0;
}


/* =========================================
   ALERT TOP
========================================= */

.alert-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 10px;
}


.alert-event {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 16px;
    font-weight: 600;
}


.alert-event i {
    font-size: 16px;
}


/* =========================================
   SEVERITY
========================================= */

.alert-severity {
    padding: 4px 9px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;

    background: rgba(255, 255, 255, 0.08);
}


/* =========================================
   ALERT HEADLINE
========================================= */

.alert-headline {
    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 600;
}


.alert-description {
    font-size: 12px;
    line-height: 1.6;

    opacity: 0.78;
}


/* =========================================
   ALERT META
========================================= */

.alert-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 13px;

    font-size: 11px;

    opacity: 0.65;
}


.alert-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* =========================================
   INSTRUCTION
========================================= */

.alert-instruction {
    margin-top: 13px;
    padding-top: 12px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);

    font-size: 12px;
    line-height: 1.5;
}


.alert-instruction strong {
    display: block;

    margin-bottom: 4px;
}


/* =========================================
   SOURCE
========================================= */

.alert-source {
    margin-top: 12px;

    font-size: 10px;

    opacity: 0.5;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .weather-alerts {
        padding: 14px;
        border-radius: 15px;
    }

    .alert-card {
        padding: 13px;
    }

    .alert-card-top {
        flex-direction: column;
        gap: 8px;
    }

    .alert-severity {
        align-self: flex-start;
    }

}

/* ==============================
   WEATHER ALERT STATUS
   ============================== */

.alerts-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ==============================
   HIGH = RED + BLINKING
   ============================== */

.alerts-status.alert-high {
    color: #ff3030;
    animation: alertHighBlink 1s infinite;
}

/* ==============================
   MODERATE = GREEN
   ============================== */

.alerts-status.alert-moderate {
    color: #22c55e;
}

/* ==============================
   MINOR = YELLOW
   ============================== */

.alerts-status.alert-minor {
    color: #facc15;
}

/* ==============================
   NO ALERT = GREEN
   ============================== */

.alerts-status.alert-none {
    color: #22c55e;
}

/* ==============================
   HIGH ALERT BLINK
   ============================== */

@keyframes alertHighBlink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }

    100% {
        opacity: 1;
    }
}

.alerts-status.alert-high {
    color: #ff3030;
    animation: alertHighBlink 1s infinite;
}

.alerts-status.alert-moderate {
    color: #22c55e;
}

.alerts-status.alert-minor {
    color: #facc15;
}

.alerts-status.alert-none {
    color: #22c55e;
}

@keyframes alertHighBlink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }

    100% {
        opacity: 1;
    }
}

/* =========================================
   ALERT SEVERITY BADGES
========================================= */

.alert-severity {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.5px;

    border: 1px solid transparent;

    transition: all 0.2s ease;
}


/* =========================================
   HIGH
========================================= */

.alert-severity-high {
    color: #ffffff;

    background: #dc2626;

    border-color: #ef4444;

    box-shadow:
        0 0 8px rgba(239, 68, 68, 0.45);

    animation: highSeverityBlink 1s infinite;
}


/* =========================================
   MODERATE
========================================= */

.alert-severity-moderate {
    color: #ffffff;

    background: #16a34a;

    border-color: #22c55e;

    box-shadow:
        0 0 7px rgba(34, 197, 94, 0.30);
}


/* =========================================
   MINOR
========================================= */

.alert-severity-minor {
    color: #3f3f00;

    background: #facc15;

    border-color: #fde047;

    box-shadow:
        0 0 7px rgba(250, 204, 21, 0.30);
}


/* =========================================
   UNKNOWN
========================================= */

.alert-severity-unknown {
    color: #ffffff;

    background: #64748b;

    border-color: #94a3b8;
}


/* =========================================
   HIGH BLINK
========================================= */

@keyframes highSeverityBlink {

    0% {
        opacity: 1;

        box-shadow:
            0 0 8px rgba(239, 68, 68, 0.45);
    }

    50% {
        opacity: 0.55;

        box-shadow:
            0 0 16px rgba(239, 68, 68, 0.85);
    }

    100% {
        opacity: 1;

        box-shadow:
            0 0 8px rgba(239, 68, 68, 0.45);
    }
}


/* ======
footer


========= */

.site-footer {
    width: min(1200px, calc(100% - 40px));

    margin: 0 auto;

    padding: 25px 0 35px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.5);

    color: var(--text-muted);

    font-size: 0.85rem;
}


.footer-links {
    display: flex;

    flex-wrap: wrap;

    gap: 18px;
}


.footer-links a {
    color: var(--text-secondary);

    text-decoration: none;
}


.footer-links a:hover {
    color: #3156c8;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {

    .source-header {
        padding: 20px 0;
    }


    .back-button {
        padding: 8px 12px;

        font-size: 0.8rem;
    }


    .hero-section {
        padding-top: 45px;
    }


    .source-section {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .source-number {
        width: 52px;
        height: 52px;

        font-size: 0.9rem;
    }


    .source-title-row {
        flex-direction: column;
    }


    .process {
        grid-template-columns: 1fr;

        gap: 25px;
    }


    .process-line {
        width: 1px;
        height: 30px;

        margin-left: 10px;
    }


    .notice-section {
        padding: 22px;
    }


    .site-footer {
        flex-direction: column;

        align-items: flex-start;
    }

}


/* bar styles */

.weather-card #humidity::after,
.weather-card #wind::after,
.weather-card #pressure::after {
    content: "";
    display: block;

    width: var(--bar-width, 0%);
    height: 6px;

    margin-top: 9px;

    border-radius: 10px;

    background: var(--bar-color, #22c55e);

    transition:
        width 0.8s ease,
        background-color 0.4s ease;
}

/* clock css */



.clock {
    --clock-size: 360px;

    width: var(--clock-size);
    height: var(--clock-size);

    position: relative;

    margin-left: auto;
    margin-right: auto;

    text-align: center;
    font-family: 'Comfortaa', cursive;

    border-radius: 50%;
    scale: 1;
}

/* =========================
   TICKS
========================= */

.spike {
    position: absolute;

    width: 8px;
    height: 1px;

    background: var(--text-primary);

    line-height: 20px;

    transform-origin: 50%;

    z-index: 5;

    inset: 0;
    margin: auto;

    font-style: normal;

    transform:
        rotate(var(--rotate))
        translateX(var(--dial-size));
}


/* Every 5th tick */

.spike.major {
    box-shadow: -7px 0 rgb(255, 0, 0);
}


/* Numbers */

.spike.major::after {
    content: attr(data-value);

    position: absolute;

    right: 22px;
    top: -10px;

    font-size: 18px;
    font-weight: 700;

    color: var(--text-primary);

    white-space: nowrap;

    transition: 1s linear;

    transform:
        rotate(calc(
            var(--dial-rotation) - var(--rotate)
        ));
}


/* =========================
   SECONDS
========================= */

.seconds {

    --dial-size: calc((var(--clock-size) / 2) - 8px);

    position: absolute;

    inset: 0;
    margin: auto;

    font-size: 18px;
    font-weight: 800;

    transform:
        rotate(calc(-1 * var(--dial-rotation)));

    transition: 1s linear;
}


/* =========================
   MINUTES
========================= */

.minutes {

    --dial-size: calc((var(--clock-size) / 2) - 65px);

    position: absolute;

    inset: 0;
    margin: auto;

    font-size: 20px;

    transform:
        rotate(calc(-1 * var(--dial-rotation)));

    transition: 1s linear;
}


/* Minute dial numbers */

.minutes .spike.major::after {
    font-size: 16px;
}


/* =========================
   STOP ANIMATION
========================= */

.stop-anim {
    transition: 0s linear;
}

.stop-anim .spike::after {
    transition: 0s linear !important;
}


/* =========================
   CENTER HOUR
========================= */

.hour {

    font-size: 30px;

    font-weight: 900;

    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    z-index: 20;
}


/* =========================
   MINUTE DISPLAY
========================= */

.minute {

    font-size: 36px;

    font-weight: 900;

    position: absolute;

    background: var(--glass);
    color: var(--text-primary);

    z-index: 10;

    right: calc(var(--clock-size) / 4.5);

    top: 50%;

    transform:
        translateY(-50%);

    padding: 0 5px;
}


/* Curved bracket */

.minute::after {

    content: '';

    position: absolute;

    border: 2px solid var(--text-primary);

    border-right: none;

    height: 50px;

    left: -10px;

    top: 50%;

    border-radius:
        40px 0 0 40px;

    width:
        calc(var(--clock-size) / 2.75);

    transform:
        translateY(-50%);
}

/* Am Pm */

.period{
  position: absolute;
  top: 55%;
  text-align: center;
  border: 1px solid var(--text-primary);
  padding: 5px;
  border-radius: 2px;
  font-weight: 900;
  width:50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto;
  border-top: none;
  border-right: none;
  border-left: none;
 
}
.hours{
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 550px) {

    .clock {
      scale: .85;

        
    }

    .hour {
        font-size: 38px;
    }

    .minute {
        font-size: 20px;
    }

    .spike.major::after {
        font-size: 10px;
    }
}

@media (max-width: 400px) {

    .clock {
      scale: .65;
      
    transform: translateX(-10vw);


        
    }

    .hour {
        font-size: 38px;
    }

    .minute {
        font-size: 20px;
    }

    .spike.major::after {
        font-size: 10px;
    }
}

/* =========================================================
   WEATHER PAGE BREADCRUMB
========================================================= */

.weather-breadcrumb {
    width: min(1100px, 92%);
    margin: 18px auto 12px;
    padding: 0;
    font-size: 14px;
}

.weather-breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    list-style: none;
    padding: 0;
    margin: 0;
}

.weather-breadcrumb li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.weather-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.weather-breadcrumb a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.weather-breadcrumb li[aria-hidden="true"] {
    opacity: 0.6;
    user-select: none;
}

.weather-breadcrumb li[aria-current="page"] {
    font-weight: 600;
}

/* button permission */
#allowLocationBtn{
    position: absolute;
    top: 25px;
    left: 50%;
    height: 100px;
    width: 90%;
    transform: translateX(-50%);

    padding: 12px 24px;

    border: none;
    border-radius: 8px;

    background: #172033;
    color: white;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    z-index: 1;
}

#allowLocationBtn:hover {
    opacity: 0.9;
}


/* =========================================
   WEATHERVERSE FARMING
========================================= */

.farming-section {
    width: 100%;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    color: var(--text-primary);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
}


/* HEADER */

.farming-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    margin-bottom: 25px;
}

.farming-eyebrow {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    margin: 1rem;
    padding: 4px;
    border-radius: 1rem;
}

.farming-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.farming-header p {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.farming-location {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-primary);
}

.farming-location-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #45c46a;
}


/* CONTROLS */

.farming-controls {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr))
        auto;

    gap: 12px;
    align-items: end;
    margin-bottom: 25px;
}

.farming-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.farming-control label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.farming-control select {
    width: 100%;
    height: 44px;
    padding: 0 12px;

    border: 1px solid rgba(23, 32, 51, 0.12);
    border-radius: 10px;

    background: var(--glass);
    color: var(--text-primary);

    font-size: 13px;
    outline: none;
}

.farming-control select:focus {
    border-color: var(--accent, #65d9ff);
}


.farming-analyze-btn {
    height: 44px;
    padding: 0 20px;

    border: 1px solid var(--glass-border);
    border-radius: 10px;

    background: var(--glass);
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.farming-analyze-btn:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}


/* LOADING */

.farming-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 30px;

    color: var(--text-secondary);
    font-size: 13px;
}

.farming-spinner {
    width: 18px;
    height: 18px;

    border: 2px solid rgba(23, 32, 51, 0.15);
    border-top-color: var(--accent);

    border-radius: 50%;

    animation: farmingSpin 0.8s linear infinite;
}

@keyframes farmingSpin {
    to {
        transform: rotate(360deg);
    }
}


/* ERROR */

.farming-error {
    padding: 14px 16px;
    margin-bottom: 20px;

    border-radius: 10px;

    background: var(--glass);
    color: #b91c1c;

    font-size: 13px;
}


/* SUMMARY */

.farming-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;

    padding: 25px;

    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 16px;

    background: var(--glass);

    margin-bottom: 18px;
}

.farming-summary-label {
    display: block;
    margin-bottom: 7px;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;

    color: var(--text-secondary);
}

.farming-risk-badge {
    display: inline-flex;
    align-items: center;

    min-height: 30px;
    padding: 5px 12px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 800;
}

.farming-summary-main p {
    margin: 10px 0 0;

    color: var(--text-secondary);
    font-size: 14px;
}

.farming-summary-meta {
    display: flex;
    gap: 30px;
    align-items: center;
}

.farming-summary-meta div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.farming-summary-meta span {
    color: var(--text-secondary);
    font-size: 11px;
}

.farming-summary-meta strong {
    font-size: 14px;
}


/* RISK COLORS */

.farm-risk-high,
.farm-status-high {
    /* background: rgba(239, 68, 68, 0.1); */
    color: #dc2626;
}

.farm-risk-moderate,
.farm-status-moderate {
    /* background: rgba(245, 158, 11, 0.12); */
    color: #b45309;
}

.farm-risk-low,
.farm-status-low {
    /* background: rgba(34, 197, 94, 0.1); */
    color: #15803d;
}


/* ADVISORY GRID */

.farming-advisory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.farm-advisory-card {
    min-width: 0;

    padding: 20px;

    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 15px;

    background: var(--glass);
}

.farm-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.farm-card-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--glass);

    font-size: 18px;
}

.farm-status {
    padding: 5px 9px;
    border-radius: 20px;

    font-size: 10px;
    font-weight: 800;

    background: var(--glass);
    color: var(--text-secondary);
}

.farm-advisory-card h3 {
    margin: 18px 0 7px;

    font-size: 16px;
    font-weight: 750;
}

.farm-advisory-card p {
    min-height: 55px;

    margin: 0;

    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.55;
}

.farm-card-data {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 18px;
    padding-top: 14px;

    border-top: 1px solid rgba(23, 32, 51, 0.07);
}

.farm-card-data div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.farm-card-data span {
    color: var(--text-secondary);
    font-size: 10px;
}

.farm-card-data strong {
    font-size: 13px;
}


/* IRRIGATION */

.farm-irrigation-value {
    display: flex;
    align-items: baseline;
    gap: 7px;

    margin-top: 15px;
}

.farm-irrigation-value strong {
    font-size: 27px;
    font-weight: 800;
}

.farm-irrigation-value span {
    color: var(--text-secondary);
    font-size: 11px;
}


/* SECTION HEADING */

.farm-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    margin: 32px 0 14px;
}

.farm-section-heading h3 {
    margin: 0;
    font-size: 18px;
}

.farm-section-heading span {
    color: var(--text-secondary);
    font-size: 11px;
}


/* WEATHER RISKS */

.farm-risk-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.farm-risk-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px;

    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 12px;

    background: var(--glass);
}

.farm-risk-icon {
    font-size: 18px;
}

.farm-risk-item div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.farm-risk-item small {
    color: var(--text-secondary);
    font-size: 10px;
}

.farm-risk-item strong {
    font-size: 12px;
}

.farm-risk-item span:last-child {
    color: var(--text-secondary);
    font-size: 10px;
}


/* DISEASE */

.farm-disease-box {
    margin-top: 15px;
    padding: 20px;

    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 14px;

    background: var(--glass);
}

.farm-disease-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.farm-disease-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(139, 124, 255, 0.1);
}

.farm-section-label {
    color: var(--text-secondary);
    font-size: 10px;
}

.farm-disease-left h3 {
    margin: 4px 0 0;
    font-size: 17px;
}

.farm-disease-stats {
    display: flex;
    gap: 35px;
    margin-top: 20px;
}

.farm-disease-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.farm-disease-stats span {
    color: var(--text-secondary);
    font-size: 10px;
}

.farm-disease-stats strong {
    font-size: 14px;
}

.farm-disease-box > p {
    margin: 15px 0 0;

    color: var(--text-secondary);
    font-size: 11px;
}


/* WEATHER BASIS */

.farm-weather-basis {
    margin-top: 10px;
}

.farm-basis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.farm-basis-grid div {
    padding: 16px;

    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 12px;

    background: var(--glass);
}

.farm-basis-grid span {
    display: block;

    margin-bottom: 6px;

    color: var(--text-muted, #6b7280);
    font-size: 10px;
}

.farm-basis-grid strong {
    font-size: 16px;
}


/* DISCLAIMER */

.farm-disclaimer {
    margin-top: 20px;
    padding: 16px 18px;

    border-left: 3px solid var(--accent, #65d9ff);

    background: var(--glass);
}

.farm-disclaimer strong {
    font-size: 12px;
}

.farm-disclaimer p {
    margin: 5px 0 0;

    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.6;
}


/* MOBILE */

@media (max-width: 1000px) {

    .farming-controls {
        grid-template-columns: repeat(2, 1fr);
    }

    .farming-analyze-btn {
        width: 100%;
    }

    .farming-advisory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .farm-risk-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 650px) {

    .farming-section {
        padding: 0 14px;
    }

    .farming-header {
        display: block;
    }

    .farming-location {
        margin-top: 12px;
    }

    .farming-controls {
        grid-template-columns: 1fr;
    }

    .farming-summary {
        grid-template-columns: 1fr;
    }

    .farming-summary-meta {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .farming-advisory-grid {
        grid-template-columns: 1fr;
    }

    .farm-risk-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .farm-basis-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .farm-disease-stats {
        gap: 20px;
        flex-wrap: wrap;
    }
}

/* loader */

.farming-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 15px;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #268500;
    border-radius: 50%;
    animation: farmingSpin 0.8s linear infinite;
}

.farming-success {
    width: 20px;
    height: 20px;
    color: #22c55e;
    background-color: #000000;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes farmingSpin {
    to {
        transform: rotate(360deg);
    }
}



/* ==========================================
   WEATHERVERSE — POPULAR CITIES
========================================== */

.popular-cities {
    margin: 40px 0 30px;
    padding: 26px 28px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
}

.popular-cities h2 {
    margin: 0 0 10px;
    color: var(--text-color, #172033);
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.4px;
}

.popular-cities p {
    margin: 0 0 22px;
    color: var(--muted-text, #64748b);
    font-size: 15px;
    line-height: 1.7;
}

.popular-cities ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.popular-cities li {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.popular-cities a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    box-sizing: border-box;

    color: var(--text-primary);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;

    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.popular-cities a::before {
    content: "";
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--primary-color, #0ea5e9);
}

.popular-cities a:hover {
    color: var(--primary-color, #0284c7);
    background: var(--city-link-hover-bg, #f0f9ff);
    border-color: var(--primary-color, #38bdf8);
    transform: translateY(-2px);
}

.popular-cities a:focus-visible {
    outline: 3px solid var(--primary-color, #38bdf8);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .popular-cities ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .popular-cities {
        margin: 28px 0 22px;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .popular-cities h2 {
        font-size: 21px;
    }

    .popular-cities p {
        margin-bottom: 18px;
        font-size: 14px;
    }

    .popular-cities ul {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .popular-cities a {
        min-height: 46px;
        padding: 11px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .popular-cities a {
        transition: none;
    }

    .popular-cities a:hover {
        transform: none;
    }
}
