@import "https://unpkg.com/open-props" layer(design.system);
/* You might not need normalize.min.css if you already have a reset/normalize.
   If you need it, include it: */

/* Universal Box Sizing & Font Smoothing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Keyframes for Animations */
@keyframes animated-sky {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes text-glow {
  from {
    text-shadow: 0 0 8px rgba(137, 247, 254, 0.5),
      0 0 10px rgba(102, 166, 255, 0.5);
  }
  to {
    text-shadow: 0 0 16px rgba(137, 247, 254, 0.8),
      0 0 20px rgba(102, 166, 255, 0.8);
  }
}

/* Animated Body Background */
body {
  background-color: #0c0c0c;
  color: #f0f0f0;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  text-align: center;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;

  /* Layered Background: Animated Gradient on top of Static Image */
  background-image: linear-gradient(
      -45deg,
      rgba(10, 10, 15, 0.4),
      rgba(40, 40, 50, 0.5),
      rgba(50, 45, 40, 0.4),
      rgba(20, 20, 25, 0.6)
    ),
    url("bb-default.jpg");
  background-size: 400% 400%, cover;
  background-position: center;
  background-attachment: fixed;
  animation: animated-sky 25s ease infinite;
}

#app-wrapper {
  width: 100%;
  max-width: 1400px;
}

/* Animated Header Styling */
#HeaderName h1 {
  cursor: pointer;
  position: relative;

  font: 900 60px Montserrat;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  font-size: 2.8em;
  font-weight: bold;
  letter-spacing: 4px;
  margin-bottom: 2rem;
  color: transparent; /* Hide the original text color */

  /* Gradient Text Effect */
  background: linear-gradient(132deg, rgb(255, 0, 0) 0%, rgb(255, 213, 0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Main Container - Glassmorphism Effect */
#Container {
  /* Your original Frosted Glass Background, NOW applied to the padding-box. */
  /* This ensures your existing background is visible inside the border. */
  background: linear-gradient(135deg, #00feba, #5b548a) padding-box,
    /* NEW: The gradient for the border area (fills the transparent border) */
      var(--gradient-1) border-box;

  /* NEW: This creates a transparent border that allows the `border-box` background to show through. */
  border: solid var(--size-2) transparent; /* --size-2 determines the border thickness */

  /* Your existing styles (kept as is) */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 1.5rem; /* Your original border-radius is kept */
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
  width: 100%;
  max-width: 95%; /* This ensures margin on left/right */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
/* Input Container Styling */
/* Input Container Styling */
body,
input {
  cursor: url(http://k003.kiwi6.com/hotlink/vp054ir5gt/c1.png) 32 32, auto;
  cursor: -webkit-image-set(url(http://k003.kiwi6.com/hotlink/vp054ir5gt/c1.png) 1x,url(http://k003.kiwi6.com/hotlink/z6fy599487/c2.png) 2x) 32 32, auto;
}
body:active,
input:active {
  cursor: url(http://k003.kiwi6.com/hotlink/3p6w4icbzt/c1a.png) 32 32, auto;
  cursor: -webkit-image-set( url(http://k003.kiwi6.com/hotlink/3p6w4icbzt/c1a.png) 1x, url(http://k003.kiwi6.com/hotlink/6ma7828al1/c2a.png) 2x ) 32 32, auto;
}

/* Static Search Container Styling */
#InputContainer {
  display: flex;
  align-items: center;
  background-color: #fff; /* White background from previous example */
  border-radius: 120px; /* Highly rounded corners */
  height: 48px; /* Fixed height, matching the button's height */
  padding-left: 35px; /* Keep left padding for the input content */
  padding-right: 0; /* No right padding, button will fill */
  width: 434px; /* Fixed width for the entire search box */
  box-shadow: 0 10px 30px #d0d0d0; /* Soft shadow, similar to the initial button shadow */
  transition: box-shadow 0.2s ease; /* Smooth transition for box-shadow */
  overflow: hidden; /* Crucial: Ensures the button's left edge is cleanly clipped by container's border-radius */
}

/* When the search container (the whole box) is focused/active */
#InputContainer:focus-within {
  box-shadow: 0 10px 30px #0190bf; /* Stronger blue shadow when active */
}

/* Input Field Styling */
#CityName {
  flex-grow: 1; /* Allow input to take up available space */
  background-color: transparent;
  border: 0;
  outline: none;
  font-size: 19px;
  font-family: Arial, Helvetica, sans-serif;
  color: #00688a; /* Text color for input */
  padding: 0 15px 0 0; /* Added a bit of right padding to prevent text from touching button */
  margin: 0; /* Remove margin as flexbox handles spacing */
  line-height: 1;
  cursor: auto;
}

#CityName::placeholder {
  color: #a0a0a0; /* Placeholder color */
}

/* Search Button Styling */
#SearchButton {
  width: 48px; /* Fixed width for the button (same as height) */
  height: 48px; /* Fixed height for the button */
  /* *** IMPORTANT CHANGE HERE: Make the right side rounded, left side straight *** */
  border-radius: 0 24px 24px 0; /* Matches the container's height (48px) / 2 = 24px for perfect curve */
  /* ************************************************************************** */
  background: linear-gradient(
    132deg,
    rgb(0, 48, 143) 0%,
    rgb(0, 255, 255) 100%
  ); /* Blue background for button */
  color: #fff; /* White icon color */
  font-size: 30px; /* Icon size */
  line-height: 1;
  padding: 0; /* Remove padding, icon size handles visual */
  margin-left: auto; /* Pushes the button to the far right of the flex container */
  border: 0; /* Ensure no default border */
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease; /* Smooth transitions */
  display: flex; /* To center the icon */
  justify-content: center; /* To center the icon */
  align-items: center; /* To center the icon */
  box-shadow: 0 10px 30px #d0d0d0; /* Keep its own shadow */
}

#SearchButton:hover {
  background: linear-gradient(
    132deg,
    rgb(30, 144, 255) 0%,
    rgb(138, 43, 226) 100%
  ); /* Slightly darker blue on hover */
  transform: scale(1.05); /* Slight scale up on hover */
}

/* Icon inside the button */
#SearchButton .fas {
  display: block; /* Ensure the icon behaves as a block for line-height */
  line-height: 1;
}

/* Weather Display Section */
#WeatherDisplay {
  display: flex;
  flex-direction: row;
  align-items: center; /* Add this line */
  gap: 2rem;
  width: 100%;
}

/* Current Weather Card */
#CurrentWeatherCard {
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url("wc-default.jpeg");
  background-size: cover;
  background-position: center;
  /* Apply border-radius directly to the main element */
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  color: white;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  min-width: 300px;
  height: 490px;
  flex: 1 1 340px;
  max-width: 400px;
  /* Crucial for positioning the pseudo-element */
  position: relative;
  /* Ensure content is above the pseudo-element */
  z-index: 1;
  transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

#CurrentWeatherCard::before {
  content: ""; /* Essential for pseudo-elements */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 4px solid transparent; /* This creates the space for the gradient */
  border-radius: 1rem; /* Apply the same border-radius here */
  background: linear-gradient(132deg, rgb(8, 0, 255) 0%, rgb(227, 43, 227) 100%)
    border-box; /* This makes the gradient fill the border area */
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); /* For mask-image fallback */
  -webkit-mask-composite: xor; /* For mask-image fallback */
  mask-composite: exclude; /* Standard for masking, combines layers */
  /* Ensure the pseudo-element is behind the content but in front of the background */
  z-index: -1;
}
#CurrentWeatherCard:hover {
  transform: translateY(-5px) scale(1.03);
  background-color: rgba(255, 255, 255, 0.2);
}

.weather-date-location {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1.1em;
  font-weight: bold;
  text-transform: uppercase;
}

.weather-temp-condition {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#current-weather-icon {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

#current-temp {
  font-size: 4em;
  font-weight: bold;
}

#current-condition {
  font-size: 1.4em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Next Days Forecast - Glassmorphism Effect */
#NextDaysNews {
  /* Frosted Glass Background */
  background: linear-gradient(132deg, rgb(65, 80, 95) 0%, rgb(36, 37, 38) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 1rem;
  padding: 1.5rem;
  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  height: 280px;
  flex: 1.5 1 500px;
  display: flex;
  flex-direction: column;
  /* Remove absolute positioning */
  position: relative;
  top: auto;
  transform: none;
  margin-left: 0;
  align-self: center;
}

/* Styled Forecast Heading */
#NextDaysNews h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  text-align: center;
  color: #a7c5eb; /* Classic cool blue */
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.forecast-item {
  background: linear-gradient(
    132deg,
    rgb(113, 143, 175) 0%,
    rgb(69, 92, 114) 100%
  );
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.forecast-item:hover {
  transform: translateY(-5px) scale(1.03);
  background-color: rgba(255, 255, 255, 0.2);
}

.forecast-day {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.forecast-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 0.5rem;
}

.forecast-temps {
  font-size: 1em;
}

/* Message Box and Loading Indicator (Unchanged) */
.message-box,
.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(25, 25, 25, 0.95);
  color: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: none;
  text-align: center;
  max-width: 90%;
}

.message-box button {
  background-color: #007bff;
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
  cursor: pointer;
  border: none;
  font-size: 1em;
  transition: background-color 0.2s ease;
}

.message-box button:hover {
  background-color: #0056b3;
}

.loading-indicator i {
  margin-right: 0.75rem;
  font-size: 1.2em;
}
.hidden {
  display: none;
}

/* --- RESPONSIVE ADJUSTMENTS (FIXED) --- */

/* For all screens UP TO 768px (Mobile and Small Tablets) */
/* This single block will handle the critical layout change for all small devices */
@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }

  /* KEY FIX: Stack the main sections vertically */
  #WeatherDisplay {
    flex-direction: column;
    align-items: center; /* Center the cards */
    gap: 1.5rem;
  }

  /* KEY FIX: Make cards take up the full width and remove fixed height */
  #CurrentWeatherCard {
    width: 100%;
    min-width: auto;
    max-width: 450px; /* Constrain width on tablets */
    height: auto; /* Allow height to be determined by content */
    flex: 1 1 auto; /* Reset flex for vertical stacking */
  }
  #NextDaysNews {
    width: 100%;
    max-width: 450px; /* Constrain width on tablets */
    height: auto; /* Allow height to be determined by content */
    flex: 1 1 auto; /* Reset flex for vertical stacking */
  }

  /* === SEARCH BAR FIX FOR TABLETS === */
  #InputContainer {
    width: 90%; /* Use percentage instead of fixed width */
    max-width: 434px; /* Ensure it doesn't get too big */
    height: 44px;
    padding-left: 20px;
  }

  #CityName {
    font-size: 16px;
  }

  #SearchButton {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 0 22px 22px 0; /* Keep the pill shape */
  }
  /* === END SEARCH BAR FIX === */

  /* Adjustments for the smallest screens (Mobile: 320px – 600px) */
  @media (max-width: 600px) {
    #HeaderName h1 {
      font-size: 2.2em;
      letter-spacing: 3px;
    }
    #Container {
      padding: 1rem;
      gap: 1.5rem;
    }

    /* === SEARCH BAR FIX FOR MOBILES === */
    #InputContainer {
      width: 100%; /* Take full available width */
      height: 40px;
      padding-left: 15px;
    }
    #CityName {
      font-size: 14px;
    }
    #SearchButton {
      width: 40px;
      height: 40px;
      font-size: 16px;
      border-radius: 0 20px 20px 0;
    }
    /* === END SEARCH BAR FIX === */

    #current-temp {
      font-size: 3.5em;
    }
    #current-condition {
      font-size: 1.2em;
    }
    .forecast-grid {
      /* On the smallest screens, two columns are best */
      grid-template-columns: repeat(2, 1fr);
      gap: 0.75rem;
    }
  }
}

/* --- Styles for screens LARGER than 768px --- */

/* Large Tablets (Landscape) & Small Laptops: 769px and up */
@media (min-width: 769px) {
  /* This is where the layout returns to being side-by-side */
  #WeatherDisplay {
    flex-direction: row;
    align-items: stretch; /* Makes cards equal height */
    gap: 2rem;
  }
  #CurrentWeatherCard {
    flex: 1 1 340px;
    max-width: 400px;
  }
  #NextDaysNews {
    flex: 1.5 1 500px;
    display: flex;
    flex-direction: column;
    height: auto; /* KEY FIX: Remove fixed height to allow the container to grow */
  }

  /* We establish a 2-column grid here for a consistent experience */
  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
    flex-grow: 1; /* Allows grid to fill the available space inside the parent */
  }
}

/* Small Desktops and Laptops: 1025px and up */
@media (min-width: 1025px) {
  #HeaderName h1 {
    font-size: 3.5em;
  }
  #Container {
    max-width: 1100px;
  }
  #NextDaysNews {
    padding: 2rem;
  }

  /* FIX: Now we switch to a 4-column grid for wider screens */
  .forecast-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Large Desktops and High-Resolution Screens: 1281px and up */
@media (min-width: 1281px) {
  #Container {
    max-width: 1200px;
  }
  #HeaderName h1 {
    font-size: 4em;
  }
}
