/* ==========================================================================
   ToonTaggest — Level-Up Lootboxes & Cosmetic Locker Styles
   ========================================================================== */

@font-face {
  font-family: "MickeyFont";
  src: url("/assets/ui/mickey-font.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MickeyFont";
  src: url("/assets/ui/mickey-font.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CogRemington";
  src: url("/assets/ui/cog-remington.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CogRemington";
  src: url("/assets/ui/cog-remington.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* Floating Trigger Button (hidden when integrated #open-cosmetics-btn is present in full-screen hub) */
#floating-cosmetics-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 45;
  pointer-events: auto;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 44px;
  background: linear-gradient(180deg, #fff6a9 0%, #ffdf2b 25%, #f5b700 75%, #c88200 100%);
  border: 3px solid #7c4d00;
  border-radius: 999px;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -3px 4px rgba(130, 75, 0, 0.55),
    0 4px 0 #593500,
    0 6px 14px rgba(0, 0, 0, 0.4);
  color: #2b1700 !important;
  font-family: Impress, "Trebuchet MS", sans-serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}

#floating-cosmetics-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    0 5px 0 #593500,
    0 8px 18px rgba(0, 0, 0, 0.48);
}

#floating-cosmetics-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(90, 50, 0, 0.5),
    0 2px 0 #593500,
    0 3px 8px rgba(0, 0, 0, 0.35);
}

#floating-cosmetics-btn .cosmetics-btn-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.lootbox-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3b30 0%, #c61a09 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  animation: lootboxBadgePulse 1.6s ease-in-out infinite;
}

.lootbox-count-badge.is-zero {
  background: #475569;
  animation: none;
  opacity: 0.85;
}

@keyframes lootboxBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.13); }
}

/* Inline Menu Profile Calling Card Preview Strip */
.menu-equipped-card-strip {
  width: 100%;
  margin: 4px 0 6px;
  border-radius: 11px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 2.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.45), 0 3px 8px rgba(0, 0, 0, 0.28);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
}

.menu-equipped-card-strip .strip-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  z-index: 1;
}

.menu-equipped-card-strip .strip-name {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.1;
}

.menu-equipped-card-strip .strip-title {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fef08a;
  font-weight: bold;
}

.menu-equipped-card-strip .strip-customize-cta {
  z-index: 1;
  font-size: 12.5px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid #ca8a04;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

/* Level-Up Lootbox Toast Notification */
#lootbox-toast {
  position: fixed;
  top: 72px;
  left: 20px;
  z-index: 120;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: radial-gradient(circle at 25% 20%, #fffbeb 0%, #fef08a 55%, #f59e0b 100%);
  border: 4px solid #b45309;
  border-radius: 16px;
  box-shadow: 0 6px 0 #78350f, 0 12px 28px rgba(0, 0, 0, 0.55);
  color: #2b1700;
  max-width: 420px;
  animation: lootboxToastSlideIn 0.38s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#lootbox-toast[hidden] {
  display: none !important;
}

@keyframes lootboxToastSlideIn {
  0% { transform: translateX(-40px) scale(0.85); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

#lootbox-toast .toast-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 2.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

#lootbox-toast .toast-icon-wrap img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

#lootbox-toast .toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#lootbox-toast .toast-title {
  font-family: Minnie, Impress, sans-serif;
  font-size: 17px;
  color: #7c2d12;
  line-height: 1.1;
}

#lootbox-toast .toast-desc {
  font-size: 14px;
  font-weight: bold;
  color: #1e293b;
}

#lootbox-toast .toast-open-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #ffffff !important;
  border: 2px solid #ffffff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Cosmetics & Lootbox Modal (#cosmetics-modal)
   ========================================================================== */
#cosmetics-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(9, 18, 38, 0.76);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  pointer-events: auto;
}

#cosmetics-modal[hidden] {
  display: none !important;
}

.cosmetics-modal-window {
  width: min(1060px, 96vw);
  height: min(668px, 93vh);
  background: radial-gradient(at 35% 15%, #fffef4 15%, #eff5e1 65%, #d2e2be 100%);
  border: 6px solid #17963f;
  border-radius: 22px;
  box-shadow:
    inset 0 3px 6px rgba(255, 255, 255, 0.85),
    0 6px 0 #076c2a,
    0 18px 42px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  color: #25335b;
}

/* Modal Header */
.cosmetics-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 10px;
  background: linear-gradient(180deg, #1b6b36 0%, #124d26 100%);
  border-bottom: 4px solid #0b3519;
  color: #ffffff;
  flex-shrink: 0;
}

.cosmetics-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cosmetics-header-title-wrap img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.cosmetics-header-title-wrap h2 {
  margin: 0;
  font-family: Minnie, Impress, sans-serif;
  font-size: clamp(22px, 2.6vw, 30px);
  color: #ffeb3b;
  text-shadow: 0 3px 0 #5c3a00, 0 4px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.cosmetics-header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 12px;
}

.cosmetics-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 2px solid #facc15;
  color: #fef08a;
  font-size: 15px;
  font-weight: bold;
}

.cosmetics-stat-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

#close-cosmetics-modal-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border: 3px solid #ffffff;
  color: #ffffff !important;
  font-family: Minnie, Impress, sans-serif;
  font-size: 20px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

#close-cosmetics-modal-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.05);
}

/* Navigation Tabs */
.cosmetics-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 8px;
  background: rgba(21, 53, 74, 0.1);
  border-bottom: 2px solid rgba(23, 150, 63, 0.28);
  flex-shrink: 0;
  overflow-x: auto;
}

.cosmetics-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  border: 2.5px solid #7fa385;
  color: #25335b !important;
  font-family: Impress, sans-serif;
  font-size: 16.5px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.cosmetics-tab-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.cosmetics-tab-btn:hover {
  background: #ffffff;
  border-color: #17963f;
  transform: translateY(-1px);
}

.cosmetics-tab-btn.active {
  background: linear-gradient(180deg, #fff587 0%, #ffdf2b 50%, #f5b700 100%);
  border-color: #8c5800;
  color: #2b1700 !important;
  box-shadow: 0 3px 0 #6b4200, 0 4px 10px rgba(0, 0, 0, 0.22);
}

.cosmetics-tab-count {
  font-size: 12.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  color: inherit;
}

/* Modal Content Area */
.cosmetics-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   Tab 1: Gag Surprise Lootbox Stage
   ========================================================================== */
.lootbox-stage-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: stretch;
  min-height: 438px;
}

.lootbox-ceremony-card {
  background: radial-gradient(circle at 50% 35%, #1e3a8a 0%, #0f172a 78%);
  border: 4px solid #f59e0b;
  border-radius: 18px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  box-shadow: inset 0 0 38px rgba(56, 189, 248, 0.22), 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Rotating Sunburst Behind Trunk */
.lootbox-sunburst {
  position: absolute;
  width: 480px;
  height: 480px;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(250, 204, 21, 0.14) 0deg 12deg,
    transparent 12deg 24deg
  );
  border-radius: 50%;
  pointer-events: none;
  animation: cosmeticsSpinSlow 18s linear infinite;
}

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

.lootbox-ceremony-header {
  text-align: center;
  z-index: 2;
}

.lootbox-ceremony-header h3 {
  margin: 0;
  font-family: Minnie, Impress, sans-serif;
  font-size: 22px;
  color: #fef08a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.lootbox-ceremony-header p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #cbd5e1;
}

/* Interactive Three.js 3D Gag Surprise Trunk Stage */
#lootbox-3d-stage {
  position: relative;
  width: 100%;
  height: 312px;
  border-radius: 15px;
  background: radial-gradient(circle at 50% 42%, rgba(56, 189, 248, 0.24) 0%, rgba(15, 23, 42, 0.76) 78%);
  border: 2.5px solid rgba(250, 204, 21, 0.62);
  box-shadow: inset 0 0 28px rgba(9, 18, 38, 0.82), 0 4px 14px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  transition: height 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

#lootbox-3d-stage.is-shaking {
  border-color: #fde047;
  box-shadow: inset 0 0 36px rgba(250, 204, 21, 0.35), 0 0 18px rgba(250, 204, 21, 0.45);
}

#lootbox-3d-stage.is-bursting {
  height: 204px;
  border-color: #fef08a;
  box-shadow: inset 0 0 42px rgba(250, 204, 21, 0.32), 0 0 22px rgba(250, 204, 21, 0.5);
}

.lootbox-trunk-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

#lootbox-3d-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
  touch-action: none;
}

#lootbox-3d-canvas:active {
  cursor: grabbing;
}

.lootbox-3d-stage-hint {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  font-size: 11.5px;
  font-weight: bold;
  color: #fef08a;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(250, 204, 21, 0.55);
  border-radius: 999px;
  padding: 2px 12px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.lootbox-rarity-beam {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.75) 0%, transparent 70%);
}

#lootbox-3d-stage.is-bursting .lootbox-rarity-beam,
.lootbox-trunk-stage.is-bursting .lootbox-rarity-beam {
  opacity: 0.9;
  animation: beamPulse 0.9s ease-in-out infinite alternate;
}

@keyframes beamPulse {
  0% { transform: scale(0.92); }
  100% { transform: scale(1.12); }
}

/* Reveal Card Overlay / Display (Docked cleanly below 3D stage with zero overlap) */
#lootbox-reveal-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 3px solid #facc15;
  border-radius: 14px;
  padding: 8px 12px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  animation: revealCardPop 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#lootbox-reveal-card[hidden] {
  display: none !important;
}

@keyframes revealCardPop {
  0% { transform: scale(0.75); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.reveal-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.reveal-badges-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.reveal-item-title {
  font-family: Minnie, Impress, sans-serif;
  font-size: 18px;
  color: #ffffff;
  margin: 0;
  text-align: left;
  line-height: 1.15;
}

.reveal-item-preview {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-item-preview > * {
  width: 100%;
}

.lootbox-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
  width: 100%;
}

#open-lootbox-action-btn {
  padding: 9px 20px;
  font-size: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #d97706 100%);
  border: 3px solid #ffffff;
  color: #2b1700 !important;
  font-family: Minnie, Impress, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 0 #78350f, 0 6px 16px rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#open-lootbox-action-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

#open-lootbox-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#claim-bonus-lootbox-btn,
#unlock-all-cosmetics-btn {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border: 2.5px solid #e0f2fe;
  color: #ffffff !important;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 #075985, 0 4px 10px rgba(0, 0, 0, 0.35);
}

#claim-bonus-lootbox-btn:hover,
#unlock-all-cosmetics-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

#equip-revealed-item-btn {
  padding: 5px 16px;
  font-size: 14.5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  border: 2px solid #ffffff;
  color: #ffffff !important;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 #14532d;
}

/* Right Side Info Panel in Lootbox Tab */
.lootbox-info-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lootbox-info-box {
  background: rgba(255, 255, 255, 0.88);
  border: 3px solid #17963f;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.lootbox-info-box h4 {
  margin: 0 0 8px;
  font-family: Minnie, Impress, sans-serif;
  font-size: 19px;
  color: #1b4d24;
}

.drop-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.drop-rate-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid transparent;
}

/* ==========================================================================
   Rarity Badges & Borders (common, rare, epic, legendary)
   ========================================================================== */
.rarity-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.rarity-common,
.drop-rate-pill.rarity-common {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  color: #ffffff;
  border-color: #94a3b8;
}

.rarity-rare,
.drop-rate-pill.rarity-rare {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #93c5fd;
}

.rarity-epic,
.drop-rate-pill.rarity-epic {
  background: linear-gradient(180deg, #9333ea 0%, #6b21a8 100%);
  color: #ffffff;
  border-color: #e9d5ff;
}

.rarity-legendary,
.drop-rate-pill.rarity-legendary {
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  color: #fffbeb;
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.65);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  background: #0f172a;
  color: #38bdf8;
  border: 1.5px solid #38bdf8;
}

/* ==========================================================================
   Cosmetic Locker Grids (Skins, Nametag Styles, Calling Cards, Titles)
   ========================================================================== */
.cosmetics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 12px;
}

.cosmetics-grid.cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.cosmetic-item-card {
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #94a3b8;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.cosmetic-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
}

.cosmetic-item-card.tier-rare { border-color: #3b82f6; }
.cosmetic-item-card.tier-epic { border-color: #a855f7; }
.cosmetic-item-card.tier-legendary {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffef7 0%, #fef9c3 100%);
}

.cosmetic-item-card.is-equipped {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35), 0 6px 14px rgba(0, 0, 0, 0.18);
}

.cosmetic-item-card.is-locked {
  opacity: 0.82;
}

.cosmetic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cosmetic-status-tag {
  font-size: 11.5px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 999px;
}

.cosmetic-status-tag.equipped {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #16a34a;
}

.cosmetic-status-tag.unlocked {
  background: #e0f2fe;
  color: #0369a1;
  border: 1.5px solid #38bdf8;
}

.cosmetic-status-tag.locked {
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #94a3b8;
}

/* Skin Palette Preview Box */
.skin-preview-box {
  height: 76px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(15, 23, 42, 0.2);
}

.skin-avatar-preview {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
  z-index: 1;
}

.skin-swatches {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  z-index: 1;
}

.skin-swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

/* Nametag Style Preview Box */
.nametag-preview-stage {
  height: 74px;
  border-radius: 12px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border: 2px solid #334155;
}

.nametag-style-sample,
.nametag-preview-text {
  font-family: Impress, "Trebuchet MS", sans-serif;
  font-size: 21px;
  font-weight: bold;
  line-height: 1.1;
  letter-spacing: 0.4px;
}

.nametag-style-sample.style-classic {
  color: #fff078;
  -webkit-text-stroke: 2px #15354a;
  paint-order: stroke fill;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.nametag-style-sample.style-golden_broadway {
  color: #fde047;
  -webkit-text-stroke: 2px #451a03;
  paint-order: stroke fill;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.95), 0 2px 4px #000;
}

.nametag-style-sample.style-neon_arcade {
  color: #00f5d4;
  -webkit-text-stroke: 2px #0f172a;
  paint-order: stroke fill;
  text-shadow: 0 0 12px #f15bb5, 0 0 20px #00bbf9;
}

.nametag-style-sample.style-comic_slam {
  color: #fb923c;
  -webkit-text-stroke: 2.5px #000000;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #7f1d1d;
}

.nametag-style-sample.style-frost_crystal {
  color: #bae6fd;
  -webkit-text-stroke: 2px #0c4a6e;
  paint-order: stroke fill;
  text-shadow: 0 0 12px #38bdf8;
}

.nametag-style-sample.style-royal_dream {
  color: #e9d5ff;
  -webkit-text-stroke: 2px #3b0764;
  paint-order: stroke fill;
  text-shadow: 0 0 12px #c084fc, 0 0 6px #facc15;
}

.nametag-style-sample.style-mickey_headline {
  font-family: "MickeyFont", "Minnie", sans-serif;
  color: #ff9800;
  -webkit-text-stroke: 2.5px #111827;
  paint-order: stroke fill;
  text-shadow: 0 0 12px rgba(255, 193, 7, 0.95), 0 2px 0 #e53935;
}

.nametag-style-sample.style-cog_typewriter {
  font-family: "CogRemington", "Courier New", monospace;
  color: #e2e8f0;
  -webkit-text-stroke: 2px #0f172a;
  paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.92), 0 2px 4px #000;
}

.nametag-style-sample.style-minnie_popstar {
  font-family: "Minnie", "Arial Black", sans-serif;
  color: #f472b6;
  -webkit-text-stroke: 2.2px #500724;
  paint-order: stroke fill;
  text-shadow: 0 0 12px rgba(244, 114, 182, 0.95), 0 2px 4px #db2777;
}

.nametag-style-sample.style-pirate_treasure {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: #eab308;
  -webkit-text-stroke: 2px #271202;
  paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.9), 0 2px 3px #000;
}

.nametag-style-sample.style-tnt_explosive {
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 1px;
  color: #facc15;
  -webkit-text-stroke: 2.4px #09090b;
  paint-order: stroke fill;
  text-shadow: 0 0 14px rgba(249, 115, 22, 0.95), 0 2px 0 #dc2626;
}

.nametag-style-sample.style-emerald_garden {
  font-family: "Brush Script MT", "Comic Sans MS", cursive;
  font-size: 24px;
  color: #4ade80;
  -webkit-text-stroke: 2px #052e16;
  paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.88), 0 2px 3px #052e16;
}

.nametag-style-sample.style-retro_pixel_toon {
  font-family: "Courier New", Consolas, monospace;
  letter-spacing: 0.8px;
  color: #84cc16;
  -webkit-text-stroke: 2px #022c22;
  paint-order: stroke fill;
  text-shadow: 0 0 12px rgba(132, 204, 22, 0.95);
}

.nametag-style-sample.style-spooky_mansion {
  font-family: Papyrus, "Palatino Linotype", Georgia, serif;
  color: #c084fc;
  -webkit-text-stroke: 2px #090414;
  paint-order: stroke fill;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.95), 0 0 6px #a3e635;
}

.nametag-style-sample.style-hypno_goggles {
  font-family: "Comic Sans MS", "Minnie", cursive;
  color: #38bdf8;
  -webkit-text-stroke: 2px #1e1b4b;
  paint-order: stroke fill;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.95), 0 0 6px #a7f3d0;
}

.nametag-style-sample.style-rainbow_silly {
  font-family: "MickeyFont", "Minnie", sans-serif;
  color: #ffca3a;
  -webkit-text-stroke: 2.4px #0f172a;
  paint-order: stroke fill;
  text-shadow: 0 0 10px #ff595e, 0 0 16px #8ac926, 0 0 22px #1982c4;
}

/* Calling Card Banners */
.calling-card-banner {
  min-height: 78px;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.calling-card-banner.card-ttc_sunny {
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 52%, #facc15 100%);
}
.calling-card-banner.card-dock_harbor {
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 55%, #38bdf8 100%);
}
.calling-card-banner.card-daisy_bloom {
  background: linear-gradient(135deg, #14532d 0%, #16a34a 55%, #facc15 100%);
}
.calling-card-banner.card-melody_synth {
  background: linear-gradient(135deg, #3b0764 0%, #9333ea 55%, #f472b6 100%);
}
.calling-card-banner.card-brrrgh_blizzard {
  background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 50%, #e0f2fe 100%);
}
.calling-card-banner.card-dreamland_cosmos {
  background: linear-gradient(135deg, #090d16 0%, #312e81 50%, #7e22ce 100%);
}
.calling-card-banner.card-tnt_demolition {
  background: repeating-linear-gradient(
    -45deg,
    #991b1b 0px,
    #991b1b 14px,
    #dc2626 14px,
    #dc2626 28px
  );
}
.calling-card-banner.card-grand_champion {
  background: linear-gradient(135deg, #78350f 0%, #d97706 38%, #fde047 72%, #b45309 100%);
  border-color: #fef08a;
}

.calling-card-banner .banner-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1;
}

.calling-card-banner .banner-player-name {
  font-family: Minnie, Impress, sans-serif;
  font-size: 17px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
}

.calling-card-banner .banner-player-title {
  font-size: 12px;
  font-weight: bold;
  color: #fef08a;
  background: rgba(15, 23, 42, 0.72);
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
}

.calling-card-banner .banner-level-badge {
  z-index: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid #facc15;
  color: #fef08a;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Title Badge Preview Box */
.title-preview-stage {
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 2px solid #334155;
}

.title-pill-preview {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  border: 1.5px solid #facc15;
  color: #fef08a;
  font-size: 13.5px;
  font-weight: bold;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.cosmetic-card-info h4 {
  margin: 0;
  font-size: 16.5px;
  color: #1e293b;
}

.cosmetic-card-info p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.25;
}

.cosmetic-equip-btn {
  width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: Impress, sans-serif;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid #8c6b00;
  background: linear-gradient(180deg, #ffffad 0%, #f5f51b 55%, #c7bc08 100%);
  color: #1e293b !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cosmetic-equip-btn.is-equipped {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border-color: #14532d;
  color: #ffffff !important;
}

.cosmetic-equip-btn.is-locked {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #475569 !important;
}

/* Hide duplicate DOM nametags when 3D overhead canvas nametags are active */
body.has-3d-nametags #nametags .nametag {
  opacity: 0;
  pointer-events: none;
}

/* Calling Card Themes on Main Menu Profile Card & Lobby Squad Slots */
.slot[data-calling-card="dock_harbor"],
#account-level-bar[data-calling-card="dock_harbor"] {
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 55%, #38bdf8 100%) !important;
  color: #ffffff;
}
.slot[data-calling-card="daisy_bloom"],
#account-level-bar[data-calling-card="daisy_bloom"] {
  background: linear-gradient(135deg, #14532d 0%, #16a34a 55%, #facc15 100%) !important;
  color: #ffffff;
}
.slot[data-calling-card="melody_synth"],
#account-level-bar[data-calling-card="melody_synth"] {
  background: linear-gradient(135deg, #3b0764 0%, #9333ea 55%, #f472b6 100%) !important;
  color: #ffffff;
}
.slot[data-calling-card="brrrgh_blizzard"],
#account-level-bar[data-calling-card="brrrgh_blizzard"] {
  background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 50%, #bae6fd 100%) !important;
  color: #ffffff;
}
.slot[data-calling-card="dreamland_cosmos"],
#account-level-bar[data-calling-card="dreamland_cosmos"] {
  background: linear-gradient(135deg, #090d16 0%, #312e81 50%, #7e22ce 100%) !important;
  color: #ffffff;
}
.slot[data-calling-card="tnt_demolition"],
#account-level-bar[data-calling-card="tnt_demolition"] {
  background: repeating-linear-gradient(-45deg, #991b1b 0px, #991b1b 14px, #dc2626 14px, #dc2626 28px) !important;
  color: #ffffff;
}
.slot[data-calling-card="grand_champion"],
#account-level-bar[data-calling-card="grand_champion"] {
  background: linear-gradient(135deg, #78350f 0%, #d97706 38%, #fde047 72%, #b45309 100%) !important;
  border-color: #fef08a !important;
  color: #ffffff;
}
.slot[data-calling-card]:not([data-calling-card="ttc_sunny"]):not([data-calling-card="ttc_sunshine"]) .slot-info strong,
.slot[data-calling-card]:not([data-calling-card="ttc_sunny"]):not([data-calling-card="ttc_sunshine"]) .slot-character,
#account-level-bar[data-calling-card]:not([data-calling-card="ttc_sunny"]):not([data-calling-card="ttc_sunshine"]) label,
#account-level-bar[data-calling-card]:not([data-calling-card="ttc_sunny"]):not([data-calling-card="ttc_sunshine"]) .account-xp-text {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

/* Per-Toon Character Skins Filter Bar */
.skins-character-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 251, 224, 0.95) 0%, rgba(254, 240, 175, 0.92) 100%);
  border: 2.5px solid #d4a72c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 3px 8px rgba(15, 23, 42, 0.14);
}

.skin-char-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b !important;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  min-width: 0;
}

.skin-char-filter-btn:hover {
  transform: translateY(-1px);
  border-color: #38bdf8;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.18);
}

.skin-char-filter-btn.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  border-color: #facc15;
  color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.45), 0 4px 12px rgba(15, 23, 42, 0.25);
}

.skin-char-filter-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(15, 23, 42, 0.08);
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  flex-shrink: 0;
}

.skin-char-filter-btn.active .skin-char-filter-avatar {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fef08a;
}

.skin-char-filter-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.skin-char-filter-name {
  font-family: Impress, sans-serif;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-char-filter-name small {
  font-size: 11px;
  opacity: 0.85;
}

.skin-char-filter-equipped {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-char-filter-btn.active .skin-char-filter-equipped {
  color: #fef08a;
}

.skin-preview-box {
  position: relative;
}

.skin-character-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: #ffffff;
  font-family: Impress, sans-serif;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.skin-character-pill img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

