/* Add this at the bottom of your style.css or replace the top layouts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    /* Pleasant, serene morning sky nature gradient */
    background: linear-gradient(180deg, #a1c4fd 0%, #c2e9fb 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center; 
    color: #2c3e50; /* Deep blue-gray for ultra-crisp text readability on light backgrounds */
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* --- Clean, Minimalist CSS Clouds --- */
body::before, body::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
    filter: blur(40px);
}

body::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -50px;
    filter: blur(50px);
}

/* Main Container */
.weather-container {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.5s ease-in-out;
    z-index: 1; /* Sits beautifully above the background decorations */
}

/* Control Layout */
.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 0; 
    transition: margin 0.5s ease;
}

.weather-container.has-data .search-section {
    margin-bottom: 25px;
}

/* Frosted Ocean-Glass Search Box */
.search-box {
    display: flex;
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(161, 196, 253, 0.3);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 18px;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.search-box input::placeholder {
    color: rgba(44, 62, 80, 0.5);
}

/* Pleasant Ocean Blue Buttons */
.search-box button, #location-btn {
    background: #4a90e2;
    color: #fff;
    border: none;
    outline: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

#location-btn {
    padding: 10px 16px;
    font-size: 18px;
}

.search-box button:hover, #location-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* Soft Soft Error Alert */
.error-msg {
    color: #d9534f;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    display: none;
    background: rgba(217, 83, 79, 0.1);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(217, 83, 79, 0.2);
    font-weight: 500;
}

/* Beautiful White-Cloud Glass Dashboard Card */
.weather-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(44, 62, 80, 0.1);
    
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.weather-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

#city-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    color: #2c3e50;
}

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

/* Make icons glow gently like sunlight */
#weather-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.temp-display {
    font-size: 64px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -1px;
    color: #1a252f;
}

#weather-desc {
    font-size: 16px;
    text-transform: capitalize;
    color: rgba(44, 62, 80, 0.8);
    margin-top: 6px;
    font-weight: 500;
}

/* Grid Layout for Stats */
.weather-details {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 25px;
}

.detail-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(44, 62, 80, 0.1);
}

.detail-item:last-child {
    border: none;
}

.label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(44, 62, 80, 0.6);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    font-weight: 600;
}

.value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* Forecast Layout */
.forecast-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.forecast-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.forecast-container::-webkit-scrollbar {
    height: 4px;
}
.forecast-container::-webkit-scrollbar-thumb {
    background: rgba(44, 62, 80, 0.15);
    border-radius: 10px;
}

.forecast-item {
    flex: 0 0 80px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 12px 6px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.forecast-day {
    font-size: 12px;
    color: rgba(44, 62, 80, 0.7);
    font-weight: 600;
}

.forecast-img {
    width: 44px;
    height: 44px;
}

.forecast-temp {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}
.app-header {
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.5s ease-in-out;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a252f;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.app-header p {
    font-size: 14px;
    color: rgba(44, 62, 80, 0.7);
    font-weight: 400;
}

/* Elegant micro-transition: shrinks slightly when weather card pulls up to look tight and clean */
.weather-container.has-data .app-header {
    margin-bottom: 15px;
}
.weather-container.has-data .app-header h1 {
    font-size: 22px;
}
.weather-container.has-data .app-header p {
    display: none; /* Hides subtext when data shows up to keep view compact */
}