/* --- Global Styles --- */
body {
  font-family: 'Poppins', 'Open Sans', sans-serif;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?auto=format&fit=crop&w=2060&q=80') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  color: #fff;
}

/* --- Layout Container --- */
.weather-app-container {
  width: 100%;
  max-width: 1200px; /* Limits overall width on ultra-wide screens */
  margin: 0 auto;
  padding-top: 50px;
}

/* --- Header Section --- */
.weather-header {
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-header h1 {
  font-weight: 600;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

/* --- Form & Search Bar --- */
.weather-form {
  margin-bottom: 40px;
}

.weather-form .input-group {
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.form-control {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff !important;
  backdrop-filter: blur(5px);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.btn-primary {
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

/* --- Individual Weather Cards (The Grid Items) --- */
.weather-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
  height: 100%; /* Ensures all cards in a row have equal height */
}

.weather-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.weather-card h2, .weather-card h3 {
  margin: 10px 0;
}

.weather-card hr {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin: 20px 0;
}

/* --- X (Twitter) Button Styling --- */
.x-button {
  background-color: transparent !important;
  border: 1px solid #888 !important;
  color: #ffffff !important;
  transition: all 0.3s ease;
}

.x-button:hover {
  background-color: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

.x-button i {
  transition: color 0.3s ease;
}

/* --- History & Footer --- */
.search-history a {
  transition: all 0.3s ease;
}

.search-history a:hover {
  color: #ff4d4d !important;
}

.weather-footer {
  text-align: center;
  margin-top: 50px;
  padding-bottom: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
  .weather-header h1 {
    font-size: 1.8rem;
  }
  
  .weather-card {
    margin-bottom: 20px; /* Adds space when cards stack on mobile */
  }
}
.hourly-scroll-container {
    min-height: 150px; /* Ensure it doesn't collapse to 0px */
    display: flex !important; 
    visibility: visible !important;
}


  
    .hourly-scroll-container {
        scrollbar-width: auto;
    scrollbar-color: #ffc107 rgba(255, 255, 255, 0.1);
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 20px;
    gap: 15px;
}


/* Chrome, Edge, and Safari scrollbar */
.hourly-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.hourly-scroll-container::-webkit-scrollbar-thumb {
    background: #ffc107;
    border-radius: 10px;
}


.hourly-item {
    flex: 0 0 140px; /* Slightly wider to prevent text wrapping too much */
    background: rgba(255, 255, 255, 0.08);
    padding: 18px 12px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.desc-label {
    /* Ensures the description is always visible and clear */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    word-wrap: break-word;
    text-align: center;
}

.extra-details span {
    display: inline-block;
}
.hourly-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.time-label { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 5px; }
.temp-label { font-size: 1.25rem; font-weight: 600; margin: 0; }
.desc-label { font-size: 0.7rem; color: #ffc107; margin: 0; }
.rain-chance { font-size: 0.75rem; color: #0dcaf0; }

.icon-wrapper img {
    width: 60px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}
/* Container for the horizontal scroll */

/* Individual hour item */



/* Custom Scrollbar for a cleaner look */
.hourly-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.hourly-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.hourly-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.share-buttons .btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0;
    transition: all 0.3s ease;
}

.share-buttons .btn:hover {
    transform: scale(1.1);
}

.share-buttons .btn-outline-info {
    color: #020d13;
    border-color: #ecedee;
}

.share-buttons .btn-outline-primary {
    color: #4267B2;
    border-color: #4267B2;
}
/* Highlight the first item (current hour) */
.hourly-scroll-container .hourly-item:first-child {
    border: 1px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

/* Add a smooth fade effect to the edges of the scroll container */
.hourly-scroll-container {
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}