/* 慧培同传 · 慧培官网风格 */
.sync-page {
    background: var(--hp-bg);
}

.hero-sync {
    background: linear-gradient(135deg, #0a2463 0%, #1a5c6e 45%, #2d9b8a 100%);
}

.sync-landing-hero {
    padding: 56px 0 48px;
    color: #fff;
}
.sync-landing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.sync-landing-grid h1 {
    font-size: clamp(1.85rem, 5vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: .02em;
}
.sync-landing-grid .lead {
    font-size: 1.05rem;
    opacity: .92;
    line-height: 1.75;
    max-width: 480px;
    margin-bottom: 28px;
}
.sync-landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.sync-landing-actions .btn-outline {
    border-color: rgba(255, 255, 255, .75);
    color: #fff;
    background: transparent;
}
.sync-landing-actions .btn-outline:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: #fff;
}

.sync-illustration {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--hp-radius);
    padding: 40px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    backdrop-filter: blur(4px);
}
.sync-illustration svg { width: 100%; max-width: 260px; height: auto; }
.sync-illustration svg rect { fill: rgba(255, 255, 255, .25); stroke: rgba(255, 255, 255, .45); }
.sync-illustration svg line { stroke: rgba(255, 255, 255, .55); }

.sync-faq {
    max-width: 720px;
    margin: 0 auto;
}
.sync-faq-item {
    border-bottom: 1px solid var(--hp-border);
    padding: 16px 0;
    background: transparent;
}
.sync-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .98rem;
    color: var(--hp-navy);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.sync-faq-item summary::-webkit-details-marker { display: none; }
.sync-faq-item summary::after {
    content: '+';
    font-size: 1.15rem;
    color: var(--hp-gold);
    flex-shrink: 0;
}
.sync-faq-item[open] summary::after { content: '−'; }
.sync-faq-item p {
    margin-top: 10px;
    color: var(--hp-muted);
    font-size: .92rem;
    line-height: 1.7;
    padding-right: 20px;
}

.sync-about {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    color: var(--hp-muted);
    font-size: .98rem;
    line-height: 1.8;
}
.sync-about a { color: var(--hp-navy); font-weight: 600; }

/* 房间 ID 弹窗 */
.sync-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 36, 99, .45);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sync-modal-overlay.is-open { display: flex; }
.sync-modal {
    background: #fff;
    border-radius: var(--hp-radius);
    box-shadow: 0 20px 60px rgba(10, 36, 99, .2);
    width: 100%;
    max-width: 400px;
    padding: 36px 32px 32px;
    position: relative;
    text-align: center;
}
.sync-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    border-radius: 6px;
}
.sync-modal-close:hover { background: #f0f2f6; color: #333; }
.sync-modal h3 {
    font-size: 1.2rem;
    color: var(--hp-navy);
    margin-bottom: 24px;
    font-weight: 700;
}
.sync-modal-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--hp-gold);
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: center;
}
.sync-modal-input:focus {
    outline: none;
    border-color: var(--hp-navy);
    box-shadow: 0 0 0 3px rgba(255, 159, 28, .2);
}
.sync-modal-input::placeholder { color: #bbb; }
.sync-modal .btn { width: 100%; justify-content: center; padding: 14px; }

/* ========== 同步房间页 ========== */
.sync-room-page {
    background: var(--hp-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sync-room-bottom-bar {
    margin-top: auto;
    border-top: 1px solid var(--hp-border);
    background: #fff;
}
.sync-room-bottom-bar .inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 20px;
    padding: 14px 0;
    font-size: .88rem;
}
.sync-room-bottom-bar a {
    color: var(--hp-muted);
    text-decoration: none;
}
.sync-room-bottom-bar a:hover {
    color: var(--hp-navy);
}
.sync-room-help-link {
    border: none;
    background: transparent;
    color: var(--hp-navy);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sync-room-help-link:hover {
    color: var(--hp-gold);
}

.sync-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 36, 99, .45);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}
.sync-help-overlay.is-open { display: flex; }
body.sync-help-open { overflow: hidden; }

.sync-help-panel {
    background: var(--hp-bg);
    border-radius: var(--hp-radius);
    box-shadow: 0 24px 64px rgba(10, 36, 99, .18);
    width: 100%;
    max-width: 760px;
    margin: auto;
    position: relative;
    border: none;
}
.sync-help-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, .9);
    border-radius: 8px;
    font-size: 1.5rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    z-index: 2;
}
.sync-help-close:hover { background: #fff; color: var(--hp-navy); }
.sync-help-inner {
    padding: 28px 24px 32px;
}
.sync-help-inner .section-head {
    margin-bottom: 20px;
}
.sync-help-inner .story-panel {
    max-height: min(62vh, 520px);
    overflow-y: auto;
}

.sync-share-modal {
    background: #fff;
    border-radius: var(--hp-radius);
    box-shadow: 0 20px 60px rgba(10, 36, 99, .2);
    width: 100%;
    max-width: 360px;
    padding: 36px 32px 28px;
    position: relative;
    text-align: center;
}
.sync-share-modal h3 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}
.sync-share-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    margin: 0 auto 20px;
}
.sync-share-qr img,
.sync-share-qr canvas {
    display: block;
    border-radius: 8px;
}
.sync-share-qr-fail {
    font-size: .88rem;
    color: var(--hp-muted);
    line-height: 1.6;
    margin: 0;
}
.sync-share-qr-loading {
    font-size: .88rem;
    color: var(--hp-muted);
    margin: 0;
}
.btn-sync-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: #e91e8c;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.btn-sync-share-link:hover {
    background: #d0187d;
    transform: translateY(-1px);
}
.btn-sync-share-link svg {
    flex-shrink: 0;
}

.sync-room-wrap {
    flex: 1;
    padding: 24px 0 8px;
}
.sync-room-help {
    padding: 8px 0 40px;
    background: var(--hp-bg);
}
.sync-room-help .story-panel {
    max-width: 720px;
    margin: 0 auto;
}
.sync-room-card {
    background: #fff;
    border-radius: var(--hp-radius);
    box-shadow: var(--hp-shadow);
    border: 1px solid var(--hp-border);
    overflow: hidden;
}

.sync-room-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--hp-border);
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
}
.sync-room-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    flex: 1;
    font-size: .92rem;
}
.sync-room-meta span { color: var(--hp-muted); }
.sync-room-meta strong {
    color: var(--hp-navy);
    font-weight: 700;
    margin-left: 4px;
}
.sync-room-bar .btn-share {
    padding: 10px 22px;
    background: var(--hp-gold);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.sync-room-bar .btn-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 159, 28, .35);
}

.sync-room-tabs {
    display: flex;
    border-bottom: 1px solid var(--hp-border);
    padding: 0 22px;
    background: #fff;
}
.sync-room-tab {
    padding: 14px 18px;
    border: none;
    background: transparent;
    font-size: .95rem;
    color: var(--hp-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 500;
}
.sync-room-tab:hover { color: var(--hp-navy); }
.sync-room-tab.is-active {
    color: var(--hp-navy);
    font-weight: 700;
    border-bottom-color: var(--hp-gold);
}

.sync-room-panel {
    display: none;
    padding: 22px;
}
.sync-room-panel.is-active { display: block; }

.sync-upload-zone {
    border: 2px dashed #b8cff5;
    border-radius: 12px;
    padding: 48px 20px;
    text-align: center;
    background: #f8faff;
    transition: border-color .2s, background .2s;
}
.sync-upload-zone.is-dragover {
    border-color: var(--hp-gold);
    background: #fff8e6;
}
.sync-upload-zone .btn-select {
    padding: 10px 24px;
    background: var(--hp-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
}
.sync-upload-zone .btn-select:hover { background: var(--hp-navy-light); }
.sync-upload-zone .hint {
    margin-top: 12px;
    font-size: .88rem;
    color: var(--hp-muted);
}
.sync-file-empty {
    text-align: center;
    padding: 32px 16px;
    color: #999;
    font-size: .92rem;
}
.sync-file-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: none;
}
.sync-file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fafbfd;
}
.sync-file-name {
    flex: 1 1 180px;
    font-weight: 600;
    color: var(--hp-navy);
    font-size: .92rem;
    word-break: break-all;
}
.sync-file-meta {
    flex: 1 1 120px;
    font-size: .82rem;
    color: var(--hp-muted);
}
.sync-file-ops {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sync-file-ops .btn {
    padding: 4px 10px;
    font-size: .82rem;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--hp-border);
    background: #fff;
    color: var(--hp-navy);
    cursor: pointer;
}
.sync-file-ops .btn-danger {
    background: #fff;
    color: #c0392b;
    border-color: #f5c6cb;
}
.sync-file-ops .btn:hover {
    border-color: var(--hp-gold);
}
.sync-file-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--hp-border);
    font-size: .85rem;
    color: var(--hp-muted);
}

.sync-text-area {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    font-size: .95rem;
    line-height: 1.65;
    resize: vertical;
    font-family: inherit;
}
.sync-text-area:focus {
    outline: none;
    border-color: var(--hp-gold);
    box-shadow: 0 0 0 3px rgba(255, 159, 28, .15);
}
.sync-text-hint {
    margin-bottom: 10px;
    padding: 10px 14px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    font-size: .88rem;
    color: #7a5c00;
    line-height: 1.5;
}
.sync-text-hint.is-warn {
    background: #fdecea;
    border-color: #f5c6cb;
    color: #922b21;
}
.sync-text-hint button {
    margin-left: 8px;
    padding: 4px 12px;
    border: 1px solid #ffc107;
    background: #fff;
    border-radius: 6px;
    font-size: .85rem;
    color: #7a5c00;
    cursor: pointer;
}
.sync-text-hint button:hover {
    background: #fff8e6;
}
.sync-text-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.sync-text-actions button {
    padding: 8px 16px;
    border: 1px solid var(--hp-border);
    background: #fff;
    border-radius: 8px;
    font-size: .88rem;
    color: var(--hp-navy);
    cursor: pointer;
}
.sync-text-actions button:hover {
    border-color: var(--hp-gold);
    background: #fff8e6;
}

.sync-room-notice {
    margin: 0 22px 22px;
    padding: 12px 16px;
    background: #fff8e6;
    border: 1px solid #ffe0a3;
    border-radius: 10px;
    font-size: .88rem;
    color: #7a5c00;
    text-align: center;
}

.sync-room-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-top: 1px solid var(--hp-border);
    background: #fafbfd;
    font-size: .88rem;
    color: var(--hp-muted);
}
.sync-online-users strong { color: var(--hp-navy); }

.sync-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--hp-navy);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: .92rem;
    z-index: 1100;
    opacity: 0;
    transition: transform .25s, opacity .25s;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(10, 36, 99, .25);
}
.sync-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 900px) {
    .sync-landing-grid { grid-template-columns: 1fr; text-align: center; }
    .sync-landing-grid .lead { margin-left: auto; margin-right: auto; }
    .sync-landing-actions { justify-content: center; }
    .sync-room-bar { flex-direction: column; align-items: stretch; }
    .sync-room-bar .btn-share { width: 100%; }
}
