:root {
    --background: #eaf7ff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;

    --primary: #2079b8;
    --primary-dark: #14577f;

    --text: #18384d;
    --muted: #668294;

    --border: rgba(255, 255, 255, 0.9);

    --shadow:
        0 18px 45px rgba(41, 111, 151, 0.12);

    --small-shadow:
        0 8px 22px rgba(41, 111, 151, 0.1);

    --danger: #c94d4d;

    --radius-large: 28px;
    --radius-medium: 20px;
    --radius-small: 14px;
}


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


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        linear-gradient(
            145deg,
            #dff3ff 0%,
            #f6fbff 48%,
            #dff4ff 100%
        );

    overflow-x: hidden;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


.background-orb {
    position: fixed;

    border-radius: 50%;

    filter: blur(15px);

    pointer-events: none;

    opacity: 0.5;

    z-index: -1;
}


.orb-one {
    width: 380px;
    height: 380px;

    top: -120px;
    left: -120px;

    background: #90d9ff;
}


.orb-two {
    width: 420px;
    height: 420px;

    right: -160px;
    bottom: -170px;

    background: #b8e8ff;
}


.app-shell {
    width: min(1180px, calc(100% - 36px));

    margin: 0 auto;

    padding:
        28px
        0
        36px;
}


/* Header */

.app-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}


.brand {
    display: flex;

    align-items: center;

    gap: 13px;
}


.brand-icon {
    width: 56px;
    height: 56px;

    display: grid;

    place-items: center;

    border-radius: 18px;

    font-size: 29px;

    background: rgba(255, 255, 255, 0.75);

    border: 1px solid var(--border);

    box-shadow: var(--small-shadow);
}


.brand h1 {
    font-size: 1.55rem;

    letter-spacing: -0.5px;
}


.brand p {
    margin-top: 3px;

    color: var(--muted);

    font-size: 0.88rem;
}


.unit-toggle {
    min-width: 52px;
    height: 44px;

    border: 1px solid var(--border);

    border-radius: 14px;

    color: var(--primary-dark);

    font-weight: 800;

    background: rgba(255, 255, 255, 0.78);

    box-shadow: var(--small-shadow);

    transition: 0.2s ease;
}


.unit-toggle:hover {
    transform: translateY(-2px);

    background: white;
}


/* Search */

.search-section {
    margin-bottom: 24px;
}


.search-wrapper {
    position: relative;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        auto;

    gap: 11px;
}


.search-input-wrapper {
    position: relative;
}


.search-icon {
    position: absolute;

    left: 18px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 17px;

    z-index: 2;
}


#cityInput {
    width: 100%;
    height: 56px;

    padding:
        0
        18px
        0
        49px;

    border: 1px solid var(--border);

    border-radius: 18px;

    outline: none;

    color: var(--text);

    background: rgba(255, 255, 255, 0.82);

    box-shadow: var(--small-shadow);

    transition: 0.2s ease;
}


#cityInput:focus {
    border-color:
        rgba(32, 121, 184, 0.35);

    background: white;

    box-shadow:
        0 0 0 4px
        rgba(32, 121, 184, 0.08),
        var(--small-shadow);
}


.search-btn,
.location-btn {
    height: 56px;

    border: none;

    border-radius: 18px;

    box-shadow: var(--small-shadow);

    transition: 0.2s ease;
}


.search-btn {
    padding: 0 28px;

    color: white;

    font-weight: 800;

    background:
        linear-gradient(
            135deg,
            #2784c4,
            #176ca7
        );
}


.search-btn:hover {
    transform: translateY(-2px);
}


.location-btn {
    width: 58px;

    color: var(--primary-dark);

    font-size: 21px;

    background: rgba(255, 255, 255, 0.82);

    border: 1px solid var(--border);
}


.location-btn:hover {
    transform: translateY(-2px);

    background: white;
}


/* Autocomplete */

.autocomplete-list {
    position: absolute;

    left: 0;
    right: 0;

    top: calc(100% + 8px);

    z-index: 50;

    overflow: hidden;

    border-radius: 16px;

    background: rgba(255, 255, 255, 0.96);

    box-shadow:
        0 18px 45px
        rgba(24, 76, 108, 0.18);
}


.autocomplete-item {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 13px 16px;

    border: none;

    border-bottom:
        1px solid
        rgba(37, 96, 129, 0.08);

    color: var(--text);

    text-align: left;

    background: transparent;
}


.autocomplete-item:hover {
    background: #edf8ff;
}


.autocomplete-item:last-child {
    border-bottom: none;
}


/* Main Content */

.weather-content {
    display: grid;

    gap: 22px;
}


.current-weather-card,
.hourly-section,
.forecast-section,
.favorites-section,
.state-card,
.welcome-state {
    border: 1px solid var(--border);

    border-radius: var(--radius-large);

    background:
        rgba(255, 255, 255, 0.68);

    box-shadow: var(--shadow);

    backdrop-filter: blur(22px);
}


/* Current Weather */

.current-weather-card {
    padding: 30px;
}


.current-weather-top {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;
}


.eyebrow {
    margin-bottom: 7px;

    color: var(--primary);

    font-size: 0.73rem;

    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


.city-title-row {
    display: flex;

    align-items: center;

    gap: 9px;
}


.city-title-row h2 {
    font-size: clamp(
        1.7rem,
        3vw,
        2.35rem
    );

    letter-spacing: -1px;
}


.favorite-btn {
    width: 38px;
    height: 38px;

    display: grid;

    place-items: center;

    border: none;

    border-radius: 12px;

    color: #df9b20;

    font-size: 25px;

    background: rgba(255, 255, 255, 0.75);

    transition: 0.2s ease;
}


.favorite-btn:hover {
    transform:
        translateY(-2px)
        scale(1.04);
}


.favorite-btn.active {
    color: #e89d16;
}


.weather-date {
    margin-top: 7px;

    color: var(--muted);

    font-size: 0.9rem;
}


.condition-summary {
    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 200px;
}


.current-weather-icon {
    font-size: 52px;

    line-height: 1;
}


.condition-name {
    font-size: 1rem;

    font-weight: 800;
}


.condition-description {
    margin-top: 4px;

    color: var(--muted);

    font-size: 0.86rem;

    text-transform: capitalize;
}


/* Temperature */

.temperature-section {
    margin: 25px 0;
}


.temperature-main {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 25px;
}


.main-temperature {
    font-size: clamp(
        5rem,
        12vw,
        8rem
    );

    font-weight: 700;

    line-height: 0.9;

    letter-spacing: -8px;

    color: #143f5b;
}


.temperature-extra {
    display: flex;

    flex-direction: column;

    gap: 8px;

    color: var(--muted);
}


.temperature-extra strong {
    color: var(--text);
}


/* Weather Details */

.weather-details-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 12px;
}


.detail-card {
    min-height: 105px;

    padding: 17px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    gap: 12px;

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.65);

    border: 1px solid var(--border);
}


.detail-icon {
    font-size: 23px;
}


.detail-card p {
    margin-bottom: 5px;

    color: var(--muted);

    font-size: 0.76rem;
}


.detail-card strong {
    font-size: 0.94rem;
}


/* Forecast Sections */

.hourly-section,
.forecast-section,
.favorites-section {
    padding: 26px;
}


.section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 18px;
}


.section-heading h2 {
    font-size: 1.2rem;
}


.section-note {
    padding: 7px 10px;

    border-radius: 999px;

    color: var(--primary-dark);

    font-size: 0.72rem;

    background:
        rgba(224, 245, 255, 0.9);
}


/* Upcoming Forecast */

.hourly-forecast {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 12px;
}


.hourly-card {
    min-width: 0;

    padding: 18px 12px;

    border: 1px solid var(--border);

    border-radius: 18px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.8),
            rgba(230, 247, 255, 0.58)
        );

    transition: 0.2s ease;
}


.hourly-card:hover {
    transform: translateY(-3px);

    box-shadow: var(--small-shadow);
}


.hourly-time {
    color: #315b74;

    font-size: 0.82rem;

    font-weight: 800;
}


.hourly-icon {
    margin: 10px 0;

    font-size: 31px;
}


.hourly-temp {
    color: #173f59;

    font-size: 1.12rem;

    font-weight: 800;
}


.hourly-desc {
    margin-top: 7px;

    overflow: hidden;

    color: var(--muted);

    font-size: 0.74rem;

    text-overflow: ellipsis;

    white-space: nowrap;

    text-transform: capitalize;
}


/* 5 Day Forecast */

.forecast-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;
}


.forecast-card {
    padding: 20px 14px;

    text-align: center;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.67);

    transition: 0.2s ease;
}


.forecast-card:hover {
    transform: translateY(-3px);

    box-shadow: var(--small-shadow);
}


.forecast-day {
    color: #315b74;

    font-weight: 800;
}


.forecast-date {
    margin-top: 3px;

    color: var(--muted);

    font-size: 0.73rem;
}


.forecast-icon {
    margin: 13px 0 9px;

    font-size: 33px;
}


.forecast-condition {
    min-height: 30px;

    color: var(--muted);

    font-size: 0.76rem;

    text-transform: capitalize;
}


.forecast-temp {
    margin-top: 11px;

    font-size: 1.04rem;

    font-weight: 800;
}


.forecast-low {
    margin-left: 5px;

    color: var(--muted);

    font-weight: 600;
}


/* Favorites */

.favorites-container {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}


.favorite-city {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 11px 14px;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: var(--primary-dark);

    font-weight: 700;

    background: rgba(255, 255, 255, 0.78);

    transition: 0.2s ease;
}


.favorite-city:hover {
    transform: translateY(-2px);

    background: white;
}


.favorite-remove {
    display: grid;

    place-items: center;

    width: 20px;
    height: 20px;

    border: none;

    border-radius: 50%;

    color: #8b5960;

    font-size: 13px;

    background: rgba(211, 81, 81, 0.09);
}


.favorites-empty {
    color: var(--muted);

    font-size: 0.86rem;
}


/* Welcome / Loading / Error */

.state-card,
.welcome-state {
    padding: 55px 25px;

    text-align: center;
}


.welcome-icon,
.state-icon {
    margin-bottom: 14px;

    font-size: 48px;
}


.welcome-state h2,
.state-card h2 {
    margin-bottom: 8px;
}


.welcome-state p,
.state-card p {
    max-width: 520px;

    margin: 0 auto;

    color: var(--muted);

    line-height: 1.6;
}


.error-state {
    color: var(--danger);
}


.error-state p {
    color: #9b6060;
}


/* Loader */

.loader {
    width: 42px;
    height: 42px;

    margin:
        0
        auto
        18px;

    border:
        4px solid
        rgba(32, 121, 184, 0.15);

    border-top-color: var(--primary);

    border-radius: 50%;

    animation:
        loader-spin
        0.8s
        linear
        infinite;
}


@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}


/* Footer - Single Centered Line */

.app-footer {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-top: 25px;

    padding: 18px 4px;

    color: var(--muted);

    font-size: 0.78rem;

    text-align: center;
}


.app-footer p {
    margin: 0;

    text-align: center;
}


/* Utility */

.hidden {
    display: none !important;
}