:root {
    --brand-sky: #0ea5e9;
    --glass-panel: rgba(15, 23, 42, 0.75);
}

html { color-scheme: dark; }
body {
    font-family: 'Inter', sans-serif;
    background-color: #020617;
    background-image: radial-gradient(circle at 50% -20%, #1e293b 0%, #020617 80%);
    color: #f8fafc;
    min-height: 100vh;
}
h1, h2, h3 { font-family: 'Plus Jakarta Sans', sans-serif; }
#starfield { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .55; }
.glass { background: var(--glass-panel); backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 25px 50px -12px rgba(0,0,0,.5); }
.track-card { transition: all .4s cubic-bezier(.4,0,.2,1); }
.track-card:hover:not(.track-disabled) { border-color: var(--brand-sky); background: rgba(14,165,233,.05); transform: translateY(-4px); }
.track-disabled { opacity: .55; cursor: not-allowed; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; visibility: hidden; transition: .4s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
#minimized-player { position: fixed; bottom: 2rem; right: 2rem; z-index: 90; transition: .6s cubic-bezier(.16,1,.3,1); transform: translateY(200%); opacity: 0; }
#minimized-player.active { transform: translateY(0); opacity: 1; }
.progress-ring-circle { transition: stroke-dashoffset .3s linear; transform: rotate(-90deg); transform-origin: 50% 50%; }
.playing-pulse { position: absolute; top: 1.5rem; right: 1.5rem; width: 10px; height: 10px; background: var(--brand-sky); border-radius: 50%; box-shadow: 0 0 12px var(--brand-sky); animation: pulse 2s infinite; }
.status-message { min-height: 1.25rem; }
@keyframes pulse { 0% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(.9); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.card-audio-info {
    padding: .8rem .9rem;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: .9rem;
    background: rgba(15,23,42,.45);
}
.card-audio-primary {
    font-size: .73rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: .02em;
}
.card-audio-secondary {
    margin-top: .32rem;
    font-size: .67rem;
    color: #64748b;
}
.audio-panel {
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 1.2rem;
    padding: 1.1rem;
    background: rgba(15,23,42,.48);
}
.audio-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.audio-panel-kicker {
    color: #e2e8f0;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
}
.audio-panel-help {
    color: #64748b;
    font-size: .68rem;
    margin-top: .35rem;
    max-width: 28rem;
    line-height: 1.45;
}
.quality-select-wrap {
    min-width: 14rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    color: #64748b;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.quality-select {
    appearance: auto;
    width: 100%;
    border: 1px solid rgba(14,165,233,.24);
    border-radius: .75rem;
    background: #0f172a;
    color: #e2e8f0;
    padding: .65rem .75rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    outline: none;
}
.quality-select:focus {
    border-color: rgba(14,165,233,.8);
    box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
.audio-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}
.audio-fact {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .62rem .7rem;
    border-radius: .7rem;
    background: rgba(2,6,23,.5);
}
.audio-fact-label {
    color: #64748b;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.audio-fact-value {
    color: #cbd5e1;
    font-size: .68rem;
    font-weight: 600;
    text-align: right;
}
@media (max-width: 640px) {
    .audio-panel-head { align-items: stretch; flex-direction: column; }
    .quality-select-wrap { min-width: 0; width: 100%; }
    .audio-facts-grid { grid-template-columns: 1fr; }
}
.modal-overlay { padding: 1rem; overflow-y: auto; }
.modal-overlay > .glass { margin: auto; }

/* Downloads page additions */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .025;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,.22) 0,
            rgba(255,255,255,.22) 1px,
            transparent 1px,
            transparent 4px
        );
    mix-blend-mode: soft-light;
}
.download-shell {
    position: relative;
    z-index: 10;
    max-width: 80rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.download-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 4rem;
}
@media (min-width: 768px) {
    .download-header { flex-direction: row; }
}
.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand-logo {
    height: 3rem;
    width: auto;
    cursor: pointer;
    filter: drop-shadow(0 0 18px rgba(14,165,233,.12));
    transition: transform .35s cubic-bezier(.16,1,.3,1), filter .35s ease;
}
.brand-logo:hover {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 0 24px rgba(14,165,233,.28));
}
.brand-title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.025em;
}
.brand-kicker {
    margin: .3rem 0 0;
    color: var(--brand-sky);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .11em;
}
.relay-status {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
}
.relay-dot {
    width: .52rem;
    height: .52rem;
    border-radius: 999px;
    background: var(--brand-sky);
    box-shadow: 0 0 12px rgba(14,165,233,.8);
    animation: pulse 2s infinite;
}
.download-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}
@media (min-width: 960px) {
    .download-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr);
        align-items: start;
    }
}
.download-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}
.download-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(
            110deg,
            transparent 0%,
            rgba(14,165,233,.08) 35%,
            rgba(255,255,255,.05) 50%,
            transparent 70%
        );
    transform: translateX(-115%);
    transition: transform 1s cubic-bezier(.16,1,.3,1);
}
.download-card:hover::after {
    transform: translateX(115%);
}
.download-hero {
    margin-bottom: 2rem;
}
.download-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--brand-sky);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
}
.download-kicker::before {
    content: "";
    width: 1.65rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-sky));
}
.download-heading {
    margin: .85rem 0 0;
    max-width: 48rem;
    font-size: clamp(2.35rem, 7vw, 5rem);
    line-height: .98;
    font-weight: 700;
    letter-spacing: -.055em;
}
.download-heading span {
    color: transparent;
    background: linear-gradient(135deg, #f8fafc 0%, #7dd3fc 55%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.download-copy {
    margin: 1.25rem 0 0;
    max-width: 42rem;
    color: #94a3b8;
    font-size: .95rem;
    line-height: 1.75;
}
.code-form {
    margin-top: 2.2rem;
}
.code-label {
    display: block;
    margin-bottom: .65rem;
    color: #cbd5e1;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
}
@media (min-width: 640px) {
    .code-row { grid-template-columns: minmax(0, 1fr) auto; }
}
.code-input-wrap {
    position: relative;
}
.code-input {
    width: 100%;
    min-height: 3.6rem;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 1rem;
    background: rgba(2,6,23,.72);
    color: #f8fafc;
    padding: 0 3.1rem 0 1rem;
    outline: none;
    font: 600 .88rem 'Inter', sans-serif;
    letter-spacing: .04em;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, transform .25s ease;
}
.code-input::placeholder { color: #475569; }
.code-input:focus {
    border-color: rgba(14,165,233,.82);
    background: rgba(2,6,23,.9);
    box-shadow: 0 0 0 4px rgba(14,165,233,.1), 0 0 32px rgba(14,165,233,.08);
}
.input-beacon {
    position: absolute;
    right: 1rem;
    top: 50%;
    width: .62rem;
    height: .62rem;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #334155;
    transition: .25s ease;
}
.code-input:focus + .input-beacon {
    background: var(--brand-sky);
    box-shadow: 0 0 12px rgba(14,165,233,.8);
}
.verify-button,
.download-button {
    position: relative;
    overflow: hidden;
    min-height: 3.6rem;
    border: 0;
    border-radius: 1rem;
    background: #0ea5e9;
    color: #020617;
    padding: 0 1.35rem;
    font-family: 'Inter', sans-serif;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(14,165,233,.16);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.verify-button:hover,
.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(14,165,233,.24);
    filter: brightness(1.06);
}
.verify-button:active,
.download-button:active { transform: translateY(0) scale(.98); }
.verify-button::after,
.download-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.45) 50%, transparent 75%);
    transform: translateX(-130%);
}
.verify-button:hover::after,
.download-button:hover::after {
    animation: buttonShine .8s ease;
}
@keyframes buttonShine {
    to { transform: translateX(130%); }
}
.verify-button[disabled] {
    cursor: wait;
    opacity: .7;
    transform: none;
}
.status-line {
    min-height: 1.45rem;
    margin-top: .85rem;
    color: #64748b;
    font-size: .72rem;
    line-height: 1.5;
}
.status-line.error { color: #fca5a5; }
.status-line.success { color: #7dd3fc; }
.scan-track {
    position: relative;
    overflow: hidden;
    height: 2px;
    margin-top: 1rem;
    border-radius: 999px;
    background: rgba(148,163,184,.08);
    opacity: 0;
    transform: scaleX(.94);
    transition: .25s ease;
}
.scan-track.active {
    opacity: 1;
    transform: scaleX(1);
}
.scan-track::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 35%;
    background: linear-gradient(90deg, transparent, var(--brand-sky), transparent);
    transform: translateX(-100%);
}
.scan-track.active::after {
    animation: scanLine 1s linear infinite;
}
@keyframes scanLine {
    to { transform: translateX(330%); }
}
.result-card {
    display: none;
    margin-top: 1.4rem;
    padding: 1.2rem;
    border: 1px solid rgba(14,165,233,.18);
    border-radius: 1.2rem;
    background: rgba(14,165,233,.035);
}
.result-card.active {
    display: block;
    animation: resultReveal .6s cubic-bezier(.16,1,.3,1) both;
}
@keyframes resultReveal {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.result-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #7dd3fc;
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.result-badge::before {
    content: "";
    width: .48rem;
    height: .48rem;
    border-radius: 999px;
    background: var(--brand-sky);
    box-shadow: 0 0 10px rgba(14,165,233,.8);
}
.result-id {
    color: #475569;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.result-title {
    margin: .8rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.result-copy {
    margin: .65rem 0 0;
    color: #94a3b8;
    font-size: .78rem;
    line-height: 1.6;
}
.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}
.meta-pill {
    padding: .45rem .65rem;
    border: 1px solid rgba(148,163,184,.1);
    border-radius: .65rem;
    background: rgba(2,6,23,.48);
    color: #64748b;
    font-size: .64rem;
    font-weight: 700;
}
.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    margin-top: 1rem;
    min-height: 3.15rem;
    text-decoration: none;
}
.download-button svg {
    width: 1rem;
    height: 1rem;
}
.side-stack {
    display: grid;
    gap: 1rem;
}
.info-card {
    border-radius: 1.35rem;
    padding: 1.25rem;
}
.info-kicker {
    margin: 0;
    color: #64748b;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
}
.info-title {
    margin: .45rem 0 0;
    font-size: 1rem;
    font-weight: 700;
}
.info-copy {
    margin: .65rem 0 0;
    color: #64748b;
    font-size: .72rem;
    line-height: 1.65;
}
.step-list {
    display: grid;
    gap: .7rem;
    margin-top: 1rem;
}
.step-row {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
}
.step-number {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(14,165,233,.18);
    border-radius: .75rem;
    background: rgba(14,165,233,.05);
    color: #7dd3fc;
    font-size: .68rem;
    font-weight: 800;
}
.step-title {
    margin: .1rem 0 0;
    color: #cbd5e1;
    font-size: .72rem;
    font-weight: 700;
}
.step-copy {
    margin: .25rem 0 0;
    color: #475569;
    font-size: .66rem;
    line-height: 1.5;
}
.footer-note {
    margin-top: 2rem;
    color: #334155;
    font-size: .65rem;
    text-align: center;
}
.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 120;
    max-width: calc(100% - 2rem);
    padding: .75rem 1rem;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: .85rem;
    background: rgba(2,6,23,.92);
    color: #cbd5e1;
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 14px);
    transition: .35s cubic-bezier(.16,1,.3,1);
    font-size: .72rem;
    font-weight: 600;
}
.toast.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.download-card,
.info-card {
    will-change: transform;
}
@media (max-width: 640px) {
    .download-shell { padding: 1.5rem 1rem 3rem; }
    .download-header { margin-bottom: 2.25rem; align-items: flex-start; }
    .download-card { border-radius: 1.35rem; }
    .download-heading { font-size: clamp(2.25rem, 14vw, 3.75rem); }
    .verify-button { width: 100%; }
    .result-head { align-items: flex-start; flex-direction: column; gap: .55rem; }
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .75rem;
}
.legal-shortcuts {
    display: flex;
    gap: .4rem;
}
.legal-shortcuts a,
.legal-jump-row a,
.public-footer a {
    color: #64748b;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.legal-shortcuts a {
    padding: .5rem .65rem;
    border: 1px solid rgba(148,163,184,.09);
    border-radius: .65rem;
    background: rgba(2,6,23,.32);
    font-size: .62rem;
    font-weight: 700;
}
.legal-shortcuts a:hover,
.public-footer a:hover {
    color: #7dd3fc;
}
.legal-intro,
.legal-panel {
    margin-top: 1rem;
    border-radius: 1.35rem;
}
.legal-intro {
    padding: clamp(1.25rem, 4vw, 2rem);
}
.legal-intro h2,
.legal-heading h2 {
    margin: .5rem 0 0;
    color: #e2e8f0;
    font-size: clamp(1.45rem, 4vw, 2.1rem);
    letter-spacing: -.035em;
}
.legal-intro > p:last-of-type,
.legal-heading > p:last-child {
    color: #64748b;
    font-size: .73rem;
    line-height: 1.7;
}
.legal-intro > p:last-of-type {
    max-width: 58rem;
    margin: .8rem 0 0;
}
.legal-jump-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}
.legal-jump-row a {
    padding: .65rem .8rem;
    border: 1px solid rgba(14,165,233,.16);
    border-radius: .7rem;
    background: rgba(14,165,233,.04);
    color: #7dd3fc;
    font-size: .65rem;
    font-weight: 800;
}
.legal-jump-row a:hover {
    border-color: rgba(14,165,233,.45);
    background: rgba(14,165,233,.08);
}
.legal-panel {
    padding: clamp(1.25rem, 4vw, 2rem);
    scroll-margin-top: 1.5rem;
}
.legal-heading {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(148,163,184,.07);
}
.legal-heading > p:last-child {
    margin: .55rem 0 0;
}
.legal-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0,1fr));
    gap: .75rem;
    margin-top: 1rem;
}
.legal-grid article {
    padding: 1rem;
    border: 1px solid rgba(148,163,184,.075);
    border-radius: 1rem;
    background: rgba(2,6,23,.32);
}
.legal-grid h3 {
    margin: 0;
    color: #cbd5e1;
    font-size: .76rem;
    line-height: 1.4;
}
.legal-grid p {
    margin: .5rem 0 0;
    color: #64748b;
    font-size: .67rem;
    line-height: 1.68;
}
.legal-grid code {
    color: #7dd3fc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .64rem;
}
.public-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-top: 1.25rem;
    padding: 1rem .25rem 0;
    border-top: 1px solid rgba(148,163,184,.05);
    color: #334155;
    font-size: .64rem;
}
.public-footer p {
    margin: 0;
}
.public-footer nav {
    display: flex;
    gap: .8rem;
}
@media (min-width: 760px) {
    .legal-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
    .public-footer {
        flex-direction: row;
    }
}
@media (max-width: 640px) {
    .download-header {
        gap: 1rem;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}
