*{
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body{
     position: relative;
     background: url("assets/bg.webp") no-repeat center/cover;
     min-height: 100vh;
     display: flex;
     justify-content: center;
     align-items: center;
     padding: 15px;
}

.attr{
     position: absolute;
     bottom: 15px;
     left: 15px;
     background: rgba(0,0,0,.5);
     color: #fff;
     padding: 10px;
     border-radius: 15px;
     font-size: 18px;
}

.attr a{
     color: #1dd1a1;
     text-decoration: none;
}

.attr a:hover{
     text-decoration: underline;
}

.container{
     background: #fafafa;
     padding: 20px;
     border-radius: 10px;
     box-shadow: 0 5px 25px rgba(0,0,0,.5);
     width: 100%;
     max-width: 700px;
}

.container .search-box {
     display: flex;
     justify-content: center;
     align-items: stretch; /* Forces buttons to match input height */
     gap: 5px;
     margin: 10px 0;
     width: 100%;
}

.container .search-box :where(input, button){
     flex-grow: 1;
     flex-shrink: 0;
     border-radius: 10px;
     padding: 0.5em;
     transition: .3s;
}

.container .search-box input{
     font-size: 16px;
     border: 1px solid #bbb;
     outline: none;
     transition: .3s;
     padding: 0.7em; /* Increased padding for a larger feel */
}

.container .search-box input:focus{
     border-color: #1dd1a1;
     box-shadow: 0 0 5px #1dd1a1;
}

.container .search-box button{
     display: flex;
     align-items: center;
     justify-content: center;
     border: 1px solid #1dd1a1;
     background: #1dd1a1;
     cursor: pointer;
}

.container .search-box button:hover{
     background: #017556;
     border-color: #017556;
     color: #fff;
}

.container .weather-details{
     display: none;
     flex-direction: column;
     align-items: center;
     justify-content: flex-start;
     gap: 5px;
}

.container .weather-details.active{
     display: flex;
}

.container .weather-details .grid{
     display: grid;
     grid-template-columns: 1fr 2fr;
     gap: 10px;
}

.container .weather-details .temperature{
     display: flex;
     justify-content: center;
     align-items: center;
     flex-direction: column;
}

.container .weather-details .temperature .temperatureTxt{
     display: flex;
     justify-content: center;
     align-items: center;
     font-size: 40px;
}

.container .weather-details .info{
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     width: 100%;
}

.container .weather-details .info li{
     display: flex;
     align-items: center;
     gap: 10px;
}

.container .daily-cards {
     display: flex;
     justify-content: space-between; /* Spreads cards evenly */
     align-items: center;
     width: 100%;
     padding: 10px 0;
     gap: 8px; /* Tighter gap to fit more on screen */
     overflow-x: hidden; /* Removes horizontal scroll for a cleaner look */
}

.container .daily-cards::-webkit-scrollbar{
     height: 10px;
}

.container .daily-cards::-webkit-scrollbar-thumb{
     background: #bbb;
     border-radius: 75px;
}

/* Card Setup */
.container .daily-cards .card {
    flex: 1;
    min-width: 0;
    height: 270px; /* Increased to fit everything */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px 2px;
    background: #fff;
    border-radius: 12px;
}

.container .daily-cards .card:hover {
    transform: translateY(-5px); /* Adds a nice "Data Science Dashboard" feel */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Adjust image and text sizes inside cards to fit the smaller width */
.container .daily-cards .card img {
    width: 60px; 
    height: 60px;
    margin: 5px 0; /* Adds a little vertical breathing room */
}

/* Update this block in style.css */
.container .daily-cards .card p {
     margin: 3px 0;
     font-size: 1.1rem; /* Increased from default */
}

.container .daily-cards .card .temp{
     display: flex;
     align-items: center;
}

.container .daily-cards .card .temp svg{
     width: 16px;
     height: 16px;
}

.container .daily-cards .card .temps {
    display: flex;
    flex-direction: column; /* Stacks the High above the Low */
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.container .daily-cards .card .date {
    font-size: 0.7rem; /* Slightly smaller to fit long day names like "Wednesday" */
    color: #777;
    text-align: center;
    width: 100%;
    line-height: 1.2;
}

.container .daily-cards .card .highTemp {
    color: #e67e22; /* Warm color for High */
    font-weight: 600;
}

.container .daily-cards .card .lowTemp {
    color: #3498db; /* Cool color for Low */
}

.errTxt{
     color: #dc3545;
     font-size: 20px;
     font-weight: 500;
}

.author {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.5em;
    text-align: right;
}

.unit-toggle {
    margin: 1em 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
}

.unit-toggle label {
    margin: 0 0.45em;
    font-size: 1.1em;
    cursor: pointer;
}

.unit-toggle .unit-divider {
    margin: 0 0.35em;
}

@media screen and (max-width: 600px){
     .container .daily-cards{
          max-width: 100%;
     }
     .attr{
          width: 100%;
          bottom: 0;
          left: 0;
          border-radius: 0;
          text-align: center;
     }
}

@media screen and (max-width: 400px){
     .container .weather-details .grid{
          width: 100%;
          grid-template-columns: auto;
     }
     .container .weather-details .info{
          width: 100%;
          flex-direction: row;
          justify-content: space-between;
     }
     .container .weather-details .info li{
          gap: 5px;
     }
}

.location-selector {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.location-option {
    list-style: none;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.location-option:hover {
    background-color: #f0f0f0;
    color: #1dd1a1;
}

#geo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #1dd1a1;
    background: #fff;
    color: #1dd1a1;
    cursor: pointer;
    border-radius: 10px;
    padding: 0.5em;
    transition: .3s;
}

#geo-btn:hover {
    background: #1dd1a1;
    color: #fff;
}

/* Style the Insight Section */
.insight-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

#insight-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #e67e22; /* Vibrant orange for insight */
    border: 1px solid #e67e22;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

#insight-btn:hover {
    background: #e67e22;
    color: #fff;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.4);
}

/* Ensure suggestion text is centered under the buttons */
#suggestion-text {
    margin-top: 15px;
    text-align: center;
    font-size: 0.95rem;
    color: #444;
    font-style: italic;
    padding: 0 10px;
}

/* Container for the small icons and text at the bottom of the card */
.card-details {
    display: flex;
    flex-direction: column; /* Stacking vertically saves horizontal space */
    gap: 4px;
    width: 100%;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0; /* Subtle line to separate from temps */
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.7rem; /* Small font size for secondary data */
    color: #666;
}

/* Force icons inside the card to be tiny so they don't push the text out */
.card-icon {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.7;
}