    @font-face {
      font-family: 'Bebas Neue';
      src: url('fonts/BebasNeue-Regular.woff2') format('woff2');
      font-weight: 400;
      font-style: normal;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    button {
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    html, body {
      width: 100%;
      height: 100%;
      overflow: hidden; /* Prevent any scrolling */
      position: fixed; /* Lock the viewport */
      overscroll-behavior: none; /* Prevent pull-to-refresh and overscroll */
      -webkit-overflow-scrolling: touch; /* iOS smooth scrolling disabled */
    }

    body {
      background: #000;
      display: flex;
      justify-content: center;
      align-items: center;
      font-family: 'Consolas', 'Courier New', monospace;
      touch-action: none; /* Prevent default touch behaviors */
      -webkit-user-select: none; /* Prevent text selection on iOS */
      user-select: none;
      overflow: hidden; /* Hide any overflow from scaled canvas */
    }

    #gameCanvas {
      max-width: none; /* Allow canvas to be scaled larger than viewport */
      max-height: none;
    }

    canvas {
      background: #222;
      display: block;
      width: 100vw;
      height: 100vh;
      object-fit: contain; /* Maintain aspect ratio while fitting screen */
      image-rendering: auto;
      pointer-events: auto;
    }

    .hidden {
      display: none !important;
    }

    #restartButton {
      position: absolute;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 1000;
      text-align: center;
    }

    #restartButton button {
      background: #e53935;
      color: white;
      border: none;
      padding: 20px 50px;
      font-size: 24px;
      border-radius: 10px;
      cursor: pointer;
      font-family: 'Consolas', 'Courier New', monospace;
      transition: background 0.3s, transform 0.1s;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    #restartButton button:hover {
      background: #c62828;
      transform: translateY(-2px);
      box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    }

    #restartButton button:active {
      background: #b71c1c;
      transform: translateY(0);
    }

    /* Fullscreen button */
    #fullscreenBtn {
      position: fixed;
      bottom: 12px;
      right: 12px;
      width: 48px;
      height: 48px;
      background: rgba(0, 0, 0, 0.55);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 10px;
      font-size: 22px;
      cursor: pointer;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    #fullscreenBtn:hover {
      background: rgba(0, 0, 0, 0.8);
    }

    /* Debug grid overlay */
    #debugGrid {
      position: fixed;
      inset: 0;
      z-index: 99999;
      pointer-events: none;
    }
    #debugGridSvg {
      width: 100%;
      height: 100%;
      display: block;
    }
    #debugGrid .dg-line {
      stroke: rgba(0, 255, 180, 0.35);
      stroke-width: 1;
    }
    #debugGrid .dg-label {
      fill: rgba(0, 255, 180, 0.9);
      font-family: 'Consolas', monospace;
      font-size: 11px;
      font-weight: bold;
      dominant-baseline: middle;
      text-anchor: middle;
    }
    #debugGrid .dg-cell-label {
      fill: rgba(0, 255, 180, 0.18);
      font-family: 'Consolas', monospace;
      font-size: 10px;
      dominant-baseline: middle;
      text-anchor: middle;
    }

    #fullscreenTip {
      position: fixed;
      bottom: 72px;
      right: 12px;
      background: rgba(0, 0, 0, 0.88);
      color: #fff;
      font-family: 'Consolas', monospace;
      font-size: 12px;
      padding: 10px 14px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.2);
      z-index: 9999;
      max-width: 180px;
      text-align: center;
      line-height: 1.5;
      pointer-events: none;
      transition: opacity 0.4s;
    }

    #fullscreenTip.hidden {
      display: none;
    }

    /* Map Select Screen */
    #mapSelectScreen {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      z-index: 300;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(to bottom, #120824, #05020f);
    }

    #mapSelectInner {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 48px;
    }

    #mapSelectTitle {
      font-family: 'JungleAdventurer', Impact, sans-serif;
      font-size: 88px;
      color: #FFD700;
      letter-spacing: 12px;
      text-shadow: 0 0 48px rgba(255,215,0,0.5), 0 3px 8px #000;
      margin: 0;
    }

    #mapCarousel {
      display: flex;
      align-items: center;
      gap: 40px;
    }

    .map-nav-arrow {
      background: rgba(20,18,40,0.7);
      border: 4px solid rgba(255,215,0,0.35);
      border-radius: 50%;
      color: #FFD700;
      font-size: 72px;
      width: 104px;
      height: 104px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
      line-height: 1;
      padding: 0;
    }

    .map-nav-arrow:hover {
      background: rgba(255,215,0,0.15);
      border-color: #FFD700;
    }

    .map-nav-arrow:disabled {
      opacity: 0.25;
      cursor: default;
    }

    #mapCardCenter {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 28px;
      width: 440px;
    }

    #mapCardImgWrap {
      width: 440px;
      height: 280px;
      border-radius: 24px;
      overflow: hidden;
      border: 5px solid rgba(255,215,0,0.3);
      background: rgba(10,8,30,0.85);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #mapCardImg {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    #mapCardNoImg {
      font-size: 96px;
      color: rgba(255,255,255,0.3);
    }

    #mapCardInfo {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    #mapCardName {
      font-family: 'JungleAdventurer', Impact, sans-serif;
      font-size: 48px;
      letter-spacing: 6px;
      color: #fff;
    }

    .beta-badge {
      background: #EF5350;
      color: #fff;
      font-family: 'Orbitron', sans-serif;
      font-size: 18px;
      font-weight: 900;
      letter-spacing: 3px;
      padding: 6px 18px;
      border-radius: 8px;
      white-space: nowrap;
      pointer-events: none;
    }

    .map-lb-btn {
      font-family: sans-serif;
      font-size: 36px;
      color: rgba(255,215,0,0.7);
      background: rgba(20,18,40,0.5);
      border: 3px solid rgba(255,215,0,0.25);
      border-radius: 12px;
      padding: 8px 40px;
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
      line-height: 1;
    }

    .map-lb-btn:hover {
      color: #FFD700;
      background: rgba(255,215,0,0.12);
      border-color: rgba(255,215,0,0.6);
    }

    #mapPlayBtn {
      font-family: 'JungleAdventurer', Impact, sans-serif;
      font-size: 56px;
      letter-spacing: 6px;
      padding: 28px 120px;
      background: rgba(20,18,40,0.92);
      border: 5px solid rgba(255,215,0,0.5);
      border-radius: 24px;
      color: #FFD700;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    }

    #mapPlayBtn:hover {
      background: rgba(255,215,0,0.15);
      border-color: #FFD700;
      box-shadow: 0 0 48px rgba(255,215,0,0.35);
    }

    #mapComingSoon {
      font-family: 'JungleAdventurer', Impact, sans-serif;
      font-size: 40px;
      letter-spacing: 8px;
      color: rgba(255,255,255,0.5);
    }

    /* ── Username Screen ───────────────────────────────────────────────────── */
    #usernameScreen {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.88);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      /* relative so #recoveryReveal can fill it absolutely */
    }

    #usernameContent {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 42px 52px;
      background: rgba(20,12,8,0.92);
      border: 2px solid rgba(255,215,0,0.35);
      border-radius: 12px;
      box-shadow: 0 0 60px rgba(255,140,0,0.18);
      width: min(400px, 90vw);
    }

    #usernameTitleRow {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
    }

    #usernameMushroom {
      width: 52px;
      height: 52px;
      object-fit: contain;
      filter: drop-shadow(0 0 8px rgba(255,140,0,0.5));
    }

    #usernameTitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 52px;
      letter-spacing: 6px;
      color: #FFD700;
      text-shadow: 0 0 20px rgba(255,215,0,0.5);
      margin: 0 0 0 10px;
    }

    #usernameSubtitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 20px;
      letter-spacing: 4px;
      color: rgba(255,255,255,0.65);
      margin: 0;
    }

    #usernameInput {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 28px;
      letter-spacing: 5px;
      text-align: center;
      color: #fff;
      background: rgba(255,255,255,0.08);
      border: 2px solid rgba(255,215,0,0.4);
      border-radius: 6px;
      padding: 12px 24px;
      outline: none;
      width: 280px;
      caret-color: #FFD700;
      text-transform: uppercase;
    }

    #usernameInput::placeholder { color: rgba(255,255,255,0.25); }
    #usernameInput:focus        { border-color: #FFD700; box-shadow: 0 0 16px rgba(255,215,0,0.25); }

    #usernameError {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 14px;
      letter-spacing: 1px;
      color: #ff5555;
      margin: -8px 0;
    }

    #usernameConfirmBtn {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 26px;
      letter-spacing: 5px;
      color: #000;
      background: #FFD700;
      border: none;
      border-radius: 6px;
      padding: 12px 48px;
      cursor: pointer;
      transition: transform 0.1s, box-shadow 0.1s;
    }

    #usernameConfirmBtn:hover  { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(255,215,0,0.4); }
    #usernameConfirmBtn:active { transform: translateY(0); }

    /* ── Lobby Leaderboard Button ───────────────────────────────────────────── */
    #lobbyLbBtn {
      position: fixed;
      top: 67.25vh;
      left: 2.25vw;
      transform-origin: left center;
      transform: scale(1.5);
      z-index: 200;
      font-family: 'JungleAdventurer', Impact, sans-serif;
      font-size: 14px;
      letter-spacing: 2px;
      color: #FFD700;
      background: rgba(8,4,18,0.75);
      border: 1.5px solid rgba(255,215,0,0.35);
      border-radius: 8px;
      padding: 6px 14px;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }
    #lobbyLbBtn:hover { background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.7); transform: scale(1.5); }

    .lb-map { color: #e8a83a; text-align: center; }

    /* ── Full Leaderboard Room ───────────────────────────────────────────────── */
    #fullLeaderboard {
      position: fixed;
      inset: 0;
      z-index: 600;
      background-image: url('images/behind_lobby.png');
      background-size: cover;
      background-position: center;
    }

    #fullLbInner {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      width: min(720px, 96vw);
      top: 8.33vh;
      bottom: 8.33vh;
      background: rgba(10,6,3,0.40);
      border: 2px solid rgba(255,215,0,0.3);
      border-radius: 12px;
      padding: 20px 24px 24px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    #fullLbHeader {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      margin: 0 0 20px;
      border-bottom: 1px solid rgba(255,215,0,0.2);
      padding-bottom: 14px;
      flex-shrink: 0;
    }

    #fullLbTitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 38px;
      letter-spacing: 8px;
      color: #FFD700;
      text-align: center;
      margin: 0;
      text-shadow: 0 0 18px rgba(255,215,0,0.4);
    }

    #fullLbCloseBtn {
      position: absolute;
      right: 0;
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 14px;
      letter-spacing: 2px;
      color: #fff;
      background: rgba(180,30,30,0.7);
      border: 1.5px solid rgba(255,100,100,0.5);
      border-radius: 50%;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s;
    }
    #fullLbCloseBtn:hover { background: rgba(220,40,40,0.9); }

    #fullLbScroll {
      overflow-y: auto;
      flex: 1;
    }

    #fullLbTable {
      width: 100%;
      border-collapse: collapse;
    }

    #fullLbBody tr {
      border-bottom: 1px solid rgba(255,255,255,0.06);
      transition: background 0.15s;
    }
    #fullLbBody tr.lb-me { background: rgba(255,215,0,0.18); outline: 1.5px solid rgba(255,215,0,0.55); }
    #fullLbBody tr.lb-me td { color: #FFD700; }
    #fullLbBody tr.lb-admin td { color: #4488ff; }
    #fullLbBody tr.lb-admin { background: rgba(40,80,180,0.15); }
    #fullLbBody td {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 20px;
      letter-spacing: 2px;
      color: rgba(255,255,255,0.85);
      padding: 18px 10px;
    }

    /* ── Leaderboard Panel ─────────────────────────────────────────────────── */
    #leaderboardPanel {
      position: fixed;
      width: min(480px, 86vw);
      background: rgba(10,6,3,0.95);
      border: 2px solid rgba(255,215,0,0.3);
      border-radius: 12px;
      padding: 20px 24px 24px;
      z-index: 1000;
      pointer-events: auto;
    }

    #lbHeader {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      margin: 0 0 20px;
    }

    #lbTitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 38px;
      letter-spacing: 8px;
      color: #FFD700;
      text-align: center;
      margin: 0;
      text-shadow: 0 0 18px rgba(255,215,0,0.4);
    }

    #lbWipeBtn {
      position: absolute;
      right: 0;
      pointer-events: all;
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 14px;
      letter-spacing: 2px;
      color: rgba(255,80,80,0.85);
      background: rgba(180,30,30,0.18);
      border: 1.5px solid rgba(255,80,80,0.35);
      border-radius: 6px;
      padding: 5px 12px;
      cursor: pointer;
    }

    #lbWipeBtn:hover {
      background: rgba(200,40,40,0.35);
      border-color: rgba(255,80,80,0.7);
      color: #ff5555;
    }

    #lbCloseBtn {
      position: absolute;
      right: 36px;
      background: rgba(180,30,30,0.7);
      border: 1.5px solid rgba(255,100,100,0.5);
      border-radius: 50%;
      width: 28px;
      height: 28px;
      color: #fff;
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

    #lbCloseBtn:hover { background: rgba(220,40,40,0.9); }

    #leaderboardTable {
      width: 100%;
      border-collapse: collapse;
    }

    .lb-th {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 15px;
      letter-spacing: 3px;
      color: rgba(255,215,0,0.7);
      text-align: left;
      padding: 0 10px 10px;
      border-bottom: 1px solid rgba(255,215,0,0.2);
    }

    #leaderboardBody tr {
      border-bottom: 1px solid rgba(255,255,255,0.06);
      transition: background 0.15s;
    }

    #leaderboardBody tr.lb-me {
      background: rgba(255,215,0,0.18);
      outline: 1.5px solid rgba(255,215,0,0.55);
    }
    #leaderboardBody tr.lb-me td { color: #FFD700; }

    #leaderboardBody tr.lb-admin td { color: #4488ff; }
    #leaderboardBody tr.lb-admin { background: rgba(40,80,180,0.15); }

    #leaderboardBody td {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 18px;
      letter-spacing: 2px;
      color: rgba(255,255,255,0.85);
      padding: 10px 10px;
    }

    .lb-rank  { color: rgba(255,215,0,0.6); width: 40px; }
    .lb-th-avatar { width: 56px; }
    .lb-avatar-cell { width: 56px; padding: 6px 8px; text-align: center; vertical-align: middle; }
    .lb-avatar-wrap { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; margin: 0 auto; border: 2px solid rgba(255,255,255,0.22); background: rgba(40,40,60,0.7); }
    .lb-avatar-wrap.lb-avatar-mine { background-color: var(--profile-bg-color, #607D8B); border-color: rgba(255,215,0,0.65); }
    .lb-avatar { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
    .lb-name  { color: #fff; }
    .lb-score { color: #7fff7f; text-align: right; }

    /* ── Profile picture background picker (Account settings) ── */
    .profile-pic-editor {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 8px 0 4px;
    }
    .profile-pic-preview {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      overflow: hidden;
      border: 3px solid rgba(255,255,255,0.3);
      flex-shrink: 0;
      transition: background-color 0.15s;
    }
    .profile-pic-preview-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .profile-color-swatches {
      display: flex;
      flex-wrap: wrap;
      gap: 9px;
      flex: 1;
    }
    .profile-swatch {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid rgba(255,255,255,0.18);
      transition: transform 0.1s, border-color 0.1s, box-shadow 0.1s;
      flex-shrink: 0;
    }
    .profile-swatch:hover { transform: scale(1.25); border-color: rgba(255,255,255,0.6); }
    .profile-swatch-active { border-color: #FFD700 !important; transform: scale(1.25); box-shadow: 0 0 8px rgba(255,215,0,0.6); }
    .lb-loading { text-align: center; padding: 24px; color: rgba(255,255,255,0.4);
                  font-family: 'Bebas Neue', Impact, sans-serif; font-size: 18px; letter-spacing: 3px; }

    /* ── Shop Overlay ── */
    #shopOverlay {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -54%);
      width: min(700px, 90vw);
      max-height: 76vh;
      background: rgba(8, 5, 2, 0.88);
      border: 2px solid rgba(255,180,0,0.35);
      border-radius: 14px;
      display: flex;
      flex-direction: column;
      z-index: 100;
      overflow: hidden;
    }

    #shopHeader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 24px 12px;
      border-bottom: 1px solid rgba(255,180,0,0.2);
    }

    #shopTitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 34px;
      letter-spacing: 8px;
      color: #FFC840;
      text-shadow: 0 0 16px rgba(255,180,0,0.5);
    }

    #shopUserInfo {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }

    #shopUsername {
      font-family: 'Orbitron', sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 2px;
      color: #FFD700;
      opacity: 0.8;
    }

    #shopCoinBadge {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 22px;
      letter-spacing: 2px;
      color: #FFD700;
      background: rgba(255,215,0,0.1);
      border: 1.5px solid rgba(255,215,0,0.35);
      border-radius: 20px;
      padding: 4px 14px;
    }

    #shopSearchRow {
      padding: 10px 20px 4px;
    }

    #shopSearchInput {
      width: 100%;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 8px;
      color: #fff;
      font-family: 'Consolas', monospace;
      font-size: 13px;
      padding: 7px 12px;
      outline: none;
    }

    #shopCategoryTabs {
      display: flex;
      gap: 6px;
      padding: 8px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .shop-tab {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 6px;
      color: rgba(255,255,255,0.55);
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 13px;
      letter-spacing: 2px;
      padding: 4px 10px;
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }

    .shop-tab:hover        { background: rgba(255,200,0,0.12); color: #FFC840; }
    .shop-tab-active       { background: rgba(255,200,0,0.18) !important; color: #FFC840 !important;
                              border-color: rgba(255,180,0,0.45) !important; }

    #shopGrid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
      gap: 10px;
      padding: 14px 20px 20px;
      overflow-y: auto;
      flex: 1;
    }

    .shop-item {
      background: rgba(255,255,255,0.05);
      border: 1.5px solid rgba(255,255,255,0.1);
      border-radius: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 10px 6px 8px;
      gap: 6px;
      transition: border-color 0.15s, background 0.15s;
    }

    .shop-item:hover { border-color: rgba(255,200,0,0.4); background: rgba(255,200,0,0.07); }

    .shop-item-img {
      width: 56px; height: 56px;
      object-fit: contain;
    }

    .shop-item-name {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 11px;
      letter-spacing: 1px;
      color: rgba(255,255,255,0.8);
      text-align: center;
      line-height: 1.2;
    }

    .shop-item-price {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 13px;
      letter-spacing: 1px;
      color: #FFD700;
    }

    .shop-buy-btn {
      background: rgba(255,200,0,0.18);
      border: 1.5px solid rgba(255,200,0,0.45);
      border-radius: 6px;
      color: #FFC840;
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 13px;
      letter-spacing: 2px;
      padding: 4px 12px;
      cursor: pointer;
      transition: background 0.15s;
      width: 100%;
    }

    .shop-buy-btn:hover:not(:disabled) { background: rgba(255,200,0,0.32); }

    .shop-buy-btn:disabled {
      opacity: 0.35;
      cursor: default;
    }

    .shop-buy-btn.shop-btn-equip  { border-color: rgba(100,220,100,0.5); color: #88ee88; background: rgba(80,180,80,0.12); }
    .shop-buy-btn.shop-btn-owned  { border-color: rgba(80,180,80,0.4);  color: #88ee88; background: rgba(80,180,80,0.08); }

    /* Shop confirm modal */
    #shopConfirmModal {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 300;
    }

    #shopConfirmBox {
      background: rgba(12,8,4,0.96);
      border: 2px solid rgba(255,200,0,0.45);
      border-radius: 14px;
      padding: 28px 36px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      min-width: 220px;
    }

    #shopConfirmImg { width: 72px; height: 72px; object-fit: contain; }

    #shopConfirmName {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 22px;
      letter-spacing: 3px;
      color: #fff;
    }

    #shopConfirmSubtext {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 16px;
      letter-spacing: 2px;
      color: #FFD700;
    }

    #shopConfirmBtns {
      display: flex;
      gap: 12px;
      margin-top: 4px;
    }

    #shopConfirmYes {
      background: rgba(255,200,0,0.22);
      border: 1.5px solid rgba(255,200,0,0.55);
      border-radius: 8px;
      color: #FFC840;
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 17px;
      letter-spacing: 3px;
      padding: 8px 24px;
      cursor: pointer;
    }

    #shopConfirmYes:hover { background: rgba(255,200,0,0.38); }

    #shopConfirmNo {
      background: rgba(255,255,255,0.06);
      border: 1.5px solid rgba(255,255,255,0.2);
      border-radius: 8px;
      color: rgba(255,255,255,0.6);
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 17px;
      letter-spacing: 3px;
      padding: 8px 24px;
      cursor: pointer;
    }

    #shopConfirmNo:hover { background: rgba(255,255,255,0.12); }

    /* Lobby settings button — replaced by canvas-drawn gear icon */
    #lobbySettingsBtn { display: none !important; }

    /* Lobby Screen */
    #lobbyScreen {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 100;
      pointer-events: none;
    }

    @font-face {
      font-family: 'JungleAdventurer';
      src: url('fonts/jungle-adventurer/JungleAdventurer.otf') format('opentype'),
           url('fonts/jungle-adventurer/JungleAdventurer.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }

    #startGameBtn {
      position: absolute;
      left: 62.5%;
      top: 37.5%;
      transform: translate(-50%, -50%) scale(3);
      transform-origin: center center;
      background: #e8a800;
      border: 8px solid #ffcc00;
      border-radius: 30px;
      padding: 30px 60px;
      cursor: pointer;
      pointer-events: auto;
      z-index: 200;
      font-family: 'JungleAdventurer', 'Orbitron', monospace;
      font-size: 50px;
      font-weight: 900;
      color: #1a0a00;
      letter-spacing: 0.05em;
      box-shadow: 0 0 38px rgba(255, 180, 0, 0.5);
      transition: background 0.1s, box-shadow 0.1s, transform 0.1s;
    }

    #startGameBtn img { display: none; }

    #startGameBtn::after { content: 'PLAY'; }

    #startGameBtn:hover {
      background: #ffc400;
      box-shadow: 0 0 60px rgba(255, 200, 0, 0.7);
      transform: translate(-50%, -50%) scale(3) translateY(-3px);
    }

    #startGameBtn:active {
      transform: translate(-50%, -50%) scale(3);
      box-shadow: 0 0 23px rgba(255, 180, 0, 0.4);
    }

    /* Pause Button */
    #pauseBtn {
      position: absolute;
      top: 12px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.55);
      color: rgba(255, 255, 255, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.25);
      padding: 10px 20px;
      min-height: 44px;
      font-size: 13px;
      border-radius: 20px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 1px;
      z-index: 500;
      transition: all 0.15s ease;
    }

    #pauseBtn:hover {
      background: rgba(0, 0, 0, 0.75);
      border-color: rgba(255, 255, 255, 0.55);
      color: #fff;
    }

    #pauseBtn:active {
      transform: translateX(-50%) scale(0.96);
    }

    /* Pause Menu */
    #pauseMenu {
      position: fixed;
      top: 10px;
      right: 10px;
      transform: none;
      background: rgba(0, 0, 0, 0.85);
      padding: 10px 14px;
      border-radius: 8px;
      z-index: 2000;
      border: 2px solid #e53935;
      min-width: 0;
      width: 180px;
    }

    #pauseMenu h2 {
      color: #fff;
      text-align: center;
      margin: 0 0 8px 0;
      font-size: 16px;
      font-family: 'Impact', 'Arial Black', sans-serif;
      letter-spacing: 2px;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .menu-section {
      margin-bottom: 8px;
    }

    .menu-label {
      color: #fff;
      font-size: 11px;
      margin-bottom: 4px;
      display: block;
      font-family: 'Consolas', 'Courier New', monospace;
    }

    /* Sliders */
    .slider-container {
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .slider {
      flex: 1;
      -webkit-appearance: none;
      appearance: none;
      height: 6px;
      background: #444;
      outline: none;
      border-radius: 3px;
    }

    .slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 20px;
      height: 20px;
      background: #fff;
      cursor: pointer;
      border-radius: 50%;
      border: 2px solid #e53935;
    }

    .slider::-moz-range-thumb {
      width: 20px;
      height: 20px;
      background: #fff;
      cursor: pointer;
      border-radius: 50%;
      border: 2px solid #e53935;
    }

    .slider-value {
      color: #fff;
      font-size: 18px;
      min-width: 30px;
      text-align: center;
      font-family: 'Consolas', 'Courier New', monospace;
    }

    /* Toggle Switches */
    .toggle-container {
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .toggle-switch {
      position: relative;
      width: 60px;
      height: 30px;
      background: transparent;
      border: 2px solid #e53935;
      border-radius: 15px;
      cursor: pointer;
      transition: background 0.3s;
    }

    .toggle-switch.active {
      background: #e53935;
    }

    .toggle-slider {
      position: absolute;
      top: 3px;
      left: 3px;
      width: 20px;
      height: 20px;
      background: #fff;
      border-radius: 50%;
      transition: transform 0.3s;
    }

    .toggle-switch.active .toggle-slider {
      transform: translateX(30px);
    }

    .toggle-label {
      color: #fff;
      font-size: 16px;
      font-family: 'Consolas', 'Courier New', monospace;
    }

    /* Resume Button */
    #resumeBtn {
      width: 100%;
      background: linear-gradient(145deg, #FFD700, #FFA500);
      color: white;
      border: 2px solid #fff;
      padding: 18px;
      font-size: 22px;
      border-radius: 10px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 2px;
      margin-top: 20px;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      box-shadow:
        0 6px 16px rgba(229, 57, 53, 0.6),
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
      transition: all 0.2s ease;
    }

    #resumeBtn:hover {
      background: linear-gradient(145deg, #FFE55C, #FFB700);
      transform: translateY(-2px);
      box-shadow:
        0 8px 20px rgba(229, 57, 53, 0.7),
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
    }

    #resumeBtn:active {
      background: linear-gradient(145deg, #FFA500, #FF8C00);
      transform: translateY(0);
      box-shadow:
        0 3px 10px rgba(229, 57, 53, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    #pauseResetBtn {
      width: 100%;
      background: linear-gradient(145deg, #FFD700, #FFA500);
      color: white;
      border: 2px solid #fff;
      padding: 15px;
      font-size: 20px;
      border-radius: 10px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 2px;
      margin-top: 15px;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      box-shadow:
        0 4px 12px rgba(229, 57, 53, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
      transition: all 0.2s ease;
    }

    #pauseResetBtn:hover {
      background: linear-gradient(145deg, #FFE55C, #FFB700);
      transform: translateY(-2px);
      box-shadow:
        0 6px 16px rgba(229, 57, 53, 0.6),
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    }

    #pauseResetBtn:active {
      background: linear-gradient(145deg, #FFA500, #FF8C00);
      transform: translateY(0);
      box-shadow:
        0 2px 8px rgba(229, 57, 53, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    #returnToLobbyBtn {
      width: 100%;
      background: linear-gradient(145deg, #4a90d9, #2563b0);
      color: white;
      border: 2px solid #fff;
      padding: 15px;
      font-size: 20px;
      border-radius: 10px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 2px;
      margin-top: 15px;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      box-shadow:
        0 4px 12px rgba(37, 99, 176, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
      transition: all 0.2s ease;
    }

    #returnToLobbyBtn:hover {
      background: linear-gradient(145deg, #5aa0e9, #3073c0);
      transform: translateY(-2px);
    }

    #returnToLobbyBtn:active {
      background: linear-gradient(145deg, #2563b0, #1a4f99);
      transform: translateY(0);
    }

    /* Death Screen — GTA "WASTED" style */
    #deathScreen {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.88);
      z-index: 3000;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 40px;
      animation: deathFade 0.4s ease-in;
    }

    @keyframes deathFade {
      from { background: rgba(0,0,0,0); }
      to   { background: rgba(0,0,0,0.88); }
    }

    .wasted-text {
      font-family: 'Impact', 'Arial Black', sans-serif;
      font-size: clamp(64px, 12vw, 140px);
      color: #c0392b;
      letter-spacing: 10px;
      text-shadow:
        3px 3px 0 #7b241c,
        -2px -2px 0 #7b241c,
        0 0 40px rgba(192, 57, 43, 0.9),
        0 0 80px rgba(192, 57, 43, 0.4);
      animation: wastedPop 0.25s cubic-bezier(0.2, 1.4, 0.6, 1) forwards;
    }

    @keyframes wastedPop {
      from { transform: scale(1.5); opacity: 0; }
      to   { transform: scale(1);   opacity: 1; }
    }

    .death-stats-row {
      display: flex;
      align-items: center;
      gap: 40px;
    }

    .death-stat {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
    }

    .death-stat-divider {
      width: 1px;
      height: 50px;
      background: rgba(255,255,255,0.2);
    }

    .stat-label {
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      font-size: 13px;
      color: #888;
      letter-spacing: 4px;
    }

    .stat-value {
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      font-size: 38px;
      color: #fff;
      letter-spacing: 2px;
    }

    .death-btn-row {
      display: flex;
      gap: 14px;
      justify-content: center;
      flex-wrap: wrap;
    }

    #resetQuestBtn {
      background: transparent;
      color: rgba(255,255,255,0.75);
      border: 2px solid rgba(255,255,255,0.3);
      padding: 12px 36px;
      min-height: 44px;
      font-size: 16px;
      border-radius: 3px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 5px;
      transition: all 0.15s ease;
    }

    #resetQuestBtn:hover {
      color: #fff;
      border-color: rgba(255,255,255,0.8);
      background: rgba(255,255,255,0.07);
    }

    #resetQuestBtn:active {
      transform: scale(0.97);
    }

    #returnToLobbyFromDeathBtn {
      background: transparent;
      color: rgba(200,160,32,0.85);
      border: 2px solid rgba(200,160,32,0.4);
      padding: 12px 28px;
      min-height: 44px;
      font-size: 14px;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      border-radius: 6px;
      cursor: pointer;
      letter-spacing: 3px;
      transition: all 0.15s ease;
      touch-action: manipulation;
    }
    #returnToLobbyFromDeathBtn:hover {
      color: #FFD700;
      border-color: rgba(200,160,32,0.9);
      background: rgba(200,160,32,0.08);
    }
    #returnToLobbyFromDeathBtn:active { transform: scale(0.97); }

    #musicMenuBtn {
      width: 100%;
      background: linear-gradient(145deg, #1a2040, #2a3060);
      color: #99aaff;
      border: 2px solid #4455aa;
      padding: 15px;
      font-size: 20px;
      border-radius: 10px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 2px;
      margin-top: 15px;
      transition: all 0.2s ease;
    }

    #musicMenuBtn:hover {
      background: linear-gradient(145deg, #2a3050, #3a4070);
      border-color: #6677cc;
      color: #bbccff;
      transform: translateY(-2px);
    }

    #musicMenuBtn:active {
      transform: translateY(0);
    }

    /* Disc Inventory Screen */
    #inventoryScreen {
      position: fixed;
      inset: 0;
      background: rgba(5, 5, 15, 0.97);
      z-index: 3000;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      overflow: hidden;
    }

    #inventoryContent {
      width: 100%;
      max-width: 580px;
      height: 100%;
      overflow-y: auto;
      padding: 20px 20px 40px;
      box-sizing: border-box;
    }

    #inventoryHeader {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid #222244;
    }

    #inventoryHeader h2 {
      flex: 1;
      text-align: center;
      color: #FFD700;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      font-size: 26px;
      letter-spacing: 4px;
      margin: 0;
      text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }

    #inventoryBackBtn {
      background: transparent;
      color: #aaa;
      border: 1px solid #444;
      padding: 10px 16px;
      min-height: 44px;
      font-size: 13px;
      border-radius: 8px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 1px;
      white-space: nowrap;
      transition: all 0.15s;
    }

    #inventoryBackBtn:hover {
      border-color: #FFD700;
      color: #FFD700;
    }

    #discGrid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
    }

    .disc-slot {
      aspect-ratio: 1;
      background: #0d0d1a;
      border: 2px solid #1e1e36;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      transition: transform 0.1s, box-shadow 0.1s;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .disc-slot.collected {
      border-color: #c8a200;
      background: #1a1a0d;
      cursor: pointer;
    }

    .disc-slot.collected:hover {
      border-color: #FFD700;
      box-shadow: 0 0 14px rgba(255, 215, 0, 0.35);
      transform: scale(1.06);
    }

    .disc-slot.playing {
      border-color: #44ff88;
      box-shadow: 0 0 18px rgba(68, 255, 136, 0.45);
    }

    .disc-slot img {
      width: 78%;
      height: 78%;
      object-fit: contain;
    }

    .disc-empty-icon {
      font-size: 22px;
      color: rgba(255, 255, 255, 0.07);
    }

    .disc-empty-icon::before {
      content: '?';
    }

    .disc-num {
      position: absolute;
      bottom: 3px;
      right: 5px;
      font-size: 9px;
      color: rgba(255, 255, 255, 0.2);
      font-family: monospace;
    }

    .disc-slot.collected .disc-num {
      color: rgba(255, 215, 0, 0.5);
    }

    .play-indicator {
      position: absolute;
      top: 4px;
      left: 5px;
      font-size: 11px;
      color: #44ff88;
    }

    /* Inventory settings section */
    #inventorySettings {
      margin-top: 22px;
      padding-top: 18px;
      border-top: 1px solid #1a1a2e;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .inv-setting-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .inv-setting-label {
      color: #888;
      font-size: 12px;
      font-family: 'Consolas', monospace;
      min-width: 76px;
    }

    .cheat-input {
      flex: 1;
      padding: 6px 10px;
      font-size: 14px;
      text-align: center;
      background: #111122;
      color: #fff;
      border: 1px solid #333366;
      border-radius: 6px;
      font-family: 'Consolas', monospace;
    }

    /* Loading Screen */
    #loadingScreen {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #000;
    }

    #loadingBg {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      z-index: 0;
    }

    #loadingBarWrap {
      position: relative;
      z-index: 1;
      width: 65%;
      max-width: 680px;
      height: 54px;
      background: rgba(0, 0, 0, 0.65);
      border: 4px solid rgba(255, 220, 100, 0.7);
      border-radius: 30px;
      overflow: hidden;
      box-shadow: 0 0 30px rgba(255, 180, 0, 0.4);
    }

    #loadingBar {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #ff8c00, #ffd700, #ffe066);
      border-radius: 30px;
      transition: width 0.12s ease;
      box-shadow: inset 0 2px 6px rgba(255,255,255,0.3);
    }

    #loadingCopyright {
      position: absolute;
      bottom: 18px;
      left: 0;
      width: 100%;
      text-align: center;
      z-index: 2;
      font-family: 'Orbitron', 'Consolas', monospace;
      font-size: 11px;
      letter-spacing: 0.12em;
      color: rgba(255, 220, 100, 0.65);
      text-transform: uppercase;
      pointer-events: none;
    }

    /* Chest Screen */
    #chestScreen {
      position: fixed;
      inset: 0;
      background: rgba(5, 5, 15, 0.97);
      z-index: 3000;
      display: flex;
      overflow: hidden;
    }

    #chestContent {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      padding: 16px 16px 20px;
      box-sizing: border-box;
      overflow: hidden;
    }

    #chestHeader {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 14px;
      padding-bottom: 12px;
      border-bottom: 1px solid #222244;
      flex-shrink: 0;
    }

    #chestHeader h2 {
      flex: 1;
      text-align: center;
      color: #C8A020;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      font-size: 26px;
      letter-spacing: 4px;
      margin: 0;
      text-shadow: 0 0 20px rgba(200, 160, 32, 0.4);
    }

    #chestBackBtn {
      background: transparent;
      color: #aaa;
      border: 1px solid #444;
      padding: 10px 16px;
      min-height: 44px;
      font-size: 13px;
      border-radius: 8px;
      cursor: pointer;
      font-family: 'JungleAdventurer', 'Impact', sans-serif;
      letter-spacing: 1px;
      white-space: nowrap;
      transition: all 0.15s;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    #chestBackBtn:hover { border-color: #C8A020; color: #C8A020; }

    #chestBody {
      display: flex;
      flex-direction: column;
      flex: 1;
      gap: 12px;
      min-height: 0;
      overflow: hidden;
    }

    #chestRunSection {
      flex-shrink: 0;
    }

    #chestStorageSection {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .chest-section-label {
      color: #555;
      font-size: 10px;
      letter-spacing: 2px;
      font-family: 'Consolas', monospace;
      text-transform: uppercase;
      margin-bottom: 6px;
    }

    #chestRunSlots {
      display: flex;
      flex-direction: row;
      gap: 10px;
    }

    #chestRunSlots .chest-slot {
      width: 80px;
      height: 80px;
      flex-shrink: 0;
      aspect-ratio: unset;
    }

    #chestGrid {
      display: grid;
      grid-template-columns: repeat(auto-fill, 72px);
      gap: 5px;
      overflow-y: auto;
      overflow-x: hidden;
      flex: 1;
      min-height: 0;
      align-content: start;
      scrollbar-width: thin;
      scrollbar-color: rgba(200,160,32,0.35) transparent;
    }
    #chestGrid::-webkit-scrollbar { width: 5px; }
    #chestGrid::-webkit-scrollbar-track { background: transparent; }
    #chestGrid::-webkit-scrollbar-thumb {
      background: rgba(200,160,32,0.35);
      border-radius: 3px;
    }

    .chest-slot {
      width: 72px;
      height: 72px;
      box-sizing: border-box;
      background: #0a0a18;
      border: 2px solid #1a1a30;
      border-radius: 7px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      cursor: grab;
      touch-action: none;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      -webkit-user-select: none;
      transition: box-shadow 0.1s;
    }

    .chest-slot:hover {
      box-shadow: 0 0 8px rgba(200, 160, 32, 0.25);
    }

    .chest-slot.chest-slot-dragging {
      opacity: 0.35;
    }

    .chest-slot.chest-slot-drag-over {
      border-color: #FFD700 !important;
      box-shadow: 0 0 14px rgba(255, 215, 0, 0.5) !important;
    }

    .chest-empty-icon::before {
      content: '·';
      font-size: 20px;
      color: rgba(255, 255, 255, 0.08);
    }

    #chestTrash {
      position: absolute;
      bottom: 18px;
      right: 18px;
      width: 56px;
      height: 56px;
      background: rgba(60, 10, 10, 0.82);
      border: 2px solid rgba(180, 40, 40, 0.45);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      cursor: pointer;
      z-index: 4001;
      transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.15s;
      user-select: none;
      -webkit-user-select: none;
    }

    #chestTrash.trash-active {
      background: rgba(180, 30, 30, 0.95);
      border-color: #ef5350;
      box-shadow: 0 0 22px rgba(239, 83, 80, 0.65);
      transform: scale(1.12);
    }

    #dragGhost {
      position: fixed;
      width: 64px;
      height: 64px;
      background: rgba(10, 10, 24, 0.92);
      border: 2px solid #FFD700;
      border-radius: 8px;
      pointer-events: none;
      z-index: 9999;
      display: none;
      padding: 6px;
      box-sizing: border-box;
      box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }

    #dragGhost img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      pointer-events: none;
    }

    @media (min-width: 600px) {
      #chestBody {
        flex-direction: row;
        overflow: hidden;
      }

      #chestRunSection {
        width: 110px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
      }

      #chestRunSlots {
        flex-direction: column;
      }

      #chestRunSlots .chest-slot {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
      }

    }

    /* ── Crafting Menu ── */
    #craftingMenu {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 500;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding-right: calc(3% + 10vw);
    }

    #craftingPanel {
      pointer-events: auto;
      background: rgba(5, 5, 20, 0.84);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 16px;
      padding: 24px 28px;
      display: flex;
      gap: 32px;
      align-items: flex-start;
      max-height: 90vh;
      overflow-y: auto;
    }

    #craftingArea {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }

    .craft-label {
      color: #999;
      font-size: 10px;
      letter-spacing: 2px;
      font-family: 'Consolas', monospace;
      text-transform: uppercase;
      text-align: center;
      margin-bottom: 2px;
    }

    #craftingCirclesWrap {
      position: relative;
      width: 462px;
      height: 420px;
    }

    #craftingLines {
      position: absolute;
      top: 0; left: 0;
      pointer-events: none;
    }

    .craft-circle {
      position: absolute;
      width: 168px;
      height: 168px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.3);
      background: rgba(12, 12, 32, 0.92);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: grab;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      transition: border-color 0.15s, box-shadow 0.15s;
      overflow: hidden;
    }

    #craftSlot0   { left: 21px;  top: 21px; }
    #craftSlot1   { left: 273px; top: 21px; }
    #craftSlotOut { left: 147px; top: 230px; cursor: grab; }

    .craft-circle:hover {
      border-color: rgba(255, 255, 255, 0.55);
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    }

    .craft-output.craft-elixir-result {
      border-color: #00CED1 !important;
      background: rgba(0, 80, 90, 0.45) !important;
      box-shadow: 0 0 28px rgba(0, 206, 209, 0.75) !important;
      animation: craftElixirPulse 1.2s ease-in-out infinite !important;
    }

    @keyframes craftElixirPulse {
      0%, 100% { box-shadow: 0 0 20px rgba(0, 206, 209, 0.55); }
      50%       { box-shadow: 0 0 40px rgba(0, 206, 209, 0.95); }
    }

    .craft-output.craft-has-result {
      border-color: #C8A020 !important;
      box-shadow: 0 0 22px rgba(200, 160, 32, 0.55) !important;
      animation: craftPulse 1.2s ease-in-out infinite;
      cursor: pointer;
    }

    @keyframes craftPulse {
      0%, 100% { box-shadow: 0 0 18px rgba(200, 160, 32, 0.4); }
      50%       { box-shadow: 0 0 34px rgba(200, 160, 32, 0.85); }
    }

    .craft-circle.craft-slot-dragging { opacity: 0.28; }

    .craft-empty {
      color: rgba(255, 255, 255, 0.22);
      font-size: 46px;
      pointer-events: none;
    }

    #miniChestSection {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    #craftRunSection {
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      margin-bottom: 4px;
    }

    #craftRunGrid {
      display: flex;
      flex-direction: row;
      gap: 8px;
    }

    #miniChestGrid {
      display: grid;
      grid-template-columns: repeat(auto-fill, 72px);
      gap: 5px;
      max-height: 460px;
      overflow-y: auto;
      overflow-x: hidden;
    }

    .mini-chest-slot {
      width: 72px;
      height: 72px;
      box-sizing: border-box;
      background: #0a0a18;
      border: 1.5px solid #1a1a30;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      cursor: grab;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      transition: border-color 0.1s;
      overflow: hidden;
    }

    .mini-chest-slot:hover { border-color: rgba(200, 160, 32, 0.45); }
    .mini-chest-slot.mini-slot-dragging { opacity: 0.28; }

    /* ── Login Screen ──────────────────────────────────────────────────────── */
    .login-section {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      width: 100%;
    }

    .login-section-label {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 13px;
      letter-spacing: 3px;
      color: rgba(255,255,255,0.45);
      margin: 0;
    }

    .login-or {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 14px;
      letter-spacing: 4px;
      color: rgba(255,255,255,0.3);
    }

    #recoveryCodeInput {
      font-family: 'Consolas', monospace;
      font-size: 22px;
      letter-spacing: 8px;
      text-align: center;
      color: #fff;
      background: rgba(255,255,255,0.06);
      border: 2px solid rgba(255,255,255,0.2);
      border-radius: 6px;
      padding: 10px 20px;
      outline: none;
      width: 220px;
      caret-color: #FFD700;
      text-transform: uppercase;
    }

    #recoveryCodeInput::placeholder { color: rgba(255,255,255,0.2); letter-spacing: 4px; }
    #recoveryCodeInput:focus { border-color: rgba(100,180,255,0.6); box-shadow: 0 0 14px rgba(100,180,255,0.2); }

    #loginLoading {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 16px;
      letter-spacing: 4px;
      color: rgba(255,215,0,0.6);
    }

    /* Recovery code reveal */
    #recoveryReveal {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #recoveryRevealBox {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      padding: 42px 52px;
      background: rgba(10,20,10,0.96);
      border: 2px solid rgba(100,220,100,0.45);
      border-radius: 12px;
      box-shadow: 0 0 50px rgba(80,200,80,0.15);
      max-width: 380px;
      text-align: center;
    }

    .recovery-reveal-title {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 34px;
      letter-spacing: 6px;
      color: #7fff7f;
    }

    .recovery-reveal-hint {
      font-family: 'Consolas', monospace;
      font-size: 13px;
      color: rgba(255,255,255,0.55);
      margin: 0;
      line-height: 1.6;
    }

    .recovery-code-big {
      font-family: 'Consolas', monospace;
      font-size: 34px;
      letter-spacing: 10px;
      color: #FFD700;
      background: rgba(255,215,0,0.08);
      border: 1.5px solid rgba(255,215,0,0.35);
      border-radius: 8px;
      padding: 14px 28px;
    }

    #recoveryRevealOkBtn {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 22px;
      letter-spacing: 4px;
      color: #000;
      background: #7fff7f;
      border: none;
      border-radius: 6px;
      padding: 10px 36px;
      cursor: pointer;
      transition: transform 0.1s;
    }
    #recoveryRevealOkBtn:hover { transform: translateY(-2px); }

    /* ── Settings Overlay ──────────────────────────────────────────────────── */
    #settingsOverlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.75);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5000;
    }

    #settingsPanel {
      width: min(720px, 92vw);
      max-height: 86vh;
      background: rgba(10,10,22,0.97);
      border: 1.5px solid rgba(255,255,255,0.14);
      border-radius: 14px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 20px 80px rgba(0,0,0,0.7);
    }

    #settingsHeader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 24px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    #settingsTitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 28px;
      letter-spacing: 6px;
      color: #FFD700;
    }

    #settingsCloseBtn {
      background: none;
      border: 1px solid rgba(255,255,255,0.22);
      color: rgba(255,255,255,0.7);
      font-size: 18px;
      width: 34px;
      height: 34px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.12s, color 0.12s;
    }
    #settingsCloseBtn:hover { background: rgba(255,255,255,0.1); color: #fff; }

    #settingsTabs {
      display: flex;
      gap: 0;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .stab {
      flex: 1;
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 15px;
      letter-spacing: 3px;
      color: rgba(255,255,255,0.45);
      background: none;
      border: none;
      border-bottom: 3px solid transparent;
      padding: 13px 10px;
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s;
    }
    .stab:hover { color: rgba(255,255,255,0.8); }
    .stab.stab-active {
      color: #FFD700;
      border-bottom-color: #FFD700;
    }

    #settingsContent {
      overflow-y: auto;
      padding: 24px 28px;
      flex: 1;
    }

    .stab-section {
      margin-bottom: 28px;
    }

    .stab-section-title {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 14px;
      letter-spacing: 4px;
      color: rgba(255,255,255,0.35);
      margin-bottom: 14px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      padding-bottom: 6px;
    }

    /* Account tab */
    .settings-text-input {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 20px;
      letter-spacing: 4px;
      color: #fff;
      background: rgba(255,255,255,0.07);
      border: 1.5px solid rgba(255,255,255,0.2);
      border-radius: 6px;
      padding: 10px 18px;
      outline: none;
      width: 100%;
      box-sizing: border-box;
      caret-color: #FFD700;
      text-transform: uppercase;
    }
    .settings-text-input::placeholder { color: rgba(255,255,255,0.2); }
    .settings-text-input:focus { border-color: rgba(255,215,0,0.5); }

    .settings-msg {
      font-family: 'Consolas', monospace;
      font-size: 12px;
      margin: 4px 0 0;
    }

    .settings-btn-row {
      display: flex;
      gap: 12px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    .settings-action-btn {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 15px;
      letter-spacing: 3px;
      color: #000;
      background: #FFD700;
      border: none;
      border-radius: 6px;
      padding: 9px 20px;
      cursor: pointer;
      transition: transform 0.1s, opacity 0.1s;
    }
    .settings-action-btn:hover { transform: translateY(-1px); }
    .settings-action-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

    .settings-admin-btn {
      background: #3a6fd8;
      color: #fff;
    }
    .settings-admin-btn:hover { background: #4a80f0; }

    .settings-wipe-btn {
      background: rgba(180, 30, 30, 0.55);
      color: #ffaaaa;
      border-color: rgba(255, 80, 80, 0.5);
    }
    .settings-wipe-btn:hover { background: rgba(220, 40, 40, 0.75); color: #fff; }

    .stab-danger-zone {
      border-top: 1px solid rgba(255, 80, 80, 0.2);
      margin-top: 4px;
    }

    .recovery-code-box {
      font-family: 'Consolas', monospace;
      font-size: 26px;
      letter-spacing: 8px;
      color: #FFD700;
      background: rgba(255,215,0,0.07);
      border: 1.5px solid rgba(255,215,0,0.28);
      border-radius: 8px;
      padding: 12px 22px;
      display: inline-block;
    }

    .settings-hint {
      font-family: 'Consolas', monospace;
      font-size: 11px;
      color: rgba(255,255,255,0.35);
      margin: 8px 0 0;
      line-height: 1.5;
    }

    /* Bugs & Reviews tab */
    .bug-type-row {
      display: flex;
      gap: 24px;
      align-items: center;
      margin-top: 6px;
    }
    .bug-type-opt {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 16px;
      letter-spacing: 2px;
      color: rgba(255,255,255,0.75);
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
    }
    .bug-type-opt input[type="radio"] { accent-color: #FFD700; width: 16px; height: 16px; cursor: pointer; }
    .bug-textarea {
      width: 100%;
      min-height: 120px;
      margin-top: 8px;
      background: rgba(255,255,255,0.05);
      border: 1.5px solid rgba(255,215,0,0.25);
      border-radius: 6px;
      color: #fff;
      font-family: 'Consolas', monospace;
      font-size: 13px;
      line-height: 1.6;
      padding: 10px 12px;
      resize: vertical;
      outline: none;
      transition: border-color 0.15s;
    }
    .bug-textarea:focus { border-color: rgba(255,215,0,0.55); }
    .bug-textarea::placeholder { color: rgba(255,255,255,0.25); }
    .bug-word-count {
      font-family: 'Consolas', monospace;
      font-size: 11px;
      color: rgba(255,215,0,0.5);
      float: right;
      font-weight: normal;
      letter-spacing: 0;
    }

    /* Controls tab — keyboard diagram */
    .kb-section { overflow-x: auto; }

    #keyboardDiagram {
      display: flex;
      flex-direction: column;
      gap: 5px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 10px;
      padding: 14px 16px;
      width: fit-content;
    }

    .kb-row {
      display: flex;
      gap: 5px;
    }

    .kb-key {
      font-family: 'Consolas', monospace;
      font-size: 10px;
      color: rgba(255,255,255,0.6);
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 5px;
      min-width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 6px;
      box-sizing: border-box;
      user-select: none;
    }

    .kb-key.kb-wide  { min-width: 56px; }
    .kb-key.kb-space { min-width: 160px; }

    .kb-key.kb-bound {
      background: rgba(68,136,255,0.28);
      border-color: #4488ff;
      color: #90bbff;
      box-shadow: 0 0 8px rgba(68,136,255,0.35);
    }

    /* Keybind list */
    #bindList {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

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

    .bind-label {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 17px;
      letter-spacing: 3px;
      color: rgba(255,255,255,0.75);
    }

    .bind-btn {
      font-family: 'Consolas', monospace;
      font-size: 13px;
      color: rgba(255,255,255,0.85);
      background: rgba(255,255,255,0.08);
      border: 1.5px solid rgba(255,255,255,0.2);
      border-radius: 6px;
      padding: 7px 16px;
      min-width: 100px;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.12s, background 0.12s;
    }
    .bind-btn:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); }
    .bind-btn.bind-btn-active {
      background: rgba(68,136,255,0.22);
      border-color: #4488ff;
      color: #90bbff;
      animation: bindPulse 0.8s infinite;
    }
    @keyframes bindPulse {
      0%, 100% { box-shadow: 0 0 6px rgba(68,136,255,0.3); }
      50%       { box-shadow: 0 0 16px rgba(68,136,255,0.7); }
    }

    .bind-conflict {
      font-family: 'Consolas', monospace;
      font-size: 12px;
      color: #ff6b6b;
      background: rgba(255,80,80,0.1);
      border: 1px solid rgba(255,80,80,0.3);
      border-radius: 6px;
      padding: 8px 12px;
      margin-bottom: 12px;
    }

    /* Audio tab */
    .audio-row {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .audio-label {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 16px;
      letter-spacing: 3px;
      color: rgba(255,255,255,0.65);
      min-width: 130px;
    }

    .settings-slider {
      flex: 1;
      -webkit-appearance: none;
      appearance: none;
      height: 5px;
      background: rgba(255,255,255,0.15);
      border-radius: 3px;
      outline: none;
      cursor: pointer;
    }
    .settings-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      background: #FFD700;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 0 8px rgba(255,215,0,0.4);
    }

    .audio-val {
      font-family: 'Consolas', monospace;
      font-size: 15px;
      color: #FFD700;
      min-width: 22px;
      text-align: right;
    }

    /* Graphics tab */
    .graphics-row {
      display: flex;
      align-items: center;
      gap: 18px;
      padding: 10px 0;
    }

    .graphics-val {
      font-family: 'Consolas', monospace;
      font-size: 16px;
      color: #FFD700;
      min-width: 46px;
      text-align: right;
    }

    /* ── Admin Code Modal ──────────────────────────────────────────────────── */
    #adminCodeModal {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 6000;
    }

    #adminCodeBox {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      padding: 38px 48px;
      background: rgba(8,8,22,0.98);
      border: 2px solid rgba(68,136,255,0.45);
      border-radius: 12px;
      box-shadow: 0 0 60px rgba(68,136,255,0.2);
    }

    #adminCodeTitle {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 24px;
      letter-spacing: 4px;
      color: #4488ff;
    }

    #adminCodeInput {
      font-family: 'Consolas', monospace;
      font-size: 28px;
      letter-spacing: 10px;
      text-align: center;
      color: #fff;
      background: rgba(255,255,255,0.07);
      border: 2px solid rgba(68,136,255,0.4);
      border-radius: 6px;
      padding: 10px 20px;
      outline: none;
      width: 160px;
      caret-color: #4488ff;
    }
    #adminCodeInput:focus { border-color: #4488ff; box-shadow: 0 0 12px rgba(68,136,255,0.3); }

    #adminCodeError {
      font-family: 'Consolas', monospace;
      font-size: 12px;
      color: #ff6b6b;
      margin: -6px 0;
    }

    #adminCodeBtns {
      display: flex;
      gap: 12px;
    }

    #adminCodeConfirmBtn {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 18px;
      letter-spacing: 3px;
      color: #fff;
      background: #3a6fd8;
      border: none;
      border-radius: 6px;
      padding: 9px 28px;
      cursor: pointer;
      transition: background 0.12s;
    }
    #adminCodeConfirmBtn:hover { background: #4a80f0; }
    #adminCodeConfirmBtn:disabled { opacity: 0.4; cursor: not-allowed; }

    #adminCodeCancelBtn {
      font-family: 'Bebas Neue', Impact, sans-serif;
      font-size: 18px;
      letter-spacing: 3px;
      color: rgba(255,255,255,0.6);
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 6px;
      padding: 9px 28px;
      cursor: pointer;
      transition: background 0.12s;
    }
    #adminCodeCancelBtn:hover { background: rgba(255,255,255,0.14); }

    #slotTooltip {
      position: fixed;
      z-index: 99999;
      background: rgba(8, 8, 22, 0.95);
      border: 1.5px solid #888;
      border-radius: 5px;
      padding: 4px 10px;
      font: bold 12px 'Consolas', monospace;
      color: #fff;
      pointer-events: none;
      white-space: nowrap;
      transform: translate(-50%, calc(-100% - 8px));
      letter-spacing: 1px;
    }
    #slotTooltip.hidden { display: none; }

      .map-close-btn {
        position: absolute;
        top: 12px;
        right: 14px;
        background: rgba(0,0,0,0.55);
        color: #fff;
        border: 1.5px solid rgba(255,255,255,0.4);
        border-radius: 50%;
        width: 34px;
        height: 34px;
        font-size: 16px;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Orbitron', monospace;
        line-height: 1;
      }

/* ── Ban screen ─────────────────────────────────────────────────────────── */
#banScreen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
}
#banScreen.hidden { display: none; }
#banBox {
  text-align: center;
  padding: 48px;
}
#banTitle {
  font-size: clamp(36px, 6vw, 72px);
  color: #ff2222;
  letter-spacing: 8px;
  text-shadow: 0 0 40px rgba(255,0,0,0.8), 0 0 80px rgba(255,0,0,0.4);
  margin-bottom: 24px;
}
#banMessage {
  font-size: clamp(12px, 1.8vw, 18px);
  color: #888;
  letter-spacing: 2px;
  max-width: 500px;
  line-height: 1.7;
  margin: 0 auto;
}
#banCountdown {
  font-size: clamp(32px, 5vw, 56px);
  color: #ff8800;
  margin-top: 32px;
  letter-spacing: 6px;
  font-variant-numeric: tabular-nums;
}

/* ── Admin dot menu ──────────────────────────────────────────────────────── */
.lb-admin-dots {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 4px;
  vertical-align: middle;
  line-height: 1;
}
.lb-admin-dots:hover { color: #fff; background: rgba(255,255,255,0.12); }

#adminMenu {
  position: fixed;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px 0;
  z-index: 9999;
  min-width: 190px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.9);
  font-family: 'Orbitron', monospace;
}
#adminMenuPlayer {
  padding: 8px 14px 10px;
  font-size: 10px;
  color: #FFD700;
  letter-spacing: 2px;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 4px;
}
.admin-menu-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #aaa;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 9px 14px;
  text-align: left;
  cursor: pointer;
}
.admin-menu-btn:hover { background: rgba(255,255,255,0.07); color: #fff; }
.admin-menu-ban { color: #ff7777; }
.admin-menu-ban:hover { background: rgba(255,0,0,0.1); color: #ff4444; }
.admin-menu-ban-perm { font-weight: bold; }
      .map-close-btn:hover { background: rgba(200,0,0,0.7); border-color: #ff6666; }

/* ── Credits tab ─────────────────────────────────────────────────────────── */
.credits-block {
  text-align: center;
  padding: 20px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.credits-block:last-child { border-bottom: none; }
.credits-copyright {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: 4px;
  text-shadow: 0 0 16px rgba(255,215,0,0.4);
}
.credits-subline {
  font-size: 11px;
  color: #555;
  letter-spacing: 2px;
  margin-top: 4px;
}
.credits-role {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  color: #888;
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.credits-name {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  color: #fff;
  letter-spacing: 2px;
}
