:root,
[data-theme='light'] {
    --bg: #ffffff;
    --ink: #0f0f10;
    --gray: #6b7280;
    --gray2: #9ca3af;
    --line: #e7e7ea;
    --soft: #f6f6f8;
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.1);
    --violet: #7c3aed;
    --violet-soft: rgba(124, 58, 237, 0.1);
    --cyan: #0ea5e9;
    --cyan-soft: rgba(14, 165, 233, 0.1);
    --green: #16a34a;
    --green-soft: rgba(22, 163, 74, 0.1);
    --red: #dc2626;
    --terracotta: #c2603a;
    --terracotta-2: #e07a50;
    --terracotta-soft: rgba(194, 96, 58, 0.14);
    --shadow: 0 24px 60px -32px rgba(15, 15, 16, 0.22);
    --grad: linear-gradient(135deg, #fafcff 0%, #fcfaff 50%, #fafffc 100%);
}

[data-theme='dark'] {
    --bg: #0f0f11;
    --ink: #f4f4f5;
    --gray: #9ca3af;
    --gray2: #6b7280;
    --line: #26262b;
    --soft: #17171a;
    --blue: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.14);
    --violet: #a78bfa;
    --violet-soft: rgba(167, 139, 250, 0.12);
    --cyan: #38bdf8;
    --cyan-soft: rgba(56, 189, 248, 0.12);
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.12);
    --red: #ef4444;
    --terracotta: #d06a45;
    --terracotta-2: #ec8b61;
    --terracotta-soft: rgba(208, 106, 69, 0.18);
    --shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.7);
    --grad: linear-gradient(135deg, #101826 0%, #1c1530 55%, #0f1f18 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: var(--grad);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

.card, .feature, .step, .drop, .file-chip, .link-row {
    background: var(--bg);
}

.mono {
    font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
}

button {
    font: inherit;
    cursor: pointer;
    color: inherit;
}

a {
    color: inherit;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.icon-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.icon-box, .icon-button, .transfer-icon, .drop-icon, .mark {
    display: grid;
    place-items: center;
    flex: none;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16.5px;
}

.mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--terracotta-2), var(--terracotta));
    border: none;
    color: #fff;
    box-shadow: 0 6px 16px -8px var(--terracotta);
}

.spacer {
    flex: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 500;
    padding: 10px 18px;
    border: 1px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
    text-decoration: none;
    cursor: pointer;
}

.btn:active {
    transform: translateY(1px);
}

.btn-dark {
    background: var(--ink);
    color: var(--bg);
}

.btn-dark:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-blue {
    background: var(--blue);
    color: #fff;
}

.btn-blue:hover {
    opacity: 0.88;
}

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

.cta-arrow {
    transition: transform 0.15s ease;
}

.btn:hover .cta-arrow {
    transform: translateX(3px);
}

.hero {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 56px;
    padding: 84px 0 72px;
    align-items: center;
    background: var(--grad);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    color: var(--gray);
    background: var(--soft);
}

.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 1.6s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--green-soft);
    }
    50% {
        box-shadow: 0 0 0 6px transparent;
    }
}

h1 {
    font-size: 48px;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.6px;
    margin: 24px 0 20px;
}

h1 em {
    font-style: normal;
    position: relative;
    z-index: 0;
    white-space: nowrap;
}

h1 em::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 10px;
    background: var(--blue-soft);
    z-index: -1;
    border-radius: 3px;
}

.sub {
    font-size: 17px;
    color: var(--gray);
    max-width: 46ch;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    background: var(--bg);
    box-shadow: var(--shadow);
}

.tabs {
    display: flex;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 7px;
    padding: 8px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.15s ease;
}

.tab.active {
    background: var(--ink);
    color: var(--bg);
}

.panel {
    display: none;
}

.panel.active {
    display: block;
    animation: fadein 0.2s ease;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.drop {
    border: 1.5px dashed var(--line);
    border-radius: 12px;
    padding: 30px 16px;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.drop.over {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.drop .drop-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    border: 1px solid var(--line);
    margin: 0 auto 10px;
    background: var(--bg);
}

.drop b {
    font-size: 14.5px;
}

.drop p {
    font-size: 12.5px;
    color: var(--gray2);
    margin-top: 4px;
}

.file-chip {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    margin-top: 12px;
}

.file-chip.show {
    display: flex;
    animation: fadein 0.2s ease;
}

.file-chip .chip-name {
    font-size: 14px;
    font-weight: 500;
}

.file-chip .chip-size {
    font-size: 12px;
    color: var(--gray2);
}

.file-chip .chip-clear {
    margin-left: auto;
}

.link-row {
    display: none;
    gap: 8px;
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 6px 6px 14px;
    margin-top: 12px;
}

.link-row.show {
    display: flex;
    animation: fadein 0.2s ease;
}

.link-row .link-url {
    flex: 1;
    font-size: 13px;
    color: var(--gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    transition: border-color 0.12s, color 0.12s;
}

.icon-button:hover {
    border-color: var(--ink);
}

.icon-button.copied {
    border-color: var(--green);
    color: var(--green);
}

.send-button {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
}

.receive-input {
    display: flex;
    gap: 8px;
}

.receive-input input {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--ink);
    outline: none;
    font-family: inherit;
}

.receive-input input:focus {
    border-color: var(--blue);
}

.status {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--gray);
    margin-top: 14px;
}

.status.show {
    display: flex;
}

.spin {
    width: 14px;
    height: 14px;
    border: 2px solid var(--line);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex: none;
}

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

.err {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--red);
}

.hint {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--gray);
    line-height: 1.5;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}

.link-life {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--gray);
    line-height: 1.5;
    background: var(--blue-soft);
    border: 1px solid var(--blue);
    border-radius: 10px;
    padding: 10px 12px;
    animation: fadein 0.2s ease;
}

.link-life.show {
    display: flex;
}

.link-life .linklife-icon {
    flex: none;
    font-size: 13px;
    line-height: 1.5;
}

.link-life b {
    color: var(--ink);
    font-weight: 600;
}

.incoming {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray);
    background: var(--blue-soft);
    border-radius: 10px;
    padding: 10px 12px;
}

.done {
    margin-top: 12px;
    font-size: 13px;
    background: var(--bg);
    border: 1px solid var(--blue);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    animation: fadein 0.2s ease;
}

.done .done-icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: var(--blue-soft);
    border: 1px solid var(--blue);
}

.done .done-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.done .done-body b {
    color: var(--ink);
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.3;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.done .done-desc {
    color: var(--blue);
    font-size: 12.5px;
    line-height: 1.4;
}

.transfer {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.transfer.done {
    border-color: var(--green);
    opacity: 0.95;
}

.transfer .transfer-file {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.transfer-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    background: var(--blue-soft);
    border: 1px solid var(--blue);
}

.transfer.done .transfer-icon {
    background: var(--green-soft);
    border-color: var(--green);
}

.transfer .transfer-name-time {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.transfer-name {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-size {
    font-size: 12px;
    color: var(--gray2);
    margin-top: 2px;
    flex: none;
}

.progress-bar {
    height: 6px;
    border-radius: 99px;
    background: var(--soft);
    overflow: hidden;
    border: 1px solid var(--line);
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: var(--blue);
    transition: width 0.15s ease;
    position: relative;
}

.transfer.done .progress-fill {
    background: var(--green);
}

.transfer-text {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 9px 2px 0;
    font-size: 12.5px;
    color: var(--gray);
}

.transfer-pct {
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.transfer-speed {
    text-align: right;
    font-size: 12px;
    color: var(--gray2);
    font-variant-numeric: tabular-nums;
}

.transfer-speed b {
    color: var(--ink);
    font-weight: 600;
}

section {
    padding: 88px 0;
}

.section-divider {
    border-top: 1px solid var(--line);
}

h2 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.step-header {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

.lead {
    display: flex;
    justify-content: center;
    color: var(--gray);
    font-size: 16px;
    margin-bottom: 30px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    gap: 6px;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.step:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    border-color: var(--blue);
}

.step .step-num {
    display: flex;
    justify-content: center;
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.05em;
}

.step h3 {
    display: flex;
    justify-content: center;
    width: 100%;
    font-size: 16.5px;
    font-weight: 600;
    margin: 6px 0 6px;
}

.step p {
    display: flex;
    text-align: center;
    width: 100%;
    font-size: 14px;
    color: var(--gray);
}

.tip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
}

.tip .tip-icon {
    flex: none;
    color: var(--blue);
}

.tip b {
    color: var(--ink);
    font-weight: 600;
}

.tip.chromium {
    background: var(--blue-soft);
    border-color: var(--blue);
    margin-bottom: 20px;
}

.tip.chromium .tip-icon {
    color: var(--blue);
}

.tip.chromium b {
    color: var(--ink);
    font-weight: 600;
}

.feature-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 24px;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    border-color: var(--blue);
}

.feature .icon-box {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--blue-soft);
    border-color: var(--blue);
    color: var(--blue);
    margin-bottom: 18px;
    font-size: 18px;
}

.feature:nth-child(2) .icon-box {
    background: var(--violet-soft);
    border-color: var(--violet);
    color: var(--violet);
}

.feature:nth-child(3) .icon-box {
    background: var(--cyan-soft);
    border-color: var(--cyan);
    color: var(--cyan);
}

.feature:nth-child(4) .icon-box {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green);
}

.feature:nth-child(2):hover, .feature:nth-child(3):hover {
    border-color: var(--violet);
}

.feature h3 {
    font-size: 15.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature p {
    font-size: 13.5px;
    color: var(--gray);
    line-height: 1.55;
}

.cta-band {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 56px 32px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    background: var(--grad);
}

.cta-band h2 {
    margin-bottom: 12px;
    font-size: 32px;
}

.cta-band p {
    color: var(--gray);
    margin-bottom: 28px;
    font-size: 16px;
}

.footer-text {
    margin-top: 20px;
    margin-bottom: 20px;
}

footer {
    display: flex;
    justify-content: center;
    color: var(--gray2);
    font-size: 13px;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 56px 0 48px;
        text-align: center;
    }

    .hero .chip {
        margin: 0 auto;
    }

    .hero .sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero .cta {
        justify-content: center;
    }

    .step-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    h1 {
        font-size: 38px;
    }

    section {
        padding: 64px 0;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding: 0 16px;
    }

    .hero {
        margin-top: 20px;
    }

    /* Header: logo left, title centered, theme button right. */
    .nav {
        position: relative;
        justify-content: space-between;
    }
    .nav .spacer {
        display: none;
    }
    .logo {
        flex: 1;
    }
    .logo span:last-child {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }

    h1 {
        font-size: 30px;
        letter-spacing: -0.4px;
    }

    .hero .sub {
        font-size: 16px;
    }

    .step-header,
    .lead {
        text-align: center;
    }

    .step-grid {
        grid-template-columns: 1fr;
    }

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

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

    .cta .btn {
        justify-content: center;
    }

    .receive-input {
        flex-direction: column;
    }

    .card {
        padding: 18px 14px;
    }

    .cta-band {
        padding: 40px 20px;
    }

    .link-life, .hint, .incoming, .done {
        word-break: break-word;
    }

    section {
        padding: 48px 0;
    }
}
