/* ==========================================================================
   jackane宇 · 舞台选盒抽屉、微透视主题皮质对战卡垫与原封盒实况点阵盘 (stage-deck.css)
   ========================================================================== */

/* ---------- 1. 顶部收敛式选盒胶囊与高质感抽屉面板 ---------- */
.series-switcher {
  top: max(60px, calc(env(safe-area-inset-top) + 48px));
  z-index: 42;
  gap: 8px;
}

.box-bar-compact {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px 4px 5px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid var(--chrome-border);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--chrome-shadow);
}

.box-selector-trigger {
  -webkit-tap-highlight-color: transparent;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px 0 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.055);
  color: var(--chrome-ink);
  cursor: pointer;
  transition: background-color 0.18s var(--ease-out), border-color 0.2s;
}

html[data-studio-light="day"] .box-selector-trigger { background: rgba(15, 23, 42, 0.045); }

.box-selector-trigger:hover,
.series-switcher.drawer-open .box-selector-trigger {
  border-color: rgba(245, 200, 76, 0.55);
  background: rgba(245, 200, 76, 0.1);
}

.box-selector-trigger:active { translate: 0 1px; }

.box-trigger-thumb {
  width: 18px;
  height: 24px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.box-trigger-title { font-size: 12px; font-weight: 700; white-space: nowrap; }

.box-trigger-meta {
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(245, 200, 76, 0.16);
  color: #f5c84c;
  white-space: nowrap;
}

html[data-studio-light="day"] .box-trigger-meta { color: #b45309; background: rgba(245, 158, 11, 0.14); }
.box-trigger-caret { font-size: 10px; opacity: 0.72; transition: transform 0.22s var(--ease-out); }
.series-switcher.drawer-open .box-trigger-caret { transform: rotate(180deg); }

.box-drawer-panel {
  pointer-events: auto;
  width: min(540px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 20px;
  background: var(--chrome-surface);
  border: 1px solid rgba(245, 200, 76, 0.32);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 26px 56px -12px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 var(--chrome-specular);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform-origin: 50% 0%;
  animation: drawer-pop 0.2s var(--ease-out);
}

.box-drawer-panel[hidden] {
  display: none !important;
}

@keyframes drawer-pop {
  from {
    opacity: 0;
    scale: 0.96;
    translate: 0 -6px;
  }
  to {
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }
}

.box-drawer-panel .series-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.box-drawer-panel .series-pill {
  height: auto;
  padding: 8px 9px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--chrome-border);
  background: rgba(255, 255, 255, 0.035);
}

html[data-studio-light="day"] .box-drawer-panel .series-pill {
  background: rgba(15, 23, 42, 0.03);
}

.box-drawer-panel .series-pill.active {
  border-color: rgba(245, 200, 76, 0.78);
  background: linear-gradient(135deg, rgba(245, 200, 76, 0.2), rgba(59, 130, 246, 0.1));
  color: var(--chrome-ink);
  box-shadow: 0 8px 20px -8px rgba(245, 200, 76, 0.35);
}

.drawer-pack-thumb {
  width: 26px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.drawer-series-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drawer-series-name {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-series-sub {
  font-size: 10px;
  color: var(--chrome-muted);
  white-space: nowrap;
}

.box-drawer-panel .variant-pills {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

html[data-studio-light="day"] .box-drawer-panel .variant-pills {
  background: rgba(15, 23, 42, 0.05);
}

.drawer-odds-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  color: var(--chrome-muted);
}

/* ---------- 2. 随系列换肤微透视主题皮质对战卡垫 (Playmat) ---------- */
.stage-playmat {
  --mat-accent: rgba(56, 189, 248, 0.34);
  --mat-glow: rgba(56, 189, 248, 0.12);
  --mat-surface: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(9, 13, 24, 0.92) 100%);
  position: absolute;
  left: 50%;
  bottom: -6vh;
  width: min(1020px, 95vw);
  height: min(470px, 54vh);
  pointer-events: none;
  border-radius: 28px;
  background: var(--mat-surface);
  border: 1.5px solid var(--mat-accent);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.75),
    inset 0 0 0 6px rgba(255, 255, 255, 0.025),
    inset 0 0 64px var(--mat-glow);
  transform: translateX(-50%) perspective(880px) rotateX(55deg);
  transform-origin: 50% 100%;
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background 0.4s var(--ease-out), opacity 0.35s;
  overflow: hidden;
}

.stage-playmat[data-series-theme="sv11w"] {
  --mat-accent: rgba(251, 146, 60, 0.36);
  --mat-glow: rgba(244, 63, 94, 0.13);
  --mat-surface: linear-gradient(180deg, rgba(38, 16, 22, 0.72) 0%, rgba(18, 9, 13, 0.92) 100%);
}

.stage-playmat[data-series-theme="m6a"] {
  --mat-accent: rgba(245, 200, 76, 0.42);
  --mat-glow: rgba(245, 200, 76, 0.15);
  --mat-surface: linear-gradient(180deg, rgba(34, 27, 14, 0.74) 0%, rgba(16, 13, 8, 0.92) 100%);
}

html[data-studio-light="day"] .stage-playmat {
  --mat-surface: linear-gradient(180deg, rgba(241, 245, 249, 0.82) 0%, rgba(226, 232, 240, 0.94) 100%);
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.14),
    inset 0 0 0 6px rgba(15, 23, 42, 0.03),
    inset 0 0 48px var(--mat-glow);
}

.playmat-stitch {
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px dashed var(--mat-accent);
  opacity: 0.65;
}

.playmat-arena-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 220px;
  height: 220px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px solid var(--mat-accent);
  opacity: 0.45;
}

.playmat-arena-ring::before {
  content: "";
  position: absolute;
  left: -90px;
  right: -90px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mat-accent), transparent);
}

.playmat-arena-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 2px solid var(--mat-accent);
  background: radial-gradient(circle, var(--mat-glow), transparent 70%);
}

/* ---------- 3. 原封盒 15 / 6 / 20 格实况点阵进度盘 & 底部控制台防挤压锁死 ---------- */
.console-kicker,
.box-meta-head { white-space: nowrap; }
.console-item,
.box-meter-group,
.console-actions,
.dock-btn { flex-shrink: 0; white-space: nowrap; }
.box-meter-group { height: auto; min-height: 40px; padding: 3px 6px 3px 10px; }
.box-meta-with-matrix { display: flex; flex-direction: column; gap: 4px; min-width: max-content; }
.box-meta-head { display: flex; align-items: baseline; gap: 7px; }
.box-matrix-track { display: flex; align-items: center; gap: 3px; }

.box-slot-cell {
  width: 7px;
  height: 9px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.2s, background-color 0.25s, box-shadow 0.25s;
}

html[data-studio-light="day"] .box-slot-cell { background: rgba(15, 23, 42, 0.1); border-color: rgba(15, 23, 42, 0.16); }
.box-slot-cell.is-fat-slot { width: 12px; }

.box-slot-cell.is-next {
  border-color: #f5c84c;
  background: rgba(245, 200, 76, 0.28);
  box-shadow: 0 0 7px rgba(245, 200, 76, 0.75);
  animation: next-pack-pulse 1.6s ease-in-out infinite;
}

@keyframes next-pack-pulse { 50% { transform: scaleY(1.22); } }

.box-slot-cell.hit-common { background: rgba(100, 116, 139, 0.55); border-color: rgba(148, 163, 184, 0.4); }
.box-slot-cell.hit-rr { background: #38bdf8; border-color: #bae6fd; box-shadow: 0 0 6px rgba(56, 189, 248, 0.65); }
.box-slot-cell.hit-ar { background: #34d399; border-color: #a7f3d0; box-shadow: 0 0 6px rgba(52, 211, 153, 0.65); }
.box-slot-cell.hit-sr { background: #c084fc; border-color: #e9d5ff; box-shadow: 0 0 8px rgba(192, 132, 252, 0.8); }
.box-slot-cell.hit-sar { background: #fb923c; border-color: #fef08a; box-shadow: 0 0 9px rgba(251, 146, 60, 0.9); }
.box-slot-cell.hit-crown,
.box-slot-cell.hit-god {
  background: linear-gradient(135deg, #fde047, #f43f5e, #38bdf8);
  border-color: #ffffff;
  box-shadow: 0 0 11px rgba(250, 204, 21, 0.95);
}

@media (max-width: 1080px) {
  .console-dock { flex-wrap: wrap; justify-content: center; border-radius: 22px; padding: 6px 10px; gap: 4px 6px; }
  .console-sep { display: none; }
}

@media (max-width: 720px) {
  .box-drawer-panel .series-pills { grid-template-columns: 1fr; }
  .box-slot-cell { width: 5.5px; height: 7px; }
  .box-slot-cell.is-fat-slot { width: 9px; }
}
