:root {
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --surface-strong: #eef1f8;
  --border: #d8deeb;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #0ea5e9;
  --danger: #dc2626;
  --text: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 禁止移动端双击放大 */
* {
  touch-action: manipulation;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: linear-gradient(160deg, #e0e7ff 0%, #f8fafc 100%);
  color: var(--text);
}
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px 80px;
}
header.app__header {
  text-align: left;
  margin-bottom: 32px;
}
header.app__header h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
header.app__header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 98%;
}
.app__main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.panel {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.panel h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.media-workspace__player {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.media-workspace__player input[type="file"] {
  display: none;
}

/* ÃƒÂ¨Ã‚Â§Ã¢â‚¬Â ÃƒÂ©Ã‚Â¢Ã¢â‚¬ËœÃƒÂ©Ã‚Â¢Ã¢â‚¬Å¾ÃƒÂ¨Ã‚Â§Ã‹â€ ÃƒÂ¥Ã¢â‚¬â„¢Ã…â€™ÃƒÂ¥Ã‚Â¾Ã‚Â®ÃƒÂ¨Ã‚Â°Ã†â€™ÃƒÂ¦Ã¢â‚¬â€Ã‚Â¶ÃƒÂ©Ã¢â‚¬â€Ã‚Â´ÃƒÂ¥Ã‚Â·Ã‚Â¦ÃƒÂ¥Ã‚ÂÃ‚Â³ÃƒÂ¦Ã…Â½Ã¢â‚¬â„¢ÃƒÂ¥Ã‚Â¸Ã†â€™ */
.player-nudge-row {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  align-items: stretch;
}

.player-nudge-row .media-workspace__player {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ÃƒÂ¥Ã‚ÂÃ‚Â³ÃƒÂ¤Ã‚Â¾Ã‚Â§ÃƒÂ¦Ã…Â½Ã‚Â§ÃƒÂ¥Ã‹â€ Ã‚Â¶ÃƒÂ©Ã‚ÂÃ‚Â¢ÃƒÂ¦Ã‚ÂÃ‚Â¿ */
.control-panel {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ÃƒÂ¥Ã‚Â¾Ã‚Â®ÃƒÂ¨Ã‚Â°Ã†â€™ÃƒÂ¦Ã¢â‚¬â€Ã‚Â¶ÃƒÂ©Ã¢â‚¬â€Ã‚Â´ÃƒÂ©Ã‚ÂÃ‚Â¢ÃƒÂ¦Ã‚ÂÃ‚Â¿ */
.nudge-panel {
  padding: 20px;
  border-radius: 4px;
  border: 1px solid var(--surface-strong);
  background: var(--surface-alt);
}

.nudge-panel h3 {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.player-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex: 1;
}
.player-shell[data-empty="true"] {
  background: var(--surface-alt);
  border: 2px dashed var(--border);
  height: 100%;
}
.player-shell[data-empty="true"] video {
  display: none;
}
.player-shell video {
  width: 100%;
  height: auto;
  max-height: 520px;
  background: #000;
}
.media-workspace__player.is-dragover .player-shell {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}
.media-workspace__player.is-dragover .player-placeholder {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(255, 255, 255, 0.92);
}
.player-placeholder {
  position: absolute;
  inset: 12px;
  border-radius: 4px;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-align: center;
  padding: 24px 16px;
}
.player-placeholder:hover,
.player-placeholder:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
  outline: none;
}
.player-placeholder__icon {
  font-size: 28px;
  line-height: 1;
}
.player-placeholder__title {
  font-size: 18px;
  font-weight: 600;
}
.player-placeholder__subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.player-placeholder__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}
.player-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.player-hint.hidden {
  display: none;
}
.player-reupload {
  text-align: center;
  max-width: 520px;
  width: 98%;
  margin: 6px auto 0;
  padding: 14px 12px;
  font-size: 16px;
  border-radius: 4px;
  background: white;
  color: #2563eb;
  font-weight: 600;
  cursor: default;
  border: 1px solid;
}
/* ÃƒÂ©Ã¢â‚¬Â¡Ã‚ÂÃƒÂ¦Ã¢â‚¬â€œÃ‚Â°ÃƒÂ¤Ã‚Â¸Ã…Â ÃƒÂ¤Ã‚Â¼Ã‚Â ÃƒÂ¦Ã…â€™Ã¢â‚¬Â°ÃƒÂ©Ã¢â‚¬â„¢Ã‚Â®ÃƒÂ¦Ã‚Â Ã‚Â·ÃƒÂ¥Ã‚Â¼Ã‚ÂÃƒÂ§Ã¢â‚¬ÂÃ‚Â±control-panelÃƒÂ§Ã…Â¡Ã¢â‚¬Å¾gapÃƒÂ¦Ã…Â½Ã‚Â§ÃƒÂ¥Ã‹â€ Ã‚Â¶ */
.precision-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.precision-row label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--text-muted);
  gap: 6px;
}
.precision-row select,
.precision-row input[type="text"] {
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
.precision-row input[type="text"]::placeholder {
  color: #c3cad8;
}
.nudge-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nudge-pair {
  display: flex;
  gap: 8px;
}

.nudge-pair .btn {
  flex: 1;
}


/* ÃƒÂ¦Ã‹â€ Ã‚ÂªÃƒÂ¥Ã‚ÂÃ¢â‚¬â€œÃƒÂ¦Ã…â€™Ã¢â‚¬Â°ÃƒÂ©Ã¢â‚¬â„¢Ã‚Â®ÃƒÂ©Ã‚ÂÃ‚Â¢ÃƒÂ¦Ã‚ÂÃ‚Â¿ */
.capture-panel {
  margin-top: 16px;
}

.capture-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
}
.btn {
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover:not(:disabled) {
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.12);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}
.btn.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn.btn--primary:hover:not(:disabled) {
  background: var(--primary-strong);
}
.btn.btn--secondary {
  background: var(--primary);
  color: #fff;
}
.btn.btn--ghost {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}
.helper-text ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.download-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.download-action-item .btn {
  width: 100%;
}
.shot-summary {
  font-size: 14px;
  color: var(--text-muted);
}
.shot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  background-color: #f5f7fb;
  padding: 10px;
}
.shot-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.shot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.12);
}
.shot-card__thumb {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  cursor: pointer;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--surface-strong);
}
.shot-card__thumb img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #000;
  transition: transform 0.2s;
}
.shot-card__thumb:hover img,
.shot-card__thumb:focus-visible img {
  transform: scale(1.02);
}
.shot-card__thumb:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.shot-card__body {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shot-card__meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shot-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shot-card__action-row {
  display: flex;
  gap: 6px;
}
.shot-card__action-row:first-child .btn {
  width: 100%;
}
.shot-card__action-row:not(:first-child) .btn {
  flex: 1 1 auto;
}
.shot-card__actions .btn {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 4px;
}
.shot-empty {
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--surface-alt);
}
.shot-preview {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.shot-preview.hidden {
  display: none;
}
.shot-preview__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}
.shot-preview__content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: min(90vw, 960px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}
.shot-preview__media {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.shot-preview__media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100vh;
  object-fit: contain;
}
.shot-preview__meta {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shot-preview__meta-primary {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.shot-preview__meta-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.shot-preview__meta-details span {
  word-break: break-all;
  white-space: normal;
}
.shot-preview__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: rgba(15, 23, 42, 0.4);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shot-preview__close:hover {
  background: rgba(15, 23, 42, 0.6);
}
.shot-preview__close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* iOS保存提示样式 */
.ios-save-hint {
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid #2563eb0d;
  border-radius: 6px;
  color: #2563eb7d;
  font-size: 14px;
  text-align: center;
  cursor: default;
  user-select: none;
  width: 100%;
}

.hidden {
  display: none !important;
}
footer {
  margin-top: 48px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.05em;
}
footer a {
  color: var(--primary);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* åŠŸèƒ½ä»‹ç»åŒºåŸŸæ ·å¼ */
.panel--intro {
  background: white;
  color: #333;
  padding: 40px 32px;
}

.intro-header {
  text-align: center;
  margin-bottom: 20px;
}

.intro-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #333;
  line-height: 1.3;
}

.intro-header p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
}

.feature-list {
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 2.2;
  color: #555;
}

.feature-list li {
  margin-bottom: 16px;
  padding-left: 24px;
  position: relative;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 18px;
}

.highlight {
  color: var(--primary);
  font-weight: bold;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.intro-footer {
  text-align: center;
}

.intro-footer h3 {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.intro-footer p {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 20px 0;
  color: #666;
  max-width: 700px;
  margin: 0 auto 20px;
}

.coming-soon-text {
  font-size: 15px;
  color: #888 !important;
  font-style: italic;
  border-top: 1px solid #eee;
  padding-top: 24px;
  margin-top: 32px !important;
}

/* ç§»åŠ¨ç«¯é€‚é… */
@media (max-width: 768px) {
  .panel--intro {
    padding: 32px 24px;
    margin-top: 20px;
  }

  .intro-header h2 {
    font-size: 24px;
  }

  .intro-header p {
    font-size: 16px;
  }

  .feature-list {
    font-size: 15px;
    padding-left: 0;
    max-width: 100%;
  }

  .feature-list li {
    padding-left: 20px;
    margin-bottom: 14px;
  }

  .intro-footer h3 {
    font-size: 20px;
  }

  .intro-footer p {
    font-size: 15px;
    line-height: 1.6;
  }

  .coming-soon-text {
    font-size: 14px;
    padding-top: 20px;
    margin-top: 28px !important;
  }
}

@media (max-width: 640px) {
  .panel--intro {
    padding: 24px 16px;
    margin-top: 16px;
  }

  .intro-header h2 {
    font-size: 22px;
  }

  .intro-header p {
    font-size: 15px;
  }

  .feature-list {
    font-size: 14px;
    line-height: 2;
  }

  .feature-list li {
    padding-left: 18px;
    margin-bottom: 12px;
  }

  .intro-footer h3 {
    font-size: 18px;
  }

  .intro-footer p {
    font-size: 14px;
  }

  .coming-soon-text {
    font-size: 13px;
    padding-top: 16px;
    margin-top: 24px !important;
  }
}
@media (max-width: 1080px) {
  .app {
    padding: 24px;
  }
  .shot-card__actions .btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
  }
  .download-actions {
    margin-top: 4px;
  }
  .player-reupload {
    text-align: center;
    max-width: 520px;
    width: 90%;
    margin: 0px auto 0;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 4px;
    background: white;
    color: #2563eb;
    font-weight: 400;
    cursor: default;
  }
}
@media (max-width: 640px) {
  .app {
    padding: 20px 10px 48px;
  }
  header.app__header h1 {
    font-size: 26px;
  }
  .panel {
    padding: 10px;
    border-radius: 4px;
  }
  .upload-area {
    padding: 24px 18px;
  }
  .player-nudge-row {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 2px;
  }
  .control-panel {
    flex: none;
    width: 100%;
  }
  .nudge-panel {
    width: 100%;
    padding: 16px;
  }
  .nudge-pair {
    gap: 12px;
  }
  .media-workspace__player {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .player-placeholder {
    inset: 8px;
  }
 
  /* upload-rowÃƒÂ§Ã…Â¡Ã¢â‚¬Å¾ÃƒÂ¦Ã‚Â Ã‚Â·ÃƒÂ¥Ã‚Â¼Ã‚ÂÃƒÂ§Ã¢â‚¬ÂÃ‚Â±control-panelÃƒÂ§Ã…Â¡Ã¢â‚¬Å¾gapÃƒÂ¦Ã…Â½Ã‚Â§ÃƒÂ¥Ã‹â€ Ã‚Â¶ */
  .capture-panel {
    margin-top: 12px;
  }
  .capture-btn {
    padding: 10px 14px;
    font-size: 16px;
  }
  .shot-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .shot-card__thumb img {
    height: 110px;
  }
  .shot-preview {
    padding: 16px;
  }
  .shot-preview__content {
    border-radius: 16px;
  }
  .player-shell {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
}
