body {
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Changed from height: 100vh */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    color: white;
    background-color: #1c1c1c;
}

.container {
    width: 90%;
    max-width: 400px;
    padding: 20px;
}

.card {
    background-color: #232323;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(55, 55, 55, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px;
}

.entry {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

#cityInput {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #333;
    color: #eee;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#cityInput::placeholder {
    color: #888;
}

#cityInput:focus {
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-btn {
    padding: 10px 15px;
    background-color: #444;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-btn:hover {
    background-color: #555;
    transform: translateY(-1px);
}

.search-btn i {
    font-size: 0.7rem;
}

#location-display {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
    margin-top: auto;
}

#weather-description {
    font-size: 1rem;
    text-transform: capitalize;
    color: #bbb;
    margin-bottom: 10px;
}

#temperature {
    font-size: 3.5rem;
    font-weight: 500;
    margin: 10px 0;
}

.weather-icon {
    width: 100px;
    height: 100px;
    margin: 10px auto;
}

.refresh-btn {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 12px;
    background-color: #2e2e2e;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(111, 111, 111, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background-color: #3a3a3a;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    margin-top: 10px;
    color: #ff4e4e;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .card {
        padding: 25px 15px;
        min-height: 400px;
    }

    .entry {
        flex-direction: column;
        gap: 8px;
    }

    #cityInput, .search-btn {
        width: 100%;
    }

    #location-display {
        font-size: 1.2rem;
    }

    #weather-description {
        font-size: 0.9rem;
    }

    #temperature {
        font-size: 3rem;
    }

    .weather-icon {
        width: 80px;
        height: 80px;
    }

    .refresh-btn {
        padding: 10px;
        font-size: 1rem;
    }
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.detail-item {
    font-size: 0.95rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item i {
    color: #888;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .weather-details {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
        padding: 10px 0;
    }

    .detail-item {
        font-size: 0.9rem;
    }

    .detail-item i {
        font-size: 1rem;
    }
}