/* 相机拍摄屏：顶栏、取景框、快门区（Zoland 蓝） */

.camera-screen {
  display: flex;
  flex-direction: column;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #0a131e;
}

.camera-screen::before {
  position: absolute;
  inset: 0;
  background: var(--selected-background, none) center / cover no-repeat;
  opacity: .16;
  filter: saturate(.85);
  content: "";
  pointer-events: none;
}

.camera-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.camera-top > div {
  display: block;
}

.camera-top strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  max-width: 60vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.back-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(240, 245, 250, .48);
  border-radius: 50%;
  background: rgba(10, 19, 30, .36);
  color: var(--ink);
  font-size: 20px;
  transition: background-color .2s ease, transform .2s ease;
}

.back-button:hover {
  background: rgba(100, 180, 232, .18);
  transform: translateX(-2px);
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.connection i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5c6b7a;
}

.connection.online i {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(100, 180, 232, .16);
}

/* 取景提示：手机端不做实时预览，仅提示看现场大屏（在剩余空间垂直居中） */
.camera-view-hint {
  display: grid;
  margin: auto 0;
  gap: 8px;
  justify-items: center;
  color: var(--muted);
  font-size: 13px;
}

.camera-view-hint span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(240, 245, 250, .35);
  border-radius: 50%;
  color: var(--teal);
  font-size: 22px;
}

.camera-view-hint p {
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.camera-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
}

.camera-overlay span {
  color: rgba(240, 245, 250, .78);
  font-size: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.camera-bottom {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 12px;
}

.countdown {
  height: 78px;
  color: var(--gold);
  font: 600 72px/1 "DM Mono", "SFMono-Regular", monospace;
  text-shadow: 0 4px 24px rgba(210, 174, 104, .3);
}

.shutter-action {
  display: flex;
  width: min(100%, 420px);
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(100, 180, 232, .5);
  border-radius: 2px;
  background: rgba(100, 180, 232, .16);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  transition: background-color .2s ease, transform .2s ease;
}

.shutter-action:hover {
  background: rgba(100, 180, 232, .26);
  transform: translateY(-2px);
}

.shutter-ring {
  display: grid;
  width: 26px;
  height: 26px;
  flex: none;
  place-items: center;
  border: 2px solid rgba(240, 245, 250, .85);
  border-radius: 50%;
}

.shutter-ring i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
}

.stop-action {
  width: min(100%, 420px);
  height: 46px;
  border: 1px solid rgba(223, 118, 84, .72);
  border-radius: 2px;
  background: rgba(223, 118, 84, .16);
  color: #f3ad95;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .2s ease;
}

.stop-action:hover {
  background: rgba(223, 118, 84, .26);
}

@media (max-width: 500px) {
  .camera-screen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .countdown {
    height: 60px;
    font-size: 56px;
  }
}

/* 照片生成中动画：拍摄触发后替代取景提示（Zoland 蓝扫描显影） */
.developing {
  display: grid;
  margin: auto 0;
  gap: 16px;
  justify-items: center;
  z-index: 2;
  position: relative;
}

.developing-frame {
  position: relative;
  width: min(52vw, 200px);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(100, 180, 232, .55);
  border-radius: 6px;
  background: rgba(10, 19, 30, .55);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 111, 170, .25);
}

.developing-frame > i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 30px;
  font-style: normal;
  animation: zn-develop-breathe 1.6s ease-in-out infinite;
}

.developing-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 34%;
  top: -34%;
  background: linear-gradient(180deg, transparent, rgba(100, 180, 232, .38), transparent);
  animation: zn-develop-scan 1.5s linear infinite;
}

.developing p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .25em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.developing p em {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  font-style: normal;
}

.developing p em i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: 5px;
  animation: zn-develop-dot 1.2s ease-in-out infinite;
}

.developing p em i:nth-child(2) { animation-delay: .2s; }
.developing p em i:nth-child(3) { animation-delay: .4s; }

@keyframes zn-develop-scan {
  0% { top: -34%; }
  100% { top: 100%; }
}

@keyframes zn-develop-breathe {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

@keyframes zn-develop-dot {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .developing-scan,
  .developing-frame > i,
  .developing p em i {
    animation: none;
  }
}
