/* ==========================================================================
   BOARDLAIR — PIXEL ART RPG & COMMUNITY STYLESHEET (V2 REDESIGN)
   Art Direction: Dark Fantasy 16-Bit RPG Dungeon UI + High-End Glassmorphism
   Inspired by: Chrono Trigger, Octopath Traveler, Hades & Dark Souls UI
   ========================================================================== */

/* --- 1. Header Adventurer Profile & Guild Crest --- */
.user-header-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 10;
}

/* Master Login / Adventurer Button */
.btn-pixel-login {
  background: linear-gradient(180deg, #ffe066 0%, #f6c443 45%, #b45309 100%);
  color: #120824 !important;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 2px solid #fff3b0;
  box-shadow: 0 4px 0 #78350f, 0 6px 20px rgba(246, 196, 67, 0.45);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.btn-pixel-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: 0.5s;
}

.btn-pixel-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #78350f, 0 10px 26px rgba(246, 196, 67, 0.65);
  background: linear-gradient(180deg, #fff7cc 0%, #ffd166 45%, #d97706 100%);
}

.btn-pixel-login:hover::before {
  left: 100%;
}

.btn-pixel-login:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #78350f, 0 3px 8px rgba(246, 196, 67, 0.3);
}

/* User Badge when Logged In */
.user-header-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(28, 18, 54, 0.95) 0%, rgba(14, 8, 30, 0.95) 100%);
  border: 2px solid #f6c443;
  border-radius: 14px;
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 243, 176, 0.3), 0 0 16px rgba(246, 196, 67, 0.25);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.user-header-badge:hover {
  background: linear-gradient(135deg, rgba(42, 28, 80, 0.98) 0%, rgba(22, 14, 46, 0.98) 100%);
  border-color: #ffe066;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(246, 196, 67, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.user-pixel-avatar-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  background: #100a20;
  border: 2px solid #f6c443;
  display: flex;
  align-items: center;
  justify-content: center;
  image-rendering: pixelated;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(246, 196, 67, 0.4), inset 0 0 6px rgba(0, 0, 0, 0.8);
  position: relative;
}

.user-pixel-avatar-thumb svg,
.user-pixel-avatar-thumb img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.user-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-header-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-header-name {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
  letter-spacing: 0.5px;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.user-header-level {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid #ffd166;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.user-header-vitals {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.user-vital-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #e2e8f0;
}

.user-vital-item strong {
  color: #f6c443;
}

#headerUserHearts {
  letter-spacing: 1px;
  animation: heartPulse 2.2s infinite ease-in-out;
  display: inline-block;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 6px #ff4d6d); }
}


/* --- 2. Gamified RPG Dashboard (Hub 3-Card Grid) --- */
.lair-gamification-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-block: 28px 24px;
  position: relative;
  z-index: 5;
}

/* Card Shell */
.rpg-card {
  background: linear-gradient(160deg, rgba(26, 17, 48, 0.92) 0%, rgba(13, 8, 26, 0.94) 100%);
  border: 2px solid rgba(246, 196, 67, 0.35);
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 243, 176, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.rpg-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 196, 67, 0.7);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(246, 196, 67, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Card Header */
.rpg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 14px;
  padding-block-end: 10px;
  border-block-end: 1px solid rgba(246, 196, 67, 0.2);
}

.rpg-card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f6c443;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(246, 196, 67, 0.3);
}

.rpg-card-dots {
  display: flex;
  gap: 5px;
}

.rpg-card-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.rpg-dot-red { background: #ef4444; box-shadow: 0 0 6px #ef4444 !important; }
.rpg-dot-yellow { background: #f59e0b; box-shadow: 0 0 6px #f59e0b !important; }
.rpg-dot-green { background: #10b981; box-shadow: 0 0 6px #10b981 !important; }

/* --- Progress Card Body --- */
.rpg-progress-body {
  display: flex;
  gap: 16px;
  align-items: center;
}

.rpg-avatar-large {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  border: 3px solid #f6c443;
  background: #0f0a20;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(246, 196, 67, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
  position: relative;
}

.rpg-avatar-large svg,
.rpg-avatar-large img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.rpg-progress-details {
  flex: 1;
}

.rpg-level-badge {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin-block-end: 6px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Fluid Animated XP Bar */
.rpg-xp-bar-wrap {
  width: 100%;
  height: 14px;
  background: #090514;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid rgba(246, 196, 67, 0.3);
  margin-block: 6px 6px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
  position: relative;
}

.rpg-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669 0%, #10b981 50%, #34d399 100%);
  border-radius: 6px;
  box-shadow: 0 0 12px #10b981;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.rpg-xp-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  animation: xpLightSweep 2.4s infinite;
}

@keyframes xpLightSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.rpg-xp-label {
  font-size: 0.74rem;
  color: #cbd5e1;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

/* Stats Chips Row */
.rpg-stats-chips-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-block-start: 14px;
}

.rpg-chip {
  background: linear-gradient(180deg, rgba(20, 13, 38, 0.8) 0%, rgba(10, 6, 20, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 3px 8px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s, transform 0.2s;
}

.rpg-chip:hover {
  border-color: rgba(246, 196, 67, 0.5);
  transform: translateY(-2px);
}

.rpg-chip-icon {
  font-size: 1.25rem;
  display: block;
  margin-block-end: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.rpg-chip-val {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.rpg-chip-label {
  font-size: 0.66rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  display: block;
  margin-top: 2px;
}

/* --- Card 2: Daily Quests --- */
.rpg-quest-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-block-end: 10px;
  padding: 10px 12px;
  background: rgba(14, 9, 28, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.rpg-quest-item:hover {
  background: rgba(24, 16, 46, 0.7);
  border-color: rgba(246, 196, 67, 0.3);
}

.rpg-quest-check {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-block-start: 2px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid #34d399;
}

.rpg-quest-check.pending {
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.rpg-quest-info {
  flex: 1;
}

.rpg-quest-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.rpg-quest-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-block-start: 2px;
  line-height: 1.4;
}

.rpg-quest-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-start: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f6c443;
}

.btn-claim-quest {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: 1.5px solid #6ee7b7;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #047857, 0 4px 12px rgba(16, 185, 129, 0.4);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-claim-quest:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #047857, 0 6px 16px rgba(16, 185, 129, 0.6);
}

.btn-claim-quest:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #047857;
}

/* --- Card 3: Community & Wishlist --- */
.rpg-community-top-item {
  background: rgba(14, 9, 28, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-block-end: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rpg-community-top-item:hover {
  background: rgba(26, 17, 50, 0.85);
  border-color: rgba(246, 196, 67, 0.4);
  transform: translateX(4px);
}

.rpg-post-pill {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill-request {
  background: rgba(246, 196, 67, 0.18);
  color: #ffd166;
  border: 1px solid rgba(246, 196, 67, 0.45);
  box-shadow: 0 0 8px rgba(246, 196, 67, 0.2);
}

.pill-favorite {
  background: rgba(239, 68, 111, 0.18);
  color: #ff758f;
  border: 1px solid rgba(239, 68, 111, 0.45);
  box-shadow: 0 0 8px rgba(239, 68, 111, 0.2);
}

.pill-talk {
  background: rgba(76, 201, 240, 0.18);
  color: #4cc9f0;
  border: 1px solid rgba(76, 201, 240, 0.45);
  box-shadow: 0 0 8px rgba(76, 201, 240, 0.2);
}

.rpg-comm-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.rpg-upvote-badge {
  background: linear-gradient(135deg, rgba(246, 196, 67, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
  border: 1px solid #f6c443;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #ffd166;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(246, 196, 67, 0.2);
}


/* --- 3. Modals: Ornate Dungeon Chest Design --- */
.rpg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.rpg-modal-panel {
  background: linear-gradient(165deg, #180f33 0%, #0d071e 100%);
  border: 3px solid #f6c443;
  border-radius: 22px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(246, 196, 67, 0.35), 0 25px 60px rgba(0, 0, 0, 0.9), inset 0 2px 0 rgba(255, 243, 176, 0.3);
  padding: 28px;
  color: #fff;
  position: relative;
}

.rpg-modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.rpg-modal-close-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: #fca5a5;
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.65);
}

.rpg-modal-tabs {
  display: flex;
  gap: 10px;
  border-block-end: 2px solid rgba(246, 196, 67, 0.2);
  margin-block-end: 22px;
  padding-block-end: 8px;
}

.rpg-tab-btn {
  background: transparent;
  border: 1.5px solid transparent;
  color: #94a3b8;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.15s ease-out;
}

.rpg-tab-btn:hover {
  color: #ffd166;
  background: rgba(246, 196, 67, 0.1);
}

.rpg-tab-btn.active {
  background: linear-gradient(135deg, rgba(246, 196, 67, 0.22) 0%, rgba(217, 119, 6, 0.22) 100%);
  color: #f6c443;
  border-color: #f6c443;
  box-shadow: 0 0 14px rgba(246, 196, 67, 0.25);
}

/* Forms */
.rpg-form-group {
  margin-block-end: 16px;
}

.rpg-form-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.84rem;
  font-weight: 800;
  color: #e2e8f0;
  margin-block-end: 6px;
  letter-spacing: 0.5px;
}

.rpg-input {
  width: 100%;
  background: #090514;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 16px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
}

.rpg-input:focus {
  border-color: #f6c443;
  box-shadow: 0 0 16px rgba(246, 196, 67, 0.35), inset 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Avatar Choice Cards */
.pixel-avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-block: 10px 18px;
}

.avatar-choice-card {
  background: #0b0618;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.avatar-choice-card:hover {
  border-color: #a78bfa;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(167, 139, 250, 0.3);
}

.avatar-choice-card.selected {
  border-color: #f6c443;
  background: linear-gradient(135deg, rgba(246, 196, 67, 0.25) 0%, rgba(217, 119, 6, 0.25) 100%);
  box-shadow: 0 0 18px rgba(246, 196, 67, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: scale(1.04);
}

.avatar-choice-card svg {
  width: 50px;
  height: 50px;
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

.avatar-choice-name {
  font-size: 0.74rem;
  font-weight: 800;
  color: #e2e8f0;
}

/* Community Feed Post */
.community-feed-post {
  background: linear-gradient(160deg, rgba(20, 14, 40, 0.85) 0%, rgba(11, 7, 24, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px 18px;
  margin-block-end: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.community-feed-post:hover {
  border-color: rgba(246, 196, 67, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(246, 196, 67, 0.2);
}

.comm-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 10px;
}

.comm-post-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comm-post-avatar-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #100a20;
  border: 1.5px solid #f6c443;
  overflow: hidden;
  image-rendering: pixelated;
  box-shadow: 0 0 8px rgba(246, 196, 67, 0.3);
}

.comm-post-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-block-end: 8px;
  letter-spacing: 0.4px;
}

.comm-post-body {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-block-end: 12px;
}

.comm-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  padding-block-start: 10px;
}

.comm-vote-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 5px 12px;
  font-weight: 800;
  font-size: 0.82rem;
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.comm-vote-btn:hover {
  background: rgba(246, 196, 67, 0.22);
  color: #ffd166;
  border-color: #f6c443;
  transform: translateY(-2px);
}

.comm-vote-btn.voted {
  background: linear-gradient(135deg, #f6c443 0%, #d97706 100%);
  color: #120924;
  border-color: #fff3b0;
  box-shadow: 0 0 12px rgba(246, 196, 67, 0.5);
}

/* ==========================================================================
   4. ACCESSIBILITY & MOTION OPTIMIZATIONS (UI-SKILLS & EMIL-DESIGN-ENG)
   ========================================================================== */

/* High-Contrast Accessible Keyboard Focus Indicator */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.rpg-card:focus-visible,
.rpg-quest-card:focus-visible,
.avatar-choice-card:focus-visible {
  outline: 2px solid #ffe066 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 14px rgba(246, 196, 67, 0.65) !important;
}

/* Touch vs Fine Pointer Hover State Isolation */
@media (hover: hover) and (pointer: fine) {
  .btn-pixel-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #78350f, 0 10px 26px rgba(246, 196, 67, 0.65);
  }
  .rpg-card:hover {
    transform: translateY(-4px);
  }
}

/* Vestibular Disorder & Reduced Motion Accessibility Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #headerUserHearts {
    animation: none !important;
  }
  .rpg-xp-fill::after {
    display: none !important;
  }
}

/* ==========================================================================
   5. CRAZYGAMES-INSPIRED UI & HIGH-CONTRAST ACTION BUTTONS
   ========================================================================== */

/* 5.1 Category Filter Bar */
.crazy-category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 6px 16px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 196, 67, 0.4) transparent;
}

.crazy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26, 17, 48, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.crazy-pill:hover {
  background: rgba(246, 196, 67, 0.18);
  border-color: #f6c443;
  color: #ffd166;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(246, 196, 67, 0.3);
}

.crazy-pill.active {
  background: linear-gradient(135deg, #ffe066 0%, #f6c443 50%, #d97706 100%);
  color: #120924 !important;
  border-color: #fffbeb;
  box-shadow: 0 4px 0 #78350f, 0 6px 20px rgba(246, 196, 67, 0.55);
  transform: translateY(-2px);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 5.2 Compact Hero Lounge (Reemplazo del cuadro gigante vacío) */
.crazy-hero-lounge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: linear-gradient(135deg, rgba(32, 20, 64, 0.96) 0%, rgba(16, 9, 36, 0.98) 100%);
  border: 2.5px solid #f6c443;
  border-radius: 20px;
  padding: 18px 26px;
  margin-bottom: 26px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 243, 176, 0.35), 0 0 24px rgba(246, 196, 67, 0.2);
  position: relative;
  overflow: hidden;
}

.crazy-hero-lounge::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: radial-gradient(circle at 100% 50%, rgba(246, 196, 67, 0.12), transparent 70%);
  pointer-events: none;
}

.crazy-lounge-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.crazy-lounge-emblem {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(246, 196, 67, 0.6));
}

.crazy-lounge-texts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crazy-lounge-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #f6c443;
  margin: 0;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.crazy-lounge-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #10b981;
}

.crazy-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 5.3 Teletransportador a Sala (High-Contrast Room Join) */
.crazy-teleport-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 580px;
  min-width: 290px;
  background: rgba(10, 6, 24, 0.88);
  border: 1.5px solid rgba(246, 196, 67, 0.45);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.crazy-teleport-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 10px;
  outline: none;
}

.crazy-teleport-input::placeholder {
  color: #94a3b8;
  font-family: 'Quicksand', sans-serif;
  letter-spacing: 0;
  font-size: 0.85rem;
}

.crazy-teleport-btn {
  background: linear-gradient(180deg, #ffe066 0%, #f6c443 45%, #d97706 100%);
  color: #120824 !important;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.6px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 2px solid #fffbeb;
  box-shadow: 0 4px 0 #78350f, 0 6px 18px rgba(246, 196, 67, 0.5);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
}

.crazy-teleport-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #78350f, 0 10px 24px rgba(246, 196, 67, 0.7);
  background: linear-gradient(180deg, #fff7cc 0%, #ffd166 45%, #e08708 100%);
}

.crazy-teleport-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #78350f;
}

/* 5.4 Botones Claros y de Alto Contraste en las Tarjetas de Juego */
.btn-game-play {
  background: linear-gradient(180deg, #ffe066 0%, #f6c443 50%, #d97706 100%) !important;
  color: #120824 !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  padding: 11px 20px !important;
  border-radius: 12px !important;
  border: 2px solid #fffbeb !important;
  box-shadow: 0 4px 0 #78350f, 0 6px 18px rgba(246, 196, 67, 0.45) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease !important;
}

.btn-game-play:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 0 #78350f, 0 10px 24px rgba(246, 196, 67, 0.7) !important;
}

.btn-game-play:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #78350f !important;
}

.btn-game-bots {
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.28) 0%, rgba(114, 9, 183, 0.4) 100%) !important;
  border: 2px solid #4cc9f0 !important;
  color: #ffffff !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 0 #3a0ca3, 0 4px 16px rgba(76, 201, 240, 0.35) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease !important;
}

.btn-game-bots:hover {
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.45) 0%, rgba(114, 9, 183, 0.6) 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 0 #3a0ca3, 0 8px 22px rgba(76, 201, 240, 0.55) !important;
  color: #a5f3fc !important;
}

.btn-game-rules {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 2px solid rgba(246, 196, 67, 0.45) !important;
  color: #ffd166 !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, border-color 0.15s ease !important;
}

.btn-game-rules:hover {
  background: rgba(246, 196, 67, 0.22) !important;
  border-color: #ffe066 !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(246, 196, 67, 0.3) !important;
}

/* 5.5 CrazyGames Mosaic Layout for the 5 games */
.crazy-games-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Top 1 Dixit Featured Card */
.vault-card-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(42, 24, 76, 0.95) 0%, rgba(20, 12, 42, 0.96) 100%) !important;
  border: 2.5px solid #f6c443 !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), 0 0 28px rgba(246, 196, 67, 0.3) !important;
}

@media (min-width: 900px) {
  .vault-card-featured {
    display: grid !important;
    grid-template-columns: 420px 1fr !important;
  }
  .vault-card-featured .lair-card-visual {
    height: 100% !important;
    min-height: 280px;
    border-bottom: none !important;
    border-right: 2px solid rgba(246, 196, 67, 0.3) !important;
  }
}

.crazy-top-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #fca5a5;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* 5.6 Guest Quick Login & Progress Card Action Buttons */
.rpg-login-cta-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-guest-quick {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
  border: 1.5px solid #10b981;
  color: #6ee7b7;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-guest-quick:hover {
  background: rgba(16, 185, 129, 0.4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* 5.7 Compact & Punchy Room Creation / Waiting Lobby */
.welcome-card {
  max-width: 680px !important;
  margin: 24px auto !important;
  padding: 26px 30px !important;
  background: linear-gradient(180deg, rgba(28, 17, 54, 0.97) 0%, rgba(14, 8, 30, 0.98) 100%) !important;
  border: 2px solid #f6c443 !important;
  border-radius: 20px !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(246, 196, 67, 0.22) !important;
  backdrop-filter: blur(14px) !important;
}

.welcome-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif !important;
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  color: #f6c443 !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.8px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
}

.welcome-subtitle {
  color: #cbd5e1 !important;
  font-size: 0.92rem !important;
  line-height: 1.4 !important;
  margin-bottom: 20px !important;
}

/* Segmented Control Tabs for Room Creation / Join */
.tabs-nav {
  display: flex !important;
  background: rgba(10, 6, 24, 0.75) !important;
  border: 1.5px solid rgba(246, 196, 67, 0.3) !important;
  border-radius: 12px !important;
  padding: 4px !important;
  gap: 6px !important;
  margin-bottom: 22px !important;
}

.tab-btn {
  flex: 1 !important;
  padding: 10px 16px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.tab-btn:hover:not(.active) {
  background: rgba(246, 196, 67, 0.12) !important;
  color: #ffd166 !important;
}

.tab-btn.active {
  background: linear-gradient(180deg, #ffe066 0%, #f6c443 50%, #d97706 100%) !important;
  color: #120824 !important;
  font-weight: 900 !important;
  box-shadow: 0 3px 0 #78350f, 0 4px 14px rgba(246, 196, 67, 0.45) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Lobby Form Inputs */
.welcome-card .input-group {
  margin-bottom: 16px !important;
}

.welcome-card .input-label {
  font-family: 'Cinzel', serif !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  color: #f6c443 !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.5px !important;
}

.welcome-card .input-field {
  background: rgba(10, 6, 24, 0.85) !important;
  border: 1.5px solid rgba(246, 196, 67, 0.35) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 0.98rem !important;
  color: #fff !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.welcome-card .input-field:focus {
  border-color: #f6c443 !important;
  box-shadow: 0 0 14px rgba(246, 196, 67, 0.4) !important;
  outline: none !important;
}

/* Room Action Buttons in Lobby & Waiting Room */
#btnSubmitCreate,
#btnSubmitJoin,
#btnStartGame {
  background: linear-gradient(180deg, #ffe066 0%, #f6c443 50%, #d97706 100%) !important;
  color: #120824 !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 900 !important;
  border: 2px solid #fffbeb !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 0 #78350f, 0 6px 18px rgba(246, 196, 67, 0.5) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  cursor: pointer !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease !important;
}

#btnSubmitCreate:hover,
#btnSubmitJoin:hover,
#btnStartGame:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 0 #78350f, 0 10px 24px rgba(246, 196, 67, 0.7) !important;
}

#btnSubmitCreate:active,
#btnSubmitJoin:active,
#btnStartGame:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #78350f !important;
}

/* Room Code Badge with Clear Contrast */
.room-badge {
  background: rgba(10, 6, 24, 0.9) !important;
  border: 2px dashed #f6c443 !important;
  border-radius: 12px !important;
  color: #f6c443 !important;
  font-family: 'Fira Code', monospace !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
  box-shadow: 0 0 18px rgba(246, 196, 67, 0.25) !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}

.room-badge:hover {
  background: rgba(246, 196, 67, 0.18) !important;
  transform: scale(1.03) !important;
}

/* 5.8 Official BoardLair Master Emblem */
.boardlair-emblem-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #f6c443;
  box-shadow: 0 0 10px rgba(246, 196, 67, 0.45);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.header-logo:hover .boardlair-emblem-img {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 18px rgba(246, 196, 67, 0.8);
}

.crazy-lounge-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #f6c443;
  box-shadow: 0 0 18px rgba(246, 196, 67, 0.55), 0 4px 12px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.crazy-lounge-brand:hover .crazy-lounge-logo-img {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 28px rgba(246, 196, 67, 0.85);
}



