:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f3f6fb;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #dce8ff 0, transparent 34%), #f3f6fb; }
button, input, select { font: inherit; }
button { border: 0; border-radius: 10px; padding: 11px 18px; background: #1769ff; color: white; cursor: pointer; font-weight: 650; }
button:disabled { cursor: not-allowed; opacity: .5; }
button.secondary { background: #e8eef9; color: #29405f; }
button.danger-button { background: #fff0f1; color: #b82939; }
.shell { width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 72px; }
header { margin-bottom: 24px; }
.app-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding: 5px; width: fit-content; border: 1px solid rgba(44, 71, 111, .1); border-radius: 12px; background: rgba(255, 255, 255, .78); }
.nav-button { padding: 9px 15px; border-radius: 8px; background: transparent; color: #65728a; }
.nav-button.active { background: #1769ff; color: white; }
.eyebrow { display: inline-block; margin-bottom: 12px; color: #1769ff; font-weight: 750; letter-spacing: .08em; font-size: 12px; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 44px); line-height: 1.12; }
header p, .panel p { color: #65728a; line-height: 1.7; }
.panel { padding: 24px; border: 1px solid rgba(44, 71, 111, .1); border-radius: 18px; background: rgba(255, 255, 255, .92); box-shadow: 0 18px 55px rgba(32, 57, 95, .1); }
.panel + .panel { margin-top: 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0 0 4px; }
.panel-heading p { margin: 0; }
button.compact { padding: 8px 13px; }
.hidden { display: none !important; }
.files-list { display: grid; gap: 8px; }
.asset-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px; border-top: 1px solid #e8edf5; }
.asset-row:first-child { border-top: 0; }
.asset-details { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.asset-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-details span { color: #758198; font-size: 13px; }
.asset-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.status-pill { padding: 5px 8px; border-radius: 999px; background: #edf2fa; color: #596982; font-size: 12px; font-weight: 700; }
.status-ready { background: #e5f7ef; color: #10764b; }
.status-uploading { background: #e9f1ff; color: #1769ff; }
.button-link { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 9px; background: #1769ff; color: white; font-size: 13px; font-weight: 700; text-decoration: none; }
.empty-state { display: grid; gap: 5px; place-items: center; padding: 44px 16px; color: #758198; text-align: center; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }
.share-section + .share-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid #e8edf5; }
.share-section h3 { margin: 0 0 10px; }
.compact-empty { padding: 22px 10px; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; min-width: 0; border: 1px solid #cbd5e5; border-radius: 10px; padding: 11px 13px; }
.share-dialog { width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 24px; border: 0; border-radius: 18px; color: #172033; box-shadow: 0 28px 90px rgba(21, 38, 66, .28); }
.share-dialog::backdrop { background: rgba(15, 25, 43, .5); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { max-width: 490px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: #edf2fa; color: #42526b; font-size: 24px; line-height: 1; }
.share-tabs { display: flex; gap: 6px; margin: 22px 0 18px; padding: 4px; border-radius: 10px; background: #f0f4fa; }
.share-tab { flex: 1; padding: 9px 12px; background: transparent; color: #637088; }
.share-tab.active { background: white; color: #1769ff; box-shadow: 0 2px 8px rgba(39, 61, 96, .08); }
.share-form { display: grid; gap: 16px; }
.share-scope-note { padding: 11px 13px; border: 1px solid #dbe7f7; border-radius: 10px; background: #f5f9ff; color: #56708f; font-size: 12px; line-height: 1.6; }
.form-divider { display: flex; align-items: center; gap: 10px; color: #8a96a9; font-size: 12px; }
.form-divider::before, .form-divider::after { height: 1px; flex: 1; background: #e2e8f1; content: ""; }
.field-row { display: grid; grid-template-columns: .65fr 1.35fr; gap: 12px; }
.field-group { display: grid; gap: 7px; }
.field-group label { font-size: 13px; font-weight: 750; color: #34435a; }
.field-group small, .share-result small { color: #758198; line-height: 1.55; }
.field-group input, .field-group select, .copy-row input { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #cbd5e5; border-radius: 10px; background: white; color: #172033; }
.member-search-wrap { display: grid; gap: 7px; }
.member-search-results { max-height: 220px; overflow-y: auto; border: 1px solid #d7dfeb; border-radius: 11px; background: white; box-shadow: 0 10px 28px rgba(33, 52, 82, .12); }
.member-result { display: flex; width: 100%; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 0; background: white; color: #172033; text-align: left; }
.member-result + .member-result { border-top: 1px solid #edf1f6; }
.member-result:hover, .member-result:focus-visible { background: #f2f6fd; }
.member-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; overflow: hidden; border-radius: 50%; background: #dfe9fb; color: #3165aa; font-size: 14px; font-weight: 800; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-result-copy { display: grid; min-width: 0; gap: 3px; }
.member-result-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-result-copy span { color: #8490a4; font-size: 12px; }
.member-search-state { padding: 14px; color: #7b879a; font-size: 13px; text-align: center; }
.selected-recipient { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #edf5ff; color: #245b9d; font-size: 13px; }
.selected-recipient button { padding: 4px 8px; background: transparent; color: #54739c; }
.share-result { display: grid; gap: 10px; margin-top: 18px; padding: 15px; border-radius: 12px; background: #edf8f3; color: #176747; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; }
.form-message { min-height: 22px; margin: 14px 0 0; color: #52627a; font-size: 13px; }
.share-shell { width: min(620px, calc(100% - 32px)); padding-top: 12vh; }
.shared-file-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px; border-radius: 15px; background: #1769ff; color: white; font-size: 27px; }
.public-share-page #download-share { width: 100%; margin-top: 18px; }
.preview-page { background: #0d1421; color: #edf3ff; }
.preview-shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 48px; }
.preview-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.preview-header h1 { max-width: 980px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-header p { margin: 0; color: #9eabc1; }
.preview-stage { display: grid; min-height: min(70vh, 760px); place-items: center; overflow: hidden; border: 1px solid rgba(188, 207, 238, .16); border-radius: 18px; background: #05080e; box-shadow: 0 24px 80px rgba(0, 0, 0, .28); }
.preview-stage video, .preview-stage img, .preview-stage iframe { width: 100%; height: min(75vh, 820px); border: 0; object-fit: contain; }
.preview-stage audio { width: min(720px, calc(100% - 40px)); }
.preview-fallback { display: grid; gap: 8px; padding: 40px; color: #aebbd0; text-align: center; }
.preview-fallback strong { color: white; font-size: 20px; }
.drop-zone { min-height: 260px; border: 2px dashed #b8c8e4; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; cursor: pointer; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: #1769ff; background: #f4f8ff; transform: translateY(-1px); }
.drop-zone span:last-child { max-width: 460px; color: #76839a; font-size: 14px; line-height: 1.6; }
.drop-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #1769ff; color: white; font-size: 27px; }
.file-card { margin-top: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; background: #f5f8fd; }
.file-card div { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.file-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card span { color: #758198; font-size: 13px; }
.progress-heading { display: flex; justify-content: space-between; margin-bottom: 13px; }
.progress-track { height: 10px; border-radius: 999px; background: #e6edf8; overflow: hidden; }
#progress-bar, #hash-progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, #1769ff, #44a5ff); transition: width .25s ease; }
.hash-panel { margin-top: 16px; padding: 16px; border-radius: 12px; background: #f5f8fd; }
.hash-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: #758198; font-size: 13px; }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #18a66a; color: white; font-size: 31px; font-weight: 800; }
.error { border-color: rgba(210, 48, 62, .25); }
.error h2 { color: #b82939; }
@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 760px); padding-top: 28px; }
  .panel { padding: 18px; border-radius: 14px; }
  .drop-zone { min-height: 220px; }
  .file-card, .inline-form, .asset-row { align-items: stretch; flex-direction: column; }
  .asset-actions { justify-content: space-between; }
  .result-actions, .copy-row, .hash-footer { align-items: stretch; flex-direction: column; }
  .field-row { grid-template-columns: 1fr; }
  .share-dialog { padding: 18px; border-radius: 14px; }
  .preview-shell { width: min(100% - 20px, 1280px); padding-top: 20px; }
  .preview-header { flex-direction: column; }
  .preview-stage { min-height: 55vh; border-radius: 12px; }
}
