/**
 * MineStat CS:GO Case Opening & Roulette Studio
 * Ultra-Premium Gaming Aesthetic & Physics Styles
 */

/* ==========================================================================
   1. CS:GO ROULETTE MODAL & STAGE
   ========================================================================== */
.case-roulette-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  user-select: none;
  font-family: 'Inter', -apple-system, sans-serif;
}

.case-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.case-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.case-title-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.case-title-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0;
}

.case-audio-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.case-audio-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ==========================================================================
   2. THE ROULETTE REEL STAGE
   ========================================================================== */
.roulette-stage-box {
  position: relative;
  width: 100%;
  height: 190px;
  background: radial-gradient(circle at center, #131a2e 0%, #080c16 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
}

/* Vignette / Shadow Overlay on Sides */
.roulette-stage-box::before,
.roulette-stage-box::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  z-index: 5;
  pointer-events: none;
}

.roulette-stage-box::before {
  left: 0;
  background: linear-gradient(to right, #080c16 20%, transparent 100%);
}

.roulette-stage-box::after {
  right: 0;
  background: linear-gradient(to left, #080c16 20%, transparent 100%);
}

/* Golden Center Line & Arrows (CS:GO Needle) */
.roulette-needle {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #f59e0b 0%, rgba(245, 158, 11, 0.2) 50%, #f59e0b 100%);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.9), 0 0 20px rgba(245, 158, 11, 0.4);
}

.roulette-needle-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid #f59e0b;
  z-index: 12;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.roulette-needle-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 11px solid #f59e0b;
  z-index: 12;
  filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.6));
}

/* The Sliding Tape */
.roulette-tape {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(0px);
  will-change: transform;
}

/* Individual Case Item Card */
.case-card {
  width: 140px;
  height: 160px;
  flex-shrink: 0;
  background: #111726;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: radial-gradient(circle at 50% 30%, var(--card-glow, rgba(255,255,255,0.05)) 0%, transparent 70%);
  pointer-events: none;
}

/* Rarity Bottom Stripe (CS:GO style) */
.case-card-stripe {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color, #94a3b8);
  box-shadow: 0 0 8px var(--card-glow, transparent);
}

.case-card-icon-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
  position: relative;
  z-index: 2;
}

.case-card-icon-wrap img,
.case-card-icon-wrap svg {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.case-card-meta {
  width: 100%;
  text-align: center;
  z-index: 2;
}

.case-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.case-card-rarity {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--card-color, #94a3b8);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Rarity Color Themes */
.rarity-common {
  --card-color: #94a3b8;
  --card-glow: rgba(148, 163, 184, 0.35);
  border-bottom: 2px solid #94a3b8;
}

.rarity-uncommon {
  --card-color: #38bdf8;
  --card-glow: rgba(56, 189, 248, 0.45);
  border-bottom: 2px solid #38bdf8;
}

.rarity-rare {
  --card-color: #c084fc;
  --card-glow: rgba(192, 132, 252, 0.5);
  border-bottom: 2px solid #c084fc;
}

.rarity-epic {
  --card-color: #f43f5e;
  --card-glow: rgba(244, 63, 94, 0.55);
  border-bottom: 2px solid #f43f5e;
}

.rarity-legendary {
  --card-color: #f59e0b;
  --card-glow: rgba(245, 158, 11, 0.75);
  border-bottom: 2px solid #f59e0b;
}

/* ==========================================================================
   3. REVEAL / WINNER CELEBRATION CARD
   ========================================================================== */
.case-winner-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: winnerPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  width: 100%;
  padding-top: 1rem;
}

@keyframes winnerPop {
  0% { transform: scale(0.7) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.winner-hero-card {
  background: radial-gradient(circle at center, #1b243b 0%, #0d1322 100%);
  border: 2px solid var(--win-color, #f59e0b);
  border-radius: 18px;
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 0 40px var(--win-glow, rgba(245, 158, 11, 0.5)), 0 15px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.winner-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--win-glow, rgba(255,255,255,0.15)) 60deg, transparent 120deg);
  animation: rotateRays 12s linear infinite;
  pointer-events: none;
  opacity: 0.35;
}

@keyframes rotateRays {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.winner-badge-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--win-color, #f59e0b);
  color: #000;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.winner-icon-wrap {
  width: 110px;
  height: 110px;
  margin: 0.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8));
  animation: floatItem 3s ease-in-out infinite alternate;
}

@keyframes floatItem {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(2deg); }
}

.winner-icon-wrap img,
.winner-icon-wrap svg {
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
}

.winner-name-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.winner-subtitle-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.winner-delivery-status {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ==========================================================================
   4. CS:GO CASE REWARD SHOWCASE (ON DETAIL PAGE)
   ========================================================================== */
.case-showcase-box {
  background: linear-gradient(135deg, rgba(20, 25, 41, 0.95) 0%, rgba(13, 17, 30, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.case-showcase-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.case-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.case-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.case-showcase-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.case-showcase-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--card-color, #f59e0b);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px var(--card-glow, transparent);
  background: rgba(255, 255, 255, 0.06);
}

.case-showcase-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-showcase-icon img,
.case-showcase-icon svg {
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.case-showcase-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-showcase-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--card-color, #94a3b8);
}

/* ==========================================================================
   5. SERVER OWNER CASE BUILDER PANEL STYLES
   ========================================================================== */
.case-builder-wrap {
  background: #0f1422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.case-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.25rem;
}

.case-preset-picker {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.case-items-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #090d16;
}

.case-items-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.case-items-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.case-items-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.case-items-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.cmd-preview-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.74rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 6px;
  border-radius: 4px;
  color: #38bdf8;
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-rarity-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.gauge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
}

.gauge-bar-outer {
  flex: 1;
  height: 8px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
}

.gauge-bar-inner {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* Confetti Canvas */
#caseConfettiCanvas,
#simConfettiCanvas,
#addSimConfettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* ==========================================================================
   AUTHENTIC MINECRAFT PIXEL ART ITEM STYLES
   ========================================================================== */
.mc-item-pixel-img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}
.mc-item-emoji {
  font-size: 2rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}
.case-card-icon-wrap .mc-item-pixel-img {
  width: 56px;
  height: 56px;
  max-width: 60px;
  max-height: 60px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7));
}
#itemIconPreview .mc-item-pixel-img,
#addItemIconPreview .mc-item-pixel-img {
  width: 32px;
  height: 32px;
}
.roulette-item-card .ric-icon .mc-item-pixel-img {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}
.winner-icon-wrap .mc-item-pixel-img {
  width: 76px;
  height: 76px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.85));
}

/* ==========================================================================
   SUNUCU DETAY SAYFASI: CS:GO VOTE KASASI ÖNİZLEME VİTRİNİ
   ========================================================================== */
.case-showcase-card {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 25, 41, 0.95) 0%, rgba(13, 17, 30, 0.98) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(245, 158, 11, 0.12);
  overflow: hidden;
}
.csc-glow-bg {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0) 70%);
  pointer-events: none;
}
.csc-header {
  margin-bottom: 1.25rem;
}
.csc-badge-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.csc-badge-case {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.csc-badge-count {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.csc-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.3rem;
  letter-spacing: -0.3px;
}
.csc-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}
.csc-items-grid {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0.25rem 0.85rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.4) rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
}
.csc-items-grid::-webkit-scrollbar {
  height: 6px;
}
.csc-items-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}
.csc-items-grid::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 999px;
}
.csc-items-grid::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

.csc-item-box {
  flex: 0 0 160px;
  width: 160px;
  min-width: 160px;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
}
.csc-item-box:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.csc-item-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.csc-item-chance {
  color: #f59e0b;
}
.csc-item-rarity-tag {
  color: #cbd5e1;
  text-transform: uppercase;
  font-size: 0.65rem;
  opacity: 0.85;
}
.csc-item-icon-wrap {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
}
.csc-pixel-icon {
  width: 44px;
  height: 44px;
}
.csc-item-info {
  width: 100%;
  flex: 1;
}
.csc-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.csc-item-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.csc-item-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.csc-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.csc-footer-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: #cbd5e1;
}
.csc-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
}
.csc-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  padding: 0.85rem 2.4rem;
  font-size: 1.02rem;
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.4);
  transition: all 0.25s ease;
  margin: 0 auto;
}
.csc-vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.55);
}

/* ==========================================================================
   10. SVG VECTOR ICONS & CATEGORICAL PICKER MODAL
   ========================================================================== */
.mc-item-svg-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.mc-svg-icon {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-card:hover .mc-svg-icon,
.mc-catalog-card:hover .mc-svg-icon,
.csc-item-box:hover .mc-svg-icon {
  transform: scale(1.14);
}

/* Modal Overlay & Backdrop */
.mc-catalog-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mc-catalog-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mc-catalog-modal-container {
  background: linear-gradient(180deg, #121829 0%, #0a0f1d 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15);
  border-radius: 18px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mc-catalog-modal-overlay.open .mc-catalog-modal-container {
  transform: scale(1) translateY(0);
}

/* Header */
.mc-catalog-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.mc-catalog-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}
.mc-catalog-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.mc-catalog-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}
.mc-catalog-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.mc-catalog-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Filter Bar & Search */
.mc-catalog-filter-bar {
  padding: 1rem 1.5rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.mc-catalog-search-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}
.mc-catalog-search-icon {
  position: absolute;
  left: 0.9rem;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.6;
}
.mc-catalog-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.65rem 2.2rem 0.65rem 2.4rem;
  color: #fff;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}
.mc-catalog-search-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  background: rgba(15, 23, 42, 1);
}
.mc-catalog-search-clear {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
}
.mc-catalog-count-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  white-space: nowrap;
}

/* Category Pills */
.mc-catalog-pills-row {
  display: flex;
  gap: 0.4rem;
  padding: 0 1.5rem 0.85rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.mc-catalog-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.mc-catalog-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.mc-catalog-pill.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(234, 88, 12, 0.2) 100%);
  color: #f59e0b;
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

/* Items Grid & Cards */
.mc-catalog-grid-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1.5rem 1.25rem;
  max-height: 440px;
}
.mc-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
}
.mc-catalog-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.mc-catalog-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.mc-catalog-card.rarity-legendary:hover { border-color: #f59e0b; box-shadow: 0 8px 22px rgba(245, 158, 11, 0.25); }
.mc-catalog-card.rarity-epic:hover { border-color: #f43f5e; box-shadow: 0 8px 22px rgba(244, 63, 94, 0.25); }
.mc-catalog-card.rarity-rare:hover { border-color: #c084fc; box-shadow: 0 8px 22px rgba(192, 132, 252, 0.25); }
.mc-catalog-card.rarity-uncommon:hover { border-color: #38bdf8; box-shadow: 0 8px 22px rgba(56, 189, 248, 0.25); }

.mc-catalog-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}
.mc-card-rarity-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.mc-card-rarity-badge.rarity-common { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.mc-card-rarity-badge.rarity-uncommon { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.mc-card-rarity-badge.rarity-rare { background: rgba(192, 132, 252, 0.15); color: #c084fc; }
.mc-card-rarity-badge.rarity-epic { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.mc-card-rarity-badge.rarity-legendary { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.mc-card-type-badge {
  font-size: 0.6rem;
  font-weight: 800;
  background: #10b981;
  color: #000;
  padding: 1px 4px;
  border-radius: 3px;
}
.mc-catalog-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.mc-catalog-card-icon img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}
.mc-catalog-card-body {
  width: 100%;
  flex: 1;
  margin-bottom: 0.4rem;
}
.mc-catalog-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-catalog-card-id {
  font-size: 0.65rem;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.mc-catalog-select-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 0;
  transition: all 0.15s ease;
  pointer-events: none;
}
.mc-catalog-card:hover .mc-catalog-select-btn {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
}

.mc-catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}
.mc-catalog-empty h4 {
  color: #fff;
  margin: 0.6rem 0 0.3rem;
  font-size: 1.05rem;
}
.mc-catalog-empty p {
  font-size: 0.85rem;
  margin: 0;
}

.mc-catalog-footer {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.mc-catalog-footer-hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .case-roulette-wrap {
    max-width: 100%;
    padding: 0;
  }
  .case-header-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
  }
  .case-title-text {
    font-size: 1rem;
  }
  .roulette-stage-box {
    height: 145px;
    border-radius: 10px;
  }
  .roulette-stage-box::before,
  .roulette-stage-box::after {
    width: 40px;
  }
  .roulette-needle {
    width: 2px;
  }
  .roulette-needle-top,
  .roulette-needle-bottom {
    border-left-width: 7px;
    border-right-width: 7px;
  }
  .roulette-needle-top {
    border-top-width: 9px;
  }
  .roulette-needle-bottom {
    border-bottom-width: 9px;
  }
  .case-card {
    width: 105px;
    height: 130px;
    padding: 6px 4px 4px;
    border-radius: 8px;
  }
  .case-card-icon-wrap {
    width: 48px;
    height: 48px;
    margin-top: 2px;
  }
  .case-card-icon-wrap img,
  .case-card-icon-wrap svg {
    max-width: 42px;
    max-height: 42px;
  }
  .case-card-name {
    font-size: 0.7rem;
  }
  .case-card-rarity {
    font-size: 0.56rem;
  }
  .roulette-tape {
    gap: 8px;
    padding: 0 10px;
  }
  .roulette-spin-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }
  .winner-hero-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }
  .winner-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0.25rem auto 0.75rem;
  }
  .winner-icon-wrap img,
  .winner-icon-wrap svg {
    max-width: 70px;
    max-height: 70px;
  }
  .winner-name-title {
    font-size: 1.15rem;
  }
  .winner-subtitle-desc {
    font-size: 0.8rem;
  }
  .case-showcase-card {
    padding: 1.15rem 0.85rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }
  .csc-title {
    font-size: 1.15rem;
  }
  .csc-desc {
    font-size: 0.82rem;
  }
  .csc-item-box {
    flex: 0 0 130px;
    width: 130px;
    min-width: 130px;
    padding: 0.7rem 0.5rem 0.8rem;
    border-radius: 10px;
  }
  .csc-item-icon-wrap {
    width: 42px;
    height: 42px;
    margin-bottom: 0.4rem;
  }
  .csc-pixel-icon {
    width: 36px;
    height: 36px;
  }
  .csc-item-name {
    font-size: 0.75rem;
  }
  .csc-vote-btn {
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    text-align: center;
    box-sizing: border-box;
  }
  .mc-catalog-modal-content {
    max-width: 95vw;
    max-height: 88vh;
    border-radius: 12px;
  }
  .mc-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 0.5rem;
    padding: 0.65rem;
  }
  .mc-catalog-card {
    padding: 0.5rem 0.35rem;
  }
  .mc-catalog-footer {
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    text-align: center;
  }
}

