@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #101d42, #253f72, #397c9d);
    color: white;
    padding: 25px 15px;
}

.container {
    max-width: 950px;
    margin: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 55px;
}

.logo {
    font-size: 25px;
    font-weight: 700;
}

.tagline {
    color: #c8d8ed;
    font-size: 13px;
}

.search-section {
    text-align: center;
    margin-bottom: 35px;
}

.search-section h1 {
    font-size: clamp(26px, 5vw, 38px);
    margin-bottom: 10px;
}

.search-section p {
    color: #cbd9ed;
    font-size: 14px;
}

.search-box {
    max-width: 580px;
    margin: 25px auto 0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 18px;
    padding: 9px 12px;
    backdrop-filter: blur(15px);
}

.search-box span {
    font-size: 21px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 15px;
    padding: 10px 0;
    font-family: inherit;
}

.search-box input::placeholder {
    color: #d1dbea;
}

.search-box button {
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    background: #7ee4dc;
    color: #102a48;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}

.search-box button:hover {
    background: white;
    transform: scale(1.04);
}

#message {
    margin-top: 15px;
    min-height: 22px;
    color: #ffe3a1;
}

.hidden {
    display: none !important;
}

.main-card {
    background: linear-gradient(130deg,
        rgba(255,255,255,0.19),
        rgba(255,255,255,0.07));
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 28px;
    padding: 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.18);
}

.location-info h2 {
    font-size: 28px;
}

.location-info p {
    color: #cbd9ed;
    margin-top: 4px;
    font-size: 13px;
}

.main-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.main-weather img {
    width: 120px;
    height: 120px;
}

.main-weather h1 {
    font-size: clamp(48px, 9vw, 75px);
    font-weight: 600;
    line-height: 1.2;
}

.main-weather p {
    color: #d8e6f4;
    font-size: 17px;
}

.feels-like {
    text-align: center;
    color: #d6e3f0;
}

.temp-range {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 18px 0;
}

.temp-range span {
    font-size: 15px;
}

.unit-control {
    text-align: center;
    margin-top: 18px;
}

.unit-control button {
    background: rgba(255,255,255,0.18);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 9px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
}

.unit-control button:hover {
    background: rgba(255,255,255,0.3);
}

.section-title {
    margin: 35px 0 20px;
    font-size: 22px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.detail-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    padding: 20px 10px;
    text-align: center;
    transition: 0.3s;
}

.detail-card:hover {
    background: rgba(255,255,255,0.23);
    transform: translateY(-5px);
}

.detail-card span {
    font-size: 27px;
}

.detail-card p {
    color: #cbd9ed;
    font-size: 12px;
    margin: 10px 0;
}

.detail-card h3 {
    font-size: 16px;
    font-weight: 600;
}

.updated {
    color: #cbd9ed;
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
}

footer {
    text-align: center;
    margin-top: 55px;
    color: #bdcfe2;
    font-size: 12px;
    line-height: 2;
}

@media(max-width: 700px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 40px;
    }

    .main-card {
        padding: 22px 15px;
    }

    .main-weather img {
        width: 90px;
        height: 90px;
    }

    .section-title {
        font-size: 19px;
    }
}

@media(max-width: 380px) {
    .search-box button {
        padding: 10px 13px;
    }

    .temp-range {
        gap: 15px;
    }
}
header {
    text-align: center;
}

header h1 {
    text-align: center;
}

.weather-card {
    text-align: center;
}

.weather-card h2,
.weather-card p {
    text-align: center;
}