:root {
    --sd-primary: #ff838e;
    --sd-primary-dark: #f43f5e;
    --sd-ink: #172033;
    --sd-muted: #667085;
    --sd-line: #e8eaf0;
    --sd-surface: #ffffff;
    --sd-soft: #fff1f2;
    --sd-success: #16a34a;
    --sd-danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body.social-download-page {
    margin: 0;
    min-height: 100vh;
    color: var(--sd-ink);
    background:
        radial-gradient(circle at 88% 6%, rgba(255, 131, 142, .15), transparent 26rem),
        linear-gradient(180deg, #fff 0%, #fff7f8 55%, #fff 100%);
}

.sd-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(232, 234, 240, .9);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(14px);
}

.sd-topbar__inner {
    width: min(1120px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sd-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--sd-ink);
    text-decoration: none;
    font-weight: 900;
}

.sd-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.sd-brand__copy {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.sd-brand__copy small {
    color: var(--sd-muted);
    font-size: .72rem;
    font-weight: 600;
}

.sd-user-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.sd-topbar-btn {
    min-height: 40px;
    border: 0;
    border-radius: 13px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.sd-topbar-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-primary-dark));
}

.sd-topbar-btn--muted {
    color: #475467;
    border: 1px solid #e4e7ec;
    background: #fff;
}

.sd-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

.sd-hero {
    max-width: 780px;
    margin: 0 auto 30px;
    text-align: center;
}

.sd-platform-badge {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 18px 36px rgba(23, 32, 51, .13);
}

[data-platform="youtube"] .sd-platform-badge {
    background: linear-gradient(145deg, #ff3b3b, #d70000);
}

[data-platform="instagram"] .sd-platform-badge {
    background: linear-gradient(145deg, #833ab4, #fd1d1d 55%, #fcb045);
}

.sd-kicker {
    margin: 0 0 8px;
    color: var(--sd-primary-dark);
    font-size: .82rem;
    font-weight: 900;
}

.sd-hero h1 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.65rem);
    line-height: 1.45;
    letter-spacing: -.035em;
}

.sd-hero p {
    max-width: 650px;
    margin: 13px auto 0;
    color: var(--sd-muted);
    font-size: .98rem;
    line-height: 2;
}

.sd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 22px;
}

.sd-card {
    border: 1px solid var(--sd-line);
    border-radius: 28px;
    background: var(--sd-surface);
    box-shadow: 0 24px 65px rgba(30, 41, 59, .08);
}

.sd-form-card {
    padding: 30px;
}

.sd-form-card h2 {
    margin: 0 0 7px;
    font-size: 1.12rem;
}

.sd-form-card__intro {
    margin: 0 0 25px;
    color: var(--sd-muted);
    font-size: .86rem;
    line-height: 1.9;
}

.sd-field {
    margin-bottom: 20px;
}

.sd-field label {
    margin-bottom: 8px;
    display: block;
    color: #344054;
    font-size: .86rem;
    font-weight: 900;
}

.sd-url-wrap {
    position: relative;
}

.sd-url-wrap > i {
    position: absolute;
    top: 50%;
    right: 16px;
    color: #98a2b3;
    transform: translateY(-50%);
}

.sd-url-input,
.sd-select {
    width: 100%;
    min-height: 54px;
    border: 1px solid #dfe3ea;
    border-radius: 15px;
    outline: none;
    background: #fff;
    color: var(--sd-ink);
    font-family: inherit;
    font-size: .9rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.sd-url-input {
    direction: ltr;
    padding: 12px 46px 12px 15px;
    text-align: left;
}

.sd-select {
    padding: 10px 14px;
}

.sd-url-input:focus,
.sd-select:focus {
    border-color: var(--sd-primary);
    box-shadow: 0 0 0 4px rgba(255, 131, 142, .12);
}

.sd-submit {
    width: 100%;
    min-height: 55px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff;
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-primary-dark));
    box-shadow: 0 13px 28px rgba(244, 63, 94, .22);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 900;
    cursor: pointer;
}

.sd-submit:disabled {
    cursor: wait;
    opacity: .62;
    box-shadow: none;
}

.sd-state {
    margin-top: 20px;
    border: 1px solid var(--sd-line);
    border-radius: 18px;
    padding: 18px;
    display: none;
    align-items: flex-start;
    gap: 13px;
    background: #f8fafc;
}

.sd-state.is-visible {
    display: flex;
}

.sd-state__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--sd-primary-dark);
    background: #ffe4e6;
}

.sd-state__body {
    min-width: 0;
    flex: 1;
}

.sd-state__body strong {
    display: block;
    margin-bottom: 4px;
    font-size: .9rem;
}

.sd-state__body p {
    margin: 0;
    color: var(--sd-muted);
    font-size: .8rem;
    line-height: 1.8;
}

.sd-progress {
    margin-top: 14px;
    display: none;
}

.sd-progress.is-visible {
    display: block;
}

.sd-progress__head {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #344054;
    font-size: .78rem;
    font-weight: 800;
}

.sd-progress__head strong {
    margin: 0;
    display: inline;
    color: var(--sd-primary-dark);
    font-size: .84rem;
    white-space: nowrap;
}

.sd-progress__track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e9edf3;
}

.sd-progress__track > span {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sd-primary), var(--sd-primary-dark));
    box-shadow: 0 0 12px rgba(244, 63, 94, .22);
    transition: width .35s ease;
}

.sd-progress.is-indeterminate .sd-progress__track > span {
    width: 38% !important;
    animation: sd-progress-indeterminate 1.15s ease-in-out infinite;
}

.sd-progress.is-complete .sd-progress__head strong {
    color: var(--sd-success);
}

.sd-progress.is-complete .sd-progress__track > span {
    background: var(--sd-success);
    box-shadow: 0 0 12px rgba(22, 163, 74, .2);
}

.sd-progress__meta {
    min-height: 18px;
    margin-top: 7px;
    color: #667085;
    font-size: .72rem;
    line-height: 1.6;
}

.sd-state--error {
    border-color: #fecaca;
    background: #fff7f7;
}

.sd-state--error .sd-state__icon {
    color: var(--sd-danger);
    background: #fee2e2;
}

.sd-state--success {
    border-color: #bbf7d0;
    background: #f5fff8;
}

.sd-state--success .sd-state__icon {
    color: var(--sd-success);
    background: #dcfce7;
}

.sd-download-btn {
    margin-top: 12px;
    min-height: 44px;
    border-radius: 13px;
    padding: 10px 15px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--sd-success);
    font-size: .84rem;
    font-weight: 900;
    text-decoration: none;
}

.sd-download-btn.is-visible {
    display: inline-flex;
}

.sd-spinner {
    animation: sd-spin .9s linear infinite;
}

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

@keyframes sd-progress-indeterminate {
    0% { transform: translateX(125%); }
    50% { transform: translateX(-85%); }
    100% { transform: translateX(-265%); }
}

.sd-side {
    display: grid;
    gap: 14px;
}

.sd-side-card {
    border: 1px solid var(--sd-line);
    border-radius: 22px;
    padding: 20px;
    background: rgba(255, 255, 255, .88);
}

.sd-side-card h3 {
    margin: 0 0 13px;
    font-size: .95rem;
}

.sd-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sd-feature + .sd-feature {
    margin-top: 13px;
}

.sd-feature i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--sd-primary-dark);
    background: var(--sd-soft);
    flex: 0 0 auto;
}

.sd-feature strong {
    display: block;
    margin-bottom: 2px;
    font-size: .8rem;
}

.sd-feature span {
    display: block;
    color: var(--sd-muted);
    font-size: .72rem;
    line-height: 1.7;
}

.sd-related-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--sd-ink);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 900;
}

.sd-related-link i {
    color: var(--sd-primary-dark);
}

.sd-faq {
    max-width: 820px;
    margin: 36px auto 0;
}

.sd-faq h2 {
    margin: 0 0 14px;
    text-align: center;
    font-size: 1.25rem;
}

.sd-faq details {
    border-bottom: 1px solid var(--sd-line);
    padding: 15px 2px;
}

.sd-faq summary {
    cursor: pointer;
    font-size: .88rem;
    font-weight: 900;
}

.sd-faq p {
    margin: 10px 0 0;
    color: var(--sd-muted);
    font-size: .8rem;
    line-height: 1.9;
}

.sd-seo-copy {
    max-width: 820px;
    margin: 28px auto 0;
    border: 1px solid var(--sd-line);
    border-radius: 22px;
    padding: 24px 26px;
    background: rgba(255, 255, 255, .72);
}

.sd-seo-copy h2 {
    margin: 0 0 10px;
    font-size: 1.12rem;
}

.sd-seo-copy h3 {
    margin: 20px 0 8px;
    font-size: .96rem;
}

.sd-seo-copy p {
    margin: 0;
    color: var(--sd-muted);
    font-size: .82rem;
    line-height: 2;
}

@media (max-width: 820px) {
    .sd-shell {
        padding-top: 34px;
    }

    .sd-layout {
        grid-template-columns: 1fr;
    }

    .sd-side {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .sd-topbar__inner,
    .sd-shell {
        width: min(100% - 22px, 1120px);
    }

    .sd-brand__copy small,
    .sd-home-label {
        display: none;
    }

    .sd-form-card {
        padding: 21px 16px;
        border-radius: 22px;
    }

    .sd-side {
        grid-template-columns: 1fr;
    }

    .sd-hero {
        margin-bottom: 22px;
    }

    .sd-seo-copy {
        padding: 20px 17px;
    }
}
