/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: Arial, Helvetica, sans-serif;
    height: 100vh;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.5s ease;
}

/* CONTAINER APP */
.app {
    width: 100%;
    max-width: 350px;
    padding: 20px;
    text-align: center;
}

/* SEARCH BOX */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 20px;
    outline: none;
}

.search-box input:focus {
    box-shadow: 0 0 0 2px rgba(6, 60, 143, 0.2);
}

.search-box button {
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.1s ease; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-box button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-box button:hover {
    background: #3730a3;
}

/* WEATHER CARD */
.weather-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.weather-card:hover {
    transform: translateY(-5px);
}

.forecast {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    color: white;
    width: 100px;
    backdrop-filter: blur(10px);
}
.forecast-item p{
    margin: 5px 0;
}

.detail-box {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.detail-box:hover {
    transform: translateY(-5px);
}

/* TEXT STYLE */
.city {
    font-size: 22px;
    margin-bottom: 10px;
}

.weather-icon {
    font-size: 40px;
    margin: 10px 0;
}

.weather-icon img {
    width: 80px;
}

#weatherIcon {
    transition: 0.3s;
}

.temperature {
    font-size: 48px;
    font-weight: bold;
}

.condition {
    font-size: 18px;
    margin-top: 5px;
}

/* DETAIL */
.details {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.detail-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 15px;
    width: 48%;
    text-align: center;
    color: white;
}

.detail-box h3 {
    margin-top: 5px;
    font-size: 18px;
}

#errorMsg {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 300px) {
    .app {
        padding: 20px 15px;
    }

    .search-box {
        flex-direction: column;
    }

    #searchBtn {
        max-width: 100%;
    }
}