:root {
  --navy: #1a2b6b;
  --teal: #00b4a6;
  --teal-glow: #00e5d4;
  --orange: #f5a623;
  --purple: #7b61ff;
  --danger: #ff4757;
  --bg: #030305;
  --card: rgba(8, 10, 18, 0.92);
  --glass: rgba(255, 255, 255, 0.04);
  --text: #eef1ff;
  --muted: #8b95b8;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body[data-theme="welcome"] { --accent: var(--teal); --accent-glow: rgba(0, 180, 166, 0.4); }
body[data-theme="room-0"] { --accent: var(--orange); --accent-glow: rgba(245, 166, 35, 0.45); }
body[data-theme="room-1"] { --accent: var(--danger); --accent-glow: rgba(255, 71, 87, 0.45); }
body[data-theme="room-2"] { --accent: var(--teal); --accent-glow: rgba(0, 180, 166, 0.45); }
body[data-theme="escaped"] { --accent: var(--teal-glow); --accent-glow: rgba(0, 229, 212, 0.5); }

/* Ambient */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#particles { width: 100%; height: 100%; opacity: 0.6; }

.ambient-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow, rgba(0,180,166,0.25)), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(123,97,255,0.12), transparent 50%);
  transition: background 0.8s ease;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.4;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(0,0,0,0.85) 100%);
  transition: background 0.6s ease;
}

body.in-escape .vignette {
  background: radial-gradient(ellipse at center 30%, transparent 0%, rgba(0,0,0,0.5) 45%, rgba(0,0,0,0.95) 100%);
}

body.in-escape .ambient-glow {
  background: radial-gradient(ellipse 50% 30% at 50% 20%, rgba(255,160,60,0.04), transparent 70%);
}

body.in-escape #particles {
  opacity: 0.25;
}

/* Flashlight overlay in escape mode */
.torch-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 90% 55% at 50% 28%,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.88) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.in-escape {
  background: #010102;
}

body.in-escape .torch-overlay {
  opacity: 1;
}

body.in-escape .top-bar {
  background: rgba(1, 1, 2, 0.85);
}

body.in-escape .logo {
  opacity: 0.7;
}

body.in-escape .live-dot,
body.in-escape .live-label {
  opacity: 0.6;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.15s;
}

.flash-overlay.active { opacity: 1; }
.flash-success { background: rgba(0, 229, 212, 0.25); }
.flash-error { background: rgba(255, 71, 87, 0.2); }

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px 40px;
}

.app.shake {
  animation: shake 0.45s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Top bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.game-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 16px rgba(0, 229, 212, 0.45);
}

.logo { height: 22px; filter: brightness(1.1); }

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
  box-shadow: 0 0 8px var(--danger);
}

.live-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--danger);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.timer-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--accent, var(--teal));
  border: 1px solid var(--accent-glow, rgba(0,180,166,0.35));
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 0 20px var(--accent-glow, rgba(0,180,166,0.2)), inset 0 1px 0 rgba(255,255,255,0.08);
}

.timer-pill.running {
  animation: timer-pulse 2s infinite;
}

@keyframes timer-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 32px var(--accent-glow), 0 0 8px var(--accent); }
}

.timer-icon { font-size: 14px; }

.mute-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, border-color 0.2s;
}

.mute-btn:active {
  transform: scale(0.94);
}

.mute-btn.muted {
  opacity: 0.45;
}

.hint-bar {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: calc(100% - 32px);
  max-width: 448px;
  background: linear-gradient(135deg, rgba(245,166,35,0.95), rgba(255,180,50,0.95));
  color: #1a1000;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 30;
  box-shadow: 0 8px 32px rgba(245,166,35,0.35);
}

.hint-bar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Screens */
.screen { display: none; }
.screen.active {
  display: block;
  animation: screenIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-panel {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Welcome scene */
.welcome-scene {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.vault-door {
  position: relative;
  width: 140px;
  height: 140px;
}

.vault-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0, 180, 166, 0.3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-outer { width: 140px; height: 140px; animation: spin 20s linear infinite; }
.ring-mid { width: 100px; height: 100px; animation: spin 14s linear infinite reverse; border-color: rgba(0,229,212,0.4); }
.ring-inner { width: 60px; height: 60px; animation: spin 8s linear infinite; border-color: rgba(245,166,35,0.5); }

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.vault-handle {
  position: absolute;
  top: 50%; left: 50%;
  width: 24px; height: 24px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--teal-glow), var(--teal));
  border-radius: 50%;
  box-shadow: 0 0 24px var(--teal-glow);
}

.vault-lock-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,212,0.15), transparent 70%);
  animation: glow-pulse 3s ease infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.warning-strip {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--orange);
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
  animation: blink-strip 2s step-end infinite;
}

@keyframes blink-strip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

.hero .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-glow);
  border: 1px solid rgba(0,229,212,0.35);
  background: rgba(0,180,166,0.08);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero .badge.pulse { animation: badge-glow 2.5s ease infinite; }

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(0,229,212,0); }
  50% { box-shadow: 0 0 16px rgba(0,229,212,0.3); }
}

.hero h1 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 10px;
  font-weight: 800;
}

.glow-text {
  background: linear-gradient(135deg, var(--teal-glow), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.challenge-banner {
  background: linear-gradient(135deg, rgba(123,97,255,0.2), rgba(0,180,166,0.15));
  border: 1px solid rgba(123,97,255,0.45);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 24px rgba(123,97,255,0.15);
}

.challenge-banner strong { color: var(--orange); }

/* Room preview cards */
.room-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.preview-item {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.preview-item:nth-child(1) { animation: float 4s ease infinite; }
.preview-item:nth-child(2) { animation: float 4s ease 0.5s infinite; }
.preview-item:nth-child(3) { animation: float 4s ease 1s infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.preview-icon {
  font-size: 28px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.preview-item .num {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.1em;
}

.preview-item .label {
  font-size: 12px;
  color: var(--muted);
}

.name-field {
  display: block;
  padding: 14px;
  margin-bottom: 16px;
}

.name-field span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.name-field input,
.field-input,
.field-textarea {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 12px 0 6px;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal), #00897b);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0,180,166,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-glow { animation: btn-glow 3s ease infinite; }

@keyframes btn-glow {
  0%, 100% { box-shadow: 0 4px 24px rgba(0,180,166,0.4); }
  50% { box-shadow: 0 4px 36px rgba(0,229,212,0.55); }
}

.btn-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  40%, 100% { left: 150%; }
}

.btn-secondary {
  background: rgba(26,43,107,0.6);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}

.btn-sm {
  width: auto;
  display: inline-block;
  padding: 8px 14px;
  font-size: 12px;
  margin-top: 10px;
  margin-right: 8px;
}

.fine-print {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
  opacity: 0.7;
}

/* Room scene */
.room-scene {
  height: 120px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}

.room-scene.enter .scene-visual {
  animation: sceneIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sceneIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.scene-visual {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,0.5);
}

/* Mystery room scenes */
.scene-rune {
  background: linear-gradient(180deg, #1a1008 0%, #2a180a 55%, #120c08 100%);
}

.rune-wall {
  display: flex;
  gap: 14px;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: rgba(245, 166, 35, 0.55);
  text-shadow: 0 0 18px rgba(245, 166, 35, 0.35);
  animation: rune-pulse 2.4s ease-in-out infinite;
}

@keyframes rune-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.scene-rune .scene-label { color: var(--orange); border: 1px solid rgba(245,166,35,0.3); }

.scene-cipher {
  background: linear-gradient(180deg, #140c10 0%, #241018 55%, #0e080c 100%);
}

.candle-row {
  position: absolute;
  bottom: 22px;
  display: flex;
  gap: 10px;
}

.candle-row span {
  width: 6px;
  height: 22px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #f5d76e, #c4860a 60%, #5a3a10);
  box-shadow: 0 -6px 12px rgba(245, 166, 35, 0.55);
  animation: candle-flicker 1.2s ease-in-out infinite;
}

.candle-row span:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.candle-row span:nth-child(3) { animation-delay: 0.45s; height: 26px; }
.candle-row span:nth-child(4) { animation-delay: 0.1s; height: 16px; }

@keyframes candle-flicker {
  0%, 100% { box-shadow: 0 -6px 10px rgba(245, 166, 35, 0.4); }
  50% { box-shadow: 0 -10px 18px rgba(245, 166, 35, 0.75); }
}

.iron-lock {
  font-size: 36px;
  filter: drop-shadow(0 0 12px rgba(255, 80, 80, 0.35));
}

.scene-cipher .scene-label { color: #ff8a9a; border: 1px solid rgba(255,71,87,0.3); }

.scene-crystal {
  background: linear-gradient(180deg, #081820 0%, #0a2830 55%, #061018 100%);
}

.crystal-trio {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

.crystal-trio span {
  width: 18px;
  height: 36px;
  clip-path: polygon(50% 0%, 100% 30%, 80% 100%, 20% 100%, 0% 30%);
  opacity: 0.85;
  animation: crystal-breathe 2s ease-in-out infinite;
}

.crystal-trio .c-red {
  background: linear-gradient(180deg, #ff6b6b, #8b1a1a);
  box-shadow: 0 0 16px rgba(255, 80, 80, 0.45);
}
.crystal-trio .c-blue {
  height: 44px;
  background: linear-gradient(180deg, #6bc5ff, #1a4a8b);
  box-shadow: 0 0 16px rgba(80, 160, 255, 0.45);
  animation-delay: 0.3s;
}
.crystal-trio .c-green {
  height: 28px;
  background: linear-gradient(180deg, #6bff9a, #1a8b4a);
  box-shadow: 0 0 16px rgba(80, 255, 140, 0.45);
  animation-delay: 0.6s;
}

@keyframes crystal-breathe {
  0%, 100% { transform: translateY(0); opacity: 0.75; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.scene-crystal .scene-label { color: var(--teal-glow); border: 1px solid rgba(0,229,212,0.3); }

/* Room header */
.room-header {
  padding: 14px;
  margin-bottom: 12px;
}

.room-meta { margin-bottom: 10px; }

.room-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 4px;
}

.room-meta h2 {
  font-size: 20px;
  font-weight: 800;
}

.room-progress-badge {
  float: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(0,0,0,0.3);
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: -28px;
}

.progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  clear: both;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal-glow));
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px var(--accent-glow);
}

.progress-glow {
  position: absolute;
  top: 0; left: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.puzzle-mount {
  padding: 16px;
  min-height: 340px;
  position: relative;
}

.puzzle-mount::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.room-story {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
}

/* Room 1 puzzle */
.lock-panel {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  text-align: center;
}

.lock-icon {
  font-size: 32px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(245,166,35,0.5));
}

.lock-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.sequence-track {
  min-height: 40px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.1);
}

.seq-chip {
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.35);
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  animation: chipIn 0.3s ease;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.action-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-card:active,
.action-card.selected {
  border-color: var(--accent);
  background: rgba(245,166,35,0.12);
  transform: scale(0.96);
  box-shadow: 0 0 20px var(--accent-glow);
}

.action-card .icon { font-size: 26px; }

/* Room 2 puzzle */
.clue-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.clue {
  background: rgba(0,0,0,0.35);
  border-left: 3px solid var(--orange);
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 0 10px 10px 0;
  font-family: "Courier New", monospace;
}

.clue-num {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  color: var(--orange);
  margin-right: 6px;
  letter-spacing: 0.08em;
}

.keypad-wrap {
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  border-radius: 16px;
  padding: 16px;
  border: 2px solid #444;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
}

.code-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.code-digit {
  width: 44px; height: 52px;
  background: #0a0a0a;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  font-family: "Courier New", monospace;
  color: #0f0;
  text-shadow: 0 0 8px #0f0;
  box-shadow: inset 0 0 12px rgba(0,255,0,0.08);
}

.code-digit.filled {
  border-color: rgba(0,255,0,0.4);
  animation: digit-pop 0.2s ease;
}

@keyframes digit-pop {
  0% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.key {
  background: linear-gradient(180deg, #4a4a4a, #2a2a2a);
  border: 1px solid #555;
  color: #eee;
  border-radius: 10px;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 #1a1a1a, 0 6px 12px rgba(0,0,0,0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}

.key:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1a1a1a;
}

.key-action {
  background: linear-gradient(180deg, #555, #333);
  font-size: 13px;
}

.key-enter {
  background: linear-gradient(180deg, var(--teal), #00897b);
  border-color: var(--teal);
  color: #fff;
}

/* Room 3 puzzle */
.vault-panel {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(0,229,212,0.2);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.gauge-row {
  margin-bottom: 18px;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.gauge-header .val {
  color: var(--teal-glow);
  font-variant-numeric: tabular-nums;
}

.gauge-track {
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.gauge-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.15s ease;
  box-shadow: 0 0 12px var(--accent-glow);
}

.gauge-fill.stock { background: linear-gradient(90deg, #c4860a, var(--orange)); }
.gauge-fill.ads { background: linear-gradient(90deg, #5a3dc4, var(--purple)); }
.gauge-fill.cash { background: linear-gradient(90deg, #00897b, var(--teal-glow)); }

/* Rune puzzle */
.rune-ring {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 16px;
}

.rune-stone {
  appearance: none;
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: radial-gradient(circle at 30% 25%, #3a2a14, #1a1208 70%);
  border-radius: 16px;
  min-height: 84px;
  color: #f5d76e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.45), 0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.rune-stone:active,
.rune-stone.lit {
  transform: scale(0.96);
  border-color: rgba(245, 166, 35, 0.9);
  box-shadow: 0 0 24px rgba(245, 166, 35, 0.45), inset 0 0 18px rgba(245, 166, 35, 0.2);
}

.rune-stone.shake-rune {
  animation: shake-rune 0.35s ease;
}

@keyframes shake-rune {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.rune-ring.solved .rune-stone {
  border-color: rgba(0, 229, 212, 0.6);
  box-shadow: 0 0 20px rgba(0, 229, 212, 0.35);
}

.rune-symbol { font-size: 28px; line-height: 1; }
.rune-tip {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
}

.seq-orbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.seq-orbs .orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(0,0,0,0.25);
}

.seq-orbs .orb.filled {
  border-style: solid;
  border-color: rgba(245, 166, 35, 0.55);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.3);
}

.puzzle-tools {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Found items (room 2) */
.found-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 16px;
}

.found-item {
  position: relative;
  padding: 14px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(0,0,0,0.25));
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.found-emoji { display: block; font-size: 22px; margin-bottom: 6px; }
.found-label { display: block; font-size: 12px; color: rgba(255,255,255,0.55); }
.found-num {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 229, 212, 0.18);
  color: #00e5d4;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.keypad-wrap.antique .code-display {
  background: rgba(20, 12, 8, 0.65);
  border-color: rgba(245, 166, 35, 0.25);
}

/* Crystal altar (room 3) */
.crystal-altar {
  margin: 8px 0 16px;
  padding: 16px 12px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(0,229,212,0.08), rgba(0,0,0,0.35));
  border: 1px solid rgba(0, 229, 212, 0.18);
}

.crystal-orb-row {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-bottom: 14px;
}

.crystal-orb {
  position: relative;
  width: 72px;
  height: 110px;
  border-radius: 36px 36px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
}

.crystal-orb .orb-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transition: height 0.15s ease;
  opacity: 0.9;
}

.crystal-orb.red .orb-glow {
  background: linear-gradient(180deg, rgba(255,120,120,0.15), #ff4d4d);
  box-shadow: 0 0 24px rgba(255, 80, 80, 0.5);
}
.crystal-orb.blue .orb-glow {
  background: linear-gradient(180deg, rgba(120,180,255,0.15), #4d8fff);
  box-shadow: 0 0 24px rgba(80, 140, 255, 0.5);
}
.crystal-orb.green .orb-glow {
  background: linear-gradient(180deg, rgba(120,255,160,0.15), #3dcc7a);
  box-shadow: 0 0 24px rgba(80, 220, 140, 0.5);
}

.crystal-orb .orb-pct,
.crystal-orb .orb-name {
  position: relative;
  z-index: 1;
}

.crystal-orb .orb-pct {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.crystal-orb .orb-name {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.crystal-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.crystal-sliders input[type="range"] {
  width: 100%;
  accent-color: #00e5d4;
}

.crystal-altar.solved {
  border-color: rgba(0, 229, 212, 0.55);
  box-shadow: 0 0 28px rgba(0, 229, 212, 0.25);
}

.crystal-altar .balance-hint {
  text-align: center;
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

/* Mini-game shells */
.mini-game { text-align: center; }
.game-banner {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #00e5d4;
  background: rgba(0, 229, 212, 0.12);
  border: 1px solid rgba(0, 229, 212, 0.35);
}
.game-status {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

/* Simon memory */
.simon-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 280px;
  margin: 12px auto 8px;
}
.simon-board.simon-6 {
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 320px;
}
.round-pips {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 4px;
}
.round-pips .pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 212, 0.4);
  background: transparent;
}
.round-pips .pip.current {
  background: rgba(0, 229, 212, 0.45);
  box-shadow: 0 0 10px rgba(0, 229, 212, 0.5);
}
.round-pips .pip.done {
  background: #00e5d4;
  border-color: #00e5d4;
}

.code-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 8px;
}
.code-slot {
  width: 56px;
  height: 64px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.code-slot.filled {
  border-style: solid;
  border-color: rgba(0, 229, 212, 0.55);
  box-shadow: 0 0 14px rgba(0, 229, 212, 0.25);
}
.slot-mark {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}
.slot-val {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.code-slot.filled .slot-val { color: #00e5d4; }

.search-item { position: relative; }
.si-order {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 12px;
  color: #00e5d4;
  font-weight: 800;
}

#room2-unlock:disabled {
  opacity: 0.4;
  pointer-events: none;
}
#room2-unlock.ready {
  animation: timer-pulse 1.6s infinite;
}
.simon-board.locked { pointer-events: none; opacity: 0.85; }
.simon-board.solved .simon-tile {
  border-color: rgba(0, 229, 212, 0.7);
  box-shadow: 0 0 22px rgba(0, 229, 212, 0.35);
}
.simon-tile {
  appearance: none;
  border: 2px solid rgba(255,255,255,0.12);
  background: radial-gradient(circle at 30% 20%, #2a2440, #12101c 75%);
  border-radius: 18px;
  min-height: 88px;
  font-size: 36px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.simon-tile:active { transform: scale(0.96); }
.simon-tile.flash {
  border-color: #00e5d4;
  box-shadow: 0 0 28px rgba(0, 229, 212, 0.55), inset 0 0 24px rgba(0, 229, 212, 0.2);
  transform: scale(1.04);
}

/* Search room */
.search-room {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}
.search-item {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.28);
  border-radius: 14px;
  padding: 12px 6px;
  color: #fff;
  cursor: pointer;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.search-item.searched {
  border-color: rgba(0, 229, 212, 0.4);
  background: rgba(0, 229, 212, 0.08);
}
.si-emoji { font-size: 22px; }
.si-label { font-size: 11px; color: rgba(255,255,255,0.5); }
.si-digit {
  font-size: 22px;
  font-weight: 800;
  color: #00e5d4;
}
.loot-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.loot-label { font-size: 12px; color: rgba(255,255,255,0.5); }
.loot-digits { display: flex; gap: 8px; min-height: 36px; align-items: center; }
.loot-chip {
  appearance: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 212, 0.5);
  background: rgba(0, 229, 212, 0.15);
  color: #00e5d4;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}
.loot-empty { font-size: 12px; color: rgba(255,255,255,0.35); }
.keypad-wrap.compact { margin-top: 4px; }

/* Gem altars */
.gem-pool {
  margin: 8px 0 14px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.gem-pool strong { color: #00e5d4; font-size: 18px; }
.gem-altars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.gem-altars.solved .gem-altar {
  border-color: rgba(0, 229, 212, 0.55);
  box-shadow: 0 0 18px rgba(0, 229, 212, 0.25);
}
.gem-altar {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  padding: 10px 6px 12px;
}
.gem-pile {
  min-height: 54px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 2px;
  font-size: 16px;
}
.gem-count {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin: 4px 0;
}
.gem-name {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.gem-btns { display: flex; gap: 6px; justify-content: center; }
.gem-btn {
  appearance: none;
  width: 36px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.gem-btn:active { transform: scale(0.95); }
.gem-altar[data-color="red"] { border-color: rgba(255, 90, 90, 0.35); }
.gem-altar[data-color="blue"] { border-color: rgba(90, 150, 255, 0.35); }
.gem-altar[data-color="green"] { border-color: rgba(90, 220, 140, 0.35); }

.gauge-row input[type="range"] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--accent);
}

.balance-total {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  margin: 12px 0;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
}

.balance-total.warn span { color: var(--danger); }
.balance-total.ok span { color: var(--teal-glow); }

.balance-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.share-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 16px;
}

.share-channel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.share-channel-btn:active {
  transform: scale(0.98);
}

.share-channel-btn.wechat {
  border-color: rgba(7, 193, 96, 0.45);
  background: rgba(7, 193, 96, 0.12);
}

.share-channel-btn.wecom {
  border-color: rgba(0, 120, 255, 0.45);
  background: rgba(0, 120, 255, 0.12);
}

.share-channel-icon {
  font-size: 24px;
  line-height: 1;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.share-modal[hidden] {
  display: none !important;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.share-sheet {
  position: relative;
  width: calc(100% - 24px);
  max-width: 480px;
  margin-bottom: 16px;
  padding: 22px 18px 18px;
  border-radius: 20px;
  z-index: 1;
}

.share-sheet h3 {
  font-size: 18px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.share-sheet-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.share-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.share-modal-tip {
  font-size: 12px;
  color: var(--teal-glow);
  line-height: 1.5;
  margin-bottom: 10px;
  min-height: 18px;
}

.feedback {
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
  min-height: 22px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s;
}

.feedback.success {
  color: var(--teal-glow);
  background: rgba(0,229,212,0.1);
  border: 1px solid rgba(0,229,212,0.25);
}

.feedback.error {
  color: var(--danger);
  background: rgba(255,71,87,0.1);
  border: 1px solid rgba(255,71,87,0.25);
}

/* Escape success */
.escape-success {
  text-align: center;
  padding: 20px 0 28px;
  position: relative;
}

.escape-burst {
  position: absolute;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,229,212,0.3), transparent 70%);
  animation: burst 1.5s ease infinite;
}

@keyframes burst {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

.door-open-scene {
  position: relative;
  height: 100px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.door-panel {
  width: 50px; height: 90px;
  background: linear-gradient(180deg, #3a3a4a, #2a2a38);
  border: 2px solid #555;
  position: absolute;
  top: 5px;
}

.door-left {
  left: calc(50% - 52px);
  animation: door-left-open 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: left center;
}

.door-right {
  right: calc(50% - 52px);
  animation: door-right-open 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: right center;
}

@keyframes door-left-open {
  to { transform: perspective(400px) rotateY(-75deg); }
}

@keyframes door-right-open {
  to { transform: perspective(400px) rotateY(75deg); }
}

.door-light {
  position: absolute;
  width: 40px; height: 80px;
  background: radial-gradient(ellipse, rgba(0,229,212,0.8), transparent 70%);
  animation: light-glow 2s ease infinite;
}

@keyframes light-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.escape-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-time {
  font-size: 56px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--teal-glow), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  filter: drop-shadow(0 0 20px rgba(0,229,212,0.3));
}

.result-rating {
  font-size: 20px;
  font-weight: 800;
  margin: 8px 0 6px;
  color: var(--teal-glow);
}

.result-desc {
  color: var(--muted);
  font-size: 14px;
}

/* Cards */
.invite-card,
.challenge-share-card,
.unlock-card {
  padding: 18px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.card-shine {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
  animation: card-shine 4s infinite;
}

@keyframes card-shine {
  0% { transform: translateX(-30%) rotate(25deg); }
  100% { transform: translateX(30%) rotate(25deg); }
}

.invite-card h3,
.challenge-share-card h3,
.unlock-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.invite-card p,
.challenge-share-card .share-lead {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.share-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

.card-preview-wrap {
  margin: 12px 0 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 212, 0.2);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 14px;
}

.placeholder-icon {
  font-size: 36px;
  opacity: 0.8;
}

.card-preview-img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.card-hint {
  font-size: 12px;
  color: var(--teal-glow);
  text-align: center;
  margin-top: 10px;
  opacity: 0.85;
}

.card-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.btn-teal {
  background: linear-gradient(135deg, #00b4a6 0%, #00e5d4 100%);
  color: #042220;
  border: none;
  border-radius: 14px;
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 229, 212, 0.25);
}

.btn-teal:active {
  transform: scale(0.98);
}

.wechat-guide {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
}

.wechat-guide[hidden] {
  display: none !important;
}

.wechat-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.wechat-guide-panel {
  position: relative;
  z-index: 1;
  width: calc(100% - 48px);
  max-width: 360px;
  margin-top: 48px;
  padding: 28px 22px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #1a2b6b 0%, #0d1a33 100%);
  border: 1px solid rgba(0, 229, 212, 0.35);
  text-align: center;
  color: #fff;
}

.wechat-guide-arrow {
  position: absolute;
  top: -36px;
  right: 24px;
  font-size: 48px;
  color: #00e5d4;
  font-weight: 800;
  animation: guide-bounce 1.2s ease infinite;
}

@keyframes guide-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.wechat-guide-panel h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #00e5d4;
}

.wechat-guide-panel p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

.wechat-guide-panel .btn {
  margin-top: 16px;
  width: 100%;
}

.share-text-hidden {
  display: none !important;
}

.reward-list {
  list-style: none;
  font-size: 13px;
  margin-bottom: 14px;
}

.reward-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.reward-icon { font-size: 18px; }

.share-reward-lead {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.5;
}

.share-reward-lead strong {
  color: var(--teal-glow, #00e5d4);
}

.reward-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.4;
}

.reward-steps .step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 229, 212, 0.18);
  border: 1px solid rgba(0, 229, 212, 0.45);
  color: #00e5d4;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qr-slot {
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.qr-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.toast {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-glow);
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.toast.visible { opacity: 1; }

/* PK */
.pk-card {
  padding: 28px 18px;
  text-align: center;
  margin-top: 8px;
}

.pk-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.pk-badge.me {
  background: rgba(0,229,212,0.15);
  color: var(--teal-glow);
  border: 1px solid rgba(0,229,212,0.35);
  box-shadow: 0 0 20px rgba(0,229,212,0.2);
}

.pk-badge.them {
  background: rgba(245,166,35,0.15);
  color: var(--orange);
  border: 1px solid rgba(245,166,35,0.35);
}

.pk-badge.tie {
  background: rgba(123,97,255,0.15);
  color: var(--purple);
  border: 1px solid rgba(123,97,255,0.35);
}

.pk-times {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.pk-col {
  flex: 1;
  padding: 16px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.pk-col.me { border-color: rgba(0,229,212,0.25); }
.pk-col.them { border-color: rgba(245,166,35,0.25); }

.pk-col .label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.pk-col .time {
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.pk-vs span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}
