/* 用途：复刻 51PAN 上传首页的视觉布局、响应式样式与交互状态。 */
:root {
  --ink: #1d3455;
  --muted: #7994b6;
  --blue: #3c8ff1;
  --blue-deep: #2873e4;
  --line: #cde3fb;
  --panel: rgba(255, 255, 255, .75);
  --mint: #e4fbf1;
  --shadow: 0 22px 52px rgba(89, 151, 213, .14);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #edf8ff; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #edf8ff url("assets/background.png") center / cover fixed no-repeat;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, .upload-zone:focus-visible { outline: 3px solid rgba(45, 136, 244, .35); outline-offset: 4px; }

.page-shell { width: min(100% - 48px, 1216px); min-height: 100vh; margin: 0 auto; padding: 30px 0 26px; position: relative; }

.topbar { height: 70px; display: flex; align-items: center; gap: 24px; padding: 0 20px; }
.brand { display: flex; align-items: center; color: #101a2e; text-decoration: none; white-space: nowrap; }
.brand-logo { display: block; width: 180px; height: auto; filter: drop-shadow(0 6px 7px rgba(66, 146, 230, .2)); }
.brand-divider, .nav-divider { width: 1px; height: 22px; background: #c0d9ee; }
.brand-tagline { margin: 0; color: #6884a6; font-size: 15px; }
.nav-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 0; color: var(--ink); background: transparent; font-weight: 700; font-size: 15px; }
.nav-link img { width: 21px; height: 21px; }
.login-cta, .primary-button, .copy-button { color: #fff; background: linear-gradient(115deg, #5ac3f6, #2d75e5); box-shadow: 0 9px 18px rgba(52, 135, 230, .2); }
.login-cta { padding: 12px 24px; border-radius: 24px; font-weight: 700; font-size: 15px; transition: transform .2s ease, box-shadow .2s ease; }
.login-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(52, 135, 230, .3); }

.share-card { position: relative; min-height: 720px; margin-top: 2px; padding: 56px 52px 28px; border: 2px solid rgba(255, 255, 255, .84); border-radius: 38px; background: var(--panel); box-shadow: var(--shadow), inset 0 1px 0 #fff; backdrop-filter: blur(18px); }
.speed-badge { position: absolute; top: 15px; right: 52px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 17px; color: #6786a7; border: 1px solid #d4e7f9; border-radius: 20px; background: rgba(255,255,255,.56); font-size: 14px; font-weight: 600; }
.speed-badge img { width: 17px; color: #70d348; filter: invert(68%) sepia(50%) saturate(558%) hue-rotate(52deg) brightness(90%); }

.upload-zone { min-height: 420px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 26px 28px 42px; border: 2px dashed #aed7ff; border-radius: 26px; background: radial-gradient(ellipse at 50% 38%, rgba(227, 249, 255, .85), rgba(255,255,255,.42) 62%); transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: #59a8f9; background: radial-gradient(ellipse at 50% 38%, rgba(213, 246, 255, .97), rgba(241, 250, 255, .72) 62%); }
.upload-zone.is-dragging { transform: scale(1.006); }
.upload-art { width: 260px; max-width: 39%; height: 190px; margin: -10px 0 -8px; object-fit: contain; user-select: none; pointer-events: none; }
.upload-copy { text-align: center; position: relative; }
.upload-copy h1 { margin: 0; color: #20395c; font-size: clamp(31px, 3.2vw, 45px); line-height: 1.2; letter-spacing: .02em; }
.upload-subtitle { margin: 7px 0 0; color: #4c6c95; font-size: 21px; font-weight: 600; }
.upload-limit { margin: 7px 0 0; color: #718aaa; font-size: 16px; }
.upload-buttons { display: flex; gap: 24px; margin-top: 20px; }
.primary-button, .secondary-button { min-width: 205px; min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 26px; border-radius: 32px; font-size: 17px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button img, .secondary-button img { width: 25px; filter: brightness(0) invert(1); }
.primary-button:hover, .copy-button:hover { transform: translateY(-2px); box-shadow: 0 13px 22px rgba(52, 135, 230, .3); }
.primary-button:disabled { cursor: wait; opacity: .78; transform: none; }
.secondary-button { color: #314b6d; border: 1px solid #d1e3f5; background: rgba(244, 250, 255, .68); box-shadow: inset 0 1px 0 #fff; }
.secondary-button:hover { background: #fff; transform: translateY(-2px); }
.secondary-button img { filter: invert(20%) sepia(21%) saturate(1705%) hue-rotate(173deg) brightness(92%); }
.upload-progress { width: min(100%, 480px); display: grid; gap: 7px; margin-top: 16px; padding: 11px 14px; border: 1px solid rgba(106, 182, 244, .35); border-radius: 14px; background: rgba(244, 251, 255, .74); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
.upload-progress[hidden] { display: none; }
.upload-progress__meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #4f7198; font-size: 13px; font-weight: 700; }
.upload-progress__meta strong { color: #2879e5; font-variant-numeric: tabular-nums; }
.upload-progress__track { height: 8px; overflow: hidden; border-radius: 999px; background: #d9edfd; }
.upload-progress__track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #52c4f3, #3478e5); box-shadow: 0 0 12px rgba(60, 143, 241, .5); transition: width .18s ease-out; }
.upload-progress p { margin: 0; color: #718aaa; font-size: 12px; font-variant-numeric: tabular-nums; }
.upload-progress.is-error { border-color: rgba(226, 100, 100, .38); background: rgba(255, 247, 247, .8); }
.upload-progress.is-error .upload-progress__meta, .upload-progress.is-error .upload-progress__meta strong, .upload-progress.is-error p { color: #bf5555; }
.drop-note { position: absolute; right: 22px; bottom: 24px; color: #5c9ff0; font-size: 14px; font-weight: 600; transform: rotate(-9deg); }
.drop-note b { display: inline-block; font-size: 25px; font-weight: 400; vertical-align: -5px; }

.steps { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; max-width: 730px; margin: 28px auto; padding: 0; list-style: none; }
.step { display: flex; align-items: center; gap: 14px; min-width: 160px; }
.step > span { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #254b73; background: #e5f1fb; font-size: 16px; font-weight: 700; }
.step--active > span { color: white; background: linear-gradient(135deg, #5bc4f4, #347be9); box-shadow: 0 7px 16px rgba(62, 144, 235, .24); }
.step div { display: grid; gap: 3px; }
.step strong { font-size: 16px; }
.step small { color: #758eae; font-size: 13px; }
.step-line { height: 2px; margin: 0 26px; background: #d7e6f4; }

.success-panel { position: relative; display: grid; grid-template-columns: 65px 1fr auto; align-items: center; gap: 16px 16px; min-height: 157px; padding: 24px 32px 28px; overflow: hidden; border: 1px solid #d1f2df; border-radius: 25px; background: linear-gradient(105deg, rgba(238, 255, 245, .92), rgba(224, 250, 239, .74)); }
.success-panel::after { content: ""; position: absolute; right: -35px; bottom: -70px; width: 230px; height: 180px; border: 28px solid rgba(110, 223, 153, .11); border-radius: 50%; pointer-events: none; }
.success-panel > img { width: 54px; height: 54px; object-fit: contain; }
.result-copy { display: grid; gap: 5px; }
.result-copy strong { color: #075b2e; font-size: 18px; }
.result-copy span { color: #628398; font-size: 14px; }
.result-note { z-index: 1; margin: 0 0 0 auto; color: #65a6e8; font-size: 14px; font-weight: 600; transform: rotate(-6deg); }
.link-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; width: 100%; }
.link-row input { min-width: 0; height: 60px; padding: 0 22px; color: #233a5c; border: 1px solid #cedff1; border-radius: 14px; outline: none; background: rgba(255,255,255,.76); font-size: 20px; font-weight: 700; }
.copy-button { min-width: 184px; height: 60px; display: inline-flex; align-items: center; justify-content: center; gap: 11px; border-radius: 14px; font-size: 16px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease; }
.copy-button:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; transform: none; }
.copy-button img { width: 24px; filter: brightness(0) invert(1); }
.open-button { width: 60px; display: grid; place-items: center; border: 1px solid #cddff0; border-radius: 14px; background: rgba(255,255,255,.79); transition: transform .2s ease, background .2s ease; }
.open-button[aria-disabled="true"] { cursor: not-allowed; opacity: .55; pointer-events: none; }
.open-button:hover { transform: translateY(-2px); background: white; }
.open-button img { width: 24px; }

.footer { display: flex; justify-content: space-between; align-items: center; padding: 24px 20px 0; color: #7593b4; font-size: 13px; }
.footer div { display: flex; align-items: center; gap: 18px; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--blue-deep); }
.footer i { width: 1px; height: 13px; background: #bad0e4; }
.side-copy { position: fixed; z-index: -1; display: grid; gap: 14px; color: #9fc6ee; font-size: 14px; letter-spacing: .15em; line-height: 1; pointer-events: none; }
.side-copy i { width: 20px; height: 1px; margin-top: 5px; background: #8fb9e4; }
.side-copy--left { left: max(30px, calc((100vw - 1440px) / 2)); top: 185px; }
.side-copy--right { right: max(30px, calc((100vw - 1440px) / 2)); top: 145px; text-align: right; font-size: 11px; letter-spacing: .43em; }
.side-copy--right i { margin-left: auto; }

.dialog { width: min(92vw, 400px); padding: 40px; color: var(--ink); border: 0; border-radius: 24px; box-shadow: 0 25px 70px rgba(25, 61, 106, .28); text-align: center; }
.dialog::backdrop { background: rgba(36, 83, 137, .22); backdrop-filter: blur(5px); }
.dialog-icon { width: 48px; color: var(--blue); }
.dialog h2 { margin: 14px 0 8px; }
.dialog p { margin: 0; color: #6683a3; line-height: 1.7; }
.dialog-action { min-width: 160px; min-height: 48px; margin-top: 22px; font-size: 15px; }
.dialog-close { position: absolute; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #eef6fd; }
.dialog-close img { width: 17px; }
.toast { position: fixed; z-index: 5; bottom: 26px; left: 50%; padding: 12px 20px; color: white; border-radius: 10px; background: rgba(25, 56, 94, .92); box-shadow: 0 8px 24px rgba(23, 52, 87, .2); font-size: 14px; opacity: 0; pointer-events: none; transform: translate(-50%, 22px); }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 600px); padding-top: 13px; }
  .topbar { height: 58px; gap: 12px; padding: 0 4px; }
  .brand-logo { width: 135px; }
  .brand-divider, .brand-tagline, .nav-link, .nav-divider { display: none; }
  .nav-actions { gap: 0; }.login-cta { padding: 10px 17px; font-size: 13px; }
  .share-card { min-height: 0; margin-top: 12px; padding: 55px 16px 18px; border-radius: 27px; }
  .speed-badge { top: 14px; right: 16px; padding: 5px 11px; font-size: 12px; }
  .upload-zone { min-height: 392px; padding: 24px 10px 34px; border-radius: 20px; }
  .upload-art { width: 235px; max-width: 75%; height: 166px; margin: -8px 0 -5px; }
  .upload-copy h1 { font-size: 31px; }.upload-subtitle { font-size: 17px; }.upload-limit { font-size: 13px; }
  .upload-buttons { width: 100%; gap: 10px; padding: 0 6px; }.primary-button, .secondary-button { min-width: 0; min-height: 51px; flex: 1; padding: 0 8px; font-size: 15px; }.primary-button img, .secondary-button img { width: 20px; }
  .upload-progress { width: calc(100% - 12px); }
  .drop-note { display: none; }
  .steps { grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 21px 0; }.step { min-width: 0; justify-content: center; gap: 7px; }.step > span { width: 30px; height: 30px; font-size: 13px; }.step strong { font-size: 13px; }.step small, .step-line { display: none; }
  .success-panel { grid-template-columns: 48px 1fr; gap: 12px; min-height: 0; padding: 18px; border-radius: 18px; }.success-panel > img { width: 45px; height: 45px; }.result-copy strong { font-size: 15px; }.result-copy span { font-size: 12px; line-height: 1.5; }.result-note { display: none; }
  .link-row { grid-template-columns: 1fr 52px; gap: 9px; }.link-row input { grid-column: 1 / -1; height: 50px; padding: 0 13px; font-size: 13px; }.copy-button { min-width: 0; height: 50px; font-size: 14px; }.copy-button img { width: 19px; }.open-button { width: 52px; }.open-button img { width: 21px; }
  .footer { display: grid; gap: 12px; justify-content: center; padding: 18px 0 0; text-align: center; font-size: 11px; }.footer div { gap: 9px; justify-content: center; }.side-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
