:root {
    color-scheme: dark;
    --bg: #070812;
    --panel: rgba(255, 255, 255, 0.09);
    --panel-strong: rgba(255, 255, 255, 0.14);
    --line: rgba(255, 255, 255, 0.16);
    --text: #f7f8ff;
    --muted: #aeb4c9;
    --accent: #22d3ee;
    --accent-two: #a3e635;
    --danger: #fb7185;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 24px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.24), transparent 28rem),
        radial-gradient(circle at 88% 16%, rgba(163, 230, 53, 0.18), transparent 24rem),
        linear-gradient(135deg, #070812 0%, #101424 42%, #071018 100%);
    overflow-x: hidden;
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.ambient {
    position: fixed;
    z-index: -1;
    filter: blur(46px);
    opacity: 0.7;
    transform: translateZ(0);
}

.ambient-one {
    width: 18rem;
    height: 18rem;
    left: -6rem;
    top: 18rem;
    background: rgba(34, 211, 238, 0.18);
}

.ambient-two {
    width: 20rem;
    height: 20rem;
    right: -8rem;
    bottom: 8rem;
    background: rgba(244, 114, 182, 0.15);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: rgba(7, 8, 18, 0.72);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
}

.brand,
.desktop-nav,
.footer div,
.action-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand {
    font-weight: 850;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 0.85rem;
    color: #061014;
    background: linear-gradient(135deg, var(--accent), var(--accent-two));
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.24);
}

.desktop-nav a,
.footer a {
    color: var(--muted);
    transition: color 180ms ease;
}

.desktop-nav a:hover,
.footer a:hover {
    color: var(--text);
}

.install-btn,
.lookup-form button,
.contact-form button,
.download-option,
.primary-link {
    border: 0;
    border-radius: 999px;
    color: #061014;
    background: linear-gradient(135deg, var(--accent), var(--accent-two));
    font-weight: 800;
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.install-btn {
    padding: 0.75rem 1rem;
}

.install-btn:hover,
.lookup-form button:hover,
.contact-form button:hover,
.download-option:hover,
.primary-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(163, 230, 53, 0.18);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 1.05fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 6.5rem) 0 2rem;
}

.hero h1,
.page-shell h1 {
    margin: 0;
    font-size: clamp(2.35rem, 7vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 11ch;
}

.tagline,
.page-shell p,
.hint {
    color: var(--muted);
    line-height: 1.75;
}

.tagline {
    max-width: 42rem;
    font-size: 1.1rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent-two);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.glass-card,
.platform-card,
.ad-shell {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.download-card {
    min-height: 34rem;
    padding: clamp(1rem, 4vw, 1.4rem);
    border-radius: var(--radius);
}

.lookup-form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.input-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.input-row input {
    width: 100%;
    min-width: 0;
    padding: 0 0.75rem;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.input-row button {
    padding: 0.9rem 1.25rem;
}

.loader-panel,
.progress-panel,
.error-box,
.result-card {
    margin-top: 1rem;
}

.loader-panel,
.progress-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
}

.loader-panel span {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.pulse-ring {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 0.45rem solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--accent);
    animation: spin 900ms linear infinite;
}

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

.error-box {
    padding: 1rem;
    color: #ffe4e9;
    border: 1px solid rgba(251, 113, 133, 0.32);
    border-radius: 1.1rem;
    background: rgba(251, 113, 133, 0.14);
}

.result-card {
    display: grid;
    gap: 1rem;
    animation: rise 360ms ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 1.1rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    background-size: 220% 100%;
    animation: shimmer 1.6s ease infinite;
}

.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes shimmer {
    0% { background-position: 140% 0; }
    100% { background-position: -80% 0; }
}

.duration-chip,
.platform-chip {
    display: inline-flex;
    width: max-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(7, 8, 18, 0.64);
}

.duration-chip {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.35rem 0.62rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.platform-chip {
    padding: 0.4rem 0.7rem;
    color: var(--accent-two);
    font-size: 0.78rem;
    font-weight: 850;
}

.result-info h2 {
    margin: 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.ghost-btn {
    padding: 0.72rem 0.9rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.option-grid,
.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.download-option {
    display: grid;
    width: 100%;
    min-height: 5.2rem;
    padding: 0.95rem;
    text-align: left;
}

.download-option span {
    display: block;
    color: rgba(6, 16, 20, 0.72);
    font-size: 0.82rem;
    font-weight: 700;
}

.format-details {
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
}

.format-details summary {
    color: var(--muted);
    cursor: pointer;
    font-weight: 750;
}

.format-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.8rem;
    max-height: 18rem;
    overflow: auto;
    padding-right: 0.25rem;
}

.format-button {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.07);
    text-align: left;
}

.progress-panel {
    display: block;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.progress-track {
    overflow: hidden;
    height: 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-two));
    transition: width 260ms ease;
}

.content-band,
.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 1.4rem auto;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2.3rem);
}

.platform-card {
    min-height: 5.8rem;
    display: grid;
    place-items: center;
    border-radius: 1.1rem;
    color: var(--text);
    font-weight: 850;
}

.history-list {
    display: grid;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
}

.history-item span {
    color: var(--muted);
    font-size: 0.84rem;
}

.ad-shell {
    display: grid;
    width: min(1180px, calc(100% - 2rem));
    min-height: 6rem;
    place-items: center;
    margin: 1.5rem auto;
    border-radius: 1.1rem;
    color: var(--muted);
    border-style: dashed;
}

.page-shell {
    padding: clamp(1.2rem, 5vw, 3rem);
    border-radius: var(--radius);
}

.page-shell h1 {
    max-width: 13ch;
    font-size: clamp(2rem, 6vw, 4rem);
}

.contact-form {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 1rem;
    outline: 0;
    background: rgba(255, 255, 255, 0.08);
}

.contact-form button,
.primary-link {
    width: max-content;
    padding: 0.9rem 1.2rem;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto 6rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.bottom-nav {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 30;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    background: rgba(7, 8, 18, 0.82);
    backdrop-filter: blur(22px);
}

.bottom-nav a {
    padding: 0.72rem 0.25rem;
    color: var(--muted);
    border-radius: 1rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
}

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

[hidden] {
    display: none !important;
}

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 2rem;
    }

    .hero h1 {
        max-width: 12ch;
    }

    .input-row {
        border-radius: 1.25rem;
        flex-direction: column;
    }

    .input-row input {
        min-height: 3.2rem;
    }

    .option-grid,
    .platform-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .footer {
        align-items: start;
        flex-direction: column;
    }

    .bottom-nav {
        display: grid;
    }
}
