/* client/css/hex-design.css */
/* CATIAN — Hexagonal Minimalist Design System (Ground Zero) */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  --gold: #fbbf24;
  --gold-dim: rgba(251, 191, 36, 0.18);
  --gold-border: rgba(251, 191, 36, 0.35);
  --bg-deep: #080e1a;
  --bg-card: rgba(12, 20, 38, 0.92);
  --bg-card2: rgba(15, 27, 50, 0.88);
  --text-main: #e8edf5;
  --text-muted: #64748b;
  --text-bright: #f0f4ff;
  --accent-blue: #38bdf8;
  --accent-green: #22d3a5;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --hex-size: 52px;
}

/* ─── Hexagon Clip-path Shape ──────────────────────────────── */
.hex-shape {
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}

/* ─── App Header — Sleek, Clean & Modern ─────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 58px;
  min-height: 58px;
  background: rgba(8, 14, 26, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.45) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 200 !important;
  overflow: visible !important;
}

/* ─── Hex Badge — Section Label ───────────────────────────── */
.hex-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  border: 1.5px solid var(--gold-border) !important;
  color: var(--gold) !important;
  padding: 4px 14px !important;
  border-radius: 4px !important;
  font-weight: 800 !important;
  font-size: 0.7rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  position: relative;
}

.hex-title {
  font-size: 1.3rem !important;
  font-weight: 900 !important;
  color: var(--text-bright) !important;
  text-shadow: none !important;
  letter-spacing: -0.3px;
  margin: 0 !important;
}

.hex-desc {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  line-height: 1.5;
  margin: 0 !important;
}

/* ─── Page Content Card ────────────────────────────────────── */
.page-content-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.28);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px 24px 90px 24px;
  gap: 20px;
  min-height: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Hex Action Card (Jugar page) ─────────────────────────── */
.hex-action-zone {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.hex-action-zone::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: var(--gold-dim);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Lobby Action Row ─────────────────────────────────────── */
.lobby-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Join Room Box ────────────────────────────────────────── */
.join-room-box {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}

.join-room-box input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(8, 14, 26, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-bright);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-align: center;
  font-family: 'Outfit', monospace;
  transition: border-color 0.2s ease;
}

.join-room-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-accent {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #000 !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 24px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  letter-spacing: 1px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-accent:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4) !important;
}

.btn-accent:active {
  transform: translateY(0) !important;
}

.btn-primary {
  background: rgba(251, 191, 36, 0.1) !important;
  color: var(--gold) !important;
  border: 1.5px solid var(--gold-border) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
}

.btn-primary:hover {
  background: rgba(251, 191, 36, 0.2) !important;
  border-color: var(--gold) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
  border: 1.5px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ─── Stat Badges in Header ────────────────────────────────── */
.user-stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.stat-badge.gold {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ─── Bell Button ──────────────────────────────────────────── */
.btn-notifications-bell {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 12px !important;
  color: var(--gold) !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.btn-notifications-bell:hover {
  background: var(--gold-dim) !important;
  border-color: var(--gold) !important;
  transform: scale(1.06) !important;
}

/* Bell subtle sway when notifications are pending */
.notifications-bell-container.has-notifications .btn-notifications-bell svg {
  animation: bell-subtle-swing 3.8s ease-in-out infinite;
  transform-origin: top center;
}

/* Radar Ping Glow on Badge */
#notifications-badge-count {
  position: absolute !important;
  top: -3px !important;
  right: -3px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  padding: 1px 5px !important;
  min-width: 17px !important;
  height: 17px !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #080e1a !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95), 0 0 20px rgba(239, 68, 68, 0.4) !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

#notifications-badge-count::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.7);
  z-index: -1;
  animation: badge-ping-radar 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes badge-ping-radar {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  65%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes bell-subtle-swing {
  0%, 75%, 100% {
    transform: rotate(0deg);
  }
  80% {
    transform: rotate(14deg);
  }
  85% {
    transform: rotate(-12deg);
  }
  90% {
    transform: rotate(8deg);
  }
  95% {
    transform: rotate(-4deg);
  }
}

/* ─── Hexagonal Decorative Tiles (Section Headers) ─────────── */
.hex-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.hex-icon-tile {
  width: 44px;
  height: 44px;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ─── Player List / Social Cards ───────────────────────────── */
.social-player-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.social-player-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-1px);
}

.reg-hex-avatar {
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: border-color 0.2s;
}

.player-row:hover {
  border-color: var(--gold-border);
}

/* ─── Leaderboard Table ─────────────────────────────────────── */
.responsive-ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Outfit', sans-serif;
}

.responsive-ranking-table thead tr {
  background: rgba(251, 191, 36, 0.06);
  border-bottom: 1px solid var(--gold-border);
}

.responsive-ranking-table th {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 12px;
}

.responsive-ranking-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.responsive-ranking-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-table-container {
  border: 1px solid var(--gold-border) !important;
  border-radius: 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--bg-card) !important;
}

/* ─── Shop Tabs ─────────────────────────────────────────────── */
.shop-tabs-pills {
  display: flex;
  gap: 6px;
  padding: 2px;
}

.shop-tab-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.shop-tab-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

.shop-tab-btn:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

/* ─── Shop Grid & Carousel — Responsive Fix ─────────────────── */
/* Override style.css which sets display:flex on shop-carousel-container,
   breaking the inner grid layout */
.shop-carousel-container {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 4px 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* On very small screens, 2 columns max */
@media (max-width: 420px) {
  .shop-items-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Hide the prev/next carousel nav buttons since we use a grid */
.btn-shop-nav {
  display: none !important;
}

/* Fix shop-items-carousel if used instead of grid */
.shop-items-carousel {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding: 4px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.shop-card-item {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Category wrapper scroll fix */
.shop-category-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  margin-bottom: 12px !important;
  /* prevent it from expanding beyond container */
  max-width: 100% !important;
  min-width: 0 !important;
}

.shop-tabs-pills {
  display: flex;
  gap: 6px;
  padding: 2px;
  /* allow horizontal scroll without wrapping */
  flex-wrap: nowrap;
  width: max-content;
}



@keyframes legendaryGlow {
  0% {
    box-shadow: 0 4px 18px rgba(251, 191, 36, 0.2);
  }

  100% {
    box-shadow: 0 6px 28px rgba(251, 191, 36, 0.45);
  }
}

/* Card States */
.shop-card-hex.state-equipped {
  border: 2px solid #fbbf24 !important;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.98)) !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35) !important;
}

.shop-card-hex.state-owned {
  border: 1.5px solid rgba(34, 211, 165, 0.5) !important;
}

/* Rarity Tag Pill */
.rarity-badge-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.rarity-tag-common {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.rarity-tag-rare {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.rarity-tag-epic {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.rarity-tag-legendary {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
}

/* Action Buttons inside Card */
.btn-shop-action {
  width: 100%;
  padding: 9px 6px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.btn-shop-action.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
}

.btn-shop-action.btn-equip {
  background: rgba(34, 211, 165, 0.15);
  border: 1.5px solid #22d3a5;
  color: #22d3a5;
}

.btn-shop-action.btn-equip:hover {
  background: rgba(34, 211, 165, 0.28);
  transform: translateY(-1px);
}

.btn-shop-action.btn-active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.25));
  border: 1.5px solid #fbbf24;
  color: #fbbf24;
  cursor: default;
}

/* Collapsible Color Forge Trigger & Drawer */
.color-forge-toggle-btn {
  width: 100%;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1.5px dashed rgba(251, 191, 36, 0.4);
  border-radius: 14px;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.color-forge-toggle-btn:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: #fbbf24;
}

/* Empty State Card */
.shop-empty-card {
  text-align: center;
  padding: 36px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px dashed var(--border-subtle);
  border-radius: 18px;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.shop-empty-card .icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}

/* ─── Tab Bar Bottom ────────────────────────────────────────── */
.tab-bar-bottom {
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  box-shadow: none !important;
}

.tab-bar-item.active-tab {
  color: var(--gold) !important;
}

.tab-bar-item.active-tab .tab-icon {
  transform: none !important;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.55)) !important;
}

/* ─── Login Screen ─────────────────────────────────────────── */
#login-screen {
  background: radial-gradient(ellipse at 30% 20%, rgba(251, 191, 36, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(56, 189, 248, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #080e1a 0%, #0c1628 100%) !important;
}

.login-card {
  background: rgba(12, 20, 38, 0.9) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(30px) !important;
}

/* ─── Auth Form ─────────────────────────────────────────────── */
.auth-input-group label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
  display: block;
}

.auth-input-group input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-bright);
  font-size: 0.92rem;
  font-family: 'Outfit', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.auth-submit-btn {
  width: 100%;
  padding: 13px !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
}

/* ─── Hexagonal Background Pattern ────────────────────────── */
.lobby-hex-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.028;
}

.lobby-hex-bg svg {
  width: 100%;
  height: 100%;
}

/* ─── Profile Section ──────────────────────────────────────── */
.profile-page {
  padding: 16px 0 85px 0 !important;
}

.pcard {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 18px !important;
  padding: 18px !important;
  box-shadow: none !important;
}

.pcard-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  color: var(--text-muted) !important;
  margin-bottom: 12px !important;
}

/* ─── XP Bar ───────────────────────────────────────────────── */
.xp-bar-bg {
  height: 5px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

.xp-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
  border-radius: 10px !important;
  transition: width 0.5s ease !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

/* ─── Stat Tile ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.stat-tile {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-tile .val {
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  color: var(--text-bright) !important;
}

.stat-tile .lbl {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* ─── Hex Background Pattern Override for Lobby ─────────────── */
#lobby-screen {
  background: radial-gradient(ellipse at 20% 10%, rgba(251, 191, 36, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 90%, rgba(56, 189, 248, 0.03) 0%, transparent 40%),
    linear-gradient(180deg, #080e1a 0%, #0b1220 100%) !important;
}

/* ─── Mobile Overrides ──────────────────────────────────────── */
@media (max-width: 600px) {
  .app-header {
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 12px !important;
  }

  .btn-notifications-bell {
    width: 36px !important;
    height: 36px !important;
  }

  .user-stats-bar .stat-badge:not(.gold) {
    display: none !important;
  }

  .stat-badge.gold {
    font-size: 0.8rem !important;
    padding: 5px 12px !important;
  }

  .hex-title {
    font-size: 1.1rem !important;
  }

  .hex-badge {
    font-size: 0.65rem !important;
    padding: 3px 10px !important;
  }

  .page-content-card {
    padding: 14px 12px 85px 12px !important;
    min-height: auto !important;
  }

  .lobby-action-row {
    flex-direction: column;
  }

  .join-room-box {
    min-width: 0;
    width: 100%;
  }

  .hex-action-zone .btn-accent,
  .hex-action-zone .btn-primary,
  .pcard .btn-accent,
  .pcard .btn-primary {
    width: 100%;
    text-align: center;
  }

  .pcard {
    border-radius: 14px !important;
    padding: 14px !important;
  }
}

/* ─── Hardware Acceleration & Mobile Thermal Optimization ─── */
#board-container {
  contain: strict;
  isolation: isolate;
}

#catan-board-canvas {
  contain: strict;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  image-rendering: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

@media (max-width: 768px) {
  /* Reduce heavy GPU rasterization blurs on mobile devices to prevent overheating */
  .app-header,
  .pcard,
  .page-content-card,
  .modal-box {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  /* Prevent unnecessary layout thrashing */
  #game-screen {
    contain: layout paint;
  }
}