body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, rgba(40, 141, 255, 0.2), transparent 28%),
      radial-gradient(circle at bottom right, rgba(0, 123, 255, 0.18), transparent 32%),
      linear-gradient(180deg, #e7f2ff 0%, #f8fbff 60%, #ffffff 100%);
    color: #1d2939;
    margin: 0;
    min-height: 100vh;
    padding: 30px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #0a4c8b;
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin: 0;
    letter-spacing: -0.04em;
}

.subtitle {
    margin: 12px 0 0;
    color: #4f5d73;
    max-width: 640px;
    text-align: center;
    line-height: 1.6;
    font-size: 1rem;
}

.container {
    width: min(100%, 680px);
    background: rgba(255, 255, 255, 0.94);
    padding: 28px 28px 24px;
    border-radius: 28px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.08);
    text-align: center;
    margin-top: 24px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 360px;
}

input {
    padding: 14px 16px;
    margin: 16px 0 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 15px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    color: #162333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #4f93ff;
    box-shadow: 0 0 0 4px rgba(79, 147, 255, 0.12);
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 10;
    display: none;
}

#suggestions li {
    padding: 14px 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #1d2939;
}

#suggestions li:hover {
    background-color: #eef4ff;
}

button {
    padding: 14px 22px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

#unitToggle {
    background-color: #475569;
    box-shadow: 0 14px 24px rgba(71, 85, 105, 0.16);
}

#unitToggle:hover {
    background-color: #334155;
}

.weather-info {
    margin-top: 26px;
    font-size: 1.05rem;
    color: #1f2937;
    text-align: left;
    padding: 24px 26px;
    background: #f8fbff;
    border-radius: 22px;
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.weather-info h2 {
    margin-bottom: 14px;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
}

.weather-info p {
    margin: 10px 0;
    line-height: 1.75;
}

.uv-index {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.uv-low {
    background-color: #22c55e;
}

.uv-moderate {
    background-color: #f59e0b;
    color: #111827;
}

.uv-high {
    background-color: #f97316;
}

.uv-very-high {
    background-color: #ef4444;
}

.uv-extreme {
    background-color: #7c3aed;
}

.recent-searches {
    margin-top: 28px;
    text-align: left;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 22px;
}

.recent-searches h3 {
    margin: 0 0 14px;
    color: #162433;
    font-size: 1.1rem;
}

.recent-searches ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.recent-searches li {
    padding: 14px 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.recent-searches li:hover {
    background-color: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.recent-searches li.empty {
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: default;
    box-shadow: none;
    transform: none;
}

@media (max-width: 520px) {
    .container {
        padding: 22px 18px 20px;
    }

    .weather-info {
        padding: 18px 18px;
    }

    button {
        width: 100%;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }
}
