/* reveal.css · 等待动画 + 三张翻牌卡片
 *
 * 设计取舍：颜色全部走 styles.css 里定义的变量并给本地兜底值，
 * 这样即使这个文件被单独引入（例如将来做静态预览页）也不会变成一片透明。
 */

/* ── 等待：狗爪走来走去 ───────────────────────────────────────── */

.rv-waiting {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
}

.rv-paws {
  position: relative;
  width: 260px;
  height: 34px;
}

.rv-paw {
  position: absolute;
  left: 0;
  top: 6px;
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  /* 先踩下去再淡出，循环起来就是"一路走过来" */
  animation: rv-step 1650ms ease-in-out infinite;
}

@keyframes rv-step {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  72%  { opacity: 1; }
  100% { opacity: 0; }
}

.rv-hint {
  margin: 0;
  font-size: 14px;
  color: var(--muted, #8a7a6d);
  text-align: center;
}

/* ── 三张翻牌卡片 ─────────────────────────────────────────────── */

.rv-cards {
  display: grid;
  gap: 12px;
}

.rv-card {
  perspective: 900px;
  cursor: pointer;
  /* 翻牌是 CSS transition，配合行内 transition-delay 做发牌节奏 */
  transition: transform 180ms ease;
}

.rv-card:active {
  transform: scale(0.985);
}

.rv-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.2, 0.8, 0.25, 1);
  /* 初始状态是背面朝上；JS 加上 .flipped 才翻开 */
  transform: rotateY(180deg);
  min-height: 96px;
}

.rv-card.flipped .rv-inner {
  transform: rotateY(0deg);
}

.rv-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 96px;
  box-sizing: border-box;
}

.rv-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--brand, #c96f43), var(--brand-deep, #a9542c));
  color: #fff6ee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.rv-back-mark {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
}

.rv-back-dots {
  opacity: 0.75;
  letter-spacing: 0.3em;
  font-size: 12px;
}

.rv-front {
  background: var(--surface, #fffaf4);
  border: 1px solid var(--line, #eadfd4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rv-card.picked .rv-front {
  border-color: var(--brand, #c96f43);
  box-shadow: 0 0 0 2px rgba(201, 111, 67, 0.18);
}

.rv-card.picked .rv-inner {
  transform: rotateY(0deg) translateY(-1px);
}

.rv-tone {
  font-size: 20px;
  line-height: 1;
}

.rv-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--fg, #3a2f28);
  word-break: break-word;
}

.rv-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.rv-src,
.rv-conf {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--chip, #f4e9df);
  color: var(--muted, #8a7a6d);
}

.rv-edit {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--brand, #c96f43);
  text-decoration: underline;
  cursor: pointer;
}

.rv-editor {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rv-editor input {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  padding: 8px 10px;
  border: 1px solid var(--line, #eadfd4);
  border-radius: 10px;
}

.rv-use,
.rv-cancel {
  flex: none;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line, #eadfd4);
  background: var(--surface, #fffaf4);
  cursor: pointer;
}

.rv-use {
  background: var(--brand, #c96f43);
  border-color: var(--brand, #c96f43);
  color: #fff6ee;
}

/* ── 减弱动态效果：不做翻牌、不做走动，但信息一样不少 ───────────── */

@media (prefers-reduced-motion: reduce) {
  .rv-paw { animation: none; opacity: 1; }
  .rv-inner { transition: none; }
  .rv-card { transition: none; }
}
