* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* ===== BODY ===== */
body {
    background: #121212;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center; /* perfect for PC */
    padding: 20px;
}

/* ===== CARD ===== */
.card {
    width: 100%;
    max-width: 430px;
    background: #1e1e1e;
    color: #ffffff;
    padding: 35px 30px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.45);
}

/* ===== SEARCH ===== */
.search {
    display: flex;
    align-items: center;
    width: 100%;
}

.search input {
    flex: 1;
    height: 55px;
    padding: 0 20px;
    border-radius: 30px;
    border: 2px solid #444;
    background: #2b2b2b;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search input::placeholder {
    color: #aaa;
}

.search button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    margin-left: 12px;
    border: none;
    background: #4A90E2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}

.search button:hover {
    background: #357ABD;
}

.search button img {
    width: 20px;
}

/* ===== ERROR ===== */
.error {
    display: none;
    margin-top: 10px;
    font-size: 14px;
    color: #ff4d4d;
    text-align: left;
}

/* ===== WEATHER ===== */
.weather {
    display: none;
}

.weather-icon {
    width: 150px;
    margin: 25px 0;
}

.weather h1 {
    font-size: 64px;
    font-weight: 500;
}

.weather h2 {
    font-size: 36px;
    margin-top: -8px;
    font-weight: 400;
}

/* ===== DETAILS ===== */
.details {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.col {
    display: flex;
    align-items: center;
    text-align: left;
}

.col img {
    width: 40px;
    margin-right: 12px;
}

.humidity,
.wind {
    font-size: 24px;
    font-weight: 500;
}

/* =======================
   📱 MOBILE FIX (IMPORTANT)
======================= */
@media (max-width: 480px) {

    body {
        align-items: flex-start; /* FIX TOP GAP */
        padding-top: 60px;       /* natural spacing */
    }

    .card {
        padding: 25px 20px;
        border-radius: 22px;
    }

    .search input {
        height: 50px;
        font-size: 14px;
    }

    .search button {
        width: 50px;
        height: 50px;
    }

    .weather-icon {
        width: 120px;
    }

    .weather h1 {
        font-size: 48px;
    }

    .weather h2 {
        font-size: 30px;
    }

    .details {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}
