:root {
    --bg: #050b10;
    --panel: #0b1a23;
    --panel-2: #0f2a35;
    --ink: #eefaff;
    --muted: #9bbbc7;
    --line: rgba(101, 203, 220, 0.24);
    --blue: #08afcb;
    --blue-dark: #0787a0;
    --green: #0bb7c9;
    --green-dark: #0794a4;
    --amber: #f01135;
    --coral: #f01135;
    --soft-cyan: rgba(8, 175, 203, 0.13);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(8, 175, 203, 0.18) 0%, rgba(8, 175, 203, 0) 34%),
        linear-gradient(215deg, rgba(240, 17, 53, 0.11) 0%, rgba(240, 17, 53, 0) 38%),
        linear-gradient(180deg, #081820 0%, #061016 48%, #050b10 100%),
        var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 0 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.brand {
    display: inline-grid;
    gap: 4px;
    align-items: start;
    color: inherit;
    text-decoration: none;
}

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

.brand-logo {
    width: 284px;
    height: 72px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 14px 28px rgba(0, 171, 196, 0.26));
}

.version-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border: 1px solid rgba(157, 238, 255, 0.65);
    border-radius: 12px;
    background: rgba(8, 175, 203, 0.09);
    color: #ffffff;
    padding: 0 12px;
    font-size: 17px;
    font-weight: 850;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 171, 196, 0.12);
    white-space: nowrap;
}

.brand-tagline {
    display: block;
    margin-top: -6px;
    padding-left: 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
}

.status-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(13, 27, 36, 0.86);
    color: #b9d5df;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
}

.status-pill.ready {
    border-color: rgba(0, 171, 196, 0.45);
    color: #9deeff;
}

.status-pill.limited {
    border-color: rgba(0, 171, 196, 0.34);
    color: #9deeff;
}

.download-card,
.settings-panel,
.result-panel {
    background:
        linear-gradient(180deg, rgba(15, 42, 53, 0.9), rgba(8, 20, 28, 0.94));
    border: 1px solid rgba(101, 203, 220, 0.27);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.download-card {
    border-radius: 26px;
    padding: 26px 28px;
    margin-bottom: 20px;
}

.content-page {
    display: grid;
    gap: 18px;
}

.content-page h1 {
    margin-bottom: 0;
}

.content-page > p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 650;
}

.content-note a {
    color: #9deeff;
    text-decoration: none;
    font-weight: 800;
}

.content-note a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.privacy-grid {
    margin-top: 4px;
}

.card-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0 0 10px;
    border: 1px solid rgba(240, 17, 53, 0.34);
    border-radius: 999px;
    background: rgba(240, 17, 53, 0.1);
    color: #ff5972;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    font-size: 50px;
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy {
    width: min(360px, 38%);
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 650;
    text-align: right;
}

.link-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px 96px;
    gap: 12px;
    align-items: center;
}

.link-form input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(4, 14, 21, 0.88);
    color: var(--ink);
    outline: none;
}

.link-form input {
    min-height: 60px;
    padding: 0 18px;
    font-size: 16px;
}

.link-form input:focus,
select:focus {
    border-color: rgba(0,164,196,0.68);
    box-shadow: 0 0 0 4px rgba(0,164,196,0.16);
}

.link-form input::placeholder {
    color: #6f909d;
}

.btn {
    border: 0;
    border-radius: 16px;
    min-height: 56px;
    padding: 0 18px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 171, 196, 0.2);
}

.btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.primary {
    background: var(--blue);
}

.primary:hover:not(:disabled) {
    background: var(--blue-dark);
}

.success {
    background: var(--green);
}

.success:hover:not(:disabled) {
    background: var(--green-dark);
}

.ghost {
    min-height: 42px;
    color: var(--ink);
    background: rgba(6, 17, 24, 0.7);
    border: 1px solid var(--line);
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(101, 203, 220, 0.14);
}

.platforms strong {
    color: #d6f5fb;
    font-size: 13px;
    font-weight: 800;
}

.platforms span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 175, 203, 0.1);
    color: #bcefff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.workspace {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    flex: 1;
}

.settings-panel,
.result-panel {
    border-radius: 24px;
}

.settings-panel {
    padding: 22px;
    position: sticky;
    top: 18px;
    align-self: start;
}

.panel-title h2 {
    margin-bottom: 4px;
}

.panel-title p {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.settings-panel label {
    display: grid;
    gap: 7px;
    position: relative;
    color: #d4eff7;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-panel label + label {
    margin-top: 14px;
}

select {
    height: 46px;
    padding: 0 12px;
    text-transform: none;
    font-weight: 700;
}

.native-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-select {
    position: relative;
    width: 100%;
    text-transform: none;
    z-index: 5;
}

.custom-select.open {
    z-index: 40;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #07131b 0%, #061017 100%);
    color: var(--ink);
    padding: 0 16px;
    text-align: left;
    font-weight: 800;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.custom-select-trigger:focus,
.custom-select.open .custom-select-trigger {
    border-color: rgba(0, 171, 196, 0.72);
    box-shadow: 0 0 0 4px rgba(0, 171, 196, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    outline: none;
}

.custom-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-chevron {
    width: 9px;
    height: 9px;
    margin-right: 2px;
    border-right: 2px solid #74ddec;
    border-bottom: 2px solid #74ddec;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    flex: 0 0 auto;
}

.custom-select.open .custom-select-chevron {
    transform: rotate(-135deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    max-height: 260px;
    overflow: auto;
    padding: 7px;
    border: 1px solid rgba(0, 171, 196, 0.34);
    border-radius: 18px;
    background: #07131b;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

.custom-select.open .custom-select-menu {
    display: grid;
    gap: 4px;
}

.custom-select-option {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #d4eff7;
    padding: 0 12px;
    text-align: left;
    font-weight: 800;
    cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option.selected {
    background: linear-gradient(135deg, rgba(2, 164, 196, 0.95), rgba(0, 127, 156, 0.95));
    color: #ffffff;
}

.checks {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.checks label {
    display: flex;
    align-items: center;
    gap: 9px;
    text-transform: none;
    font-weight: 700;
    color: var(--muted);
}

.checks input {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.result-panel {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    padding: 20px;
    align-self: stretch;
}

.result-panel::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    height: 1px;
    background: linear-gradient(90deg, rgba(8, 175, 203, 0), rgba(8, 175, 203, 0.42), rgba(240, 17, 53, 0.24), rgba(8, 175, 203, 0));
    pointer-events: none;
}

.media-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(8, 175, 203, 0.11), rgba(15, 42, 53, 0.76));
    padding: 16px;
}

.summary-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #ffffff;
    font-weight: 800;
}

.media-summary h2 {
    margin-bottom: 4px;
}

.media-summary p {
    margin: 0;
    color: var(--muted);
}

.notice {
    margin: 14px 0;
    border-left: 4px solid var(--blue);
    border-radius: 16px;
    background: rgba(0, 171, 196, 0.1);
    color: #bcefff;
    padding: 14px 16px;
    font-weight: 700;
}

.notice.error {
    border-left-color: var(--coral);
    background: rgba(240, 17, 53, 0.12);
    color: #ffb7c1;
}

.hidden {
    display: none;
}

.formats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 12px;
}

.formats-head h2 {
    margin-bottom: 0;
}

.format-list {
    display: grid;
    gap: 16px;
}

.empty-state,
.format-item {
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: rgba(6, 17, 24, 0.76);
    padding: 18px;
}

.empty-state {
    display: grid;
    gap: 4px;
    color: var(--muted);
}

.empty-state strong {
    color: var(--ink);
}

.format-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-style: solid;
}

.selected-format {
    border-color: rgba(0, 171, 196, 0.46);
    background: linear-gradient(135deg, rgba(8, 175, 203, 0.13), rgba(6, 17, 24, 0.86) 64%);
}

.format-main {
    display: grid;
    gap: 5px;
}

.format-main strong {
    font-size: 16px;
}

.format-main span {
    color: var(--muted);
    font-size: 14px;
}

.format-main em {
    color: #9deeff;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.format-item a,
.format-item button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--green);
    color: #ffffff;
    padding: 0 16px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    font: inherit;
}

.format-choices {
    display: grid;
    gap: 14px;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(101, 203, 220, 0.14);
}

.format-choices-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.format-choices-head strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
}

.format-choices-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.format-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    gap: 12px;
}

.format-choice {
    display: grid;
    gap: 5px;
    min-height: 76px;
    border: 1px solid rgba(8, 175, 203, 0.4);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 175, 203, 0.17), rgba(8, 175, 203, 0.08));
    color: var(--ink);
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.format-choice:hover {
    transform: translateY(-1px);
    border-color: rgba(8, 175, 203, 0.78);
    background: linear-gradient(180deg, rgba(8, 175, 203, 0.28), rgba(8, 175, 203, 0.12));
}

.format-choice.current {
    border-color: rgba(157, 238, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(157, 238, 255, 0.22), 0 12px 28px rgba(0, 171, 196, 0.14);
}

.format-choice.unavailable {
    border-color: rgba(101, 203, 220, 0.14);
    background: rgba(6, 17, 24, 0.58);
    cursor: not-allowed;
    opacity: 0.68;
}

.format-choice.unavailable:hover {
    transform: none;
    border-color: rgba(101, 203, 220, 0.14);
    background: rgba(6, 17, 24, 0.58);
}

.format-choice-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.format-choice-title span {
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
    min-width: 0;
}

.format-choice-title b {
    border: 1px solid rgba(157, 238, 255, 0.34);
    border-radius: 999px;
    background: rgba(8, 175, 203, 0.2);
    color: #9deeff;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 850;
    flex: 0 0 auto;
}

.format-choice.unavailable .format-choice-title b {
    border-color: rgba(155, 187, 199, 0.24);
    background: rgba(155, 187, 199, 0.08);
    color: #8faab5;
}

.format-choice small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.seo-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    margin-top: 20px;
    padding: 24px 28px;
    border: 1px solid rgba(101, 203, 220, 0.2);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 42, 53, 0.64), rgba(6, 17, 24, 0.86));
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.seo-section h2 {
    margin-bottom: 10px;
    font-size: 28px;
    line-height: 1.12;
}

.seo-section p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 650;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.seo-grid article {
    display: grid;
    gap: 7px;
    min-height: 128px;
    border: 1px solid rgba(101, 203, 220, 0.2);
    border-radius: 18px;
    background: rgba(4, 14, 21, 0.62);
    padding: 16px;
}

.seo-grid strong {
    color: #ffffff;
    font-size: 15px;
}

.seo-grid span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 650;
}

.footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(101, 203, 220, 0.13);
    color: var(--muted);
    font-size: 13px;
}

.footer span:last-child {
    margin-left: auto;
    text-align: right;
    font-weight: 700;
}

.footer a {
    color: #9deeff;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 860px) {
    .shell {
        width: min(100% - 20px, 1180px);
        padding-top: 14px;
    }

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

    .brand-logo {
        width: 220px;
        height: 58px;
    }

    .brand-main {
        gap: 10px;
    }

    .version-badge {
        min-height: 28px;
        border-radius: 10px;
        padding: 0 10px;
        font-size: 14px;
    }

    .brand-tagline {
        margin-top: -5px;
        font-size: 13px;
    }

    .download-card {
        padding: 20px;
        border-radius: 22px;
    }

    .card-heading {
        display: grid;
        gap: 12px;
        margin-bottom: 18px;
    }

    h1 {
        font-size: 34px;
        line-height: 1.08;
    }

    .hero-copy {
        width: 100%;
        text-align: left;
        font-size: 14px;
    }

    .link-form,
    .workspace,
    .format-item {
        grid-template-columns: 1fr;
    }

    .format-choices-head {
        display: grid;
        gap: 4px;
    }

    .format-choice-grid {
        grid-template-columns: 1fr;
    }

    .result-panel {
        order: -1;
    }

    .settings-panel {
        position: static;
    }

    .result-panel {
        min-height: auto;
    }

    .seo-section,
    .seo-grid {
        grid-template-columns: 1fr;
    }

    .seo-section {
        padding: 20px;
    }

    .seo-section h2 {
        font-size: 24px;
    }

    .platforms {
        justify-content: flex-start;
    }

    .btn,
    .link-form input {
        width: 100%;
    }
}
