/* ── Transfer page ───────────────────────────────────────────────────────── */

.transfer-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

/* Hero */
.transfer-hero {
    text-align: center;
    padding: 3.5rem 1rem 2.5rem;
    position: relative;
}

.transfer-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(252, 92, 108, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.transfer-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color, #fc5c6c);
    margin: 0 0 14px;
}

.transfer-headline {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #111;
    margin: 0 0 16px;
}

.transfer-sub {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 24px;
}

.transfer-hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.transfer-hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    padding: 5px 14px;
}

.transfer-hero-badges span i {
    color: var(--primary-color, #fc5c6c);
}

/* Auth gate */
.transfer-gate {
    text-align: center;
    padding: 3rem 1rem;
    border: 1.5px dashed #e0e0e0;
    border-radius: 14px;
    margin-bottom: 2rem;
}

.transfer-gate-icon {
    font-size: 2.2rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

.transfer-gate p {
    color: #555;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.transfer-gate-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.transfer-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--primary-color, #fc5c6c);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.transfer-btn-primary:hover { background: #e84756; }
.transfer-btn-primary[hidden] { display: none; }

.transfer-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    color: var(--primary-color, #fc5c6c);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px;
    border: 1.5px solid var(--primary-color, #fc5c6c);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.transfer-btn-outline:hover { background: rgba(252, 92, 108, 0.06); }
.transfer-btn-outline[hidden] { display: none; }

.transfer-icon-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 11px;
    cursor: pointer;
    color: #555;
    font-size: 0.9rem;
    transition: background 0.15s;
    flex-shrink: 0;
}

.transfer-icon-btn:hover { background: #ebebeb; }

/* Card */
.transfer-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

/* Tabs */
.transfer-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f0f0f4;
    padding: 4px;
    border-radius: 10px;
}

.transfer-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.transfer-tab:hover { background: #fff; color: var(--primary-color, #fc5c6c); }

.transfer-tab.active {
    background: #fff;
    color: var(--primary-color, #fc5c6c);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.transfer-panel { display: none; }
.transfer-panel.active { display: block; }

/* Send: dropzone + text */
.transfer-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 40px 24px;
    border: 2px dashed #e0e0e5;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.transfer-dropzone:hover,
.transfer-dropzone.dragover {
    border-color: var(--primary-color, #fc5c6c);
    background: #fff5f6;
}

.transfer-dropzone-icon { font-size: 2rem; color: var(--primary-color, #fc5c6c); }
.transfer-dropzone-title { font-weight: 700; font-size: 1rem; color: #222; }
.transfer-dropzone-sub { font-size: 0.85rem; color: #888; }

.transfer-or {
    display: flex;
    align-items: center;
    text-align: center;
    color: #aaa;
    font-size: 0.8rem;
    margin: 18px 0;
}

.transfer-or::before, .transfer-or::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.transfer-or span { padding: 0 12px; }

.transfer-field-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 6px;
}

.transfer-textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 12px;
    border: 1px solid #e0e0e5;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.transfer-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #fc5c6c);
    box-shadow: 0 0 0 2px rgba(252, 92, 108, 0.18);
}

.transfer-error {
    color: var(--error-color, #ff5252);
    margin-top: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

.transfer-error:empty { display: none; }

/* Send: streaming state */
.transfer-stream-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.transfer-stream-name { font-weight: 700; color: #222; margin: 0; word-break: break-all; }
.transfer-stream-meta { font-size: 0.85rem; color: #888; margin: 2px 0 0; }

.transfer-canvas-wrap {
    display: flex;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #eee;
}

.transfer-canvas-wrap canvas {
    width: 100%;
    max-width: 320px;
    height: auto;
    image-rendering: pixelated;
}

.transfer-frame-status {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin: 14px 0 8px;
}

.transfer-progress-track {
    width: 100%;
    height: 6px;
    background: #f0f0f4;
    border-radius: 999px;
    overflow: hidden;
}

.transfer-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color, #fc5c6c);
    border-radius: 999px;
    transition: width 0.15s linear;
}

.transfer-stream-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.transfer-speed-group {
    display: flex;
    background: #f0f0f4;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.transfer-speed-btn {
    border: none;
    background: transparent;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #777;
    cursor: pointer;
}

.transfer-speed-btn.active { background: #fff; color: var(--primary-color, #fc5c6c); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.transfer-density-btn {
    border: none;
    background: transparent;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #777;
    cursor: pointer;
}

.transfer-density-btn.active { background: #fff; color: var(--primary-color, #fc5c6c); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.transfer-density-group { margin-bottom: 8px; }
.transfer-density-hint { margin-top: 0; margin-bottom: 18px; text-align: left; }

.transfer-hint {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-top: 14px;
    text-align: center;
    line-height: 1.5;
}

/* Receive: camera */
.transfer-camera-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 1 / 1;
}

.transfer-camera-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.transfer-camera-frame {
    position: absolute;
    inset: 12%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25);
}

.transfer-camera-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* Receive: progress grid */
.transfer-receive-progress { margin-top: 22px; }

.transfer-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.transfer-progress-head span:first-child { font-weight: 700; color: #222; word-break: break-all; }
.transfer-progress-head span:last-child { color: #888; white-space: nowrap; }

.transfer-chunk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10px, 1fr));
    gap: 3px;
}

.transfer-chunk-grid span {
    aspect-ratio: 1 / 1;
    border-radius: 2px;
    background: #eee;
}

.transfer-chunk-grid span.filled { background: var(--success-color, #48d1a8); }

/* Receive: result */
.transfer-result {
    text-align: center;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #eee;
}

.transfer-result-icon { font-size: 2rem; color: var(--success-color, #48d1a8); }
.transfer-result-title { font-weight: 700; font-size: 1.05rem; margin: 8px 0 2px; }
.transfer-result-name { color: #888; font-size: 0.85rem; margin: 0 0 16px; word-break: break-all; }

.transfer-text-preview {
    text-align: left;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fafafa;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.transfer-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Small FAQ (self-contained, no dependency on the generator page's FAQ styles) */
.transfer-faq { max-width: 720px; margin: 0 auto; padding: 0 1.25rem 4rem; }
.transfer-faq-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 1.25rem; text-align: center; color: #111; }
.transfer-faq-item { border-bottom: 1px solid #eee; }
.transfer-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 4px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
}
.transfer-faq-q .transfer-faq-chevron { transition: transform 0.2s; flex-shrink: 0; color: #999; }
.transfer-faq-item.open .transfer-faq-chevron { transform: rotate(90deg); }
.transfer-faq-a { display: none; padding: 0 4px 16px; color: #666; line-height: 1.6; font-size: 0.92rem; }
.transfer-faq-item.open .transfer-faq-a { display: block; }

@media (max-width: 480px) {
    .transfer-stream-controls { flex-direction: column; }
}

/* Dark mode */
[data-theme="dark"] .transfer-headline { color: #e8e8f0; }
[data-theme="dark"] .transfer-sub { color: #888; }
[data-theme="dark"] .transfer-card { background: #1e1e2a; border-color: #2e2e3e; }
[data-theme="dark"] .transfer-tabs { background: #16161f; }
[data-theme="dark"] .transfer-tab.active { background: #262633; }
[data-theme="dark"] .transfer-dropzone { background: #1a1a24; border-color: #2e2e3e; }
[data-theme="dark"] .transfer-dropzone:hover,
[data-theme="dark"] .transfer-dropzone.dragover { background: #20141a; }
[data-theme="dark"] .transfer-dropzone-title { color: #e0e0e8; }
[data-theme="dark"] .transfer-field-label { color: #ccc; }
[data-theme="dark"] .transfer-textarea { background: #161620; border-color: #2e2e3e; color: #e0e0e8; }
[data-theme="dark"] .transfer-stream-name { color: #e0e0e8; }
[data-theme="dark"] .transfer-canvas-wrap { background: #fff; }
[data-theme="dark"] .transfer-progress-track,
[data-theme="dark"] .transfer-speed-group { background: #16161f; }
[data-theme="dark"] .transfer-speed-btn.active { background: #262633; }
[data-theme="dark"] .transfer-density-btn.active { background: #262633; }
[data-theme="dark"] .transfer-chunk-grid span { background: #2e2e3e; }
[data-theme="dark"] .transfer-progress-head span:first-child { color: #e0e0e8; }
[data-theme="dark"] .transfer-result { border-top-color: #2e2e3e; }
[data-theme="dark"] .transfer-text-preview { background: #161620; border-color: #2e2e3e; color: #ddd; }
[data-theme="dark"] .transfer-faq-title { color: #e8e8f0; }
[data-theme="dark"] .transfer-faq-item { border-color: #2e2e3e; }
[data-theme="dark"] .transfer-faq-q { color: #e0e0e8; }
