:root {
    color-scheme: dark;

    --background: #0d1117;
    --surface: rgba(24, 30, 40, 0.82);
    --surface-solid: #171d27;
    --surface-hover: #202938;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text: #f7f9fc;
    --muted: #9ca8ba;

    --accent: #72a7ff;
    --accent-strong: #4b8cff;

    --danger: #ff7b86;
    --success: #6de1a5;

    --radius-small: 12px;
    --radius: 20px;
    --radius-large: 30px;

    --shadow:
        0 30px 80px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

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

    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(72, 116, 190, 0.16),
            transparent 38%
        ),
        var(--background);

    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

/* ---------------------------------------------------------- */
/* BACKGROUND                                                 */
/* ---------------------------------------------------------- */

.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    opacity: 0.22;
}

.ambient-one {
    width: 420px;
    height: 420px;
    background: #277fff;
    top: -180px;
    right: -100px;
}

.ambient-two {
    width: 360px;
    height: 360px;
    background: #6544ff;
    left: -180px;
    bottom: -160px;
}

/* ---------------------------------------------------------- */
/* HEADER                                                     */
/* ---------------------------------------------------------- */

.topbar {
    height: 84px;

    display: flex;
    align-items: center;

    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;

    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

    display: grid;
    place-items: center;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #8cbdff,
            #4d85ff
        );

    color: white;
    font-size: 23px;

    box-shadow:
        0 12px 32px rgba(69, 130, 255, 0.28);
}

.brand strong,
.brand span {
    display: block;
}

.brand strong {
    font-size: 16px;
}

.brand span {
    margin-top: 2px;

    color: var(--muted);
    font-size: 12px;
}

/* ---------------------------------------------------------- */
/* PAGE                                                       */
/* ---------------------------------------------------------- */

.page {
    position: relative;
    z-index: 1;

    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.auth-layout {
    min-height: calc(100vh - 164px);

    display: grid;
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(360px, 0.8fr);

    align-items: center;
    gap: 80px;
}

/* ---------------------------------------------------------- */
/* HERO                                                       */
/* ---------------------------------------------------------- */

.hero {
    max-width: 700px;
}

.eyebrow {
    margin: 0 0 12px;

    color: var(--accent);
    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.16em;
}

.hero h1 {
    margin: 0;

    font-size: clamp(52px, 6vw, 86px);
    line-height: 0.99;
    letter-spacing: -0.055em;

    max-width: 800px;
}

.hero h1 span {
    color: var(--accent);
}

.hero > p {
    max-width: 570px;

    margin: 30px 0 0;

    color: var(--muted);

    font-size: 18px;
    line-height: 1.7;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;

    gap: 28px;

    margin-top: 42px;

    color: #c9d1dc;
    font-size: 14px;
}

.hero-points div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-points span {
    color: var(--accent);
}

/* ---------------------------------------------------------- */
/* AUTH CARD                                                  */
/* ---------------------------------------------------------- */

.auth-card {
    padding: 12px;

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

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

    background:
        rgba(18, 24, 33, 0.78);

    box-shadow:
        var(--shadow);

    backdrop-filter: blur(28px);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;

    padding: 5px;

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.035);
}

.tab {
    padding: 12px 10px;

    border: 0;
    border-radius: 12px;

    background: transparent;
    color: var(--muted);

    font-weight: 700;

    transition: 160ms ease;
}

.tab.active {
    background: var(--surface-hover);
    color: var(--text);

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.24);
}

form {
    display: grid;
    gap: 20px;

    padding: 30px 24px 24px;
}

.form-heading {
    margin-bottom: 3px;
}

.form-heading h2 {
    margin: 0 0 7px;
    font-size: 26px;
}

.form-heading p {
    margin: 0;

    color: var(--muted);
    line-height: 1.5;
}

label {
    display: grid;
    gap: 9px;

    color: #d8dee8;

    font-size: 13px;
    font-weight: 700;
}

input {
    width: 100%;

    padding: 14px 15px;

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

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

    outline: none;

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

    color: var(--text);

    transition: 160ms ease;
}

input:focus {
    border-color:
        rgba(114, 167, 255, 0.7);

    box-shadow:
        0 0 0 4px
        rgba(75, 140, 255, 0.11);
}

.primary-button,
.secondary-button {
    border: 0;
    border-radius: 12px;

    font-weight: 750;

    transition:
        transform 150ms ease,
        background 150ms ease,
        opacity 150ms ease;
}

.primary-button {
    padding: 15px 18px;

    background:
        linear-gradient(
            135deg,
            #77abff,
            #4e83f8
        );

    color: white;

    box-shadow:
        0 12px 28px
        rgba(69, 126, 255, 0.25);
}

.secondary-button {
    padding: 11px 15px;

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

    color: var(--text);

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

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.location-box {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 14px;

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

    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.025);
}

.location-box strong,
.location-box span {
    display: block;
}

.location-box strong {
    margin-bottom: 4px;
    font-size: 13px;
}

.location-box span {
    color: var(--muted);
    font-size: 12px;
}

.form-error {
    min-height: 18px;

    margin: -4px 0 0;

    color: var(--danger);

    font-size: 13px;
}

/* ---------------------------------------------------------- */
/* DASHBOARD                                                  */
/* ---------------------------------------------------------- */

.dashboard {
    padding-top: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 30px;

    margin-bottom: 40px;
}

.dashboard-header h1 {
    margin: 0;

    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.045em;
}

.dashboard-header h1 span {
    color: var(--accent);
}

.muted {
    color: var(--muted);
}

.loading-card {
    padding: 60px;

    text-align: center;

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

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

    color: var(--muted);

    background: var(--surface);
}

.current-weather {
    display: grid;
    grid-template-columns:
        minmax(320px, 1fr)
        minmax(420px, 1fr);

    gap: 28px;

    padding: 38px;

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

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

    background:
        linear-gradient(
            145deg,
            rgba(40, 60, 91, 0.78),
            rgba(18, 24, 34, 0.88)
        );

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

.current-main {
    display: flex;
    align-items: center;
    gap: 30px;
}

.weather-icon {
    font-size: 84px;
    line-height: 1;
}

.temperature-row {
    display: flex;
    align-items: flex-start;
}

#currentTemperature {
    font-size: clamp(74px, 8vw, 116px);

    line-height: 0.85;

    font-weight: 250;
    letter-spacing: -0.065em;
}

.degree {
    margin-top: 2px;

    color: var(--accent);

    font-size: 46px;
    font-weight: 300;
}

.current-main h2 {
    margin:
        16px 0 6px;

    font-size: 20px;
}

.current-main p {
    margin: 0;
    font-size: 13px;
}

.weather-metrics {
    display: grid;
    grid-template-columns:
        repeat(2, 1fr);

    gap: 12px;
}

.metric {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: 100px;

    padding: 20px;

    border:
        1px solid
        rgba(255, 255, 255, 0.07);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.035);
}

.metric span {
    margin-bottom: 8px;

    color: var(--muted);
    font-size: 12px;
}

.metric strong {
    font-size: 21px;
}

/* ---------------------------------------------------------- */
/* FORECAST                                                   */
/* ---------------------------------------------------------- */

.forecast-section {
    margin-top: 44px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}

.section-title h2 {
    margin: 0;
    font-size: 30px;
}

.forecast-grid {
    display: grid;
    grid-template-columns:
        repeat(7, minmax(130px, 1fr));

    gap: 12px;
}

.forecast-day {
    padding: 21px 16px;

    text-align: center;

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

    border-radius:
        var(--radius);

    background:
        rgba(24, 30, 40, 0.72);

    transition:
        transform 150ms ease,
        border 150ms ease;
}

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

    border-color:
        rgba(114, 167, 255, 0.3);
}

.forecast-day.today {
    background:
        linear-gradient(
            145deg,
            rgba(59, 101, 166, 0.4),
            rgba(24, 30, 40, 0.85)
        );

    border-color:
        rgba(114, 167, 255, 0.28);
}

.forecast-day-name {
    margin-bottom: 16px;

    color: var(--muted);
    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.forecast-icon {
    margin-bottom: 13px;
    font-size: 36px;
}

.forecast-temperatures {
    display: flex;
    justify-content: center;
    gap: 7px;

    margin-bottom: 10px;

    font-size: 16px;
}

.forecast-low {
    color: var(--muted);
}

.forecast-rain {
    color: #85b9ff;
    font-size: 12px;
}

/* ---------------------------------------------------------- */
/* TOAST                                                      */
/* ---------------------------------------------------------- */

.toast {
    position: fixed;

    left: 50%;
    bottom: 26px;

    transform:
        translate(-50%, 20px);

    padding: 12px 18px;

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

    border-radius: 13px;

    background: #202733;

    color: white;

    opacity: 0;
    pointer-events: none;

    transition: 180ms ease;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.35);

    z-index: 50;
}

.toast.visible {
    opacity: 1;

    transform:
        translate(-50%, 0);
}

/* ---------------------------------------------------------- */
/* RESPONSIVE                                                 */
/* ---------------------------------------------------------- */

@media (max-width: 1000px) {

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero {
        padding-top: 30px;
    }

    .current-weather {
        grid-template-columns: 1fr;
    }

    .forecast-grid {
        grid-template-columns:
            repeat(4, 1fr);
    }
}

@media (max-width: 650px) {

    .topbar,
    .page {
        padding-left: 18px;
        padding-right: 18px;
    }

    .page {
        padding-top: 20px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .auth-card {
        border-radius: 22px;
    }

    form {
        padding:
            26px 14px 18px;
    }

    .hero-points {
        gap: 16px;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .current-weather {
        padding: 25px;
    }

    .current-main {
        gap: 18px;
    }

    .weather-icon {
        font-size: 55px;
    }

    #currentTemperature {
        font-size: 72px;
    }

    .weather-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .forecast-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .location-box {
        align-items: flex-start;
        flex-direction: column;
    }
}
