:root {
    color-scheme: dark;
    --bg: #07090f;
    --panel: rgba(16, 20, 31, 0.78);
    --panel-strong: rgba(20, 25, 39, 0.96);
    --panel-soft: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --text: #f7f8fb;
    --muted: #a7afc2;
    --muted-strong: #cbd1dd;
    --cyan: #4de3ff;
    --green: #49f2a7;
    --rose: #ff5c9a;
    --amber: #ffd166;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
    --radius: 8px;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(77, 227, 255, 0.18), transparent 28rem),
        radial-gradient(circle at 88% 4%, rgba(255, 92, 154, 0.14), transparent 30rem),
        linear-gradient(135deg, #07090f 0%, #0c111d 44%, #080a10 100%);
    color: var(--text);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* .brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(77, 227, 255, 0.18), rgba(73, 242, 167, 0.15)),
        rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 34px rgba(77, 227, 255, 0.12);
    color: var(--cyan);
    font-weight: 800;
} */

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 1.08rem;
    letter-spacing: 0;
}

.brand-copy small,
.section-kicker,
.eyebrow {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.top-nav a {
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 6px;
    color: var(--muted-strong);
    font-size: 0.9rem;
    transition: background 180ms ease, color 180ms ease;
}

.top-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.install-button {
    min-height: 48px;
    padding: 0 17px;
    border: 1px solid rgba(73, 242, 167, 0.36);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(73, 242, 167, 0.18), rgba(77, 227, 255, 0.1));
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 14px 34px rgba(73, 242, 167, 0.1);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.install-button:hover {
    transform: translateY(-1px);
    border-color: rgba(77, 227, 255, 0.5);
    background: linear-gradient(135deg, rgba(73, 242, 167, 0.24), rgba(77, 227, 255, 0.14));
}

.install-button[hidden] {
    display: none;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    align-items: center;
    gap: 44px;
    min-height: calc(100vh - 132px);
    padding: 22px 0 56px;
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--green);
}

.eyebrow::before {
    width: 34px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--green), var(--cyan));
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 730px;
    margin-bottom: 20px;
    font-size: clamp(2.45rem, 4.8vw, 4.55rem);
    line-height: 1;
    letter-spacing: 0;
}

.hero-text {
    max-width: 560px;
    margin-bottom: 28px;
    color: var(--muted-strong);
    font-size: 1.08rem;
    line-height: 1.75;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-row span,
.status-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.trust-row span {
    padding: 10px 14px;
}

.download-panel,
.result-section,
.feature-strip article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.download-panel {
    position: relative;
    overflow: hidden;
    padding: 26px;
}

.download-panel::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(120deg, rgba(77, 227, 255, 0.14), transparent 28%),
        linear-gradient(300deg, rgba(255, 92, 154, 0.12), transparent 38%);
}

.panel-heading,
.download-form,
.loader-stage {
    position: relative;
    z-index: 1;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.panel-heading h2 {
    margin: 6px 0 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.status-pill {
    flex: 0 0 auto;
    padding: 8px 11px;
}

.status-pill.is-working {
    border-color: rgba(77, 227, 255, 0.42);
    color: var(--cyan);
}

.status-pill.is-error {
    border-color: rgba(255, 92, 154, 0.55);
    color: #ff9abc;
}

.status-pill.is-success {
    border-color: rgba(73, 242, 167, 0.46);
    color: var(--green);
}

.download-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

.input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    min-height: 62px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(2, 5, 12, 0.58);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-wrap:focus-within {
    border-color: rgba(77, 227, 255, 0.52);
    box-shadow: 0 0 0 4px rgba(77, 227, 255, 0.08);
}

.input-wrap input {
    width: 100%;
    min-width: 0;
    height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.98rem;
}

.input-wrap input::placeholder {
    color: rgba(203, 209, 221, 0.5);
}

.icon-action {
    min-width: 58px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.icon-action:hover {
    transform: translateY(-1px);
    border-color: rgba(77, 227, 255, 0.4);
    background: rgba(77, 227, 255, 0.12);
}

.icon-action.muted {
    color: var(--muted-strong);
}

.field-message {
    min-height: 23px;
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.field-message.is-error {
    color: #ff9abc;
}

.field-message.is-success {
    color: #95f7c9;
}

.primary-button {
    position: relative;
    display: inline-grid;
    width: 100%;
    min-height: 56px;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(77, 227, 255, 0.98), rgba(73, 242, 167, 0.98) 54%, rgba(255, 209, 102, 0.98));
    color: #061018;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(73, 242, 167, 0.18);
    transition: transform 180ms ease, filter 180ms ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    filter: saturate(1.12);
}

.primary-button:disabled {
    cursor: wait;
    transform: none;
    filter: grayscale(0.12);
    opacity: 0.85;
}

.button-loader {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(6, 16, 24, 0.2);
    border-top-color: #061018;
    border-radius: 50%;
    opacity: 0;
    animation: spin 760ms linear infinite;
}

.primary-button.is-loading .button-label {
    opacity: 0;
}

.primary-button.is-loading .button-loader {
    opacity: 1;
}

.loader-stage {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(77, 227, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(77, 227, 255, 0.06);
}

.loader-stage[hidden],
.result-section[hidden],
.images-section[hidden] {
    display: none;
}

.loader-stage strong {
    display: block;
    margin-bottom: 4px;
}

.loader-stage p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.sky-loader {
    position: relative;
    width: 54px;
    height: 54px;
}

.sky-loader span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(77, 227, 255, 0.2);
    border-radius: 50%;
    animation: pulse-ring 1.8s ease-in-out infinite;
}

.sky-loader span:nth-child(2) {
    animation-delay: 240ms;
}

.sky-loader span:nth-child(3) {
    animation-delay: 480ms;
}

.sky-loader i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 0 22px rgba(77, 227, 255, 0.75);
    transform: translate(-50%, -50%);
}

.sky-loader::after {
    position: absolute;
    inset: 7px;
    border-top: 2px solid var(--cyan);
    border-right: 2px solid transparent;
    border-radius: 50%;
    content: "";
    animation: orbit 1.15s linear infinite;
}

.result-section {
    display: grid;
    grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
    gap: 28px;
    margin-bottom: 34px;
    padding: 22px;
    background: var(--panel-strong);
}

.result-media {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0a0d15;
}

.result-media img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    display: block;
}

.result-overlay {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(3, 6, 12, 0.74);
    color: var(--text);
    font-weight: 800;
}

.result-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.result-content h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.author-line {
    margin-bottom: 22px;
    color: var(--muted-strong);
}

.author-line span {
    color: var(--text);
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.stats-grid div {
    min-height: 84px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.stats-grid span {
    display: block;
    margin-bottom: 6px;
    font-size: 1.3rem;
    font-weight: 900;
}

.stats-grid small,
.download-link small {
    color: var(--muted);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.download-link {
    display: grid;
    min-height: 76px;
    align-content: center;
    gap: 5px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.download-link span {
    font-weight: 900;
}

.download-link:hover {
    transform: translateY(-2px);
    border-color: rgba(77, 227, 255, 0.42);
    background: rgba(77, 227, 255, 0.08);
}

.download-link.featured {
    border-color: rgba(73, 242, 167, 0.36);
    background: linear-gradient(135deg, rgba(73, 242, 167, 0.16), rgba(77, 227, 255, 0.08));
}

.download-link.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.images-section {
    margin-bottom: 34px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.images-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.images-heading h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.15;
}

.images-heading p:not(.section-kicker) {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

.image-download-all {
    width: min(240px, 100%);
    flex: 0 0 auto;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.image-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #0a0d15;
}

.image-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
}

.image-card-body h3 {
    margin-bottom: 0;
    font-size: 0.96rem;
}

.image-download {
    min-height: 36px;
    padding: 9px 12px;
    border: 1px solid rgba(77, 227, 255, 0.34);
    border-radius: 6px;
    background: rgba(77, 227, 255, 0.1);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.image-download:hover {
    transform: translateY(-1px);
    border-color: rgba(73, 242, 167, 0.44);
    background: rgba(73, 242, 167, 0.12);
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 48px;
}

.feature-strip article {
    min-height: 194px;
    padding: 22px;
    box-shadow: none;
}

.feature-strip span {
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 900;
}

.feature-strip h3 {
    margin: 22px 0 10px;
    font-size: 1.1rem;
}

.feature-strip p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 0 32px;
    border-top: 1px solid var(--line);
    color: var(--muted-strong);
}

.site-footer p {
    margin-bottom: 0;
}

.site-footer a {
    color: var(--cyan);
    font-weight: 800;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 20;
    max-width: min(360px, calc(100vw - 40px));
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(12, 17, 29, 0.94);
    box-shadow: var(--shadow);
    color: var(--text);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    border-color: rgba(255, 92, 154, 0.45);
}

.toast.success {
    border-color: rgba(73, 242, 167, 0.42);
}

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

@keyframes orbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-ring {
    0% {
        opacity: 0.95;
        transform: scale(0.32);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.04);
    }
}

@media (max-width: 920px) {
    .hero-section,
    .result-section {
        grid-template-columns: 1fr;
    }

    .hero-section {
        min-height: auto;
        padding-top: 28px;
    }

    .download-panel {
        max-width: 620px;
    }

    .feature-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .site-shell {
        width: min(100% - 22px, 1180px);
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .top-nav {
        width: 100%;
        justify-content: space-between;
    }

    .top-nav a {
        flex: 1;
        text-align: center;
    }

    .install-button {
        width: 100%;
    }

    .hero-section {
        gap: 28px;
        padding-bottom: 42px;
    }

    h1 {
        font-size: clamp(2.1rem, 10vw, 3.25rem);
    }

    .download-panel,
    .result-section,
    .images-section {
        padding: 16px;
    }

    .panel-heading {
        flex-direction: column;
    }

    .input-wrap {
        grid-template-columns: 1fr;
    }

    .input-wrap input {
        padding: 0 4px;
    }

    .icon-action {
        width: 100%;
    }

    .buttons,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .images-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .image-download-all {
        width: 100%;
    }

    .result-media,
    .result-media img {
        min-height: 300px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
