/* ==================== YU-GI-OH! DARK OBSIDIAN RESKIN ON TOP OF 100BCARDS ==================== */
/* Transforms the whole app into a sleek dark obsidian duelist gallery while keeping 100bcards'
   iconic tactile grid, dock, chest, level bar, 3D foil pack, ceremonies & dialogs! */

:root {
  --ygo-font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --paper: #0b0e18 !important;
  --ink: #f1f5ff !important;
  --muted: #97a3c0 !important;
  --line: rgba(148, 163, 210, 0.14) !important;
}

html, body {
  background-color: #090b14 !important;
  background-image:
    radial-gradient(ellipse 80% 52% at 50% 0%, rgba(56, 78, 152, 0.28) 0%, transparent 65%),
    radial-gradient(ellipse 70% 45% at 50% 100%, rgba(168, 85, 247, 0.12) 0%, transparent 70%),
    linear-gradient(rgba(148, 163, 210, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 210, 0.055) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 100%, 34px 34px, 34px 34px !important;
  color: #f1f5ff !important;
  font-family: var(--ygo-font) !important;
}

/* Title & Intro */
#gameTitle {
  color: #f8fafc !important;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
}
#gameTitle .number {
  background: linear-gradient(135deg, #ffe79a 0%, #f5b935 55%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.tagline, .counter, #binderCount, .market-timer, .empty {
  color: #9ba7c6 !important;
}

/* Level bar & info button */
.level-row {
  margin-top: 8px !important;
}
.level-num {
  color: #f8fafc !important;
}
.level-info {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(245, 185, 53, 0.45) !important;
  color: #fde047 !important;
}
.level-bar i {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Top & Bottom Buttons */
.icon-button, .back, .about-button, .lang-button, .gift-button, .share-button,
.binder-tabs button, .pager button {
  background: rgba(22, 27, 46, 0.86) !important;
  border: 1px solid rgba(148, 163, 210, 0.22) !important;
  color: #e6ecf8 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}
.binder-tabs button[aria-pressed="true"] {
  background: linear-gradient(135deg, #3b2d7a, #1e1b4b) !important;
  border-color: rgba(192, 132, 252, 0.65) !important;
  color: #ffffff !important;
}

/* Shared bottom dock */
.shared-dock {
  background: linear-gradient(180deg, rgba(9, 11, 20, 0) 0%, rgba(9, 11, 20, 0.92) 34%, rgba(9, 11, 20, 0.98) 100%) !important;
}
.home-entries {
  background: rgba(19, 23, 40, 0.94) !important;
  border: 1px solid rgba(148, 163, 210, 0.2) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55) !important;
}

/* Pack Tray & Shadow */
.pack-shadow {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 70%) !important;
}
.tray-shell {
  background: rgba(18, 22, 38, 0.84) !important;
  border: 1px solid rgba(148, 163, 210, 0.2) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
}
.pile-count {
  background: rgba(18, 22, 38, 0.94) !important;
  border: 1px solid rgba(250, 204, 21, 0.42) !important;
  color: #fde047 !important;
}

/* Batch Open Bar right below current 3D Pack */
.ygo-batch-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px auto 8px;
  position: relative;
  z-index: 12;
}
.ygo-batch-bar[hidden] {
  display: none !important;
}
.ygo-batch-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  background: linear-gradient(135deg, rgba(34, 28, 62, 0.92), rgba(20, 24, 44, 0.94));
  color: #fef08a;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.ygo-batch-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(253, 224, 71, 0.85);
  background: linear-gradient(135deg, rgba(56, 42, 100, 0.96), rgba(29, 34, 62, 0.98));
}
.ygo-batch-btn.all {
  background: linear-gradient(135deg, #c2410c, #d97706);
  border-color: rgba(254, 240, 138, 0.65);
  color: #ffffff;
}
.ygo-batch-btn.all:hover {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

/* Market & Trophies Dark Surfaces */
.market h2, .binder h2 {
  color: #f8fafc !important;
}
.offer, .trophy-row, .binder-card {
  background: rgba(20, 25, 44, 0.86) !important;
  border: 1px solid rgba(148, 163, 210, 0.18) !important;
  color: #f1f5ff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36) !important;
}
.offer-name, .t-head b, .binder-meta strong {
  color: #f8fafc !important;
}
.t-goal, .t-num, .binder-meta small {
  color: #9ba7c6 !important;
}
.t-bar {
  background: rgba(255, 255, 255, 0.1) !important;
}
.offer .claim {
  background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
  color: #ffffff !important;
  border: none !important;
}
.offer .claim:disabled {
  background: rgba(148, 163, 210, 0.16) !important;
  color: #7c88a8 !important;
}

/* Market Claim-All Action Bar */
.ygo-market-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.ygo-claim-all-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.65);
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #11131e;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.34);
  transition: transform 0.14s ease, filter 0.14s ease;
  white-space: nowrap;
}
.ygo-claim-all-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.ygo-claim-all-btn:disabled {
  background: rgba(148, 163, 210, 0.15);
  border-color: rgba(148, 163, 210, 0.2);
  color: #6e7a99;
  box-shadow: none;
  cursor: default;
}

/* Dialogs & Level-up Modal Dark Theme */
dialog, .lu-panel {
  background: #131729 !important;
  color: #f1f5ff !important;
  border: 1px solid rgba(148, 163, 210, 0.26) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72) !important;
}
dialog::backdrop {
  background: rgba(4, 6, 14, 0.76) !important;
  backdrop-filter: blur(6px);
}
.dialog-head {
  border-bottom-color: rgba(148, 163, 210, 0.16) !important;
}
.dialog-head h2, .lu-title, .lu-new {
  color: #f8fafc !important;
}
.odds-row, .lu-row {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5ff !important;
}
.odds-sub, .odds-note, .lu-a {
  color: #9ba7c6 !important;
}

/* --- 5 Pure English OCG Rarity Colors (N / SR / UR / SER / 20SER) --- */
.rarity.N {
  background: linear-gradient(135deg, #64748b, #475569) !important;
  color: #f8fafc !important;
}
.rarity.SR {
  background: linear-gradient(135deg, #0284c7, #38bdf8, #2563eb) !important;
  color: #ffffff !important;
}
.rarity.UR {
  background: linear-gradient(135deg, #d97706, #fde047, #b45309) !important;
  color: #1c1917 !important;
}
.rarity.SER {
  background: linear-gradient(135deg, #9333ea, #e0e7ff, #4f46e5) !important;
  color: #1e1b4b !important;
}
.rarity.\32 0SER,
.rarity.R20SER {
  background: linear-gradient(135deg, #dc2626, #ff1744, #f59e0b, #dc2626) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.48);
}

/* --- Rotating Millennium Magic Circle Ceremony Backdrop (for SER & 20SER) --- */
.ygo-circle {
  position: fixed;
  left: 50%;
  top: 46%;
  width: min(86vmin, 540px);
  height: min(86vmin, 540px);
  transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  mix-blend-mode: screen;
}
.ygo-circle.go {
  opacity: 0.88;
  transform: translate(-50%, -50%) scale(1.02) rotate(120deg);
  animation: ygoCircleSpin 16s linear infinite;
}
.ygo-circle.ser {
  filter: drop-shadow(0 0 26px rgba(192, 132, 252, 0.92)) drop-shadow(0 0 58px rgba(99, 102, 241, 0.68));
}
.ygo-circle.r20 {
  filter: drop-shadow(0 0 30px rgba(255, 23, 68, 0.95)) drop-shadow(0 0 68px rgba(255, 215, 0, 0.72));
}
@keyframes ygoCircleSpin {
  from { transform: translate(-50%, -50%) scale(1.02) rotate(0deg); }
  to   { transform: translate(-50%, -50%) scale(1.02) rotate(360deg); }
}

/* --- Crimson Lightning Fakeout Overlay for 20SER --- */
.ygo-lightning {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 23, 68, 0.52) 0%, rgba(255, 196, 0, 0.16) 32%, transparent 66%),
    linear-gradient(122deg, transparent 46%, rgba(255, 255, 255, 0.95) 49.5%, rgba(255, 23, 68, 0.9) 50.5%, transparent 54%),
    linear-gradient(64deg, transparent 47%, rgba(255, 215, 0, 0.92) 49.6%, rgba(255, 23, 68, 0.85) 50.4%, transparent 53%);
  mix-blend-mode: screen;
}
.ygo-lightning.go {
  animation: ygoBoltFlash 0.52s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ygoBoltFlash {
  0%   { opacity: 0; transform: scale(0.92); }
  12%  { opacity: 1; transform: scale(1.04); }
  28%  { opacity: 0.25; }
  42%  { opacity: 0.95; transform: scale(1.01); }
  100% { opacity: 0; transform: scale(1.12); }
}

/* --- Enhanced Rarity Splash Typography (UR / SER / 20SER) --- */
.ur-splash.ur-gold b {
  background: linear-gradient(135deg, #fff7cc 0%, #ffd700 45%, #d97706 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 28px rgba(251, 191, 36, 0.92));
}
.ur-splash.ser-prism b {
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 30%, #c084fc 65%, #38bdf8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 32px rgba(192, 132, 252, 0.95));
}
.ur-splash.r20-red b {
  font-size: clamp(54px, 16vw, 118px) !important;
  letter-spacing: 0.04em !important;
  background: linear-gradient(120deg, #ff0a3c 0%, #ff7a00 28%, #ffe97d 52%, #ff2a55 78%, #ffffff 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 38px rgba(255, 23, 68, 1)) drop-shadow(0 0 72px rgba(255, 215, 0, 0.78));
}

/* ==================== 100% FIXED 59:86 CARD STAGE & NON-STRETCHING CARD BACK ==================== */
#resultView .card-stage {
  width: min(312px, 78vw) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  position: relative !important;
}

#resultView .card-stage .card,
#resultView .card-stage.with-stack .card {
  width: 100% !important;
  aspect-ratio: 680 / 986 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
}

/* Lock card-stack strictly to the exact 680:986 card bounding box so card backs NEVER stretch! */
#resultView .card-stack {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  aspect-ratio: 680 / 986 !important;
  height: auto !important;
  pointer-events: none;
  z-index: 0;
}

/* Official Yu-Gi-Oh! HD Card Back on BOTH flip back and multi-card stack sheets! */
.card-back,
.stack-sheet,
.card-stage.stack-pending .card-stack::after {
  width: 100% !important;
  height: 100% !important;
  background: #140a06 url('./cards/card-back.jpg') center / cover no-repeat !important;
  border-radius: 13px !important;
  border: 1.5px solid rgba(212, 166, 90, 0.65) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55) !important;
}

.result .card .card-body {
  width: 100% !important;
  height: 100% !important;
  transition: transform 0.12s ease-out;
}

.result .card .card-inner {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  display: block !important;
  background: #0d0e17 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}

/* Disable 100bcards' flat CSS sheen so our WebGL GLSL relief shader owns 100% of lighting! */
.result .card .card-inner::after {
  display: none !important;
}

/* Keep 20SER clean & architectural: disable noisy CSS twinkle/mote dots over the card art! */
.result .card .ur-motes,
.result .card .twinkles {
  display: none !important;
}

/* Metallic 3D card slab edges tinted by OCG rarity */
.result .card.SR .edge     { background: linear-gradient(135deg, #7dd3fc, #0284c7) !important; }
.result .card.UR .edge     { background: linear-gradient(135deg, #fde047, #b45309) !important; }
.result .card.SER .edge    { background: linear-gradient(135deg, #e0e7ff, #9333ea, #38bdf8) !important; }
.result .card.R20SER .edge { background: linear-gradient(135deg, #be123c, #fbbf24, #9f1239) !important; }

/* Card stage rarity ambient halos & pool rings */
.card-stage.SR .pool i     { border-color: rgba(56, 189, 248, 0.55) !important; }
.card-stage.UR .pool i     { border-color: rgba(251, 191, 36, 0.65) !important; }
.card-stage.SER .pool i    { border-color: rgba(192, 132, 252, 0.70) !important; }
.card-stage.R20SER .pool i { border-color: rgba(244, 63, 94, 0.78) !important; }

.card-stage.UR .aura {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.52) 0%, rgba(217, 119, 6, 0.22) 48%, transparent 72%) !important;
}
.card-stage.SER .aura {
  background: radial-gradient(circle, rgba(192, 132, 252, 0.58) 0%, rgba(99, 102, 241, 0.26) 50%, transparent 74%) !important;
}
.card-stage.R20SER .aura {
  background: radial-gradient(circle, rgba(225, 29, 72, 0.68) 0%, rgba(251, 191, 36, 0.28) 48%, transparent 76%) !important;
}

/* Outer glowing border on revealed Yu-Gi-Oh! card */
.result .card.SR .card-inner {
  box-shadow: 0 22px 48px rgba(2, 132, 199, 0.42), 0 0 0 2px rgba(56, 189, 248, 0.75) !important;
}
.result .card.UR .card-inner {
  box-shadow: 0 24px 56px rgba(217, 119, 6, 0.48), 0 0 0 2.5px rgba(253, 224, 71, 0.88) !important;
}
.result .card.SER .card-inner {
  box-shadow: 0 26px 64px rgba(147, 51, 234, 0.55), 0 0 0 2.5px rgba(216, 180, 254, 0.92) !important;
}
.result .card.R20SER .card-inner {
  box-shadow:
    0 28px 76px rgba(225, 29, 72, 0.62),
    0 0 42px rgba(251, 191, 36, 0.28),
    0 0 0 2.5px rgba(244, 63, 94, 0.92) !important;
}

.ygo-gl-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Dark Frosted Card Info Strip below card */
.ygo-meta-bar {
  width: min(350px, 90vw);
  margin: 14px auto 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(19, 24, 42, 0.9);
  border: 1px solid rgba(148, 163, 210, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 12;
  backdrop-filter: blur(12px);
}
.ygo-meta-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ygo-meta-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ygo-meta-name {
  font-size: 15px;
  font-weight: 900;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ygo-meta-sub {
  font-size: 11.5px;
  color: #9ba7c6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ygo-info-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.45);
  background: rgba(253, 224, 71, 0.14);
  color: #fde047;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.ygo-info-btn:hover {
  background: rgba(253, 224, 71, 0.25);
}

/* --- Yu-Gi-Oh! Binder Card Grid (59:86 Full HD Collector Cards!) --- */
.binder-card {
  border-radius: 14px !important;
  overflow: hidden !important;
}
.binder-card .thumb {
  aspect-ratio: 680 / 986 !important;
  height: auto !important;
  background: #0d101c !important;
  position: relative;
  display: block;
}
.binder-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.binder-foil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.binder-foil.UR {
  background: linear-gradient(132deg, rgba(251, 191, 36, 0.20), transparent 46%, rgba(253, 224, 71, 0.14));
}
.binder-foil.SER {
  background:
    repeating-linear-gradient(0deg, rgba(216, 180, 254, 0.10) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(125, 211, 252, 0.09) 0 1px, transparent 1px 4px),
    linear-gradient(125deg, rgba(192, 132, 252, 0.20), transparent 52%, rgba(56, 189, 248, 0.16));
}
.binder-foil.R20SER {
  background:
    repeating-linear-gradient(0deg, rgba(244, 63, 94, 0.12) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(251, 191, 36, 0.10) 0 1px, transparent 1px 4px),
    linear-gradient(125deg, rgba(225, 29, 72, 0.24), transparent 45%, rgba(251, 191, 36, 0.20));
}

.binder-card.R20SER {
  border-color: rgba(244, 63, 94, 0.85) !important;
  box-shadow: 0 6px 24px rgba(225, 29, 72, 0.28) !important;
}
.binder-card.SER {
  border-color: rgba(168, 85, 247, 0.72) !important;
  box-shadow: 0 5px 18px rgba(147, 51, 234, 0.22) !important;
}
.binder-card.UR {
  border-color: rgba(245, 158, 11, 0.75) !important;
}

/* Batch Open Summary Grid inside Dialog */
.ygo-batch-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.ygo-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  max-height: 54vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.ygo-batch-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(148, 163, 210, 0.22);
  background: #0d101c;
  padding: 0;
  cursor: pointer;
  transition: transform 0.14s ease;
  text-align: left;
}
.ygo-batch-item:hover {
  transform: translateY(-2px) scale(1.03);
}
.ygo-batch-item img {
  display: block;
  width: 100%;
  aspect-ratio: 680 / 986;
  object-fit: cover;
}
.ygo-batch-item.UR { border-color: rgba(251, 191, 36, 0.85); }
.ygo-batch-item.SER { border-color: rgba(192, 132, 252, 0.9); box-shadow: 0 0 12px rgba(147, 51, 234, 0.35); }
.ygo-batch-item.R20SER { border-color: rgba(244, 63, 94, 0.95); box-shadow: 0 0 16px rgba(225, 29, 72, 0.55); }
.ygo-batch-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 5px;
}
.ygo-batch-new {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  background: #10b981;
  color: #fff;
}
.ygo-batch-name {
  padding: 4px 5px;
  font-size: 10px;
  font-weight: 700;
  color: #e6ecf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Effect Detail Dialog Dark Theme */
.ygo-dialog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ygo-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ygo-stat-chip {
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde047;
  font-size: 12px;
  font-weight: 800;
}
.ygo-types-line {
  font-size: 12.5px;
  font-weight: 800;
  color: #c4b5fd;
  white-space: pre-line;
}
.ygo-desc-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-line;
}

/* ==================== ALT-ART (异画) BADGE & FILTER ==================== */
.ygo-alt-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 55%, #ec4899 100%);
  color: #fff !important;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  white-space: nowrap;
}
.ygo-alt-badge.sm {
  font-size: 9.5px;
  padding: 1px 5px;
  margin-left: 4px;
}
.ygo-alt-badge.batch {
  position: absolute;
  left: 4px;
  bottom: 24px;
  font-size: 9px;
  padding: 1px 5px;
}
.rarity.ygo-alt-filter {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 55%, #ec4899 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 224, 130, 0.65) !important;
}

/* ==================== ICONIC ANIME TROPHY SCENES (8 FULLSCREEN CINEMATICS) ==================== */
.ygo-scene-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #04050a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  overflow: hidden;
  animation: ygoSceneFadeIn 0.35s ease;
}
@keyframes ygoSceneFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ygo-scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.ygo-scene-hud {
  position: relative;
  z-index: 2;
  max-width: min(620px, 92vw);
  text-align: center;
  padding: 16px 22px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 14, 28, 0.72), rgba(7, 9, 18, 0.90));
  border: 1px solid rgba(250, 204, 21, 0.38);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 36px rgba(245, 196, 81, 0.22);
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ygo-scene-hud.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.ygo-scene-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.16);
  border: 1px solid rgba(245, 196, 81, 0.45);
  color: #fde047;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.ygo-scene-title {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 32px);
  font-weight: 950;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}
.ygo-scene-en {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(226, 232, 240, 0.68);
  margin: 2px 0 8px;
}
.ygo-scene-quote {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #f1f5f9;
  font-weight: 600;
}
.ygo-scene-hud.compact {
  padding: 12px 18px 14px;
  max-width: min(560px, 92vw);
}
.ygo-scene-hud.compact .ygo-scene-title {
  font-size: clamp(18px, 3.8vw, 25px);
}
.ygo-scene-hud.compact .ygo-scene-quote {
  font-size: 12.5px;
  margin-bottom: 10px;
}
.ygo-scene-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.ygo-scene-btn {
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 210, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ygo-scene-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.16); }
.ygo-scene-btn.primary {
  border-color: rgba(250, 204, 21, 0.65);
  background: linear-gradient(135deg, #f59e0b, #fde047);
  color: #111827;
}

/* Cinema Showcase Modal ("名场面动画放映厅") */
.ygo-scenes-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(4, 6, 14, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ygo-scenes-panel {
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  background: linear-gradient(180deg, #11162a, #090c18);
  border: 1px solid rgba(250, 204, 21, 0.32);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  padding: 18px 20px 22px;
  color: #f1f5f9;
}
.ygo-scenes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ygo-scenes-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #fde047;
}
.ygo-scenes-sub {
  margin: 0;
  font-size: 12px;
  color: #9ba7c6;
}
.ygo-scenes-sub code {
  color: #fde047;
  background: rgba(250, 204, 21, 0.12);
  padding: 1px 5px;
  border-radius: 5px;
}
.ygo-scenes-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 210, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.ygo-scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}
.ygo-scene-card {
  display: flex;
  gap: 12px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(20, 26, 46, 0.85);
  border: 1px solid rgba(148, 163, 210, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ygo-scene-card.unlocked {
  border-color: color-mix(in srgb, var(--sc-accent, #f5c451) 55%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--sc-accent, #f5c451) 14%, transparent);
}
.ygo-scene-card:hover { transform: translateY(-2px); }
.ygo-scene-thumb {
  position: relative;
  width: 68px;
  flex-shrink: 0;
  aspect-ratio: 680 / 986;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0e18;
}
.ygo-scene-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ygo-scene-code {
  position: absolute;
  left: 3px;
  bottom: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fde047;
  font: 900 9px Consolas, monospace;
}
.ygo-scene-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ygo-scene-era {
  font-size: 11px;
  font-weight: 800;
  color: var(--sc-accent, #fde047);
}
.ygo-scene-name {
  font-size: 14px;
  font-weight: 900;
  color: #f8fafc;
}
.ygo-scene-desc {
  font-size: 11.5px;
  color: #9ba7c6;
  line-height: 1.45;
  flex: 1;
}
.ygo-scene-play-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--sc-accent, #f5c451) 60%, transparent);
  background: color-mix(in srgb, var(--sc-accent, #f5c451) 18%, rgba(15, 20, 36, 0.9));
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.ygo-scene-play-btn:hover {
  background: var(--sc-accent, #f5c451);
  color: #0b0e18;
}

/* Trophies Modal: Iconic Scenes Showcase Banner */
.ygo-tr-scenes-box {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.12), rgba(225, 29, 72, 0.10) 55%, rgba(18, 24, 44, 0.9));
  border: 1px solid rgba(250, 204, 21, 0.35);
  margin-bottom: 10px;
}
.ygo-tr-scenes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ygo-tr-scenes-head strong {
  display: block;
  font-size: 14px;
  color: #fde047;
}
.ygo-tr-scenes-head small {
  display: block;
  font-size: 11.5px;
  color: #9ba7c6;
  margin-top: 2px;
}
.ygo-tr-open-cinema {
  padding: 6px 13px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #fde047);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.ygo-tr-scenes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 7px;
}
.ygo-tr-scene-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(12, 16, 30, 0.72);
  border: 1px solid rgba(148, 163, 210, 0.18);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.ygo-tr-scene-pill.done {
  border-color: color-mix(in srgb, var(--sc-accent, #f5c451) 55%, transparent);
  color: #fff;
}
.ygo-tr-sc-meta {
  font-size: 10.5px;
  color: var(--sc-accent, #fde047);
  white-space: nowrap;
}

/* ==================== CONCURRENT ONLINE LIMIT GATE (5 USERS MAX) ==================== */
.ygo-online-badge {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 16, 30, 0.78);
  border: 1px solid rgba(148, 163, 210, 0.22);
  backdrop-filter: blur(8px);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.ygo-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
.ygo-online-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: radial-gradient(circle at 50% 35%, rgba(28, 22, 52, 0.96), rgba(6, 8, 16, 0.99));
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ygo-gate-card {
  width: min(380px, 92vw);
  padding: 28px 24px 24px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 25, 44, 0.95), rgba(10, 13, 24, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.38);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(245, 196, 81, 0.16);
}
.ygo-gate-emblem {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.14);
  border: 1px solid rgba(245, 196, 81, 0.42);
  color: #fde047;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.ygo-gate-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  color: #f8fafc;
}
.ygo-gate-count {
  font: 900 32px/1.1 Consolas, "Segoe UI", monospace;
  color: #fb7185;
  text-shadow: 0 0 20px rgba(251, 113, 133, 0.45);
  margin: 4px 0 12px;
}
.ygo-gate-desc {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #9ba7c6;
}
.ygo-gate-desc b {
  color: #fde047;
}
.ygo-gate-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #fde047);
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.ygo-gate-sub {
  margin-top: 10px;
  font-size: 12px;
  color: #8e9ab8;
}
