:root {
    --primary: #721e64;
    --secondary: #2c982a;
    --glass: rgba(255, 255, 255, 0.13);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem 2rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    color: white;
    position: relative;
    overflow: hidden;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.18);
    border-radius: 50px;
    padding: 4px 14px 4px 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1.5px solid rgba(255,255,255,0.35);
    width: 100%;
    max-width: 400px;
    position: relative;
}

.search-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
}

#cityInput {
    width: 100%;
    padding: 0.8rem 0.5rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: background 0.2s;
}

#cityInput::placeholder {
    color: #dbeafe;
    opacity: 0.8;
}

#searchBtn, #locationBtn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0 8px;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
}

#locationBtn {
    margin-left: 2px;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.97);
    color: #222;
    border-radius: 0 0 16px 16px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    border: 1px solid #e0e7ef;
}

.suggestions-list li {
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.15s;
}

.suggestions-list li:hover, .suggestions-list li.active {
    background: #e0e7ef;
    color: #1e3c72;
}

.unit-toggle {
    background: rgba(255,255,255,0.18);
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    user-select: none;
    border: 1.5px solid rgba(255,255,255,0.25);
    transition: background 0.2s;
}

.unit-toggle:hover {
    background: rgba(255,255,255,0.28);
}

.location-notice {
    background: rgba(255,255,255,0.16);
    color: #fff;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.18);
    display: none;
    transition: opacity 0.2s;
}

.weather-main {
    text-align: center;
    margin: 2rem 0 1.5rem 0;
    min-height: 200px;
    transition: opacity 0.3s;
}

.temperature {
    font-size: 3.3rem;
    font-weight: 400;
    margin: 1rem 0 0.5rem 0;
    letter-spacing: 1px;
}

.weather-icon {
    width: 110px;
    height: 110px;
    margin: -0.5rem auto 0.5rem auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.23));
    display: block;
}

.city-name {
    font-size: 1.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

.description {
    text-transform: capitalize;
    font-size: 1.1rem;
    color: #e0e7ef;
    margin-bottom: 0.2rem;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.1rem;
    margin-top: 1.6rem;
}

.detail-card {
    background: var(--glass);
    padding: 1.3rem 0.8rem;
    border-radius: 16px;
    backdrop-filter: blur(5px);
    transition: transform 0.25s;
    text-align: center;
    min-width: 110px;
    border: 1px solid rgba(255,255,255,0.09);
}

.detail-card:hover {
    transform: translateY(-6px) scale(1.03);
    background: rgba(255,255,255,0.22);
}

.detail-card i {
    color: #e0e7ef;
    margin-bottom: 0.6rem;
}

.detail-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.detail-card p {
    font-size: 1rem;
    color: #e0e7ef;
    margin-top: 0.2rem;
}

@media (max-width: 480px) {
    .container {
        padding: 1.2rem;
    }
    .temperature {
        font-size: 2.1rem;
    }
    .weather-main {
        min-height: 140px;
    }
    .weather-details {
        gap: 0.7rem;
    }
}
