/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #141414;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ===== Navbar ===== */
.navbar {
    background-color: #0d0d0d;
    padding: 26px 24px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
}

.navbar h1 {
    font-size: 1.9rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
    .navbar h1 {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }

    .container {
        margin: 14px auto;
        padding: 0 14px;
    }

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

    .search-box button {
        padding:12px;
    }

    .weather-card {
        padding: 24px 16px 20px;
        border-radius: 14px;
    }

    .weather-icon {
        font-size: 3.5rem;
        margin: 14px 0 8px;
    }

    .temperature {
        font-size: 2.5rem;
    }

    .city-name {
        font-size: 1.1rem;
    }

    .details {
        padding: 14px 10px;
    }

    .detail-label {
        font-size: 0.6rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }
}

/* ===== Main Container ===== */
.container {
    max-width: 440px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ===== Search Box ===== */
.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #333;
    border-radius: 10px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box input::placeholder {
    color: #555;
}

.search-box input:focus {
    border-color: #555;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.search-box button {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    background-color: #f0f0f0;
    color: #111;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background-color 0.25s, transform 0.15s, box-shadow 0.25s;
}

.search-box button:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

.search-box button:not(:disabled):hover {
    background-color: #ffffff;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.search-box button:not(:disabled):active {
    background-color: #ccc;
    transform: translateY(0);
    box-shadow: none;
}

/* ===== Error Message ===== */
.error-msg {
    text-align: center;
    color: #e85d5d;
    margin-top: 14px;
    font-size: 0.85rem;
    min-height: 20px;
}

/* ===== Weather Card ===== */
.weather-card {
    background-color: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 36px 28px 28px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.city-name {
    font-size: 1.3rem;
    color: #ccc;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.weather-icon {
    font-size: 5rem;
    margin: 20px 0 10px;
    line-height: 1;
}

.temperature {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -1px;
}

.description {
    font-size: 1rem;
    color: #888;
    text-transform: capitalize;
    margin-top: 4px;
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

/* ===== Details Row ===== */
.details {
    display: flex;
    justify-content: space-between;
    background-color: #161616;
    border-radius: 12px;
    padding: 18px 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.detail-item:not(:last-child) {
    border-right: 1px solid #2a2a2a;
}

.detail-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.detail-value {
    font-size: 1.05rem;
    color: #ddd;
    font-weight: 600;
}