/* ==========================================================================
   COMPONENTS: BOTS, ANALYSIS, PUZZLES, ECONOMY, CHAT & MODALS
   ========================================================================== */

/* Bot Cards Grid */
.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--trans-normal);
  position: relative;
  overflow: hidden;
}

.bot-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-green);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--neon-green-glow);
}

.bot-avatar-large {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 14px;
  border: 2px solid var(--border-glass-light);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
}


.bot-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.bot-rating-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--royal-gold);
  margin-bottom: 10px;
}

.bot-playstyle-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--neon-green);
  margin-bottom: 12px;
}

.bot-bio {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Subagent Persona Distinctive Cards */
.bot-card.bot-subagent-siddarth {
  border-color: rgba(245, 158, 11, 0.35);
}
.bot-card.bot-subagent-siddarth:hover {
  border-color: #F59E0B;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 158, 11, 0.4);
}

.bot-card.bot-subagent-priya {
  border-color: rgba(236, 72, 153, 0.35);
}
.bot-card.bot-subagent-priya:hover {
  border-color: #EC4899;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(236, 72, 153, 0.4);
}

.bot-card.bot-subagent-ayan {
  border-color: rgba(239, 68, 68, 0.35);
}
.bot-card.bot-subagent-ayan:hover {
  border-color: #EF4444;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(239, 68, 68, 0.4);
}

.bot-card.bot-subagent-gyro {
  border-color: rgba(139, 92, 246, 0.35);
}
.bot-card.bot-subagent-gyro:hover {
  border-color: #8B5CF6;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(139, 92, 246, 0.4);
}

.bot-agent-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 255, 163, 0.12);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 163, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.bot-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green);
  animation: pulseDot 2s infinite ease-in-out;
}

.bot-rating-dynamic {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FCD34D;
}

.bot-quote-preview {
  font-size: 0.76rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  width: 100%;
  border-left: 2px solid var(--royal-gold);
  line-height: 1.35;
  box-sizing: border-box;
}

.btn-challenge-bot {
  min-height: 44px;
  font-weight: 800;
  transition: all var(--trans-fast);
}
.btn-challenge-bot:active {
  transform: scale(0.98);
}

/* ==========================================================================
   MOVE QUALITY BADGES & ANALYSIS
   ========================================================================== */
.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.quality-brilliant {
  background: linear-gradient(135deg, #00E5FF, #B026FF);
  color: #FFFFFF;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.quality-best {
  background: rgba(0, 255, 163, 0.2);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 163, 0.4);
}

.quality-inaccuracy {
  background: rgba(255, 215, 0, 0.2);
  color: var(--royal-gold);
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.quality-mistake {
  background: rgba(255, 140, 0, 0.2);
  color: #FF8C00;
  border: 1px solid rgba(255, 140, 0, 0.4);
}

.quality-blunder {
  background: rgba(255, 51, 102, 0.2);
  color: var(--solar-crimson);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

/* Right-side Move History Panel (Chess.com Proper Width & Height Match) */
.moves-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: clamp(8px, 1.2vh, 16px);
  width: clamp(360px, 26vw, 400px);
  min-width: 350px;
  max-width: 420px;
  flex-shrink: 0;
  height: calc(var(--board-size) + 148px);
  max-height: calc(100dvh - 100px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.moves-sidebar-header {
  font-size: 1rem;
  font-weight: 800;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.moves-list-scroll {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.move-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: background-color var(--trans-fast);
}

.move-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.move-ply {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.move-san-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}

.move-san-btn:hover {
  background: rgba(0, 255, 163, 0.15);
  color: var(--neon-green);
}

.move-san-btn.active-ply {
  background: var(--neon-green);
  color: var(--bg-primary);
  font-weight: 800;
}

/* PGN Explorer Controls */
.move-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}

.move-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--trans-fast);
}

.move-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-glass-light);
}

/* ==========================================================================
   DAILY TACTICAL PUZZLES
   ========================================================================== */
.puzzle-arena-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.puzzle-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(255, 140, 0, 0.2));
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: var(--solar-crimson);
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   ROYAL STORE & MARKETPLACE (SPECIAL PIECES, BOARDS & CUSTOMIZATION)
   ========================================================================== */
.store-marketplace-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 1. Store Header Bar (Compact & Minimalist) */
.store-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(16, 21, 30, 0.95), rgba(11, 14, 21, 0.98));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.store-header-titles {
  flex: 1;
  min-width: 220px;
}

.store-header-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin: 0 0 4px;
  color: var(--text-primary, #FFFFFF);
}

.store-header-subtitle {
  color: var(--text-secondary, #94A3B8);
  font-size: 0.88rem;
  margin: 0;
}

.store-wallet-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.store-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full, 999px);
  font-size: 0.82rem;
  color: #FFFFFF;
  backdrop-filter: blur(8px);
}

.store-pill-icon {
  font-size: 1rem;
  color: var(--royal-gold, #D4AF37);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.store-pill-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary, #FFFFFF);
}

.store-pill-unit {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94A3B8;
  letter-spacing: 0.5px;
}

.store-wallet-pill.salary-pill {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.salary-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 8px #F59E0B;
  display: inline-block;
  animation: pulseGoldDot 2s infinite ease-in-out;
}

.salary-status-text {
  font-size: 0.68rem;
  color: var(--neon-green, #10B981);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 2px;
}

/* Light Theme support for Store Header Bar */
.light-theme .store-header-bar {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.light-theme .store-header-title {
  color: #0F172A !important;
}

.light-theme .store-header-subtitle {
  color: #475569 !important;
}

.light-theme .store-wallet-pill {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0F172A !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.light-theme .store-pill-value {
  color: #0F172A !important;
}

.light-theme .store-pill-unit {
  color: #64748B !important;
}

.light-theme .store-pill-icon {
  color: #D97706 !important;
}

.light-theme .store-wallet-pill.salary-pill {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

.light-theme .store-wallet-pill.salary-pill .store-pill-value.salary-val {
  color: #B45309 !important;
}

.light-theme .salary-status-text {
  color: #059669 !important;
}

#claim-hourly-btn {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  transition: all var(--trans-fast);
}

/* Passive Income Continuous Stream Badges (Authoritative) */
.store-passive-income-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.live-pulse-gold-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 8px #F59E0B;
  display: inline-block;
  animation: pulseGoldDot 2s infinite ease-in-out;
}

@keyframes pulseGoldDot {
  0%, 100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 6px #F59E0B; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px #F59E0B; }
}

.passive-income-live-pill {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  display: inline-block;
  animation: pulseGreenDot 2s infinite ease-in-out;
}

@keyframes pulseGreenDot {
  0%, 100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 6px #10B981; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px #10B981; }
}

/* 2. Category Filter & Sort Navigation Bar */
.store-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 2px 0;
}

.store-segmented-tabs {
  display: inline-flex;
  background: rgba(14, 18, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.store-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94A3B8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.store-segment-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.store-segment-btn.active {
  color: #FFFFFF;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.store-tab-counter {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 2px;
  color: #CBD5E1;
}

.store-segment-btn.active .store-tab-counter {
  color: var(--cote-gold);
}

.store-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.store-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.store-search-box input {
  background: rgba(14, 18, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 7px 28px 7px 32px;
  font-size: 0.82rem;
  color: #FFFFFF;
  width: 170px;
  transition: width 0.2s, border-color 0.2s;
  outline: none;
}

.store-search-box input:focus {
  width: 210px;
  border-color: #38BDF8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.store-search-box .store-search-icon {
  position: absolute;
  left: 10px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.store-search-clear-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.store-search-clear-btn:hover {
  color: #FFFFFF;
}

.store-select-wrap {
  position: relative;
}

.store-select-dropdown {
  background: rgba(14, 18, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #CBD5E1;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.store-select-dropdown:hover,
.store-select-dropdown:focus {
  border-color: rgba(56, 189, 248, 0.35);
  color: #FFFFFF;
}

/* 3. Product Catalogue Responsive Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1366px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* 4. Product Card Component */
.shop-card {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  min-height: 220px;
}

.shop-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(212, 175, 55, 0.12);
}

.shop-card:hover .shop-card-title {
  color: var(--royal-gold, #D4AF37);
}

.shop-card.is-equipped {
  border-color: rgba(16, 185, 129, 0.75) !important;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), #0E121A) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.22), inset 0 0 14px rgba(16, 185, 129, 0.05) !important;
}

/* Special Edition Border Glows */
.shop-card.border-gold-glow:hover {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.shop-card.border-cosmic-glow:hover {
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.shop-card.border-gothic-glow:hover {
  border-color: rgba(225, 29, 72, 0.7);
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.25);
}

.shop-card.border-dragon-glow:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.my-collection-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(15, 20, 32, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.my-collection-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.my-collection-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.my-collection-count-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(212, 175, 55, 0.2);
  color: var(--royal-gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}

.my-collection-active-desc {
  font-size: 0.8rem;
  color: #94A3B8;
  margin-top: 4px;
}

.active-item-name {
  color: #10B981;
  font-weight: 700;
}

.btn-reset-default {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #FFFFFF;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-reset-default:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--royal-gold);
  color: var(--royal-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.store-empty-collection {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  background: rgba(14, 18, 26, 0.7);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 16px;
}

/* Product Preview Thumbnail Area */
.shop-card-preview {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 9px;
  overflow: hidden;
  background: #07090E;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

/* Subtle Hover Preview Hint */
.preview-hover-hint {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 5;
}

.shop-card-preview:hover .preview-hover-hint,
.shop-card:hover .preview-hover-hint {
  opacity: 1;
}

/* Chessboard Micro-Preview */
.board-preview-stage {
  background: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.45) 0%, rgba(10, 13, 20, 0.96) 80%);
}

.micro-board-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.micro-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 25px);
  grid-template-rows: repeat(4, 25px);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
}

.shop-card:hover .micro-board-grid {
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8), 0 0 12px rgba(212, 175, 55, 0.25);
}

.micro-tile {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.micro-tile svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
}

/* Pieces Showcase Stage */
.piece-preview-stage {
  background: radial-gradient(circle at 50% 65%, rgba(30, 41, 59, 0.6) 0%, rgba(10, 13, 20, 0.96) 80%);
}

.piece-pedestal-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding-bottom: 12px;
  position: relative;
  z-index: 2;
}

.stage-piece {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85));
}

.stage-queen {
  width: 36px;
  height: 36px;
}

.stage-king {
  width: 44px;
  height: 44px;
}

.stage-king.prominent {
  width: 46px;
  height: 46px;
  transform: translateY(-2px);
  z-index: 3;
}

.stage-knight {
  width: 32px;
  height: 32px;
}

.stage-bishop {
  width: 32px;
  height: 32px;
}

.stage-piece svg {
  width: 100%;
  height: 100%;
  display: block;
}

.shop-card:hover .stage-king.prominent {
  transform: translateY(-6px) scale(1.08);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.shop-card:hover .stage-queen,
.shop-card:hover .stage-knight,
.shop-card:hover .stage-bishop {
  transform: translateY(-3px);
}

/* Piece Theme Ambient Pedestal Auras */
.aura-royal-gold {
  background: radial-gradient(circle at 50% 65%, rgba(212, 175, 55, 0.22) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-cosmic-void {
  background: radial-gradient(circle at 50% 65%, rgba(168, 85, 247, 0.22) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-gothic-dark {
  background: radial-gradient(circle at 50% 65%, rgba(225, 29, 72, 0.22) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-emerald-dragon {
  background: radial-gradient(circle at 50% 65%, rgba(16, 185, 129, 0.22) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-neo {
  background: radial-gradient(circle at 50% 65%, rgba(56, 189, 248, 0.16) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-wood {
  background: radial-gradient(circle at 50% 65%, rgba(180, 115, 60, 0.18) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-glass {
  background: radial-gradient(circle at 50% 65%, rgba(147, 197, 253, 0.18) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

.aura-cyberpunk {
  background: radial-gradient(circle at 50% 65%, rgba(236, 72, 153, 0.2) 0%, rgba(14, 18, 26, 0.96) 75%) !important;
}

/* Badges within Preview */
.shop-card-badges-left {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
  pointer-events: none;
}

.badge-rarity {
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(168, 85, 247, 0.2);
  color: #D8B4FE;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.shop-card-equipped-indicator {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55);
  backdrop-filter: blur(6px);
  color: #10B981;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
}

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

@keyframes pulse-dot-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Card Details */
.shop-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 10px;
  justify-content: space-between;
  gap: 10px;
}

.shop-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.shop-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary, #FFFFFF);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.badge-status-equipped {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.22);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.status-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}

.badge-status-owned {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--royal-gold, #D4AF37);
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-status-rented {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.18);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* STRICT USER REQUIREMENT: ZERO DESCRIPTIONS ACROSS THE STORE */
.shop-card-desc,
.theme-preview-desc {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}

/* Card Action Group */
.shop-card-actions {
  margin-top: auto;
  width: 100%;
}

.shop-actions-group {
  display: flex;
  gap: 6px;
  width: 100%;
}

.btn-shop-buy {
  flex: 1.2;
  height: 36px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(212, 175, 55, 0.12));
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  color: var(--royal-gold, #D4AF37);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.15);
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-shop-buy:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.45), rgba(212, 175, 55, 0.22));
  border-color: rgba(212, 175, 55, 0.8);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-shop-rent {
  flex: 1;
  height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #CBD5E1;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-shop-rent:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-action-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.85;
}

.btn-action-price {
  font-size: 0.82rem;
  font-weight: 800;
}

.btn-price-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-action-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--royal-gold, #D4AF37);
}

.btn-action-coin img,
.btn-action-coin picture {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: block !important;
  object-fit: contain !important;
}

.btn-action-unit {
  font-size: 0.7rem;
  opacity: 0.75;
}

.btn-shop-equip {
  width: 100%;
  height: 36px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  color: #38BDF8;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-shop-equip:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.7);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-shop-equipped {
  width: 100%;
  height: 36px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  color: #10B981;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: default;
  opacity: 0.95;
}
/* 5. Store Confirmation & Preview Modals */
.store-purchase-modal-box {
  max-width: 440px;
  width: 92vw;
  background: #10141E;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.15);
  text-align: left;
}

.store-purchase-header {
  text-align: center;
  margin-bottom: 16px;
}

.store-purchase-icon-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--cote-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.store-purchase-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.store-purchase-item-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.store-purchase-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0A0D14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.store-purchase-item-text h3 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
}

.store-purchase-item-cat {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 600;
}

.store-purchase-breakdown {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.store-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #94A3B8;
}

.breakdown-val {
  font-weight: 700;
  color: #FFFFFF;
  font-family: var(--font-mono);
}

.breakdown-price {
  color: var(--cote-gold);
}

.store-breakdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

.balance-after-row {
  font-weight: 800;
  color: #FFFFFF;
  font-size: 0.86rem;
}

.store-purchase-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FCA5A5;
  margin-bottom: 16px;
}

.store-purchase-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Theme Preview Modal Refinements */
.theme-preview-modal-box {
  max-width: 480px;
  width: 92vw;
  background: #10141E;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.theme-preview-header {
  margin-bottom: 12px;
}

.theme-preview-title-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 4px 0;
}

.theme-preview-desc-text {
  font-size: 0.8rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1.4;
}

.theme-preview-board-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 12px;
  position: relative;
  width: fit-content;
  max-width: 100%;
}

#store-theme-preview-board {
  width: min(300px, 72vw);
  height: min(300px, 72vw);
  aspect-ratio: 1 / 1;
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.badge-theme-counter {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #CBD5E1;
  letter-spacing: 0.5px;
}

/* Store Theme Preview Navigation Arrows */
.theme-preview-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(16, 20, 30, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  color: #FFD700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 215, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  outline: none;
  user-select: none;
}

.theme-preview-nav-btn:hover {
  background: rgba(255, 215, 0, 0.22);
  border-color: #FFD700;
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 215, 0, 0.45);
}

.theme-preview-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.theme-preview-nav-btn.theme-preview-btn-prev {
  left: -52px;
}

.theme-preview-nav-btn.theme-preview-btn-next {
  right: -52px;
}

@keyframes themePreviewFade {
  0% {
    opacity: 0.65;
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.theme-preview-board-wrap.animating-theme #store-theme-preview-board {
  animation: themePreviewFade 0.22s ease-out;
}

@media (max-width: 480px) {
  .theme-preview-nav-btn {
    width: 36px;
    height: 36px;
  }
  .theme-preview-nav-btn.theme-preview-btn-prev {
    left: -12px;
  }
  .theme-preview-nav-btn.theme-preview-btn-next {
    right: -12px;
  }
}

html.light-theme .theme-preview-nav-btn,
body.light-theme .theme-preview-nav-btn {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(217, 119, 6, 0.5);
  color: #D97706;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

html.light-theme .theme-preview-nav-btn:hover,
body.light-theme .theme-preview-nav-btn:hover {
  background: rgba(254, 243, 199, 1);
  border-color: #D97706;
  color: #92400E;
}

html.light-theme .badge-theme-counter,
body.light-theme .badge-theme-counter {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  color: #475569;
}

.theme-preview-piece-strip {
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.piece-strip-header {
  font-size: 0.7rem;
  color: #94A3B8;
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.piece-strip-display {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.theme-preview-actions-bar {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}


/* ==========================================================================
   1-PAGE VIEWPORT LOCKED TELEGRAM GLOBAL CHAT & SOCIAL LOUNGE
   Authentic bi-directional bubbles, quoted replies, typing wave & reactions
   ========================================================================== */

/* Desktop 1-Page Viewport Lock for Global Chat: zero outer window scrolling */
body.chat-view-active {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

body.chat-view-active #app-container {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

body.chat-view-active .app-main-content {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
  padding: 0 !important;
}

body.chat-view-active .main-viewport {
  padding: 54px 16px 14px 16px !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

/* Outer View Panel for Chat */
.view-panel-chat-page {
  box-sizing: border-box;
  overflow: hidden !important;
  display: none;
}

.view-panel-chat-page.active {
  display: flex !important;
  flex-direction: column;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  flex: 1 1 0% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   TELEGRAM-INSPIRED REAL-TIME CHAT SHELL & 3-SECTION ARCHITECTURE
   Left: Channels/Communities Navigation
   Center: Main High-Performance Conversation Pane
   Right: Collapsible Channel & Member Info Panel (Hidden by default)
   ========================================================================== */
.chat-telegram-shell {
  display: flex;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  flex: 1 1 0%;
}

/* 1. Left Section: Channels & Communities Sidebar */
.chat-channels-sidebar {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface, rgba(14, 18, 26, 0.85));
  border-right: 1px solid var(--border-glass);
  height: 100%;
  min-height: 0;
  z-index: 20;
  box-sizing: border-box;
}

.chat-channels-header {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(11, 15, 23, 0.45);
  flex-shrink: 0;
}

.chat-channels-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 10px;
}

.chat-channels-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  color: #FFF;
}

.chat-brand-icon {
  color: var(--royal-gold);
  display: inline-flex;
}

.chat-channels-close-btn {
  display: none;
}

.chat-channels-search-box {
  position: relative;
  width: 100%;
}

.chat-channels-search-box input {
  width: 100%;
  height: 34px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 6px 30px 6px 30px;
  font-size: 0.78rem;
  color: #FFF;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--trans-fast), background var(--trans-fast);
}

.chat-channels-search-box input:focus {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(0, 0, 0, 0.45);
}

.chat-search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94A3B8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background var(--trans-fast), color var(--trans-fast);
}

.chat-search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.chat-search-clear-btn svg {
  width: 12px;
  height: 12px;
}

.chat-search-glyph {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  pointer-events: none;
  display: inline-flex;
}

.chat-channels-list {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.25) transparent;
}

.chat-channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(18, 20, 26, 0.6);
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  box-sizing: border-box;
  font-family: var(--font-main);
  position: relative;
}

.chat-channel-item:hover {
  background: rgba(25, 28, 36, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

.chat-channel-item.active {
  background: #14171E !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(212, 175, 55, 0.04) !important;
}

.chat-channel-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--royal-gold, #D4AF37);
}

.channel-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transition: all 0.16s ease;
  overflow: hidden;
}

.channel-item-avatar.has-channel-image,
.chat-header-avatar.has-channel-image,
.chat-info-big-avatar.has-channel-image {
  padding: 0 !important;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.chat-channel-item.active .channel-item-avatar.has-channel-image {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.channel-item-avatar.avatar-class-d.has-channel-image,
.chat-header-avatar.has-channel-image:not(.is-dm-peer-avatar),
.chat-info-big-avatar.has-channel-image:not(.is-dm-peer-avatar) {
  border-radius: 0 !important;
  overflow: visible !important;
}

.class-d-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
  padding: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.avatar-class-elite {
  background: rgba(255, 183, 3, 0.14) !important;
  color: #FFB703 !important;
  border: 1px solid rgba(255, 183, 3, 0.35);
}

.avatar-class-a {
  background: rgba(225, 29, 72, 0.14) !important;
  color: #E11D48 !important;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.avatar-class-b {
  background: rgba(6, 182, 212, 0.14) !important;
  color: #06B6D4 !important;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.avatar-class-c {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #10B981 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.avatar-class-d {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.chat-channel-item.active .avatar-class-d {
  border-color: rgba(212, 175, 55, 0.4) !important;
  color: #E2E8F0 !important;
  background: rgba(212, 175, 55, 0.12) !important;
}

.channel-item-info {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.channel-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.channel-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #F3F4F6 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-channel-item.active .channel-item-name {
  color: #FFFFFF !important;
  font-weight: 800;
}

.channel-item-tag {
  font-size: 0.52rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
}

.chat-channel-item.active .channel-item-tag {
  background: rgba(212, 175, 55, 0.15);
  color: var(--royal-gold, #D4AF37);
  border-color: rgba(212, 175, 55, 0.35);
}

.channel-item-snippet {
  font-size: 0.69rem;
  color: #9CA3AF !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat-channel-item.active .channel-item-snippet {
  color: #CBD5E1 !important;
}

.chat-channels-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.chat-sidebar-1v1-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--royal-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-sidebar-1v1-btn:hover {
  background: var(--royal-gold);
  color: #0B0E14;
}

/* 2. Center Section: Main Conversation Area */
.chat-conversation-pane {
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-primary, rgba(10, 13, 20, 0.6));
  box-sizing: border-box;
}

.chat-telegram-header {
  height: 54px;
  flex-shrink: 0;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--bg-surface, rgba(15, 20, 30, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  box-sizing: border-box;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.chat-mobile-drawer-btn {
  display: none;
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--royal-gold), #B38F3F);
  color: #0B0E14;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.chat-header-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.chat-header-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #FFF;
  margin: 0;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.chat-online-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

.chat-header-sub-divider {
  color: var(--text-muted);
  opacity: 0.6;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.chat-btn-icon:hover {
  background: rgba(212, 175, 55, 0.14);
  color: var(--royal-gold);
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.chat-btn-icon:active {
  transform: scale(0.95);
}

/* Explicitly hide mobile-only drawer triggers on desktop (overrides .chat-btn-icon) */
.chat-btn-icon.chat-channels-close-btn,
.chat-btn-icon.chat-mobile-drawer-btn,
.chat-btn-icon.chat-mobile-back-btn {
  display: none;
}

/* Directory Section Headers (Groups / People) & People Rows */
.chat-list-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--text-muted, #94A3B8);
  text-transform: uppercase;
  user-select: none;
}

.chat-people-section-label {
  margin-top: 6px;
}

.chat-people-online-pill {
  font-size: 0.64rem;
  font-weight: 700;
  color: #34D399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.chat-people-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-people-empty {
  padding: 14px 10px;
  font-size: 0.78rem;
  color: var(--text-muted, #94A3B8);
  text-align: center;
}

.chat-people-empty-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(212, 175, 55, 0.25);
  color: var(--text-muted, #94A3B8);
  font-size: 0.78rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color var(--trans-fast), background var(--trans-fast), color var(--trans-fast);
}

.chat-people-empty-prompt:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.5);
  color: #F8FAFC;
}

.chat-people-empty-prompt-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.14);
  color: #FACC15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-people-empty-prompt-icon svg {
  width: 14px;
  height: 14px;
}

.chat-item-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.chat-item-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F59E0B, #D4AF37);
  color: #0B0E14;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

.chat-item-chevron {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #64748B);
  opacity: 0.65;
  flex-shrink: 0;
}

.channel-item-avatar.chat-person-avatar {
  position: relative;
  border-radius: 50%;
  overflow: visible;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.channel-item-avatar.chat-person-avatar .chat-person-avatar-img,
.channel-item-avatar.chat-person-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.chat-header-avatar.is-dm-peer-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.chat-dm-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #0E121A;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.65);
  pointer-events: none;
}

.channel-item-tag-ai {
  background: rgba(139, 92, 246, 0.16) !important;
  color: #C4B5FD !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

.channel-item-tag-online {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #34D399 !important;
  border-color: rgba(16, 185, 129, 0.32) !important;
}

@media (min-width: 769px) {
  #view-chat .chat-channels-close-btn,
  #view-chat .chat-mobile-drawer-btn,
  #view-chat .chat-mobile-back-btn,
  #view-chat .chat-item-chevron {
    display: none !important;
  }
}

/* In-Channel Slide-Down Search */
.chat-in-channel-search {
  padding: 8px 16px;
  background: rgba(18, 24, 36, 0.96);
  border-bottom: 1px solid var(--border-glass);
  z-index: 9;
  box-sizing: border-box;
}

.chat-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  width: 100%;
}

.chat-search-inner input {
  flex: 1 1 0%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 6px 12px 6px 32px;
  font-size: 0.82rem;
  color: #FFF;
  outline: none;
}

.chat-search-inner input:focus {
  border-color: rgba(212, 175, 55, 0.6);
}

.search-input-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: inline-flex;
}

.search-count-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: var(--font-mono);
}

.chat-search-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.chat-search-close-btn:hover {
  color: #FFF;
}

/* Messages Relative Wrapper */
.chat-messages-container-rel {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Date Separator */
.chat-date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 6px;
  pointer-events: none;
  user-select: none;
}

.chat-date-separator span {
  background: rgba(18, 24, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2.5px 12px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.2px;
}

/* Consecutive Message Stacking */
.chat-bubble-telegram.msg-consecutive {
  margin-top: -3px !important;
}

.chat-bubble-telegram.msg-consecutive .chat-author-line {
  display: none !important;
}

.chat-bubble-telegram.chat-msg-other.msg-consecutive .chat-user-avatar {
  visibility: hidden !important;
  pointer-events: none !important;
}

.chat-bubble-telegram.chat-msg-other.msg-consecutive .chat-bubble-content {
  border-top-left-radius: 4px !important;
}

.chat-bubble-telegram.chat-msg-self.msg-consecutive .chat-bubble-content {
  border-top-right-radius: 4px !important;
}

/* Bottom Message Composer — Compact, Unified, Modern Capsule */
.chat-telegram-composer {
  flex-shrink: 0;
  padding: 10px 18px 14px;
  background: var(--bg-surface, rgba(14, 18, 26, 0.95));
  border-top: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 25;
  box-sizing: border-box;
  width: 100%;
}

.chat-composer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(19, 24, 36, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 5px 6px 5px 10px;
  min-height: 48px;
  box-sizing: border-box;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease;
  width: 100%;
}

.chat-composer-box.is-multiline {
  align-items: flex-end;
}

.chat-composer-box:focus-within {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.22), 0 4px 16px rgba(0, 0, 0, 0.35);
  background: rgba(24, 30, 44, 0.98);
}

.chat-composer-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.chat-composer-box.is-multiline .chat-composer-tools {
  margin-bottom: 2px;
}

.composer-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #94A3B8 !important;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.composer-tool-btn [data-icon] {
  color: inherit !important;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.composer-tool-btn svg {
  color: inherit !important;
  width: 19px;
  height: 19px;
  display: block;
}

.composer-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--royal-gold, #D4AF37) !important;
  transform: scale(1.06);
}

.composer-tool-btn:active {
  transform: scale(0.94);
}

.chat-composer-box .chat-telegram-textarea,
.chat-composer-box .chat-input-field {
  flex: 1 1 auto;
  field-sizing: content;
  min-height: 36px !important;
  height: auto;
  max-height: 120px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 7px 10px 7px 8px !important;
  margin: 0 !important;
  font-family: var(--font-main, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.94rem;
  color: #F8FAFC !important;
  line-height: 22px !important;
  resize: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.chat-composer-box .chat-telegram-textarea::-webkit-scrollbar,
.chat-composer-box .chat-input-field::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.chat-composer-box .chat-telegram-textarea::-webkit-scrollbar-button,
.chat-composer-box .chat-input-field::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.chat-composer-box .chat-telegram-textarea::-webkit-scrollbar-thumb,
.chat-composer-box .chat-input-field::-webkit-scrollbar-thumb {
  display: none !important;
}

.chat-composer-box .chat-telegram-textarea::placeholder,
.chat-composer-box .chat-input-field::placeholder {
  color: #64748B !important;
  opacity: 1;
}

.chat-composer-box .chat-telegram-send-btn,
.chat-composer-box .chat-send-btn {
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, var(--royal-gold, #D4AF37), #B38F3F) !important;
  border: none !important;
  outline: none !important;
  color: #0B0E14 !important;
  cursor: pointer;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35) !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.15s ease;
}

.chat-composer-box.is-multiline .chat-telegram-send-btn,
.chat-composer-box.is-multiline .chat-send-btn {
  margin-bottom: 2px !important;
}

.chat-composer-box .chat-telegram-send-btn [data-icon],
.chat-composer-box .chat-send-btn [data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chat-composer-box .chat-telegram-send-btn svg,
.chat-composer-box .chat-send-btn svg {
  display: block;
}

.chat-composer-box .chat-telegram-send-btn:hover,
.chat-composer-box .chat-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.55) !important;
}

.chat-composer-box .chat-telegram-send-btn:active,
.chat-composer-box .chat-send-btn:active {
  transform: scale(0.92);
}

/* 3. Right Section: Collapsible Channel & Member Info Panel */
.chat-info-sidebar {
  width: 290px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(14, 18, 26, 0.95);
  border-left: 1px solid var(--border-glass);
  height: 100%;
  min-height: 0;
  z-index: 15;
  box-sizing: border-box;
}

.chat-info-header {
  height: 54px;
  flex-shrink: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-info-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFF;
  margin: 0;
}

.chat-info-scroll {
  flex: 1 1 0%;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.chat-info-channel-card {
  text-align: center;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}

.chat-info-big-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--royal-gold), #B38F3F);
  color: #0B0E14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
}

.chat-info-section {
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
}

.chat-info-section-heading {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.chat-tier-rules-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.tier-rule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.chat-messages-scroll {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.chat-messages-scroll::-webkit-scrollbar {
  width: 6px;
}

.chat-messages-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages-scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 3px;
}

.chat-messages-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--royal-gold);
}

/* Telegram Swipe to Reply Gesture Indicator */
.swipe-reply-indicator {
  position: absolute;
  left: -44px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  border: 1.5px solid var(--royal-gold);
  color: var(--royal-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  z-index: 2;
}

.swipe-reply-indicator.swipe-armed {
  background: var(--royal-gold);
  color: #0B0E14;
  transform: translateY(-50%) scale(1.15) !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.8);
}

/* Telegram Bubble Base */
.chat-bubble-telegram {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  max-width: 78%;
  position: relative;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
  will-change: transform;
}

/* Others' Messages (Left-Aligned, Dark Slate Glass) */
.chat-bubble-telegram.chat-msg-other {
  align-self: flex-start;
  margin-right: auto;
}

.chat-bubble-telegram.chat-msg-other .chat-bubble-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(18, 24, 36, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px 12px 12px 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

/* Own Messages (Right-Aligned, Royal Gold / Emerald Gradient) */
.chat-bubble-telegram.chat-msg-self {
  align-self: flex-end;
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-bubble-telegram.chat-msg-self .chat-bubble-content {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(16, 185, 129, 0.14) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px 12px 3px 12px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.12);
}

.chat-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--royal-gold), #B38F3F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #0B0E14;
  font-weight: 900;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.chat-user-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.chat-bubble-content {
  padding: 6px 10px 4px;
  position: relative;
  min-width: 48px;
  word-break: break-word;
}

.chat-author-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.chat-author-line .user-tier-badge {
  font-size: 0.54rem !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  line-height: 1.2 !important;
  height: 15px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
}

.chat-author-line .user-tier-badge span[data-icon] {
  width: 10px !important;
  height: 10px !important;
}

.chat-username {
  color: var(--antique-gold);
  font-weight: 800;
  cursor: pointer;
  font-size: 0.76rem;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.chat-username:hover {
  color: #F8FAFC;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-text {
  font-size: 0.86rem;
  color: #F8FAFC;
  line-height: 1.4;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

/* Telegram Message Metadata (Timestamp + Read Checks) */
.chat-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 0.60rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 1px;
  line-height: 1;
}

.chat-bubble-meta .tick-double {
  display: inline-flex;
  align-items: center;
  color: var(--royal-gold);
}

/* Telegram Quoted Reply Card inside Bubble */
.telegram-reply-quote {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--royal-gold);
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.telegram-reply-quote:hover {
  background: rgba(212, 175, 55, 0.12);
}

.telegram-reply-author {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--royal-gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.telegram-reply-snippet {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* Telegram Floating Action Buttons on Hover */
.chat-bubble-actions {
  position: absolute;
  top: -12px;
  right: 8px;
  display: none;
  background: rgba(15, 20, 30, 0.95);
  border: 1px solid var(--border-glass-light);
  border-radius: 12px;
  padding: 2px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 5;
  gap: 4px;
}

.chat-bubble-telegram:hover .chat-bubble-actions,
.chat-bubble-telegram:focus-within .chat-bubble-actions,
.chat-bubble-telegram.actions-active .chat-bubble-actions {
  display: flex;
  align-items: center;
}

.chat-bubble-telegram.chat-msg-self .chat-author-line {
  display: none !important;
}

.chat-bubble-telegram.chat-msg-self .chat-username {
  color: var(--royal-gold);
}

/* Telegram Quick Reaction Popover */
.chat-react-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(15, 20, 32, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 28px;
  padding: 5px 10px;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 16px rgba(212, 175, 55, 0.15);
  z-index: 120;
  animation: telegramReactPopIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-bubble-telegram.chat-msg-other .chat-react-popover {
  right: auto;
  left: 0;
}

@keyframes telegramReactPopIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.react-pick-item {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
}

.react-pick-item:hover,
.react-pick-item:active {
  transform: scale(1.4) translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
}

/* Telegram Flying Emoji Particle Animation */
.telegram-flying-reaction {
  position: absolute;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 200;
  animation: telegramFlyReaction 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  will-change: transform, opacity;
}

@keyframes telegramFlyReaction {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
  25% { transform: translate(-50%, -20px) scale(1.4); opacity: 1; }
  65% { transform: translate(-50%, -50px) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -85px) scale(0.9); opacity: 0; }
}

/* Telegram Double-Tap Quick React Burst */
.telegram-double-tap-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 2.2rem;
  pointer-events: none;
  z-index: 150;
  animation: doubleTapBurst 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes doubleTapBurst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  40% { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
}

.chat-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}

.chat-action-btn:hover {
  color: var(--royal-gold);
  background: rgba(212, 175, 55, 0.15);
}

/* Telegram Reactions Row */
.chat-reactions-row:empty {
  display: none !important;
}

.chat-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.emoji-react-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.70rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.emoji-react-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--royal-gold);
  color: var(--royal-gold);
  transform: scale(1.08);
}

.emoji-react-btn.reacted-by-me {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--royal-gold);
  color: var(--royal-gold);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.emoji-react-btn.reacted-pulse {
  animation: reactChipPulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes reactChipPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Telegram Quoted Reply Preview Bar (above input) */
.telegram-reply-preview-bar {
  background: rgba(14, 18, 28, 0.95);
  border-top: 1px solid var(--border-glass-light);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: slideDownFade 0.2s ease;
}

.telegram-reply-preview-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.reply-accent-bar {
  width: 3px;
  height: 28px;
  background: var(--royal-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.reply-preview-content {
  overflow: hidden;
}

.reply-preview-author {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--royal-gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.reply-preview-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-cancel-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reply-cancel-btn:hover {
  color: var(--solar-crimson);
}

/* Telegram Live Typing Wave */
.telegram-typing-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 6px;
  font-size: 0.75rem;
  color: var(--royal-gold);
  font-style: italic;
  animation: fadeIn 0.2s ease;
}

.typing-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--royal-gold);
  animation: typingBounce 1.2s infinite ease-in-out;
  --stagger-step: 0.2s;
  animation-delay: calc(var(--dot-index, 0) * var(--stagger-step));
  animation-delay: calc((sibling-index() - 1) * var(--stagger-step));
}

.typing-dot:nth-child(1) { --dot-index: 0; }
.typing-dot:nth-child(2) { --dot-index: 1; }
.typing-dot:nth-child(3) { --dot-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .typing-dot {
    animation: none;
  }
}

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* Telegram Floating Scroll-To-Bottom FAB */
.chat-scroll-bottom-fab {
  position: absolute;
  bottom: 12px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid var(--royal-gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  color: var(--royal-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-scroll-bottom-fab:hover {
  transform: scale(1.12);
  background: rgba(212, 175, 55, 0.2);
}

.chat-unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--solar-crimson);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Target Message Flash Animation on Quote Click */
@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
  30% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.85); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 rgba(212, 175, 55, 0); transform: scale(1); }
}

.message-highlight-target {
  animation: highlightPulse 1.4s ease-out;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  position: relative;
  z-index: 25;
  box-sizing: border-box;
}

.chat-input-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--trans-fast);
}

.chat-input-tool-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  color: var(--royal-gold);
  border-color: var(--royal-gold);
  transform: scale(1.08);
}

.chat-input-emoji-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  background: rgba(15, 20, 32, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  width: 296px;
  max-width: calc(100vw - 32px);
  overflow: hidden !important;
  box-sizing: border-box;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.15);
  z-index: 100;
  animation: popoverFadeIn 0.18s ease;
}

.emoji-picker-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  margin-bottom: 6px;
  overflow-x: hidden !important;
  flex-wrap: nowrap;
}

.emoji-cat-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", var(--font-main, inherit);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.emoji-cat-tab:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.06);
}

.emoji-cat-tab.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--royal-gold);
  border-color: rgba(212, 175, 55, 0.4);
}

.emoji-picker-grid-scroll {
  display: flex;
  flex-direction: column;
  max-height: 190px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
}

.emoji-picker-grid-scroll::-webkit-scrollbar {
  width: 4px;
  height: 0px !important;
}

.emoji-picker-grid-scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.emoji-picker-category-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important;
}

.emoji-picker-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 4px;
}

.emoji-picker-grid,
.emoji-picker-group-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important;
}

.input-emoji-item,
.modal-emoji-chip,
.react-pick-item,
.emoji-char,
.emoji-react-btn {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif !important;
  font-feature-settings: "liga" 0;
  -webkit-font-smoothing: antialiased;
}

.input-emoji-item {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
}

.input-emoji-item:hover {
  transform: scale(1.3);
  background: rgba(255, 255, 255, 0.12);
}

#store-purchase-confirm-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

#store-purchase-confirm-btn [data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.chat-input-field {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  padding: 10px 16px;
  border-radius: 24px;
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.chat-input-field:focus {
  border-color: var(--royal-gold);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.chat-send-btn {
  border-radius: 24px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-weight: 800;
}

/* Mobile Chat Compose Dialog Modal */
.modal-box-chat-compose {
  width: min(92vw, 480px);
  background: rgba(14, 18, 28, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.modal-chat-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.2s ease;
}

.modal-chat-textarea:focus {
  border-color: var(--royal-gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.2);
}

.modal-compose-emojis-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 2px;
  scrollbar-width: none;
}

.modal-compose-emojis-bar::-webkit-scrollbar {
  display: none;
}

.modal-emoji-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.modal-emoji-chip:hover {
  transform: scale(1.2);
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--royal-gold);
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: clamp(10px, 2.5vh, 24px);
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.25s ease;
}

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

.modal-box {
  background: linear-gradient(165deg, #10131A 0%, #171B24 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl, 20px);
  padding: 24px 28px;
  width: 100%;
  max-width: 450px;
  max-height: min(90vh, 620px);
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.4) rgba(0, 0, 0, 0.3);
}

.modal-box::-webkit-scrollbar {
  width: 6px;
}
.modal-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}
.modal-box::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 4px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
  background: var(--vice-cyan, #00F0FF);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #9299A6);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(255, 46, 147, 0.2);
  border-color: rgba(255, 46, 147, 0.5);
  color: #FFFFFF;
  transform: rotate(90deg);
}

/* Language Switcher Modal Buttons */
.lang-choice-btn {
  transition: all var(--trans-fast);
}

.lang-choice-btn.active {
  border-color: var(--antique-gold) !important;
  background: rgba(197, 160, 89, 0.22) !important;
  color: var(--antique-gold) !important;
  box-shadow: 0 0 14px var(--royal-gold-glow);
}

/* ==========================================================================
   CLIMB THE RANKS (5 CLASSES SYSTEM) STYLES
   ========================================================================== */

.ranks-header-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(14, 19, 31, 0.95), rgba(8, 10, 15, 0.98));
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.ranks-hero-text h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #FFFFFF 40%, var(--royal-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ranks-hero-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.current-standing-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--royal-gold);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: right;
  box-shadow: 0 0 20px var(--royal-gold-glow);
}

.standing-class {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--royal-gold);
  letter-spacing: 1px;
}

.standing-rate {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neon-green);
  margin: 4px 0;
}

.standing-rank-pos {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 5 Classes Cards Grid */
.ranks-classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

@media (min-width: 1180px) {
  .ranks-classes-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.rank-tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  gap: 14px;
  transition: all var(--trans-normal);
}

.rank-tier-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rank-tier-card.active-tier {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid var(--royal-gold) !important;
  box-shadow: 0 0 24px var(--royal-gold-glow);
}

.tier-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tier-icon-wrap {
  font-size: 28px;
}

.tier-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.tier-limit-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.current-rank-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 900;
  background: var(--royal-gold);
  color: var(--bg-primary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.tier-rate-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.tier-rate-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
}

.tier-promo-cutoff {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* How Earnings Work 3-Step Process */
.earnings-process-section {
  margin-bottom: 36px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.earnings-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  color: var(--bg-primary);
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Weekly Promotions Section */
.weekly-promotions-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}

.promo-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.promo-header-row h2 {
  font-size: 1.4rem;
  font-weight: 900;
}

.promo-sub-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.promo-countdown-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.countdown-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--neon-green);
}

.promo-ladder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-ladder-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.ladder-class-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.ladder-class-name.target {
  color: var(--neon-green);
  font-weight: 800;
}

.ladder-arrow {
  color: var(--text-muted);
  font-size: 16px;
}

.ladder-cutoff-badge {
  background: rgba(0, 255, 163, 0.15);
  border: 1px solid rgba(0, 255, 163, 0.35);
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.demotion-alert-banner {
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid rgba(255, 51, 102, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #FFA3BA;
  font-size: 0.85rem;
}

/* Floating Toast Alerts */
.floating-reward-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(14, 19, 31, 0.95);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 25px var(--neon-green-glow);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: #FFFFFF;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  animation: slideDownToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.4s ease;
}

.bot-quote-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 19, 31, 0.95);
  border: 1px solid var(--solar-crimson);
  box-shadow: 0 0 25px var(--solar-crimson-glow);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  color: #FFFFFF;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transition: opacity 0.4s ease;
}

@keyframes slideDownToast {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .earnings-steps-grid {
    grid-template-columns: 1fr;
  }
  .ranks-header-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }
  .current-standing-box {
    text-align: left;
    width: 100%;
  }
}


.play-modes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .play-modes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .play-modes-grid {
    grid-template-columns: 1fr;
  }
}

.play-mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  min-height: 270px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.play-mode-card:hover {
  transform: translateY(-6px);
  border-color: var(--antique-gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px var(--royal-gold-glow);
}

.play-mode-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(197, 160, 89, 0.14);
  color: var(--antique-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: transform 0.25s ease;
}

.play-mode-card:hover .play-mode-icon-box {
  transform: scale(1.08);
}

.play-mode-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin: 0;
}

.play-mode-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.play-mode-arrow {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--antique-gold);
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}


/* ==========================================================================
   DASHBOARD VIEW (AFTER LOGIN)
   ========================================================================== */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.has-active-user #dash-welcome-grant-box,
.has-active-user .landing-welcome-gift-banner {
  display: none !important;
}

/* Dashboard Top Hero Grid (Profile Mini Card + Matchmaking Card) */
.dash-top-hero-grid {
  display: grid;
  grid-template-columns: minmax(310px, 360px) 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .dash-top-hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 1. User Profile "Small Card" */
.dash-profile-mini-card {
  background: linear-gradient(145deg, #131417 0%, #0c0d10 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}

.dash-profile-mini-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
}

.dash-profile-mini-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-avatar-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.dash-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.35rem;
  border: 2px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  background-size: cover;
  background-position: center;
}

.dash-avatar-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #0c0d10;
  box-shadow: 0 0 8px #10B981;
}

.dash-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-profile-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.dash-profile-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-rating-pill {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.74rem;
}

.dash-bullet-sep {
  color: rgba(255, 255, 255, 0.2);
}

.dash-profile-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 6px;
}

.dash-mini-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-metric-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.dash-metric-value-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-metric-num {
  font-size: 1.05rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #FFFFFF;
}

.dash-metric-num.emerald {
  color: #10B981;
}

.dash-metric-unit {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* 2. Play Online Matchmaking Card */
.dash-matchmaking-hero-card {
  background: linear-gradient(145deg, #131417 0%, #0c0d10 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}

.dash-matchmaking-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.65), rgba(212, 175, 55, 0.35), transparent);
}

.dash-matchmaking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-mm-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dash-mm-badge-text {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #FFB703;
}

.dash-tc-active-desc {
  font-weight: 700;
  color: #F59E0B;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.dash-tc-chips-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-tc-chip {
  flex: 1;
  min-width: 78px;
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.dash-tc-chip:hover {
  background: #1a1b20;
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.dash-tc-chip.active {
  background: rgba(245, 158, 11, 0.14);
  border-color: #F59E0B;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.dash-tc-chip .tc-chip-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.dash-tc-chip.active .tc-chip-icon {
  transform: scale(1.15);
}

.dash-tc-chip .tc-chip-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.dash-tc-chip .tc-chip-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dash-tc-chip.active .tc-chip-tag {
  color: #F59E0B;
  font-weight: 700;
}

.dash-mm-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-btn-start-hero {
  background: linear-gradient(135deg, #FFB703 0%, #F59E0B 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 12px 24px;
  color: #120D00;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.42);
}

.dash-btn-start-hero:hover {
  background: linear-gradient(135deg, #FFC72C 0%, #FFAA00 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.6);
  color: #000000;
}

.dash-btn-friend-hero {
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 20px;
  color: #E2E8F0;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.dash-btn-friend-hero:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
  color: #F59E0B;
}

.dash-btn-link-hero {
  width: 44px;
  height: 44px;
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-btn-link-hero:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.dashboard-greeting-box {
  margin-bottom: 24px;
}

.dashboard-greeting-title {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.dashboard-greeting-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Top 3 Stats Grid */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.dash-stat-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
}

.dash-stat-delta {
  font-size: 0.72rem;
  color: var(--emerald-accent);
  font-weight: 700;
}

/* Continue Playing Card */
.continue-game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  transition: all var(--trans-fast);
}

.continue-game-card:hover {
  border-color: var(--antique-gold);
}

.continue-game-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.continue-game-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FF3366, #FF9900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.continue-game-meta h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.continue-game-meta p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.quick-action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--trans-fast);
  color: var(--text-primary);
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--antique-gold);
  background: rgba(197, 160, 89, 0.08);
}

.quick-action-icon {
  color: var(--antique-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2px;
  display: block;
}

.quick-action-title {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Improve Your Game Banner */
.improve-game-card {
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.35), rgba(197, 160, 89, 0.15));
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.improve-game-text h3 {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.improve-game-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Upcoming Tournaments List */
.upcoming-tourneys-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upcoming-tourneys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upcoming-tourneys-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.tourney-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tourney-item-row:last-child {
  border-bottom: none;
}

.tourney-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tourney-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(197, 160, 89, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--antique-gold);
}

.tourney-item-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 2px;
}

.tourney-item-name {
  font-size: 0.9rem;
  font-weight: 800;
}

.tourney-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tourney-item-prize {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--antique-gold);
}

/* ==========================================================================
   PROFILE VIEW & RATING PROGRESS — REDESIGNED CAREER HUB
   ========================================================================== */
.profile-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 40px;
}

/* 1. Compact Player Identity Card */
.profile-identity-card {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
}

.profile-identity-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar-frame {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid var(--royal-gold, #D4AF37);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  background: url('/assets/avatar_default.webp') center / cover no-repeat, linear-gradient(135deg, var(--antique-gold, #D4AF37), #7C5A1C);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.profile-avatar-frame:hover {
  transform: scale(1.04);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.45);
}

.profile-avatar-edit-chip {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--royal-gold, #D4AF37);
  color: #0A0B0E;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0E121A;
  font-size: 10px;
  transition: transform 0.15s ease;
}

.profile-avatar-edit-chip span[data-icon],
.profile-avatar-edit-chip svg {
  width: 11px;
  height: 11px;
}

.profile-avatar-frame:hover .profile-avatar-edit-chip {
  transform: scale(1.15);
}

.profile-online-indicator {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-info-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-display-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.2;
}

.profile-badge-chip {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--royal-gold, #D4AF37);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.profile-badge-chip.guest {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.35);
}

.profile-badge-chip.registered {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.35);
}

.profile-handle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #94A3B8;
  flex-wrap: wrap;
}

.profile-handle {
  font-family: var(--font-mono, monospace);
  color: #94A3B8;
}

.profile-meta-divider {
  color: rgba(255, 255, 255, 0.2);
}

.profile-class-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--royal-gold, #D4AF37);
}

.profile-season-tag {
  font-size: 0.75rem;
  color: #64748B;
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-claim-account {
  background: linear-gradient(135deg, #FFB703, #F59E0B);
  color: #0A0B0E;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
  transition: all 0.15s ease;
}

.btn-claim-account:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
}

.btn-profile-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-profile-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-notices-action {
  position: relative;
  padding: 6px 10px;
}

.notices-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  position: absolute;
  top: 5px;
  right: 5px;
  display: none;
}

/* 2. Compact Key Chess Statistics Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.profile-stat-tile {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.profile-stat-tile.active-stat-tile {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), #0E121A);
}

.stat-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94A3B8;
}

.stat-tile-icon {
  width: 14px;
  height: 14px;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-tile-icon svg {
  width: 100%;
  height: 100%;
}

.stat-tile-number {
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFFFFF;
  font-family: var(--font-mono, monospace);
  line-height: 1.1;
  margin: 2px 0;
}

.stat-tile-sub {
  font-size: 0.72rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Integrated Game Mode Tabs */
.profile-mode-selector-wrap {
  margin: 2px 0;
}

.profile-mode-tabs {
  display: flex;
  background: rgba(14, 18, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  width: 100%;
}

.mode-tab-btn {
  flex: 1;
  height: 36px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #94A3B8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.mode-tab-btn span[data-icon],
.mode-tab-btn svg {
  width: 14px;
  height: 14px;
}

.mode-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.45);
  color: var(--royal-gold, #D4AF37);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* 4. Two-Column Workspace Layout on Desktop */
.profile-workspace-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 14px;
  align-items: start;
}

.profile-main-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-side-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Rating Chart Card */
.rating-chart-card {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.rating-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.chart-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.chart-current-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.chart-rating-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.25rem;
  font-weight: 900;
  color: #FFFFFF;
}

.chart-delta-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.rating-timeframe-btns {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.timeframe-btn {
  background: transparent;
  border: none;
  color: #64748B;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.timeframe-btn:hover {
  color: #FFFFFF;
}

.timeframe-btn.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--royal-gold, #D4AF37);
  font-weight: 800;
}

.svg-chart-container {
  width: 100%;
  height: 160px;
  position: relative;
}

/* Authentic Empty State for Rating Chart */
.rating-chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 160px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  padding: 16px;
}

.empty-chart-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  color: var(--royal-gold, #D4AF37);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.empty-chart-icon span[data-icon],
.empty-chart-icon svg {
  width: 16px;
  height: 16px;
}

.empty-chart-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 4px 0;
}

.empty-chart-desc {
  font-size: 0.74rem;
  color: #64748B;
  max-width: 320px;
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.btn-empty-play {
  font-size: 0.75rem !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
}

/* Recent Games Match History */
.recent-games-card {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.recent-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.recent-games-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.recent-games-subtitle {
  font-size: 0.75rem;
  color: #64748B;
}

.btn-play-shortcut {
  font-size: 0.75rem;
  padding: 4px 10px;
}

.recent-games-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  gap: 8px;
  transition: background 0.15s ease;
}

.recent-game-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.game-opponent-col {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.game-opp-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #0A0B0E;
  background: linear-gradient(135deg, var(--royal-gold, #D4AF37), #B8860B);
  flex-shrink: 0;
}

.game-opp-info {
  min-width: 0;
  overflow: hidden;
}

.game-opp-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-opp-meta {
  font-size: 0.7rem;
  color: #64748B;
}

.game-result-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.game-result-chip {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.game-result-chip.result-win {
  background: rgba(16, 185, 129, 0.18);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.game-result-chip.result-loss {
  background: rgba(225, 29, 72, 0.18);
  color: #FB7185;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.game-result-chip.result-draw {
  background: rgba(212, 175, 55, 0.18);
  color: #F59E0B;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.btn-analyze-match {
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 5px;
}

.game-date-col {
  font-size: 0.7rem;
  color: #64748B;
  flex-shrink: 0;
  width: 50px;
  text-align: right;
}

.recent-games-empty {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

/* Right Sidebar Cards */
.outcome-distribution-card {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.outcome-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.outcome-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.outcome-card-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748B;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.outcome-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.outcome-chart-wrapper {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.outcome-legend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.outcome-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.outcome-legend-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94A3B8;
}

.outcome-legend-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-wins { background: #10B981; }
.dot-losses { background: #E11D48; }
.dot-draws { background: #D4AF37; }

.outcome-stat-number {
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  color: #FFFFFF;
}

.outcome-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: 12px;
}

.footer-stat-label {
  font-size: 0.68rem;
  color: #64748B;
}

.footer-stat-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 800;
  color: #FFFFFF;
}

.footer-stat-val.val-green {
  color: #10B981;
}

/* Progression Card */
.progression-card {
  background: #0E121A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.progression-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progression-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.progression-season-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--royal-gold, #D4AF37);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.class-ladder-widget {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.ladder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ladder-current-label {
  font-size: 0.72rem;
  color: #64748B;
}

.ladder-current-val {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--royal-gold, #D4AF37);
}

.ladder-steps-bar {
  display: flex;
  gap: 4px;
}

.ladder-step {
  flex: 1;
  height: 26px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748B;
  transition: all 0.2s ease;
}

.ladder-step.active {
  background: rgba(212, 175, 55, 0.22);
  border-color: rgba(212, 175, 55, 0.6);
  color: var(--royal-gold, #D4AF37);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.ladder-step.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10B981;
}

.progression-perks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progression-perk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 7px;
}

.perk-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--royal-gold, #D4AF37);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.perk-info {
  flex: 1;
  min-width: 0;
}

.perk-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
}

.perk-sub {
  font-size: 0.7rem;
  color: #64748B;
}

.perk-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.perk-rating-pill {
  font-size: 0.68rem;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  color: var(--royal-gold, #D4AF37);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   SETTINGS & CHESS THEMES SHOWCASE
   ========================================================================== */
.settings-container {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.theme-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-mode-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--trans-fast);
  color: var(--text-primary);
}

.theme-mode-btn.active, .theme-mode-btn:hover {
  border-color: var(--antique-gold);
  background: rgba(197, 160, 89, 0.12);
}

.themes-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.theme-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all var(--trans-fast);
  position: relative;
}

.theme-preview-card:hover {
  transform: translateY(-2px);
  border-color: var(--antique-gold);
  box-shadow: var(--shadow-md);
}


/* Game Over Dialog Modal */
.game-over-modal-box {
  max-width: 440px;
  width: 92%;
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  padding: 20px 24px 24px !important;
  position: relative;
  box-sizing: border-box;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.game-over-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 2px;
}

.game-over-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.game-over-icon-btn:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: rgba(0, 240, 255, 0.5);
  color: var(--vice-cyan, #00F0FF);
  transform: scale(1.05);
}

.game-over-icon-btn:active {
  transform: scale(0.95);
}

.modal-close-btn-gameover {
  font-size: 1.1rem;
}

.game-over-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.game-over-trophy {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(255, 183, 3, 0.22) 0%, rgba(0, 240, 255, 0.05) 70%);
  border: 1.5px solid rgba(255, 183, 3, 0.5);
  color: var(--vice-amber, #FFB703);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.25);
  margin-top: -6px;
  transition: all 0.25s ease;
}

.game-over-trophy.outcome-win {
  background: radial-gradient(circle, rgba(255, 183, 3, 0.3) 0%, rgba(0, 240, 255, 0.08) 70%);
  border: 1.5px solid var(--vice-amber, #FFB703);
  color: var(--vice-amber, #FFB703);
  box-shadow: 0 0 28px rgba(255, 183, 3, 0.4), 0 0 12px rgba(0, 240, 255, 0.2);
}

.game-over-trophy.outcome-loss {
  background: radial-gradient(circle, rgba(255, 46, 147, 0.25) 0%, rgba(15, 23, 42, 0.6) 70%);
  border: 1.5px solid var(--vice-magenta, #FF2E93);
  color: var(--vice-magenta, #FF2E93);
  box-shadow: 0 0 24px rgba(255, 46, 147, 0.3);
}

.game-over-trophy.outcome-draw {
  background: radial-gradient(circle, rgba(148, 163, 184, 0.2) 0%, rgba(15, 23, 42, 0.6) 70%);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  color: #CBD5E1;
  box-shadow: 0 0 20px rgba(148, 163, 184, 0.18);
}

.game-over-trophy svg {
  width: 28px;
  height: 28px;
}

.game-over-trophy .piece {
  width: 38px;
  height: 38px;
  background-size: 100% 100%;
  pointer-events: none;
}

.game-over-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

.game-over-reason {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: -8px;
}

.game-over-score {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--vice-cyan, #00F0FF);
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
  margin: -4px 0 0;
  line-height: 1;
}

.game-over-players-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-sizing: border-box;
}

.game-over-player-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  min-width: 0;
}

.game-over-player-meta:last-child {
  text-align: right;
  align-items: flex-end;
}

.game-over-player-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-over-player-meta:last-child .game-over-player-label {
  flex-direction: row-reverse;
}

.game-over-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.game-over-dot.white-dot {
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

.game-over-dot.black-dot {
  background: #222222;
  border: 1.5px solid #888888;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.game-over-player-meta span[id$="-rating"] {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.game-over-vs-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--vice-cyan, #00F0FF);
  padding: 3px 8px;
  background: rgba(0, 240, 255, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.game-over-primary-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.game-over-action-btn {
  flex: 1;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#game-over-rematch-btn {
  background: linear-gradient(135deg, #FF2E93 0%, #FF8A00 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 18px rgba(255, 46, 147, 0.35) !important;
}

#game-over-rematch-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 24px rgba(255, 46, 147, 0.5) !important;
}

#game-over-new-game-btn {
  background: rgba(0, 240, 255, 0.08) !important;
  color: var(--vice-cyan, #00F0FF) !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
}

#game-over-new-game-btn:hover {
  background: rgba(0, 240, 255, 0.16) !important;
  border-color: var(--vice-cyan, #00F0FF) !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25) !important;
  transform: translateY(-1px);
}

.btn-game-over-review {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary, #9299A6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.btn-game-over-review:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--vice-cyan, #00F0FF);
  transform: translateY(-1px);
}

.btn-game-over-review:active {
  transform: translateY(0);
}

/* ==========================================================================
   APP SIDEBAR LAYOUT (MATCHING ULTRA-PREMIUM MOCKUP)
   ========================================================================== */
.app-layout-sidebar {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.app-sidebar {
  width: 230px;
  min-width: 230px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  z-index: 120;
  overflow-y: auto;
  transition: all var(--trans-normal);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 24px 10px;
  cursor: pointer;
  user-select: none;
}

.brand-icon-crown {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon-crown svg,
.brand-icon-crown img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Responsive logo sizing: larger on desktop, compact on mobile */
.ec-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease, box-shadow 0.25s ease;
}

.elite-brand-crest {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.sidebar-brand:hover .elite-brand-crest,
.sidebar-brand:hover .ec-logo-img,
.topbar-mobile-brand:hover .elite-brand-crest,
.topbar-mobile-brand:hover .ec-logo-img {
  transform: scale(1.08) rotate(-1deg);
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.65));
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

.sidebar-brand-title {
  display: inline-flex;
  align-items: center;
  font-family: 'Cinzel', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
}

.brand-title-elite {
  color: #FFFFFF;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-title-chess {
  background: linear-gradient(135deg, #FFF4B8 0%, #F59E0B 50%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.sidebar-brand:hover .brand-title-chess {
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.45));
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
  text-align: left;
  user-select: none;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.sidebar-btn.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, rgba(245, 158, 11, 0.02) 100%);
  color: #FFB703;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-left: 3px solid #FFB703;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), inset 0 0 12px rgba(245, 158, 11, 0.08);
}

.sidebar-btn.active .sidebar-icon svg {
  filter: drop-shadow(0 0 6px currentColor);
}

.sidebar-btn .sidebar-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-btn .sidebar-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  stroke-width: 2px;
}

body.light-theme .sidebar-btn {
  color: var(--text-secondary);
}

body.light-theme .sidebar-btn:hover {
  background: rgba(15, 45, 31, 0.06);
  color: var(--forest-green);
  border-color: rgba(15, 45, 31, 0.12);
}

body.light-theme .sidebar-btn.active {
  background: rgba(197, 160, 89, 0.22);
  color: #7E5B1A;
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 4px 12px rgba(158, 116, 39, 0.15);
}

.sidebar-btn.nav-btn-disabled,
.sidebar-btn[aria-disabled="true"] {
  opacity: 0.62;
  cursor: not-allowed !important;
  padding: 10px 6px 10px 14px;
  gap: 5px;
}

.sidebar-btn.nav-btn-disabled .sidebar-icon {
  margin-right: 9px;
}

.sidebar-btn.nav-btn-disabled .sidebar-btn-label {
  font-size: 0.80rem;
  white-space: nowrap;
}

.sidebar-btn.nav-btn-disabled:hover,
.sidebar-btn[aria-disabled="true"]:hover,
.sidebar-btn.nav-btn-disabled:focus-visible {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.sidebar-btn.nav-btn-disabled:hover [data-icon] > svg {
  transform: none !important;
}

.nav-coming-soon-badge {
  margin-left: auto;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.15px;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.14);
  color: #F5C518;
  border: 1px solid rgba(212, 175, 55, 0.34);
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

body.light-theme .sidebar-btn.nav-btn-disabled:hover,
html.light-theme .sidebar-btn.nav-btn-disabled:hover {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body.light-theme .nav-coming-soon-badge,
html.light-theme .nav-coming-soon-badge {
  background: rgba(212, 175, 55, 0.16) !important;
  color: #92400E !important;
  border-color: rgba(180, 83, 9, 0.3) !important;
}

.app-main-content {
  flex: 1;
  min-width: 0;
  margin-left: 230px;
  width: calc(100% - 230px);
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* App Topbar in Content Area (Fixed below desktop sidebar) */
.app-topbar {
  position: fixed;
  top: 0;
  left: 230px;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px;
  min-height: 42px;
  max-height: 44px;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
}

.topbar-search {
  position: relative;
  width: 230px;
  max-width: 100%;
}

.topbar-search input {
  width: 100%;
  padding: 5px 10px 5px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.75rem;
  height: 28px;
  box-sizing: border-box;
  outline: none;
  transition: all var(--trans-fast);
}

.topbar-search input:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.topbar-search input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #38BDF8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.topbar-search .search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
}

.topbar-search .search-icon svg {
  width: 13px;
  height: 13px;
  display: block;
  stroke: currentColor;
  stroke-width: 2px;
}

/* Global Search Dropdown */
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 440px;
  max-width: min(460px, 92vw);
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1200;
  padding: 10px 0;
  animation: fadeInDown 0.18s ease-out;
}

body.light-theme .global-search-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(197, 160, 89, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.global-search-dropdown::-webkit-scrollbar {
  width: 6px;
}

.global-search-dropdown::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.35);
  border-radius: 4px;
}

.search-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 4px 16px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--antique-gold);
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
  background: rgba(197, 160, 89, 0.12);
}

body.light-theme .search-result-item:hover,
body.light-theme .search-result-item.highlighted {
  background: rgba(197, 160, 89, 0.18);
}

.search-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.search-item-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #FFFFFF;
  flex-shrink: 0;
}

.search-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-action-btn {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm, 6px);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.search-action-btn:hover {
  transform: scale(1.04);
  filter: brightness(1.15);
}

.search-action-challenge {
  background: linear-gradient(135deg, var(--antique-gold), #8A6520);
  color: #0E1217;
  font-weight: 800;
}

.search-action-play {
  background: linear-gradient(135deg, #00f0ff, #0088cc);
  color: #0E1217;
  font-weight: 800;
}

.search-action-open {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-glass-light);
}

.search-empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

body.light-theme .topbar-search input {
  background: rgba(15, 45, 31, 0.04);
  border: 1px solid rgba(15, 45, 31, 0.16);
  color: var(--text-primary);
}

body.light-theme .topbar-search input:focus {
  background: #FFFFFF;
  border-color: var(--antique-gold);
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.3);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

@media (max-width: 1280px) {
  .topbar-search {
    width: 190px;
  }
  #header-sunday-timer-badge .header-sunday-label {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  .topbar-search {
    width: 160px;
  }
  .user-meta-name {
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-topbar .user-tier-badge {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .topbar-search {
    width: 135px;
  }
  #header-sunday-timer-badge {
    display: none !important;
  }
  .desktop-topbar-utils #toggle-voice-btn,
  .desktop-topbar-utils #toggle-sound-btn {
    display: none !important;
  }
}

/* Online Indicator Badge */
.online-indicator-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 26px;
  box-sizing: border-box;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--emerald-accent);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.online-indicator-badge:hover {
  background: rgba(16, 185, 129, 0.22);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   HIERARCHICAL TIER-GATED CHAT SYSTEM STYLES
   ========================================================================== */
.chat-channel-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-channel-tabs::-webkit-scrollbar {
  display: none;
}

.chat-channel-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--trans-fast);
}

.chat-channel-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.chat-channel-tab.active {
  background: #14171E !important;
  color: #FFFFFF !important;
  border-color: rgba(212, 175, 55, 0.45) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(212, 175, 55, 0.05) !important;
}

.chat-channel-tab.tab-locked {
  opacity: 0.55;
  border-style: dashed;
}

.chat-channel-tab.tab-locked:hover {
  border-color: #EF4444;
  color: #EF4444;
}

.chat-tier-lock-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  color: #FCA5A5;
  font-size: 0.82rem;
  margin: 10px 14px 0 14px;
  animation: fadeIn 0.3s ease;
}

/* User Tier Badges - Standard Esports Minimalist Styling */
.user-tier-badge.tier-elite {
  background: rgba(255, 183, 3, 0.12);
  color: #FFB703;
  border: 1px solid rgba(255, 183, 3, 0.4);
}

.user-tier-badge.tier-a {
  background: rgba(225, 29, 72, 0.12);
  color: #E11D48;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.user-tier-badge.tier-b {
  background: rgba(6, 182, 212, 0.12);
  color: #06B6D4;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.user-tier-badge.tier-c {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.user-tier-badge.tier-d {
  background: rgba(148, 163, 184, 0.12);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* ==========================================================================
   MATCHMAKING RADAR & SEARCHING OVERLAY
   ========================================================================== */
.radar-modal-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  max-width: 460px;
}

.radar-animation-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.3);
}

.radar-circle.c1 { width: 60px; height: 60px; }
.radar-circle.c2 { width: 110px; height: 110px; }
.radar-circle.c3 { width: 160px; height: 160px; }

.radar-pulse-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--antique-gold);
  animation: radarWave 2.4s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.radar-pulse-ring:nth-child(2) {
  animation-delay: 0.8s;
}

.radar-pulse-ring:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes radarWave {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3); opacity: 0; }
}

.radar-center-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--antique-gold), #7C5A1C);
  color: #0A120E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 2;
  box-shadow: 0 0 20px var(--royal-gold-glow);
}

.radar-timer-ticker {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--antique-gold);
  letter-spacing: 1px;
}

/* ==========================================================================
   LIVE PLAYERS DIRECTORY
   ========================================================================== */
.player-directory-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--trans-fast);
}

.player-directory-card:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 160, 89, 0.4);
}

.player-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator-pill {
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-dot-green { background: #10B981; box-shadow: 0 0 6px #10B981; }
.status-dot-yellow { background: #F59E0B; box-shadow: 0 0 6px #F59E0B; }
.status-dot-red { background: #EF4444; }

/* In-Game Tabbed Right Panel */
.game-tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
}

.game-tab-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.game-tab-btn:hover {
  color: var(--text-primary);
}

.game-tab-btn.active {
  color: var(--antique-gold);
  border-bottom-color: var(--antique-gold);
  background: rgba(255, 255, 255, 0.03);
}

/* In-Game Chat Unread Star Indicator */
.chat-tab-unread-star {
  display: inline-block;
  color: #F59E0B;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  margin-left: 4px;
  vertical-align: top;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  animation: inGameStarPulse 1.8s ease-in-out infinite;
}

@keyframes inGameStarPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
    color: #F59E0B;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    color: #FDE68A;
    text-shadow: 0 0 12px rgba(253, 230, 138, 0.9);
  }
}

.game-tab-btn.has-unread-star {
  color: #FDE68A;
}

/* In-Game Chat Floating Notification Bubble */
.moves-sidebar {
  position: relative;
}

.in-game-chat-notify-bubble {
  position: absolute;
  top: 44px;
  left: 10px;
  right: 10px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(15, 18, 25, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 14px rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transform-origin: top center;
  box-sizing: border-box;
}

.in-game-chat-notify-bubble.animate-pop-in {
  animation: notifyBubblePopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.in-game-chat-notify-bubble.animate-fade-out {
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

@keyframes notifyBubblePopIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notify-bubble-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.notify-bubble-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--antique-gold, #D4AF37);
  flex-shrink: 0;
}

.notify-bubble-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.notify-bubble-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-bubble-preview {
  font-size: 0.7rem;
  color: var(--text-muted, #94A3B8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.notify-bubble-action {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--antique-gold, #D4AF37);
  flex-shrink: 0;
  padding: 3px 8px;
  background: rgba(212, 175, 55, 0.12);
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  transition: background var(--trans-fast, 0.15s);
}

.notify-bubble-action:hover {
  background: rgba(212, 175, 55, 0.24);
}

.notify-bubble-dismiss {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--trans-fast, 0.15s);
}

.notify-bubble-dismiss:hover {
  color: #FFFFFF;
}

.live-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.player-tier-filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.player-tier-filter-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.player-tier-filter-btn.active {
  background: var(--antique-gold);
  color: #0A120E;
  border-color: var(--antique-gold);
  box-shadow: 0 2px 8px var(--royal-gold-glow);
}

.btn-match-tc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-match-tc.active {
  border-color: var(--antique-gold);
  background: rgba(197, 160, 89, 0.15);
  box-shadow: 0 0 16px var(--royal-gold-glow);
  transform: translateY(-2px);
}


.bot-quote-toast {
  position: fixed;
  bottom: 84px;
  right: 24px;
  background: rgba(10, 10, 14, 0.95);
  border: 1px solid var(--antique-gold);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #FFF;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 15px var(--royal-gold-glow);
  z-index: 9999;
  transition: opacity 0.4s ease;
}

@media (max-width: 900px) {
  .app-sidebar {
    display: none !important;
  }
  .app-main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .app-topbar {
    left: 0 !important;
  }
}

/* ==========================================================================
   LANDING PAGE LUXURY ANIMATIONS & SHOWCASE
   ========================================================================== */
.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--antique-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
  animation: none;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.landing-glow-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.landing-glow-title .gold-gradient-text {
  background: linear-gradient(135deg, #FFF3D1 0%, var(--antique-gold) 45%, #B8860B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}


/* ==========================================================================
/* ==========================================================================
   AUTH MODAL & ACCOUNT SECURITY STYLES
   ========================================================================== */
#auth-modal.auth-modal-overlay {
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: safe center;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#auth-modal .modal-box.auth-dialog {
  width: 100%;
  max-width: 432px;
  max-height: none;
  overflow: visible;
  padding: 20px 24px 18px;
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #F1F5F9;
  color-scheme: dark;
  text-align: left;
  box-sizing: border-box;
}

.auth-dialog [data-icon] {
  color: currentColor !important;
}

.auth-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.auth-brand-mark {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  min-height: 36px;
  max-height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.18);
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
}

.auth-brand-logo-img {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  user-select: none;
  flex-shrink: 0;
}

.auth-title-group {
  min-width: 0;
}

.auth-dialog #auth-modal-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.25;
  color: #F8FAFC;
  letter-spacing: -0.01em;
}

.auth-dialog #auth-modal-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #94A3B8;
}

.auth-dialog .auth-close-btn {
  position: static;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.auth-dialog .auth-close-btn:hover {
  background: rgba(255, 46, 147, 0.2);
  border-color: rgba(255, 46, 147, 0.5);
  color: #FFFFFF;
}

.auth-dialog .auth-close-btn span[data-icon],
.auth-dialog .auth-eye-btn span[data-icon],
.auth-dialog .auth-inline-secondary-btn span[data-icon],
.auth-dialog .auth-guest-btn span[data-icon],
.auth-dialog .auth-back-link span[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-dialog .auth-close-btn svg,
.auth-dialog .auth-eye-btn svg {
  width: 16px;
  height: 16px;
}

.auth-dialog .auth-inline-secondary-btn svg,
.auth-dialog .auth-guest-btn svg,
.auth-dialog .auth-back-link svg,
.auth-dialog .auth-welcome-icon svg {
  width: 14px;
  height: 14px;
}

.auth-tabs-row {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab-btn {
  flex: 1;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #94A3B8;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.auth-tab-btn:hover:not(.active) {
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab-btn.active {
  background: rgba(245, 158, 11, 0.14);
  color: #FBBF24;
  font-weight: 700;
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.14);
}

.auth-feedback-slot {
  min-height: 34px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-welcome-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #E2E8F0;
  font-size: 0.75rem;
  line-height: 1.3;
  box-sizing: border-box;
}

.auth-welcome-chip strong {
  color: #FBBF24;
  font-weight: 700;
}

.auth-welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FBBF24;
  flex-shrink: 0;
}

.auth-views-wrap {
  position: relative;
}

.auth-form {
  animation: authFadeIn 0.16s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 1;
  }
}

.auth-field-cluster {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
  text-align: left;
}

.auth-dialog .auth-field-cluster .auth-input-group {
  margin-bottom: 0;
}

.auth-input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #CBD5E1;
  letter-spacing: 0.01em;
  line-height: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.auth-dialog .auth-input-group label {
  height: 20px;
  overflow: hidden;
}

.auth-label-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.auth-label-muted {
  color: #64748B;
  font-weight: 500;
}

.auth-required-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 46, 147, 0.12);
  border: 1px solid rgba(255, 46, 147, 0.3);
  color: var(--vice-magenta, #FF2E93);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-field-error {
  font-size: 0.71rem;
  font-weight: 600;
  color: #F87171;
  line-height: 1.2;
  text-align: right;
  flex-shrink: 0;
}

.auth-field-meta,
.auth-otp-meta {
  font-size: 0.7rem;
  font-weight: 500;
  color: #94A3B8;
}

.auth-ref-bonus {
  color: #FBBF24;
  font-weight: 600;
}

.auth-input-group input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary, #FFF);
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
  transition: all var(--trans-fast);
}

.auth-input-group input:focus {
  border-color: rgba(245, 158, 11, 0.68);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

/* Integrated Input Shells inside redesigned Auth Dialog */
.auth-dialog .auth-input-shell {
  display: flex;
  align-items: center;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-dialog .auth-input-shell:focus-within {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.auth-dialog .auth-input-group.error .auth-input-shell {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.auth-dialog .auth-input-shell input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 11px;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  color: #F8FAFC;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
}

.auth-dialog .auth-input-shell input::placeholder {
  color: #64748B;
  font-weight: 400;
  text-transform: none !important;
}

#signup-referral:not(:placeholder-shown) {
  text-transform: uppercase;
}

.auth-eye-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-eye-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.05);
}

.auth-inline-secondary-btn {
  height: 28px;
  margin: 3px 4px 3px 0;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-inline-secondary-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #FBBF24;
}

.auth-inline-secondary-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.auth-dialog .auth-primary-cta {
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFD166 0%, #FFB703 55%, #F59E0B 100%) !important;
  color: #090B10 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3) !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-dialog .auth-primary-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.42) !important;
}

.auth-dialog .auth-primary-cta.loading {
  opacity: 0.78;
}

.auth-dialog-footer {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-guest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #F1F5F9;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-guest-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #FBBF24;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.auth-footer-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: #94A3B8;
  margin-left: auto;
}

.auth-footer-switch-btn {
  border: none;
  background: transparent;
  padding: 3px 2px;
  color: #FBBF24;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-footer-switch-btn:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-forgot-topbar {
  margin-bottom: 8px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 2px 0;
  color: #94A3B8;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-back-link:hover {
  color: #F8FAFC;
}

/* Light Theme Claim Inputs (separate from .auth-dialog .auth-input-shell) */
html.light-theme #modal-claim-account .auth-input-group input,
body.light-theme #modal-claim-account .auth-input-group input,
html.light-theme #claim-account-otp,
body.light-theme #claim-account-otp,
html.light-theme .input-with-action input,
body.light-theme .input-with-action input {
  background: #F8FAFC !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
  font-weight: 600 !important;
}

html.light-theme #modal-claim-account .auth-input-group input:focus,
body.light-theme #modal-claim-account .auth-input-group input:focus,
html.light-theme #claim-account-otp:focus,
body.light-theme #claim-account-otp:focus,
html.light-theme .input-with-action input:focus,
body.light-theme .input-with-action input:focus {
  background: #FFFFFF !important;
  border-color: #D4AF37 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25) !important;
}

html.light-theme input::selection,
body.light-theme input::selection {
  background: #D4AF37 !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-action input {
  flex: 1;
}

.btn-roll-dice {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--antique-gold);
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 38px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn-roll-dice:hover {
  background: rgba(197, 160, 89, 0.18);
  border-color: var(--antique-gold);
  transform: scale(1.02);
}

.auth-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
}

.auth-terms-row.error {
  border-color: rgba(239, 68, 68, 0.72);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.auth-terms-checkbox {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 2px 0 0;
  accent-color: var(--antique-gold);
  cursor: pointer;
}

.auth-dialog .auth-terms-checkbox {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.14s ease, border-color 0.14s ease;
}

.auth-dialog .auth-terms-checkbox:hover {
  border-color: rgba(212, 175, 55, 0.55);
}

.auth-dialog .auth-terms-checkbox:checked {
  background: #D4AF37;
  border-color: #D4AF37;
}

.auth-dialog .auth-terms-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #0F172A;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-terms-text {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #94A3B8;
}

.auth-terms-text label {
  cursor: pointer;
}

.auth-terms-inline-err {
  margin-left: 6px;
}

.auth-terms-text a {
  color: #D4AF37;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-terms-text a:hover {
  color: #F3D06B;
}

html.light-theme .auth-terms-row,
body.light-theme .auth-terms-row,
html[data-theme="light"] .auth-terms-row,
body[data-theme="light"] .auth-terms-row {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

html.light-theme .auth-terms-text,
body.light-theme .auth-terms-text,
html[data-theme="light"] .auth-terms-text,
body[data-theme="light"] .auth-terms-text {
  color: #475569;
}

html.light-theme .auth-terms-text a,
body.light-theme .auth-terms-text a,
html[data-theme="light"] .auth-terms-text a,
body[data-theme="light"] .auth-terms-text a {
  color: #B45309;
}

.auth-alert-box {
  display: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  margin-bottom: 0;
  line-height: 1.3;
  min-height: 34px;
  box-sizing: border-box;
}

.auth-alert-box.error {
  display: flex;
  align-items: center;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.success {
  display: flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
}

.auth-alert-box.info {
  display: flex;
  align-items: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.32);
  color: #F3D06B;
}

.btn-otp-action {
  min-width: 84px;
  justify-content: center;
}

.btn-otp-action:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.otp-code-input {
  letter-spacing: 0.22em;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.otp-code-input::placeholder {
  letter-spacing: normal;
  font-weight: 400;
  font-family: inherit;
}

.email-fallback-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.34);
  margin: 4px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-fallback-text {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #FDE68A;
}

.email-fallback-btn {
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-color: rgba(245, 158, 11, 0.42);
  color: #FCD34D;
}

.email-fallback-btn:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: #F59E0B;
}

#settings-email-status-badge.verified {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #34D399;
}

#settings-email-status-badge.unverified {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #FBBF24;
}

.auth-forgot-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.auth-text-link {
  color: #D4AF37;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--trans-fast), opacity var(--trans-fast);
}

.auth-text-link:hover {
  color: #F3D06B;
  text-decoration: underline;
}

/* ==========================================================================
   PERFECT SLOW LUXURY ANIMATIONS & FLUID MOTION SUITE
   - 0.5s - 0.75s Cubic-Bezier Ease-Out View Reveals
   - Ambient Sine-Wave Float for Badges & Crowns
   - Shimmer Sheen Sweeps on Buttons & Glass Cards
   - Chess Piece Move & Square Highlights
   - Floating CSS Tooltips with Smooth Reveal
   ========================================================================== */

/* 1. Crisp Fluid View Transitions */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: viewRevealSlow 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes viewRevealSlow {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. Calm Brand Presence (Zero Distracting Idle Bobbing) */
.landing-hero-badge, .brand-icon-crown {
  animation: none;
}

@keyframes royalFloatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

.landing-glow-title .gold-gradient-text {
  animation: none !important;
  filter: none !important;
}

@keyframes goldGlowPulse {
  0%, 100% {
    filter: none;
  }
}

.landing-demo-card {
  animation: ecRiseIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slowAuraGlow {
  0% {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(197, 160, 89, 0.15);
  }
  100% {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 30px rgba(197, 160, 89, 0.35);
  }
}

/* 3. Luxury 45-degree Shimmer Sheen on Primary Elements */
.btn-royal-primary, .landing-hero-badge {
  position: relative;
  overflow: hidden;
}

.btn-royal-primary::after, .landing-hero-badge::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -70%;
  width: 45%;
  height: 220%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: slowSheen 6.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes slowSheen {
  0% { left: -80%; }
  28% { left: 160%; }
  100% { left: 160%; }
}

/* 4. Chess Piece & Square Transitions */
.chessboard .square {
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.chessboard .piece {
  transition: filter 0.2s ease;
}

.chessboard .piece:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}

.square.last-move-from, .square.last-move-to {
  animation: slowLastMovePulse 3.5s ease-in-out infinite alternate;
}

@keyframes slowLastMovePulse {
  0% {
    filter: brightness(1);
  }
  100% {
    filter: brightness(1.2) drop-shadow(0 0 8px var(--royal-gold-glow));
  }
}

/* 5. Slow Staggered Feature Card Entrance */
.landing-feature-card:nth-child(1) { animation: slowCardEnter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both; }
.landing-feature-card:nth-child(2) { animation: slowCardEnter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both; }
.landing-feature-card:nth-child(3) { animation: slowCardEnter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both; }
.landing-feature-card:nth-child(4) { animation: slowCardEnter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both; }
.landing-feature-card:nth-child(5) { animation: slowCardEnter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both; }
.landing-feature-card:nth-child(6) { animation: slowCardEnter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both; }

@keyframes slowCardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 6. Crisp Luxury Button Hover Motion */
.btn-royal-primary, .btn-royal-secondary, .action-btn-sm, .sidebar-btn, .mobile-nav-item, .quick-action-btn, .icon-btn-util {
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-royal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.35);
}

.btn-royal-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
}

.action-btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.sidebar-btn:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-item:hover, .mobile-nav-item:active {
  transform: translateY(-2px);
}

/* 7. Modal Scale Crisp Entrance (No Blur) */
.modal-overlay.active .modal-box {
  animation: modalSlowEntrance 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalSlowEntrance {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 8. Floating CSS Tooltips with Smooth Slow Reveal (Pointing Downward to prevent clipping) */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(10, 10, 14, 0.95);
  color: var(--antique-gold);
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(197, 160, 89, 0.4);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1200;
  backdrop-filter: blur(12px);
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Ensure right-aligned items in header do not overflow screen edge */
.topbar-actions > :nth-last-child(-n+3)[data-tooltip]::before {
  left: auto;
  right: 0;
  transform: translateY(-6px);
}

.topbar-actions > :nth-last-child(-n+3)[data-tooltip]:hover::before {
  transform: translateY(0);
}

/* ==========================================================================
   ELITECHESS ESPORTS MASTER LANDING PAGE DESIGN SYSTEM
   ========================================================================== */


/* Split Hero Layout - Two Column (Large Board Left, Matchmaking & Controls Right) */
.landing-hero-split {
  display: grid;
  grid-template-columns: minmax(460px, 560px) minmax(0, 1fr);
  gap: 52px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 36px 56px;
  box-sizing: border-box;
}

@media (max-width: 1140px) {
  .landing-hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
    padding: 24px 20px 44px;
  }
}

.landing-hero-board-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.landing-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

@media (max-width: 1140px) {
  .landing-hero-content {
    align-items: center;
  }
}

.landing-hero-title {
  font-size: clamp(2.25rem, 3.5vw, 3.45rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.4px;
  margin-bottom: 14px;
  color: var(--text-primary, #FFFFFF);
}

.landing-hero-subtitle {
  font-size: 1.02rem;
  color: var(--text-secondary, #94A3B8);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 580px;
}

/* Focused Single-Column Hero Action Area */
.landing-hero-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 490px;
  gap: 0;
  width: 100%;
  align-items: start;
}

@media (max-width: 720px) {
  .landing-hero-actions-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 0;
  }
}

/* QuickPlay Selector (Open, Borderless Layout) */
.landing-quickplay-box {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  width: 100%;
  box-shadow: none;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  position: relative;
}

.landing-hero-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.hero-game-controls-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  padding: 10px 2px 0;
  box-shadow: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.hero-controls-header {
  display: none;
}

.hero-controls-gear-icon {
  color: var(--antique-gold, #E5B842);
  display: inline-flex;
  align-items: center;
}

.hero-controls-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}

.hero-ctrl-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  color: #9CA3AF;
  font-family: var(--font-main, inherit);
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  width: auto;
  text-align: left;
  white-space: nowrap;
  box-sizing: border-box;
}

.hero-ctrl-btn [data-icon],
.hero-ctrl-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hero-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.hero-ctrl-btn:active {
  transform: scale(0.98);
}

.hero-premove-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 4px 12px;
  margin-top: 0;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.hero-premove-wrap:hover {
  background: transparent;
  opacity: 0.95;
}

.hero-live-arena-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.hero-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

.hero-live-sep {
  opacity: 0.4;
}

.hero-live-arena-strip strong {
  color: var(--antique-gold);
  font-weight: 800;
}

.hero-premove-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #CBD5E1;
  white-space: nowrap;
}

.hero-premove-icon {
  color: var(--antique-gold, #E5B842);
}

.hero-premove-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
  margin: 0;
}

.hero-premove-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.hero-premove-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  transition: all 0.25s ease;
}

.hero-premove-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-premove-switch input:checked + .hero-premove-slider {
  background: var(--antique-gold, #E5B842);
}

.hero-premove-switch input:checked + .hero-premove-slider:before {
  transform: translateX(16px);
  background: #0B0E14;
}

.quickplay-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--antique-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quickplay-pills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quickplay-pill {
  background: rgba(8, 10, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 52px;
  justify-content: center;
  white-space: nowrap;
}

.quickplay-pill:hover {
  background: rgba(255, 183, 3, 0.08);
  border-color: rgba(255, 183, 3, 0.45);
  color: #FFFFFF;
  box-shadow: none;
  transform: translateY(-1px);
}

.quickplay-pill.active {
  background: rgba(255, 183, 3, 0.14);
  border-color: rgba(255, 183, 3, 0.85);
  color: #FFB703;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.35);
}

.quickplay-pill.active .quickplay-pill-time {
  color: #FFFFFF;
  text-shadow: none;
}

.quickplay-pill-time {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 4px;
}

.quickplay-gold-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
}

.gold-ui-icon {
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.header-task-img {
  width: 18px;
  height: 18px;
}

.mobile-bell-img {
  width: 18px;
  height: 18px;
}

.btn-landing-quickplay {
  width: 100%;
  padding: 15px 22px;
  min-height: 52px;
  background: linear-gradient(135deg, #FFD166 0%, #FFB703 50%, #F59E0B 100%);
  color: #0A0B10;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-landing-quickplay::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-25deg);
  animation: viceButtonShimmer 4.5s infinite;
}

@keyframes viceButtonShimmer {
  0% { left: -100%; }
  25%, 100% { left: 200%; }
}

.btn-landing-quickplay:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-landing-quickplay:active {
  transform: scale(0.98) translateY(1px) !important;
}

.quickplay-subactions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.quickplay-sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  min-height: 42px;
  min-width: 0;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-social-proof-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.landing-proof-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-proof-item strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 800;
}

/* Interactive Playable Home Board (Clean, Borderless Canvas Mount) */
.landing-board-showcase-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  gap: 0;
  box-sizing: border-box;
}

#landing-board-mount {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  height: auto;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.55);
  border: none;
  box-sizing: border-box;
}

.home-board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  gap: 10px;
}

.home-board-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.08));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--antique-gold);
  white-space: nowrap;
}

.home-board-level-icon {
  display: inline-flex;
  align-items: center;
  color: var(--antique-gold);
}

.home-board-status-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-board-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-board-tool {
  padding: 6px 12px !important;
  min-height: 34px !important;
  font-size: 0.80rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Progressive Practice Board Level Strip [1, 2, 3, Play Now, 4, 5, 6...] */
.home-level-bar {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  padding: 6px 4px;
  background: rgba(10, 14, 22, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-lg, 12px);
  box-sizing: border-box;
  overflow: hidden;
}

.home-level-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px;
  box-sizing: border-box;
}

.home-level-scroll::-webkit-scrollbar {
  display: none;
}

.home-level-pill {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary, #94A3B8);
  font-family: var(--font-heading, inherit);
  font-size: 0.86rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.home-level-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  color: #FFFFFF;
}

.home-level-pill.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.15) 100%);
  border-color: #F59E0B;
  color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.home-level-pill.is-completed {
  border-color: rgba(16, 185, 129, 0.45);
  color: #10B981;
}

.home-level-pill.is-completed.active {
  border-color: #F59E0B;
  color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.btn-home-level-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: none;
  color: #0A0B0E;
  font-family: var(--font-heading, inherit);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  user-select: none;
  box-sizing: border-box;
}

.btn-home-level-play:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.btn-home-level-play:active {
  transform: scale(0.96);
}

.btn-home-level-play.is-playing {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-home-level-play.is-pulsing {
  animation: homePlayGlowPulse 0.75s ease;
}

@keyframes homePlayGlowPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35); }
}

/* FAQ Dedicated Page (#view-faq) */
#view-faq .faq-page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 6px 40px;
}

#view-faq .faq-page-header {
  text-align: center;
  margin-bottom: 24px;
}

#view-faq .faq-page-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 900;
  color: #FFFFFF;
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
}

#view-faq .faq-page-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary, #94A3B8);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Common Section Container */
.landing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px;
}

.landing-section-header {
  text-align: center;
  margin-bottom: 44px;
}

.landing-section-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--antique-gold);
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 12px;
}

/* Esports Tournaments Banner */
.landing-tourn-hero-card {
  background: linear-gradient(135deg, rgba(20, 40, 30, 0.9) 0%, rgba(10, 10, 14, 0.95) 100%);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--royal-gold-glow);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .landing-tourn-hero-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
}

.landing-tourn-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.landing-tourn-stat-pill {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  min-width: 125px;
}

.tourn-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.tourn-stat-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tourn-stat-val.gold { color: var(--antique-gold); }
.tourn-stat-val.green { color: var(--neon-green); }

.landing-bracket-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.bracket-match-node {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 130px;
}

.bracket-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-weight: 600;
}

.bracket-player-row.winner {
  color: var(--antique-gold);
  font-weight: 800;
}

/* AI Bots Arena Showcase */
.landing-bots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .landing-bots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .landing-bots-grid {
    grid-template-columns: 1fr;
  }
}

.landing-bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 380px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.landing-bot-card:hover {
  transform: translateY(-6px);
  border-color: var(--antique-gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px var(--royal-gold-glow);
}

.landing-bot-avatar-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 2px solid var(--antique-gold);
}

.landing-bot-quote {
  font-style: italic;
  font-size: 0.84rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--antique-gold);
  min-height: 56px;
  display: flex;
  align-items: center;
  line-height: 1.45;
}

.landing-bot-card .btn-royal-secondary,
.landing-bot-card .btn-royal-primary {
  margin-top: auto;
  padding: 13px 20px !important;
  min-height: 46px !important;
  width: 100%;
  border-radius: 12px !important;
  font-weight: 800 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Climb The Ranks 5-Tier Economy */
.landing-economy-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 960px) {
  .landing-economy-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
  }
  .landing-tier-card {
    min-width: 200px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

.landing-tier-card {
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: 12px;
  padding: 24px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.22s ease, background-color 0.22s ease;
  min-height: 204px;
  justify-content: space-between;
  box-shadow: none;
}

.landing-tier-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.landing-tier-badge-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.landing-tier-badge-icon .tier-badge-pic,
.landing-tier-badge-icon picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
}

.landing-tier-badge-icon .tier-badge-graphic,
.landing-tier-badge-icon img {
  width: 56px !important;
  height: 56px !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.landing-tier-name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.landing-tier-income, .landing-tier-dividend {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--antique-gold);
  background: rgba(255, 183, 3, 0.08);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 183, 3, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.landing-welcome-gift-banner {
  background: rgba(255, 183, 3, 0.03);
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0;
  padding: 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 24px;
  box-shadow: none !important;
}

@media (max-width: 820px) {
  .landing-welcome-gift-banner {
    flex-wrap: wrap;
    padding: 20px 22px;
  }
}

.landing-welcome-gift-banner .btn-cote-crimson {
  background: linear-gradient(135deg, #FFD166 0%, #FFB703 50%, #F59E0B 100%) !important;
  color: #0A0B10 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  padding: 12px 24px !important;
  min-height: 46px !important;
  font-size: 0.9rem !important;
  font-weight: 900 !important;
  border-radius: 12px !important;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.landing-welcome-gift-banner .btn-cote-crimson [data-icon],
.landing-welcome-gift-banner .btn-cote-crimson svg {
  color: #0A0B10 !important;
  stroke: #0A0B10 !important;
}

/* Move Quality Showcase (Chess.com Style) */
.landing-review-showcase {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 1100px) {
  .landing-review-showcase {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .landing-review-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}

.landing-badge-demo-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  min-height: 125px;
  transition: all 0.25s ease;
}

.landing-badge-demo-item:hover {
  border-color: var(--antique-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   INTERACTIVE DAILY TACTICAL PUZZLE CHALLENGE (HOME CARD & MODAL)
   ========================================================================== */
.landing-puzzle-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.landing-puzzle-section-header::before,
.landing-puzzle-section-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}

.landing-puzzle-section-title {
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  color: #FFF;
  margin: 0;
  letter-spacing: -0.02em;
}

.landing-puzzle-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(380px, 1.15fr) minmax(320px, 1fr);
  gap: 48px;
  align-items: center;
  box-sizing: border-box;
}

.landing-puzzle-board-col {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.landing-puzzle-info-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

@media (max-width: 900px) {
  .landing-puzzle-card {
    display: flex !important;
    flex-direction: column !important;
    max-width: 520px !important;
    padding: 16px !important;
    gap: 14px !important;
  }
}

/* 1. Sleek Top Bar */
.landing-puzzle-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-puzzle-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-puzzle-num-tag {
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  color: #FFF;
  letter-spacing: 0.08em;
}

.landing-puzzle-theme-badge {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #C084FC;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.landing-puzzle-meta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-puzzle-compact-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.landing-puzzle-compact-stat .compact-stat-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.landing-puzzle-compact-stat .compact-stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* 2. Compact Live Feedback & Quick Tactical Tools */
.landing-puzzle-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.landing-puzzle-feedback-banner {
  flex: 1;
  padding: 6px 0;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  min-height: 36px;
  box-sizing: border-box;
  transition: color 0.25s ease;
}

.landing-puzzle-feedback-banner.feedback-success {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: var(--neon-green) !important;
  color: var(--neon-green) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
  animation: badgePop 0.35s ease-out;
}

.landing-puzzle-feedback-banner.feedback-error {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #EF4444 !important;
  color: #F87171 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
  animation: badgePop 0.35s ease-out;
}

.landing-puzzle-quick-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-puzzle-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--antique-gold);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
  box-sizing: border-box;
}

.btn-puzzle-tool:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--royal-gold);
  color: #FFF;
}

/* 3. The Interactive Puzzle Chess Board */
.landing-puzzle-board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.landing-puzzle-board-frame {
  width: min(100%, 520px);
  height: min(100%, 520px);
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.3);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.landing-puzzle-board-frame .chessboard,
.landing-puzzle-board-frame .board-grid {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
}

/* 4. Bottom Action Bar */
.landing-puzzle-bottom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.btn-puzzle-primary {
  flex: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  min-height: 46px;
  background: linear-gradient(135deg, #FFB703, #D4AF37) !important;
  color: #000 !important;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.28);
  transition: all 0.2s ease;
}

.btn-puzzle-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.42);
}

.btn-puzzle-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  min-height: 46px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--antique-gold);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-puzzle-secondary:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--royal-gold);
  color: #FFF;
}

/* Modal Specific Styles */
.modal-box-puzzle {
  background: var(--bg-card) !important;
  backdrop-filter: blur(20px) !important;
}

.modal-puzzle-content-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 820px) {
  .modal-puzzle-content-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: 80vh;
    overflow-y: auto;
  }
}

.btn-chat-puzzle-trigger {
  transition: all 0.2s ease;
}

.btn-chat-puzzle-trigger:hover {
  border-color: var(--antique-gold) !important;
  box-shadow: 0 0 12px var(--royal-gold-glow);
}

@media (max-width: 560px) {
  .chat-puzzle-btn-label {
    display: none;
  }
}

/* FAQ Accordion */
.landing-faq-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}

.landing-faq-item.active {
  border-color: var(--antique-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.landing-faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.landing-faq-chevron {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--antique-gold);
  transition: transform 0.3s ease;
}

.landing-faq-item.active .landing-faq-chevron {
  transform: rotate(180deg);
}

.landing-faq-answer {
  padding: 0 24px 22px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  display: none;
}

.landing-faq-item.active .landing-faq-answer {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* VIP Final Call to Action */
.landing-vip-cta {
  background: linear-gradient(135deg, rgba(16, 16, 22, 0.95) 0%, rgba(22, 22, 28, 0.95) 100%);
  border: 2px solid rgba(197, 160, 89, 0.4);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 6vw, 64px) 28px;
  text-align: center;
  max-width: 1040px;
  margin: 48px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px var(--royal-gold-glow);
  position: relative;
  overflow: hidden;
}

.landing-vip-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Comprehensive Esports Footer */
.landing-full-footer {
  border-top: 1px solid var(--border-glass);
  padding: 50px 24px 28px;
  max-width: 1200px;
  margin: 40px auto 0;
}

.landing-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

@media (max-width: 860px) {
  .landing-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .landing-footer-grid {
    grid-template-columns: 1fr;
  }
}

.landing-footer-col h4 {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--antique-gold);
  margin-bottom: 14px;
}

.landing-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-footer-col a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.landing-footer-col a:hover {
  color: var(--antique-gold);
}

.landing-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   $CHESS COIN DEDICATED CURRENCY ICON & BADGE
   Uniform vector representation across all components, headers, shop & cards
   ========================================================================== */
.svg-points-coin,
.svg-points-atom,
[data-icon="points"],
[data-icon="point"],
[data-icon="coin"],
[data-icon="coins"],
[data-icon="atom"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -2px;
  color: #F5C518;
  filter: drop-shadow(0 1px 4px rgba(245, 197, 24, 0.45));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.svg-points-coin:hover,
.svg-points-atom:hover,
[data-icon="points"]:hover,
[data-icon="coins"]:hover {
  transform: scale(1.15) rotate(12deg);
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.85));
}

.atom-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--royal-gold);
}

/* ==========================================================================
   PLAY ARENA: S-SYSTEM MATCHMAKING LOBBY & CUSTOM TIME CONTROLS
   ========================================================================== */
.play-lobby-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 10px 0 30px 0;
  animation: modalScaleUp 0.25s ease-out;
}

.lobby-hero-card {
  background: linear-gradient(135deg, #131417, #0a0b0d) !important;
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.lobby-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 9999px;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #E11D48;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.lobby-hero-title {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 900;
  margin: 0 0 6px 0;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.lobby-hero-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 auto 16px auto;
  max-width: 580px;
}

.lobby-user-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.lobby-rating-pill {
  padding: 5px 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-full);
  color: #38BDF8;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.lobby-wallet-pill {
  padding: 5px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  color: #FFD700;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lobby-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.lobby-tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.lobby-tc-card {
  background: rgba(18, 24, 40, 0.7);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-lg);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lobby-tc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 29, 72, 0.5);
  background: rgba(24, 32, 54, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.lobby-tc-card.active {
  border-color: #E11D48 !important;
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.15) 0%, rgba(18, 24, 40, 0.9) 100%) !important;
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.35) !important;
}

.tc-card-icon {
  font-size: 1.3rem;
  color: var(--text-secondary);
}

.lobby-tc-card.active .tc-card-icon {
  color: #E11D48;
}

.tc-card-name {
  font-size: 1.15rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #FFFFFF;
}

.tc-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tc-badge-popular {
  position: absolute;
  top: -8px;
  right: -6px;
  background: #E11D48;
  color: #FFF;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

/* Custom Time Controls Slider Panel */
.lobby-custom-section {
  padding: 20px 24px;
}

.custom-tc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.custom-tc-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #E11D48;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.custom-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.slider-val-badge {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.82rem;
}

.custom-range-slider {
  width: 100%;
  accent-color: #E11D48;
  cursor: pointer;
}

/* Matchmaking Actions */
.lobby-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-lobby-cta {
  flex: 2 1 240px;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-lobby-action {
  flex: 1 1 180px;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Matchmaking Radar Scanner */
.matchmaking-radar-card {
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: 0 0 35px rgba(225, 29, 72, 0.2);
}

.radar-scanner-rings {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.matchmaking-radar-card .radar-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(225, 29, 72, 0.4);
  animation: radarPulse 2s infinite cubic-bezier(0.2, 0.8, 0.4, 1);
}

.matchmaking-radar-card .radar-pulse-ring.ring-1 { width: 40px; height: 40px; }
.matchmaking-radar-card .radar-pulse-ring.ring-2 { width: 80px; height: 80px; animation-delay: 0.6s; }
.matchmaking-radar-card .radar-pulse-ring.ring-3 { width: 120px; height: 120px; animation-delay: 1.2s; }

.radar-sweep-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: conic-gradient(from 0deg, rgba(225, 29, 72, 0.4) 0deg, transparent 60deg);
  transform-origin: top left;
  animation: radarRotate 2.5s infinite linear;
}

.matchmaking-radar-card .radar-center-icon {
  z-index: 2;
  color: #E11D48;
  font-size: 1.5rem;
}

#matchmaking-radar-modal #radar-spar-bot-btn {
  padding: 10px 20px;
  font-size: 0.85rem;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: var(--cote-cyan, #38BDF8) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#matchmaking-radar-modal #radar-spar-bot-btn:hover {
  border-color: var(--cote-cyan, #38BDF8) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: var(--cote-cyan, #38BDF8) !important;
}

@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes radarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0;
  color: #FFFFFF;
}

.radar-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.radar-timer-pill {
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: #E11D48;
}

.btn-cancel-search {
  margin-top: 6px;
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

/* Sound Toggle Button during Gameplay */
.btn-sound-toggle.muted {
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.btn-leave-lobby {
  border-color: var(--border-glass-light);
  color: var(--text-secondary);
}

.btn-leave-lobby:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   PLAY ARENA LOBBY: SEARCH PLAYER FOR CHALLENGE & AI SPARRING BOTS
   ========================================================================== */
.lobby-player-challenge-section,
.lobby-bots-section {
  padding: 22px 24px;
}

.lobby-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.badge-online-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  padding: 3px 10px;
}

.lobby-section-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 14px 0;
}

.lobby-player-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.lobby-player-search-bar .search-icon-slot {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
}

.lobby-player-search-bar input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.lobby-player-search-bar input:focus {
  outline: none;
  border-color: var(--cote-crimson);
  box-shadow: 0 0 14px rgba(225, 29, 72, 0.25);
  background: rgba(14, 20, 36, 0.9);
}

.lobby-player-tier-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lobby-tier-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lobby-tier-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.lobby-tier-btn.active {
  background: rgba(225, 29, 72, 0.18);
  border-color: var(--cote-crimson);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.3);
}

.lobby-contenders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.lobby-contender-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(18, 24, 40, 0.65);
  border: 1px solid var(--border-glass-light);
  transition: all 0.2s ease;
}

.lobby-contender-card:hover {
  border-color: rgba(225, 29, 72, 0.45);
  background: rgba(24, 32, 54, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lobby-contender-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lobby-contender-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #FFFFFF;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.lobby-contender-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-contender-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-lobby-challenge-player {
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #E11D48, #BE123C);
  border: none;
  border-radius: var(--radius-md);
  color: #FFFFFF;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-lobby-challenge-player:hover {
  background: linear-gradient(135deg, #F43F5E, #9F1239);
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

/* AI Sparring Bots Grid in Lobby */
.lobby-bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.lobby-bot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(18, 24, 40, 0.65);
  border: 1px solid var(--border-glass-light);
  transition: all 0.2s ease;
}

.lobby-bot-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(24, 32, 54, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lobby-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lobby-bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lobby-bot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.lobby-bot-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: #FFFFFF;
}

.lobby-bot-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-spar-bot-card {
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cote-gold), #D97706);
  border: none;
  border-radius: var(--radius-md);
  color: #080A12;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-spar-bot-card:hover {
  background: linear-gradient(135deg, #FBBF24, #B45309);
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   RESIGN / CONCEDE MATCH CONFIRMATION DIALOG (CLEAN & PREMIUM REDESIGN)
   ========================================================================== */
.resign-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 14, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 2500 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.resign-modal-overlay.active {
  display: flex !important;
}

.resign-modal-card {
  position: relative;
  width: 100%;
  max-width: 380px !important;
  background: #111520 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 24px 20px 20px !important;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.15) !important;
  animation: resignModalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden;
}

@keyframes resignModalPop {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.resign-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #64748B;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  padding: 0;
}

.resign-close-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.06);
}

.resign-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transition: transform 0.2s ease;
}

.resign-modal-card:hover .resign-icon-badge {
  transform: scale(1.05);
}

.resign-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.resign-modal-desc {
  font-size: 0.85rem;
  color: #94A3B8;
  line-height: 1.45;
  margin: 0 auto 16px;
  max-width: 320px;
}

/* Match Information Panel */
.resign-info-panel {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}

.resign-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.resign-info-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748B;
  text-transform: uppercase;
}

.resign-info-value {
  font-size: 0.92rem;
  font-weight: 800;
  color: #F1F5F9;
}

.resign-info-value.result-loss {
  color: #EF4444;
}

.resign-info-value.rating-loss {
  color: #F59E0B;
}

.resign-info-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.07);
}

.resign-error-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #FCA5A5;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 14px;
  text-align: center;
}

/* Actions Row */
.resign-actions-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.resign-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.resign-btn:active {
  transform: scale(0.98);
}

.resign-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
}

.resign-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.resign-btn-confirm {
  background: #DC2626;
  border: 1px solid #EF4444;
  color: #FFFFFF;
}

.resign-btn-confirm:hover {
  background: #B91C1C;
  border-color: #DC2626;
}

.resign-btn-confirm:disabled,
.resign-btn-cancel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.resign-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: resignSpin 0.65s linear infinite;
}

@media (max-width: 360px) {
  .resign-modal-card {
    padding: 18px 12px 14px !important;
    max-width: calc(100vw - 20px) !important;
  }
  .resign-modal-title {
    font-size: 1.1rem;
  }
  .resign-modal-desc {
    font-size: 0.78rem;
    margin-bottom: 12px;
  }
  .resign-info-panel {
    padding: 8px 10px;
    margin-bottom: 14px;
  }
  .resign-info-label {
    font-size: 0.6rem;
  }
  .resign-info-value {
    font-size: 0.84rem;
  }
  .resign-btn {
    font-size: 0.8rem;
    padding: 8px 8px;
    min-height: 40px;
  }
}

/* ==========================================================================
   ELITECHESS PLAY ARENA: LUXURY ESPORTS LOBBY REDESIGN
   ========================================================================== */
.play-lobby-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 48px;
  animation: fadeIn 0.25s ease-out;
}

/* 1. Arena Hero Section */
.arena-hero-banner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  background: linear-gradient(180deg, #101114 0%, #08090b 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: var(--radius-xl, 20px);
  padding: clamp(20px, 2.5vw, 32px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 0, 0, 0.7) !important;
  position: relative;
  overflow: hidden;
}

.arena-hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.65), rgba(212, 175, 55, 0.35), transparent);
}

.arena-hero-main {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.arena-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #FFB703;
  margin-bottom: 8px;
}

.arena-hero-title {
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.6px;
  color: #FFFFFF;
  margin: 0 0 18px 0;
  line-height: 1.15;
}

.arena-hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.48;
  max-width: 580px;
  margin: 0 0 20px 0;
}

/* Time control selector block */
.arena-tc-selector-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.arena-tc-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
}

.arena-tc-header-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.arena-tc-active-desc {
  font-weight: 700;
  color: #F59E0B;
  font-family: var(--font-mono);
}

.arena-tc-chips-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.arena-tc-chip {
  flex: 1;
  min-width: 82px;
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.arena-tc-chip:hover {
  background: #1a1b20;
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.arena-tc-chip.active {
  background: rgba(245, 158, 11, 0.14);
  border-color: #F59E0B;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.arena-tc-chip .tc-chip-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.arena-tc-chip.active .tc-chip-icon {
  transform: scale(1.15);
}

.arena-tc-chip .tc-chip-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.arena-tc-chip .tc-chip-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.arena-tc-chip.active .tc-chip-tag {
  color: #F59E0B;
  font-weight: 700;
}

/* Hero actions bar */
.arena-hero-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.arena-btn-start-hero {
  background: linear-gradient(135deg, #FFB703 0%, #F59E0B 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 13px 26px;
  color: #120D00;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.42);
}

.arena-btn-start-hero:hover {
  background: linear-gradient(135deg, #FFC72C 0%, #FFAA00 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.6);
  color: #000000;
}

.arena-btn-friend-hero {
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 13px 22px;
  color: #E2E8F0;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.arena-btn-friend-hero:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
  color: #F59E0B;
}

.arena-btn-link-hero {
  width: 44px;
  height: 44px;
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.arena-btn-link-hero:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Right stage card */
.arena-hero-side {
  flex: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
}

.arena-stage-card {
  width: 100%;
  max-width: 340px;
  background: #0d0e11 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8) !important;
}

.arena-stage-board-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arena-stage-micro-board {
  display: grid;
  grid-template-columns: repeat(4, 38px);
  grid-template-rows: repeat(4, 38px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px var(--board-accent-glow, rgba(245, 158, 11, 0.2));
  border: 2px solid var(--board-border-color, rgba(245, 158, 11, 0.4));
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.stage-tile {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-tile.l {
  background-color: var(--board-sq-light, #E6ECE2) !important;
  color: var(--board-coord-light, #16482B);
}

.stage-tile.d {
  background-color: var(--board-sq-dark, #16482B) !important;
  color: var(--board-coord-dark, #E6ECE2);
}

.stage-tile svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65));
  pointer-events: none;
  transition: transform 0.2s ease;
}

.arena-stage-micro-board:hover .stage-tile svg {
  transform: scale(1.08);
}

.stage-glyph-piece {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4AF37;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.arena-hero-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #141519 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px;
  padding: 8px 12px;
}

.arena-user-avatar-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: url('/assets/avatar_default.webp') center / cover no-repeat, linear-gradient(135deg, #F59E0B, #B45309);
  border: 1.5px solid var(--antique-gold);
  color: #120D00;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  overflow: hidden;
}

.arena-user-info-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.arena-user-display-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-user-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.arena-user-elo-text {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: #F59E0B;
}

/* 2. Structured Game Modes Grid */
.arena-modes-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arena-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arena-section-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #FFFFFF;
  margin: 0 0 2px 0;
  letter-spacing: -0.3px;
}

.arena-section-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
}

.arena-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.arena-mode-card {
  background: linear-gradient(180deg, #131417, #0a0b0d) !important;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
  user-select: none;
  outline: none;
}

.arena-mode-card:hover,
.arena-mode-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.08);
}

.arena-mode-card.featured {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04), #0a0b0d) !important;
}

.arena-mode-card.featured:hover {
  border-color: #F59E0B;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.2);
}

.arena-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.arena-card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arena-card-icon-wrap.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.arena-card-icon-wrap.cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
}

.arena-card-icon-wrap.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.arena-card-icon-wrap.purple {
  background: rgba(192, 132, 252, 0.15);
  color: #C084FC;
}

.arena-card-icon-wrap.amber {
  background: rgba(251, 146, 60, 0.15);
  color: #FB923C;
}

.arena-card-icon-wrap.blue {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
}

.arena-card-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.arena-card-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.arena-card-badge.cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.arena-card-badge.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.arena-card-badge.purple {
  background: rgba(192, 132, 252, 0.15);
  color: #C084FC;
  border: 1px solid rgba(192, 132, 252, 0.35);
}

.arena-card-badge.amber {
  background: rgba(251, 146, 60, 0.15);
  color: #FB923C;
  border: 1px solid rgba(251, 146, 60, 0.35);
}

.arena-card-badge.blue {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.arena-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
}

.arena-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 16px 0;
  flex: 1;
}

.arena-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
}

.arena-mode-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.35));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FFD700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.arena-mode-btn:hover {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border-color: #F59E0B;
  color: #0F172A;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.arena-mode-card.featured .arena-mode-btn {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  border-color: #FBBF24;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.arena-mode-card.featured .arena-mode-btn:hover {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}

.light-theme .arena-mode-btn {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(180, 83, 9, 0.2));
  border-color: rgba(217, 119, 6, 0.4);
  color: #B45309;
}

.light-theme .arena-mode-btn:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #FFFFFF;
}

.light-theme .arena-mode-card.featured .arena-mode-btn {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #FFFFFF;
  border-color: #B45309;
}

.arena-card-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #F59E0B;
  transition: transform 0.15s ease;
}

.arena-mode-card:hover .arena-card-action-link {
  transform: translateX(3px);
}

/* 3. Secondary Real Data Sections */
.arena-secondary-split {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
}

.arena-contenders-card {
  background: rgba(16, 21, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.arena-contenders-header {
  margin-bottom: 14px;
}

.arena-contenders-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.arena-contenders-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.arena-online-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.arena-contenders-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.arena-contenders-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.arena-contenders-search-box {
  flex: 1;
  min-width: 180px;
  position: relative;
  display: flex;
  align-items: center;
}

.arena-contenders-search-box span {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
}

.arena-contenders-search-box input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}

.arena-contenders-search-box input:focus {
  border-color: #38BDF8;
}

.arena-contenders-tier-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* Sunday Promotion Cup Card */
.arena-sunday-card {
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), rgba(14, 18, 30, 0.85));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.arena-sunday-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #F59E0B;
  margin-bottom: 6px;
}

.arena-sunday-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
}

.arena-sunday-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 14px 0;
}

.arena-sunday-countdown-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  margin-bottom: 14px;
}

.arena-sunday-cd-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.arena-sunday-cd-time {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  color: #FFB703;
  letter-spacing: 0.5px;
}

.arena-sunday-rule-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.3);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
}

.arena-sunday-rule-callout span {
  color: #FB7185;
  flex-shrink: 0;
  margin-top: 2px;
}

.arena-sunday-cta-btn {
  margin-top: auto;
  width: 100%;
  padding: 11px;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .arena-hero-banner {
    flex-direction: column;
    gap: 20px;
  }
  .arena-hero-side {
    width: 100%;
    min-width: auto;
  }
  .arena-stage-card {
    max-width: 100%;
  }
  .arena-modes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .arena-secondary-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .play-lobby-container {
    padding: 12px 14px 40px;
    gap: 20px;
  }
  .arena-hero-title {
    font-size: 1.7rem;
  }
  .arena-tc-chips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .arena-tc-chip {
    min-width: auto;
    padding: 7px 6px;
  }
  .arena-hero-actions-bar {
    flex-direction: column;
    width: 100%;
  }
  .arena-btn-start-hero,
  .arena-btn-friend-hero {
    width: 100%;
    justify-content: center;
  }
  .arena-btn-link-hero {
    display: none;
  }
  .arena-modes-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}





/* ==========================================================================
   NATIVE ROYAL DIALOG MODAL (Alerts, Confirms & Prompts)
   ========================================================================== */
#elite-dialog-modal {
  z-index: 3500;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(4, 6, 12, 0.88);
}

.elite-dialog-box {
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 240, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-xl, 20px);
  animation: eliteDialogZoomIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes eliteDialogZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.elite-dialog-box #elite-dialog-input:focus {
  border-color: var(--vice-cyan, #00F0FF) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3) !important;
}

@media (max-width: 480px) {
  .elite-dialog-box {
    padding: 20px 16px !important;
    max-width: 92vw !important;
  }
  #elite-dialog-actions {
    flex-direction: column-reverse;
  }
  #elite-dialog-actions button {
    width: 100%;
  }
}

/* ==========================================================================
   HEADER SEARCH TOP 3 PLAYERS & REAL-TIME MATCHING
   ========================================================================== */
.search-match-highlight {
  color: var(--royal-gold, #D4AF37) !important;
  font-weight: 900 !important;
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 55, 0.6);
  text-underline-offset: 3px;
  background: rgba(212, 175, 55, 0.14);
  padding: 0 2px;
  border-radius: 2px;
}

.search-player-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.search-top3-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.15);
  color: var(--royal-gold, #D4AF37);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.search-tier-chip {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.3px;
}

.search-tier-chip.tier-class-d {
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}
.search-tier-chip.tier-class-c {
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}
.search-tier-chip.tier-class-b {
  color: #C084FC;
  border-color: rgba(192, 132, 252, 0.3);
  background: rgba(192, 132, 252, 0.1);
}
.search-tier-chip.tier-class-a {
  color: #FB923C;
  border-color: rgba(251, 146, 60, 0.3);
  background: rgba(251, 146, 60, 0.1);
}
.search-tier-chip.tier-elite {
  color: var(--royal-gold, #D4AF37);
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   1V1 MATCH QR CODE SYSTEM (Mobile Camera Scan & Play)
   ========================================================================== */
#modal-challenge-qr, #modal-play-friend {
  z-index: 2800;
}

#modal-challenge-qr .modal-box.qr-modal-box {
  max-width: 440px;
  width: 92%;
  position: relative;
  text-align: center;
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: var(--radius-xl, 24px);
  padding: 24px 24px 22px;
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(0, 240, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-sizing: border-box;
}

#modal-challenge-qr .qr-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
  line-height: 1;
  padding: 0;
}

#modal-challenge-qr .qr-modal-close-btn:hover {
  background: rgba(255, 46, 147, 0.2);
  color: #FFFFFF;
  border-color: rgba(255, 46, 147, 0.5);
}

#modal-challenge-qr .qr-modal-close-btn span[data-icon],
#modal-challenge-qr .qr-modal-close-btn svg {
  width: 16px;
  height: 16px;
}

/* Header */
.qr-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.qr-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vice-cyan, #00F0FF);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
  flex-shrink: 0;
}

.qr-modal-icon-badge span[data-icon],
.qr-modal-icon-badge svg {
  width: 18px;
  height: 18px;
}

.qr-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
  font-family: var(--font-main);
}

.qr-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 auto 16px;
  max-width: 340px;
  line-height: 1.45;
}

/* Time Control Switcher Buttons */
.qr-tc-selector {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#modal-challenge-qr .arena-tc-chip {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary, #CBD5E1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

#modal-challenge-qr .arena-tc-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

#modal-challenge-qr .arena-tc-chip:focus-visible {
  outline: 2px solid var(--vice-cyan, #00F0FF);
  outline-offset: 1px;
}

#modal-challenge-qr .arena-tc-chip.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22), rgba(0, 240, 255, 0.4));
  border: 1px solid var(--vice-cyan, #00F0FF);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(0, 240, 255, 0.25);
  transform: none;
}

/* QR Code Display Card */
.qr-display-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(12, 15, 24, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: var(--radius-lg, 18px);
  padding: 16px;
  margin: 0 auto;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04), 0 0 20px rgba(0, 240, 255, 0.05);
}

.qr-plate-wrapper {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

#direct-challenge-qr-svg {
  width: 176px;
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

#direct-challenge-qr-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-scan-caption {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qr-scan-caption span[data-icon],
.qr-scan-caption svg {
  color: var(--vice-cyan, #00F0FF);
  width: 14px;
  height: 14px;
}

/* Status & Time Control Pill Row */
.qr-status-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  flex-wrap: wrap;
}

.qr-tc-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--vice-cyan, #00F0FF);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 20px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.qr-live-status {
  font-size: 0.78rem;
  color: #10B981;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

#friend-challenge-qrcode-box:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.4) !important;
}

.pulse-radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: radarPulse 1.8s infinite;
}

@keyframes radarPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Link Sharing Bar */
.qr-link-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.qr-link-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.qr-link-input-wrapper .qr-input-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-link-input-wrapper .qr-input-icon svg {
  width: 14px;
  height: 14px;
}

.qr-link-input {
  width: 100%;
  padding: 10px 12px 10px 32px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  box-sizing: border-box;
  outline: none;
  transition: border-color var(--trans-fast);
}

.qr-link-input:focus {
  border-color: var(--vice-cyan, #00F0FF);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.qr-copy-btn {
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
  border-radius: 10px;
  min-height: auto;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(135deg, #FF2E93 0%, #FF8A00 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 4px 14px rgba(255, 46, 147, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 46, 147, 0.45) !important;
}

.qr-copy-btn .qr-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qr-copy-btn .qr-btn-icon svg {
  width: 14px;
  height: 14px;
}

.qr-copy-btn.btn-copied {
  background: linear-gradient(135deg, #10B981, #059669) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  #modal-challenge-qr .modal-box.qr-modal-box {
    padding: 20px 14px 18px;
    width: 94%;
  }

  .qr-modal-title {
    font-size: 1.15rem;
  }

  .qr-modal-subtitle {
    font-size: 0.78rem;
    margin-bottom: 12px;
  }

  .qr-tc-selector {
    gap: 4px;
    padding: 3px;
    margin-bottom: 12px;
  }

  #modal-challenge-qr .arena-tc-chip {
    padding: 7px 0;
    font-size: 0.72rem;
  }

  .qr-display-card {
    padding: 12px;
  }

  .qr-plate-wrapper {
    padding: 8px;
  }

  #direct-challenge-qr-svg {
    width: 156px;
    height: 156px;
  }

  .qr-link-bar {
    gap: 6px;
  }

  .qr-link-input {
    font-size: 0.74rem;
    padding: 9px 8px 9px 28px;
  }

  .qr-link-input-wrapper .qr-input-icon {
    left: 8px;
    width: 12px;
    height: 12px;
  }

  .qr-copy-btn {
    padding: 9px 12px;
    font-size: 0.76rem;
  }
}


/* ==========================================================================
   ARIA AI GUIDE ONBOARDING & SUNDAY TOURNAMENT DISCOVERY EXPERIENCE
   ========================================================================== */

/* Full UI Backdrop & Sidebar Blur when Aria speaks / Onboarding Guide Active */
body.aria-guide-active #app-container,
body.aria-guide-active .app-sidebar,
body.aria-guide-active .app-topbar,
body.aria-guide-active .app-main-content,
body.aria-guide-active #mobile-nav-bar,
body.aria-guide-active #arena-sidebar-nav,
body.aria-guide-active .arena-hero-header,
body.aria-guide-active .arena-subnav-bar,
body.aria-guide-active #main-content,
body.aria-tour-blur-active #app-container,
body.aria-tour-blur-active .app-sidebar {
  filter: blur(12px) brightness(0.4) saturate(0.8) !important;
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), brightness 0.4s ease !important;
}

.aria-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.aria-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Standalone Visual Stage (Aria standing freely on the side, speech bubble beside her) */
.aria-standalone-stage-backdrop {
  background: rgba(6, 9, 15, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 40px 24px 40px !important;
  z-index: 999999 !important;
}

.aria-standalone-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 32px;
  max-width: 1040px;
  width: 100%;
  position: relative;
  z-index: 2;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 8px;
}

.aria-modal-backdrop.active .aria-standalone-stage {
  transform: translateY(0) scale(1);
}

/* Character Side Stage (Standing free outside) */
.aria-character-side-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  user-select: none;
}

.aria-character-aura-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -15%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.28) 0%, rgba(192, 132, 252, 0.22) 42%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
  animation: ariaPulseAura 4s ease-in-out infinite alternate;
}

.aria-standalone-portrait-wrapper {
  position: relative;
  width: 320px;
  height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 35px rgba(192, 132, 252, 0.35));
  animation: ariaCharacterFloat 4s ease-in-out infinite alternate;
}

.aria-standalone-character-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

/* Floating Speech Bubble Stage */
.aria-speech-bubble-stage {
  position: relative;
  flex: 1;
  max-width: 600px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

/* Speech Tail pointing left toward Aria */
.aria-speech-tail-desktop {
  position: absolute;
  left: -22px;
  top: 48px;
  width: 24px;
  height: 36px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(-4px 0 5px rgba(0, 0, 0, 0.5));
}

.aria-speech-tail-mobile {
  display: none;
}

/* Speech Bubble Card */
.aria-speech-bubble-card {
  position: relative;
  background: radial-gradient(circle at 85% 15%, rgba(192, 132, 252, 0.08), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(212, 175, 55, 0.08), transparent 50%),
              rgba(20, 24, 34, 0.96);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85),
              0 0 35px rgba(212, 175, 55, 0.14),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.aria-bubble-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aria-bubble-header-bar .aria-modal-close-btn {
  position: relative;
  top: auto;
  right: auto;
  width: 32px;
  height: 32px;
  font-size: 20px;
  flex-shrink: 0;
}

.aria-modal-box {
  position: relative;
  width: 100%;
  max-width: 820px;
  background: radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.08), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(192, 132, 252, 0.08), transparent 50%),
              rgba(15, 20, 29, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85),
              0 0 50px rgba(212, 175, 55, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 32px;
  overflow: hidden;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.aria-modal-backdrop.active .aria-modal-box {
  transform: translateY(0) scale(1);
}

.aria-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, #94A3B8);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.aria-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #F87171;
  transform: rotate(90deg);
}

.aria-modal-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: center;
}

/* Portrait Column */
.aria-portrait-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.aria-portrait-aura-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -10%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(192, 132, 252, 0.2) 40%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: ariaPulseAura 4s ease-in-out infinite alternate;
}

@keyframes ariaPulseAura {
  0% { transform: translate(-50%, -10%) scale(0.92); opacity: 0.6; }
  100% { transform: translate(-50%, -10%) scale(1.08); opacity: 0.95; }
}

.aria-portrait-wrapper {
  position: relative;
  width: 280px;
  height: 330px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 25px rgba(192, 132, 252, 0.25));
  animation: ariaCharacterFloat 4s ease-in-out infinite alternate;
}

@keyframes ariaCharacterFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

.aria-character-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.aria-character-tag {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 30px;
  background: rgba(20, 26, 38, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.aria-live-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: beaconPulse 2s infinite;
}

@keyframes beaconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.aria-tag-name {
  font-family: var(--font-display, 'Cabinet Grotesk', sans-serif);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #FFFFFF;
}

.aria-tag-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.2);
  color: var(--royal-gold, #D4AF37);
  letter-spacing: 0.08em;
}

/* Speech / Dialogue Column */
.aria-speech-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aria-dialogue-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aria-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #C084FC;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
}

.aria-role-pill [data-icon] {
  width: 13px;
  height: 13px;
}

.aria-class-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FBBF24;
}

/* Animated SVG Voice Wave / Talking Indicator */
.aria-talking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.28);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.15);
}

.aria-voice-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  color: #E9D5FF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wave-bar {
  animation: waveBounce 1.2s ease-in-out infinite alternate;
  transform-origin: center bottom;
}
.wb-1 { animation-delay: 0.0s; }
.wb-2 { animation-delay: 0.25s; }
.wb-3 { animation-delay: 0.5s; }
.wb-4 { animation-delay: 0.15s; }
.wb-5 { animation-delay: 0.35s; }
.wb-6 { animation-delay: 0.1s; }

@keyframes waveBounce {
  0% { transform: scaleY(0.25); opacity: 0.45; }
  100% { transform: scaleY(1.35); opacity: 1; }
}

/* SVG Message Dialog Container & Speech Tail */
.aria-svg-dialog-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}

.aria-dialog-tail-anchor {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.aria-dialog-tail-desktop {
  left: -21px;
  top: 32px;
  width: 22px;
  height: 32px;
  filter: drop-shadow(-3px 0 6px rgba(0, 0, 0, 0.6));
}

.aria-dialog-tail-mobile {
  display: none;
}

.aria-speech-title {
  font-family: var(--font-display, 'Cabinet Grotesk', sans-serif);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  color: #FFFFFF;
  margin: 0 0 12px 0;
}

.aria-gold-text {
  background: linear-gradient(135deg, #FFFBEB 0%, #FBBF24 50%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.aria-speech-bubble {
  position: relative;
  background: rgba(13, 19, 32, 0.96);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75),
              0 0 25px rgba(212, 175, 55, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 22px 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #CBD5E1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aria-dialog-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aria-speech-bubble p {
  margin: 0;
}

.aria-speech-bubble strong {
  color: #FFFFFF;
  font-weight: 700;
}

.aria-speech-highlight {
  color: #FDE047 !important;
  font-weight: 600;
}

/* Actions Row */
.aria-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.aria-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  transition: all 0.25s ease;
}

.aria-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.55);
}

.aria-btn-primary [data-icon] {
  width: 16px;
  height: 16px;
}

.aria-btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted, #94A3B8);
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aria-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Floating Tour Companion Card */
.aria-companion-bubble {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 9995;
  background: transparent;
  padding: 0;
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.97);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.aria-companion-bubble.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.aria-companion-grid {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

/* Noticeable Aria Guide Character Figure */
.aria-companion-figure-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.aria-companion-aura {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, rgba(192, 132, 252, 0.25) 45%, transparent 70%);
  filter: blur(14px);
  pointer-events: none;
  animation: ariaPulseAura 3.5s ease-in-out infinite alternate;
}

.aria-companion-figure-wrapper {
  position: relative;
  width: 125px;
  height: 155px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 20px rgba(192, 132, 252, 0.35));
  animation: ariaCharacterFloat 4s ease-in-out infinite alternate;
}

.aria-companion-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.aria-companion-badge {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(13, 19, 32, 0.94);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Tour Companion Speech Bubble Column */
.aria-companion-bubble-col {
  position: relative;
  flex: 1;
  min-width: 270px;
  max-width: 380px;
}

.aria-companion-speech {
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(13, 19, 32, 0.97);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85),
              0 0 30px rgba(212, 175, 55, 0.2);
  gap: 10px;
}

.aria-companion-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.aria-companion-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aria-companion-title {
  font-family: var(--font-display, 'Cabinet Grotesk', sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--royal-gold, #D4AF37);
  letter-spacing: 0.04em;
}

.aria-companion-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, #94A3B8);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.aria-companion-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
}

.aria-companion-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary, #CBD5E1);
  min-height: 48px;
}

.aria-companion-body strong {
  color: #FFFFFF;
}

.aria-companion-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.aria-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.aria-bubble-btn-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted, #94A3B8);
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aria-bubble-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

/* ==========================================================================
   ARIA TOUR BACKDROP BLUR & FOCUSED SPOTLIGHT SYSTEM
   ========================================================================== */
body.aria-tour-blur-active {
  overflow-x: hidden;
}

/* Blur all background regions during tour focus */
body.aria-tour-blur-active #topbar-nav:not(.aria-header-spotlight),
body.aria-tour-blur-active #sidebar-nav,
body.aria-tour-blur-active .arena-hero-header,
body.aria-tour-blur-active .arena-subnav-bar,
body.aria-tour-blur-active .sunday-tournament-banner,
body.aria-tour-blur-active .tourney-card:not(.aria-spotlight-focus),
body.aria-tour-blur-active .mobile-bottom-nav {
  filter: blur(8px) brightness(0.32) !important;
  transition: filter 0.45s cubic-bezier(0.16, 1, 0.3, 1), brightness 0.45s ease !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* The exact focused spotlight element stays 100% sharp and illuminated */
.tourney-card.aria-spotlight-focus {
  position: relative !important;
  z-index: 9985 !important;
  filter: none !important;
  pointer-events: auto !important;
  border-color: var(--royal-gold, #D4AF37) !important;
  box-shadow: 0 0 0 3px var(--royal-gold, #D4AF37),
              0 0 50px rgba(212, 175, 55, 0.8),
              0 0 90px rgba(16, 185, 129, 0.5) !important;
  transform: scale(1.025);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease !important;
}

/* Header spotlight when flight arrives */
#topbar-nav.aria-header-spotlight {
  filter: none !important;
  z-index: 9988 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.3) !important;
  pointer-events: auto !important;
}

/* Visual Novel Typewriter Stream & Cursor */
.aria-typed-stream {
  display: inline;
}

.aria-typing-cursor {
  display: inline-block;
  color: var(--royal-gold, #D4AF37);
  font-weight: 900;
  font-size: 0.9em;
  margin-left: 2px;
  animation: cursorBlink 0.65s infinite;
  vertical-align: middle;
}

.aria-typing-cursor.finished {
  animation: cursorFadeOut 1.4s forwards;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes cursorFadeOut {
  0% { opacity: 1; }
  75% { opacity: 0.5; }
  100% { opacity: 0; display: none; }
}

/* Spotlight Highlight for Sunday Tournament Card */
.aria-spotlight-card {
  position: relative;
  z-index: 9985 !important;
  border-color: var(--royal-gold, #D4AF37) !important;
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.75),
              0 0 60px rgba(16, 185, 129, 0.4),
              inset 0 0 25px rgba(212, 175, 55, 0.2) !important;
  animation: ariaSpotlightPulse 2.4s ease-in-out infinite alternate !important;
}

@keyframes ariaSpotlightPulse {
  0% {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4),
                0 0 45px rgba(16, 185, 129, 0.2),
                inset 0 0 15px rgba(212, 175, 55, 0.1);
  }
  100% {
    box-shadow: 0 0 45px rgba(212, 175, 55, 0.75),
                0 0 75px rgba(16, 185, 129, 0.45),
                inset 0 0 30px rgba(212, 175, 55, 0.25);
  }
}

/* Flight Animation Clone (Connecting Tournament Countdown to Header Timer) */
.aria-flight-clone {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.95), rgba(16, 185, 129, 0.95));
  color: #0A0F1A;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.85),
              0 0 45px rgba(16, 185, 129, 0.6);
  border: 1px solid #FFFFFF;
  will-change: transform, opacity;
}

/* Subtle Header Timer Arrival Pulse (Existing header timer untouched) */
#header-sunday-timer-badge.aria-target-pulse {
  animation: headerTimerPulse 1.4s ease-out forwards;
}

@keyframes headerTimerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.9);
  }
  40% {
    box-shadow: 0 0 24px 6px rgba(212, 175, 55, 0.75), 0 0 35px 8px rgba(16, 185, 129, 0.5);
  }
  100% {
    box-shadow: none;
  }
}

/* Tour Replay Button inside Tournament Banner */
.aria-tour-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: #E9D5FF;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aria-tour-replay-btn:hover {
  background: rgba(192, 132, 252, 0.22);
  border-color: rgba(192, 132, 252, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.3);
}

.aria-tour-replay-btn [data-icon] {
  width: 14px;
  height: 14px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .aria-standalone-stage {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-height: 92vh;
    max-width: 94%;
    width: 420px;
    overflow-y: auto;
    padding: 8px;
    margin: auto;
  }
  .aria-character-side-stage {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: -4px;
  }
  .aria-standalone-portrait-wrapper {
    width: 85px;
    height: 105px;
  }
  .aria-character-aura-glow {
    width: 85px;
    height: 85px;
  }
  .aria-character-tag {
    margin-top: 0;
    padding: 2px 8px;
    font-size: 0.72rem;
  }
  .aria-speech-bubble-stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .aria-speech-tail-desktop {
    display: none !important;
  }
  .aria-speech-tail-mobile {
    display: block !important;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 16px;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 -3px 5px rgba(0, 0, 0, 0.6));
  }
  .aria-speech-bubble-card {
    padding: 16px 14px 14px;
    text-align: left;
    border-radius: 16px;
  }
  .aria-modal-box {
    padding: 20px 16px;
  }
  .aria-modal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .aria-portrait-wrapper {
    width: 120px;
    height: 145px;
  }
  .aria-dialog-tail-desktop {
    display: none !important;
  }
  .aria-dialog-tail-mobile {
    display: block !important;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 16px;
    filter: drop-shadow(0 -3px 5px rgba(0, 0, 0, 0.6));
  }
  .aria-dialogue-header {
    justify-content: center;
  }
  .aria-speech-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  .aria-dialog-text {
    font-size: 0.86rem;
    line-height: 1.45;
  }
  .aria-dialog-text p {
    margin-bottom: 6px;
  }
  .aria-dialog-text p:last-child {
    margin-bottom: 0;
  }
  .aria-speech-bubble {
    text-align: left;
    font-size: 0.86rem;
    padding: 14px 16px;
  }
  .aria-actions-row {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    gap: 8px;
    flex-direction: column;
  }
  .aria-btn-primary, .aria-btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.88rem;
  }
  .aria-companion-bubble {
    bottom: 14px;
    left: 12px;
    right: 12px;
    max-width: 100%;
    width: auto;
  }
  .aria-companion-grid {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .aria-companion-figure-wrapper {
    width: 68px;
    height: 84px;
  }
  .aria-companion-bubble-col {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .aria-standalone-stage {
    gap: 6px;
    padding: 4px;
    max-width: 96%;
  }
  .aria-standalone-portrait-wrapper {
    width: 72px;
    height: 88px;
  }
  .aria-character-aura-glow {
    width: 72px;
    height: 72px;
  }
  .aria-speech-title {
    font-size: 1.05rem;
  }
  .aria-dialog-text {
    font-size: 0.82rem;
    line-height: 1.4;
  }
  .aria-speech-bubble-card {
    padding: 14px 12px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aria-modal-box,
  .aria-companion-bubble,
  .aria-portrait-aura-glow,
  .aria-spotlight-card,
  #header-sunday-timer-badge.aria-target-pulse {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Outcome Distribution Card Component (Profile Performance)
   ========================================================================== */
.outcome-distribution-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.outcome-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.outcome-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 0;
}

.outcome-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--antique-gold);
}

.outcome-card-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.outcome-chart-wrapper {
  width: 110px;
  height: 110px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.outcome-legend-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.outcome-legend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.outcome-legend-row:hover {
  transform: translateX(2px);
}

.outcome-legend-row.row-wins {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.outcome-legend-row.row-losses {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.18);
}

.outcome-legend-row.row-draws {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.18);
}

.outcome-legend-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.outcome-legend-label.label-wins {
  color: var(--emerald-accent);
}

.outcome-legend-label.label-losses {
  color: var(--solar-crimson);
}

.outcome-legend-label.label-draws {
  color: var(--antique-gold);
}

.outcome-legend-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.outcome-legend-indicator.dot-wins {
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.outcome-legend-indicator.dot-losses {
  background: #EF4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.outcome-legend-indicator.dot-draws {
  background: var(--antique-gold);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}

.outcome-stat-number {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.outcome-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 10px;
  margin-top: 14px;
}

@media (max-width: 360px) {
  .outcome-card-body {
    gap: 10px;
  }
  .outcome-chart-wrapper {
    width: 96px;
    height: 96px;
  }
  .outcome-legend-row {
    padding: 5px 8px;
    font-size: 0.78rem;
  }
  .outcome-stat-number {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   LEGAL TRUST & POLICY CENTER MODAL
   ========================================================================== */
.legal-modal-box {
  max-width: 860px !important;
  width: 95% !important;
  max-height: min(92vh, 760px) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 24px 26px !important;
  position: relative;
  background: var(--bg-card) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.12) !important;
  border-radius: var(--radius-xl) !important;
}

.legal-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 14px;
  padding-right: 36px;
  flex-shrink: 0;
}

.legal-modal-icon-badge {
  background: rgba(212, 175, 55, 0.12);
  color: var(--royal-gold);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.legal-tabs-row {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.legal-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.legal-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.legal-tab-btn.active {
  background: var(--antique-gold);
  color: #0A120E !important;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(197, 160, 89, 0.35);
}

.legal-tab-btn.active .legal-tab-icon {
  color: #0A120E !important;
}

.legal-body-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 160, 89, 0.4) rgba(0, 0, 0, 0.2);
}

.legal-body-container::-webkit-scrollbar {
  width: 6px;
}
.legal-body-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.legal-body-container::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.35);
  border-radius: 4px;
}
.legal-body-container::-webkit-scrollbar-thumb:hover {
  background: var(--antique-gold);
}

.legal-doc-hero {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.legal-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.legal-section h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-section p, .legal-section li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-section ul {
  margin: 6px 0 10px 18px;
  padding: 0;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-callout {
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid var(--antique-gold);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 10px 0;
  font-size: 0.83rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.legal-callout-danger {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #EF4444;
}

.legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 680px) {
  .legal-tabs-row {
    flex-direction: column;
    gap: 4px;
  }
  .legal-tab-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    justify-content: flex-start;
  }
  .legal-modal-box {
    padding: 18px 14px !important;
  }
  .legal-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .legal-modal-footer button {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   HOME SPARRING BOT LEVEL VICTORY MODAL & CELEBRATION
   ========================================================================== */
.home-victory-box {
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%) !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 240, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 28px 24px !important;
  position: relative;
  overflow: hidden;
}

.home-victory-celebration-burst {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.victory-confetti-particle {
  position: absolute;
  border-radius: 3px;
  background-color: var(--particle-color, #D4AF37);
  box-shadow: 0 0 6px var(--particle-color, #D4AF37);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  animation: confettiExplode 1.1s cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
}

@keyframes confettiExplode {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  75% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--target-x, 0px)), calc(-50% + var(--target-y, 0px))) scale(0.4) rotate(420deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .victory-confetti-particle {
    display: none !important;
  }
}

/* ==========================================================================
   MOBILE IN-GAME CHAT BOTTOM SHEET DRAWER
   ========================================================================== */
.mobile-chat-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1250;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.mobile-chat-sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-chat-sheet-content {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  height: min(60vh, 500px);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: env(safe-area-inset-bottom, 8px);
  overflow: hidden;
}

.mobile-chat-sheet-backdrop.active .mobile-chat-sheet-content {
  transform: translateY(0);
}

.mobile-chat-drag-handle {
  width: 38px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  margin: 8px auto 4px;
  flex-shrink: 0;
}

.mobile-chat-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--border-glass-light);
  flex-shrink: 0;
}

.mobile-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-chat-header-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFF;
}

.mobile-chat-header-sub {
  font-size: 0.72rem;
  color: var(--antique-gold);
  font-weight: 600;
}

.board-chat-icon-morph {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.board-chat-icon-morph .icon-chat-bubble,
.board-chat-icon-morph .icon-chat-cross {
  position: absolute;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease, color 0.22s ease;
}

.board-chat-icon-morph .icon-chat-bubble {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.board-chat-icon-morph .icon-chat-cross {
  opacity: 0;
  transform: rotate(90deg) scale(0.3);
  pointer-events: none;
}

#board-btn-chat.is-open .board-chat-icon-morph .icon-chat-bubble,
#board-btn-chat.chat-open .board-chat-icon-morph .icon-chat-bubble {
  opacity: 0;
  transform: rotate(-90deg) scale(0.3);
  pointer-events: none;
}

#board-btn-chat.is-open .board-chat-icon-morph .icon-chat-cross,
#board-btn-chat.chat-open .board-chat-icon-morph .icon-chat-cross {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #F43F5E;
}

#board-btn-chat.is-open,
#board-btn-chat.chat-open {
  color: #F43F5E !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  background: rgba(244, 63, 94, 0.12) !important;
}

.mobile-chat-sheet-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass-light);
  color: #FFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
}

.mobile-chat-sheet-close:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.45);
  color: #F43F5E;
  transform: scale(1.08) rotate(90deg);
}

.mobile-chat-sheet-close:active {
  transform: scale(0.92);
}

.mobile-chat-messages-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.mobile-quick-reactions-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 12px;
  border-top: 1px solid var(--border-glass-light);
  background: rgba(10, 14, 22, 0.6);
  flex-shrink: 0;
  scrollbar-width: none;
}

.mobile-quick-reactions-bar::-webkit-scrollbar {
  display: none;
}

.mobile-chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.mobile-chat-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass-light);
  border-radius: 8px;
  padding: 8px 12px;
  color: #FFF;
  font-size: 0.88rem;
  outline: none;
}

.mobile-chat-input-bar input:focus {
  border-color: var(--royal-gold);
}

.mobile-chat-input-bar button {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   SETTINGS & PLATFORM CONTROLS VIEW COMPONENT
   ========================================================================== */
.settings-page-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 10px 0 40px;
}

.settings-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg, 16px);
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.settings-header-titles {
  flex: 1;
  min-width: 240px;
}

.settings-header-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.settings-header-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.45;
}

.settings-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.settings-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.settings-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.settings-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.settings-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  color: var(--antique-gold);
  flex-shrink: 0;
}

.settings-card-icon svg {
  width: 22px;
  height: 22px;
}

.settings-card-info {
  flex: 1;
}

.settings-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.settings-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}

.settings-control-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.control-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.control-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Luxury Toggle Switch Button */
.btn-setting-toggle {
  position: relative;
  width: 66px;
  height: 32px;
  border-radius: 9999px;
  background: #3A3D42;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  transition: background-color 0.25s ease;
  outline: none;
}

.btn-setting-toggle .toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-setting-toggle .toggle-label {
  font-size: 0.7rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.6);
  margin-left: auto;
  user-select: none;
}

.btn-setting-toggle.active {
  background: #10B981;
}

.btn-setting-toggle.active .toggle-knob {
  transform: translateX(34px);
}

.btn-setting-toggle.active .toggle-label {
  margin-left: 0;
  margin-right: auto;
  color: #FFFFFF;
}

/* Background Theme Selector Cards */
.settings-theme-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-theme-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.settings-theme-option:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.settings-theme-option.active {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px #F59E0B;
}

.theme-swatch {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.swatch-black {
  background: #000000;
  border: 1px solid #333;
}

.swatch-grey {
  background: #202124;
  border: 1px solid #444;
}

.swatch-light {
  background: #F8F6F0;
  border: 1px solid #CCC;
}

.swatch-accent {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.4);
}

.theme-option-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-option-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.theme-option-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.theme-check-icon {
  color: #10B981;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.settings-theme-option.active .theme-check-icon {
  opacity: 1;
}

/* Animation Speed Chips */
.settings-speed-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.settings-chip-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-chip-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.settings-chip-btn.active {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 0 1px #F59E0B;
}

.chip-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--antique-gold);
}

.chip-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.chip-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Voice Persona Selector */
.settings-voice-gender-selection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.gender-section-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gender-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.gender-choice-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.gender-choice-btn.active {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 0 1px #F59E0B;
}

.gender-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.gender-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gender-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.gender-persona {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gender-check {
  color: #10B981;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gender-choice-btn.active .gender-check {
  opacity: 1;
}

.settings-test-btn {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
}

@media (max-width: 600px) {
  .settings-cards-grid {
    grid-template-columns: 1fr;
  }
  .settings-speed-chips {
    grid-template-columns: repeat(2, 1fr);
  }
  .gender-btn-group {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TRANSPARENCY CENTER, PLATFORM FOOTER & ACCOUNT SECURITY STYLES
   ========================================================================== */
.legal-tabs-row {
  overflow-x: auto !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.legal-tabs-row::-webkit-scrollbar {
  height: 4px;
}
.legal-tabs-row::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.35);
  border-radius: 4px;
}
.legal-tab-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Platform Lobby Footer */
.platform-lobby-footer {
  margin-top: 36px;
  padding: 24px;
  background: rgba(15, 23, 20, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg, 16px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.platform-lobby-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.platform-lobby-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.platform-lobby-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.platform-lobby-footer-link {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--trans-fast);
}
.platform-lobby-footer-link:hover {
  color: var(--royal-gold);
}
.platform-lobby-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Account Security Settings Card */
.settings-security-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.security-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.security-input-wrapper input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm, 8px);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color var(--trans-fast);
}
.security-input-wrapper input:focus {
  outline: none;
  border-color: var(--royal-gold);
}
.security-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.security-toggle-pwd:hover {
  color: var(--royal-gold);
}
.security-danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
  border-radius: var(--radius-md, 12px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-security-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--trans-fast);
}
.btn-security-danger:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #EF4444;
}

/* Light Theme Overrides for New Components */
html.light-theme .platform-lobby-footer,
body.light-theme .platform-lobby-footer {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04) !important;
}
html.light-theme .platform-lobby-footer-bottom,
body.light-theme .platform-lobby-footer-bottom {
  border-top-color: rgba(0, 0, 0, 0.06) !important;
}
html.light-theme .security-input-wrapper input,
body.light-theme .security-input-wrapper input {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
}

/* =========================================================================
   CONTENDER AVATAR PICKER MODAL
   ========================================================================= */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 12px;
  padding: 6px 2px;
}

.avatar-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.avatar-option-card:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.avatar-option-card.selected {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #F59E0B !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35) !important;
}

.avatar-option-img-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option-card.selected .avatar-option-img-wrap {
  border-color: #F59E0B;
}

.avatar-option-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-option-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 76px;
}

.avatar-option-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #F59E0B;
  color: #0A0B0E;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.avatar-option-card.selected .avatar-option-check {
  display: flex;
}

.avatar-tab-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-tab-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #F59E0B;
  color: #F59E0B;
  font-weight: 800;
}

/* ============================================================================
   DEDICATED PLAYER PROFILE PAGE (#view-player-profile)
   ============================================================================ */
.pp-page-shell {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 32px;
}

.pp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pp-back-btn,
.pp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.pp-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pp-profile-slug {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  border-radius: 8px;
}

.pp-hero-card {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pp-hero-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 260px;
}

.pp-avatar-shell {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}

.pp-avatar-wrap {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 55, 0.65);
  background: linear-gradient(135deg, var(--royal-gold), #8A6A2C);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: #0B0E14;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.pp-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pp-avatar-status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-panel, #111622);
  background: #64748B;
}

.pp-avatar-status-dot.online {
  background: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

.pp-avatar-status-dot.in_game {
  background: #F59E0B;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.85);
}

.pp-identity-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pp-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pp-username {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.pp-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pp-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-secondary);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.pp-presence-pill.online {
  background: rgba(16, 185, 129, 0.14);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.38);
}

.pp-presence-pill.in_game {
  background: rgba(245, 158, 11, 0.16);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.45);
}

.pp-member-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pp-bio {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 560px;
}

.pp-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 240px;
}

.pp-challenge-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.pp-tc-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pp-tc-chip {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pp-tc-chip.active,
.pp-tc-chip:hover {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--royal-gold);
  color: var(--royal-gold);
}

.pp-secondary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  font-size: 0.84rem;
  font-weight: 700;
}

.pp-watch-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(217, 119, 6, 0.22));
  color: #FDE68A;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.pp-watch-live-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.36);
}

.pp-live-banner {
  padding: 16px 20px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(16, 20, 30, 0.65));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pp-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #FBBF24;
  margin-bottom: 4px;
}

.pp-live-matchup {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pp-live-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pp-ratings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pp-rating-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-rating-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pp-rating-val {
  font-family: var(--font-mono);
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--royal-gold);
}

.pp-stats-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
}

.pp-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.pp-stat-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pp-color-win { color: #34D399; }
.pp-color-loss { color: #F87171; }
.pp-color-gold { color: var(--royal-gold); }

.pp-stat-cap {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pp-history-card {
  padding: 20px;
}

.pp-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pp-history-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pp-history-subtitle {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pp-history-filters {
  display: flex;
  gap: 6px;
}

.pp-filter-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.pp-filter-chip.active {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--royal-gold);
  color: var(--royal-gold);
}

.pp-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pp-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.pp-match-row.is-live {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.07);
}

.pp-match-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  flex: 1;
}

.pp-match-outcome-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  min-width: 64px;
  text-align: center;
}

.pp-match-outcome-pill.win { background: rgba(16, 185, 129, 0.16); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.35); }
.pp-match-outcome-pill.loss { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.32); }
.pp-match-outcome-pill.draw { background: rgba(148, 163, 184, 0.16); color: #CBD5E1; border: 1px solid rgba(148, 163, 184, 0.32); }
.pp-match-outcome-pill.live { background: rgba(245, 158, 11, 0.2); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.45); }

.pp-match-players {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pp-match-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pp-match-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pp-match-action-btn {
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pp-empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.search-action-profile {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--royal-gold);
}

/* Google OAuth 2.0 Continue Button & Divider */
.auth-google-block {
  width: 100%;
  margin-top: 6px;
}

.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 6px;
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.btn-google-oauth {
  width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #F1F5F9;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-google-oauth:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-google-oauth:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.btn-google-oauth:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.google-g-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

html.light-theme .btn-google-oauth,
body.light-theme .btn-google-oauth,
html[data-theme="light"] .btn-google-oauth,
body[data-theme="light"] .btn-google-oauth {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html.light-theme .btn-google-oauth:hover:not(:disabled),
body.light-theme .btn-google-oauth:hover:not(:disabled),
html[data-theme="light"] .btn-google-oauth:hover:not(:disabled),
body[data-theme="light"] .btn-google-oauth:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: #94A3B8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}


/* Theme-Responsive & WebP Icon Helpers */
.ec-img-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.ec-swords-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
}

.btn-landing-quickplay .ec-swords-icon,
.dash-btn-start-hero .ec-swords-icon,
.btn-pub-chal-accept .ec-swords-icon,
.btn-accept-public-challenge .ec-swords-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65));
}

/* Clean Professional Dialogs & Profile Avatar Chip Contrast */
.aria-talking-indicator,
.aria-live-beacon,
.aria-speech-tail-desktop,
.aria-speech-tail-mobile,
.aria-dialog-tail-anchor {
  display: none !important;
}

.profile-avatar-edit-chip span[data-icon],
.profile-avatar-edit-chip svg {
  color: #090C12 !important;
  stroke: #090C12 !important;
  width: 15px !important;
  height: 15px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 768px) {
  .aria-standalone-stage-backdrop {
    padding: 10px 8px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .aria-standalone-stage {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: auto !important;
    gap: 8px !important;
    max-height: 94vh !important;
  }

  .aria-character-stage {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 0 4px !important;
    margin: 0 !important;
  }

  .aria-character-glow-ring {
    display: none !important;
  }

  .aria-character-img-wrapper {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 1.5px solid rgba(212, 175, 55, 0.5) !important;
    background: rgba(15, 20, 32, 0.9) !important;
    margin: 0 !important;
  }

  .aria-character-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
  }

  .aria-character-tag {
    margin-top: 0 !important;
    padding: 4px 10px !important;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
  }

  .aria-speech-bubble-stage,
  .aria-speech-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 10px !important;
  }

  .aria-speech-bubble-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 14px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  .aria-companion-overlay {
    padding: 10px 8px !important;
  }

  .aria-companion-grid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    gap: 8px !important;
  }

  .aria-companion-speech {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
    box-sizing: border-box !important;
  }
}

/* Desktop & Shared Settings Language Selector */
.settings-lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.setting-lang-chip {
  min-width: 84px;
}

/* ==========================================================================
   OBSIDIAN + HYPER GOLD — COMPREHENSIVE MODAL & DIALOGUE SUITE
   ========================================================================== */
.avatar-picker-box,
#modal-avatar-picker .modal-box {
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.invite-share-modal-box,
#modal-invite-share .modal-box {
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#generic-modal .modal-box,
#modal-play-friend .modal-box,
#modal-daily-puzzle .modal-box,
#modal-claim-account .modal-box,
#lang-select-modal .modal-box,
#modal-sent-challenges .modal-box,
#modal-create-public-challenge .modal-box,
#modal-user-profile .modal-box,
#resign-confirm-modal .modal-box,
#welcome-gift-modal .modal-box {
  background: linear-gradient(165deg, #10131A 0%, #08090D 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.avatar-card,
.avatar-choice-item,
.avatar-grid-item {
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.avatar-card:hover,
.avatar-choice-item:hover,
.avatar-grid-item:hover {
  border-color: rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.14) !important;
}

.avatar-card.active,
.avatar-card.selected,
.avatar-choice-item.active,
.avatar-choice-item.selected,
.avatar-grid-item.selected {
  border-color: #FFB703 !important;
  background: rgba(245, 158, 11, 0.12) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.32) !important;
  transform: scale(1.04);
}

.friend-choice-card {
  background: rgba(23, 27, 36, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 16px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  transition: border-color 0.2s ease, transform 0.2s ease !important;
}

.friend-choice-card:hover {
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.invite-perks-banner {
  background: rgba(16, 19, 26, 0.8) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  border-radius: 14px !important;
}
