* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(to bottom, #a2caff, #ffffff);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: #333;
}

.search-box {
    width: 100%;
    max-width: 400px;
    display: flex;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    outline: none;
}

.search-box button.get-data {
    background-color: #0077ff;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button.get-data:hover {
    background-color: #005fcc;
}

.img-box {
    width: 100%;
    max-width: 480px;
    height: 260px;
    border-radius: 15px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 30px;
}

.weather-info {
    display: flex;
    justify-content: space-between;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 440px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 20px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    color: white;
    text-align: center;
    align-items: center;
    min-width: 160px;
}

.city-name {
    font-weight: 700;
    font-size: 1.6rem;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.temperature {
    font-weight: 600;
    font-size: 1.4rem;
    white-space: nowrap;
}

.detail-box {
    width: 100%;
    max-width: 480px;
    display: flex;
    gap: 25px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.detail-box>div {
    flex: 1 1 calc(45% - 12px);
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    color: #444;
    text-align: center;
    transition: transform 0.2s ease;
    min-width: 180px;
}

.detail-box>div:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.temperature-felt {
    font-weight: 700;
    font-size: 2.2rem;
}

.temperature-felt span {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: #777;
    margin-top: 6px;
}

.visibility, .air-pressure, .humidity,.SW {
    font-weight: 600;
    font-size: 1.3rem;
    color: #222;
}

.visibility span, .air-pressure span, .humidity span, .SW span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    margin-top: 6px;
}

@media screen and (max-width: 540px) {
    .search-box {
        max-width: 100%;
        flex-direction: column;
    }

    .search-box input[type="text"] {
        padding: 12px 15px;
        font-size: 1rem;
        width: 100%;
        border-bottom: 1px solid #ddd;
    }

    .search-box button.get-data {
        padding: 12px;
        font-size: 1rem;
        width: 100%;
        border-radius: 0 0 10px 10px;
        margin-top: 5px;
    }

    .img-box {
        max-width: 100%;
        height: 200px;
        border-radius: 10px;
    }

    .weather-info {
        max-width: calc(100% - 30px);
        height: 45px;
        font-size: 0.9rem;
        padding: 5px 15px;
    }

    .city-name {
        font-size: 1.2rem;
        max-width: 65%;
    }

    .temperature {
        font-size: 1.1rem;
    }

    .detail-box {
        flex-direction: column;
        gap: 18px;
    }

    .detail-box>div {
        flex: 1 1 100%;
        min-width: auto;
    }

    .temperature-felt {
        font-size: 1.8rem;
    }

    .visibility,
    .air-pressure,
    .humidity,
    .SW {
        font-size: 1.1rem;
    }
}