/* ============================================================
   ClaudeCraft — Commercial Enhancement CSS
   Layered on top of the existing CSS bundle.
   ============================================================ */

/* ---- Font upgrade ---------------------------------------- */
/* (Space Grotesk is loaded via <link> in index.html — no @import
   here, a second render-blocking fetch would double the cost) */

:root {
  --cc-font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --accent: #5dcc40;
  --accent-dark: #3ea827;
  --accent-glow: rgba(93, 204, 64, 0.35);
  --panel: rgba(10, 15, 22, 0.82);
  --panel-line: rgba(255,255,255,0.12);
  --card-bg: rgba(12, 18, 28, 0.92);
  --card-shadow: 0 24px 72px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  --glow-green: 0 0 30px rgba(93, 204, 64, 0.2);
}

body, .card, .btn, .field, #info, #hint, #chat, #playerlist {
  font-family: var(--cc-font);
}

/* ---- Menu overlay: richer background — keep bg image visible */
#menu {
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(20, 55, 90, 0.45) 0%, transparent 65%),
    radial-gradient(ellipse 70% 60% at 85% 95%, rgba(10, 40, 15, 0.35) 0%, transparent 60%),
    linear-gradient(180deg, rgba(6,9,15,0.78) 0%, rgba(8,12,18,0.72) 100%),
    url('./assets/title_bg-DiwFJ-sV.jpg') center/cover no-repeat;
}

/* ---- Particle canvas ------------------------------------- */
#cc-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ---- Floating block decorations -------------------------- */
.menu-blocks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mb {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(93,204,64,0.12), rgba(93,204,64,0.04));
  border: 1px solid rgba(93,204,64,0.15);
  box-shadow: 0 0 12px rgba(93,204,64,0.08);
  animation: mb-float linear infinite;
  transform-origin: center;
}

.mb-1 { left: 8%; bottom: -60px; width: 44px; height: 44px; animation-duration: 18s; animation-delay: 0s; }
.mb-2 { left: 22%; bottom: -60px; width: 32px; height: 32px; animation-duration: 22s; animation-delay: -6s; }
.mb-3 { left: 72%; bottom: -60px; width: 52px; height: 52px; animation-duration: 16s; animation-delay: -3s; }
.mb-4 { right: 10%; bottom: -60px; width: 36px; height: 36px; animation-duration: 20s; animation-delay: -9s; }
.mb-5 { left: 50%; bottom: -60px; width: 28px; height: 28px; animation-duration: 25s; animation-delay: -14s; }

@keyframes mb-float {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  5%   { opacity: 0.7; }
  95%  { opacity: 0.4; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ---- Menu overlay: top-aligned + scrollable so nothing clips */
#menu.overlay {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  justify-content: flex-start !important;
  align-items: center !important;
  padding: 20px 16px 28px !important;
  gap: 16px !important;
}

/* Scrollbar styling for menu */
#menu::-webkit-scrollbar { width: 4px; }
#menu::-webkit-scrollbar-track { background: transparent; }
#menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* ---- Enhanced card --------------------------------------- */
.cc-card-enhanced {
  position: relative;
  z-index: 1;
  background: var(--card-bg) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  box-shadow: var(--card-shadow) !important;
  border-radius: 20px !important;
  padding: 22px 28px !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  animation: card-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Emblem glow + compact size -------------------------- */
#menu-emblem {
  width: 80px !important;
  height: 80px !important;
  margin: 0 auto 10px !important;
  filter: drop-shadow(0 8px 24px rgba(93,204,64,0.4)) drop-shadow(0 2px 6px rgba(0,0,0,0.7)) !important;
}

/* ---- Title gradient -------------------------------------- */
.card h1 {
  background: linear-gradient(170deg, #d4f5c0 10%, #5dcc40 55%, #3ab326 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  font-size: 40px !important;
  letter-spacing: 0.5px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

.tag {
  font-size: 13.5px !important;
  margin-bottom: 16px !important;
  color: rgba(159, 176, 191, 0.9) !important;
}

/* ---- Live world stats strip ------------------------------ */
.cc-live-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(93, 204, 64, 0.07);
  border: 1px solid rgba(93, 204, 64, 0.2);
  border-radius: 20px;
  padding: 7px 16px;
  margin: 0 0 18px;
  font-size: 12.5px;
  color: rgba(159, 176, 191, 0.85);
}

.cc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5dcc40;
  box-shadow: 0 0 6px #5dcc40;
  animation: live-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #5dcc40; }
  50% { opacity: 0.5; box-shadow: 0 0 2px #5dcc40; }
}

.cc-live-num {
  color: #f2f5f8;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.cc-live-sep {
  color: rgba(159, 176, 191, 0.4);
}

/* ---- Enhanced input ------------------------------------- */
.field input {
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  background: rgba(0,0,0,0.3) !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  font-family: var(--cc-font) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.field input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(93, 204, 64, 0.15) !important;
}

/* ---- Enhanced buttons ----------------------------------- */
.btn.primary.cc-play-btn {
  background: linear-gradient(170deg, #6ee84a, #3ea827) !important;
  border: 1px solid rgba(93, 204, 64, 0.5) !important;
  box-shadow: 0 4px 20px rgba(62, 168, 39, 0.45), 0 1px 0 rgba(255,255,255,0.15) inset !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-family: var(--cc-font) !important;
  font-weight: 700 !important;
  padding: 13px 20px !important;
  letter-spacing: 0.3px !important;
  transition: all 0.18s ease !important;
  color: #06100a !important;
  text-shadow: none !important;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

.btn.primary.cc-play-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 28px rgba(62, 168, 39, 0.55), 0 1px 0 rgba(255,255,255,0.15) inset !important;
  filter: brightness(1.06) !important;
}

.btn.primary.cc-play-btn:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 10px rgba(62, 168, 39, 0.3) !important;
}

.btn:not(.primary) {
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  background: rgba(255,255,255,0.06) !important;
  font-family: var(--cc-font) !important;
  transition: all 0.15s ease !important;
  padding: 11px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin-bottom: 10px !important;
}

.btn:not(.primary):hover {
  background: rgba(255,255,255,0.11) !important;
  border-color: rgba(255,255,255,0.18) !important;
}

/* Single player button specific */
#singleBtn {
  color: rgba(242, 245, 248, 0.85) !important;
}

/* ---- Button emojis via CSS (survive i18n text replacement) */
.cc-play-btn::before {
  content: '🌐';
  font-size: 15px;
  margin-right: 7px;
  flex-shrink: 0;
}

.cc-single-btn::before {
  content: '👤';
  font-size: 15px;
  margin-right: 7px;
  flex-shrink: 0;
}

.cc-play-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ---- How to play section -------------------------------- */
.help {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 14px;
  margin-top: 12px !important;
}

.help summary {
  color: rgba(159, 176, 191, 0.7) !important;
  font-size: 12.5px !important;
  letter-spacing: 0.3px;
  transition: color 0.15s;
}

.help summary:hover {
  color: #f2f5f8 !important;
}

.help ul {
  color: rgba(159, 176, 191, 0.8) !important;
  font-size: 12.5px !important;
  line-height: 1.9 !important;
}

.help b {
  color: #c8dcc0 !important;
}

/* ---- Feature showcase strip — single scrolling row ------- */
.cc-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  width: min(440px, 92vw);
  animation: card-enter 0.65s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}

.cc-feat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12px;
  color: rgba(159, 176, 191, 0.85);
  transition: all 0.15s ease;
  cursor: default;
  font-family: var(--cc-font);
}

.cc-feat:hover {
  background: rgba(93, 204, 64, 0.08);
  border-color: rgba(93, 204, 64, 0.2);
  color: #f2f5f8;
}

/* ---- Online players strip ------------------------------- */
.cc-who {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: rgba(159, 176, 191, 0.65);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 420px;
}

.cc-who-name {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11.5px;
  color: rgba(159,176,191,0.9);
}

.cc-who-label {
  color: rgba(93, 204, 64, 0.8);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Footer: in-flow inside the menu overlay ------------ */
#menu .footer {
  position: relative !important;
  bottom: auto !important;
  z-index: 1;
  color: rgba(159, 176, 191, 0.35) !important;
  font-size: 11px !important;
  margin-top: 4px;
}

/* ---- Loading overlay: title art ONLY at the start menu ---- */
/* Mid-game the game reuses #loading for dimension switches —
   title-screen artwork there would break immersion, so gate on
   the menu still being visible. */
body:has(#menu:not(.hidden)) #loading {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(10, 30, 50, 0.55) 0%, transparent 70%),
    linear-gradient(180deg, rgba(6,9,15,0.82) 0%, rgba(8,12,18,0.78) 100%),
    url('./assets/title_bg-DiwFJ-sV.jpg') center/cover no-repeat !important;
}

/* ---- Enhanced loading screen ---------------------------- */
.cc-loader-enhanced {
  gap: 20px !important;
}

.cc-loading-logo {
  width: 72px;
  height: 72px;
  background: url('./assets/emblem-BrOs_bHP.png') center/contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(93, 204, 64, 0.6));
  animation: cc-bob 2s ease-in-out infinite, cc-pulse-glow 3s ease-in-out infinite;
  image-rendering: pixelated;
}

@keyframes cc-pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(93, 204, 64, 0.6)); }
  50%       { filter: drop-shadow(0 0 28px rgba(93, 204, 64, 0.9)); }
}

.spinner {
  border-width: 3px !important;
  border-top-color: var(--accent) !important;
  width: 36px !important;
  height: 36px !important;
}

.cc-loading-msg {
  color: rgba(159, 176, 191, 0.7) !important;
  font-size: 14px !important;
  font-family: var(--cc-font) !important;
}

.cc-loading-tips {
  color: rgba(93, 204, 64, 0.6);
  font-size: 12px;
  font-family: var(--cc-font);
  font-style: italic;
  max-width: 280px;
  text-align: center;
  animation: tips-fade 0.5s ease;
}

@keyframes tips-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Language select ------------------------------------ */
.langfield select {
  background: rgba(14, 20, 32, 0.9) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  color: #f2f5f8 !important;
  font-family: var(--cc-font) !important;
  font-size: 14px !important;
  padding: 8px 10px !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.langfield select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(93, 204, 64, 0.12) !important;
  outline: none !important;
}

/* ---- Connection status ---------------------------------- */
#connStatus {
  font-size: 12px !important;
  color: rgba(159, 176, 191, 0.55) !important;
  margin: -4px 0 4px !important;
  padding: 0 !important;
}

/* ---- In-game HUD polish --------------------------------- */
#info {
  font-family: 'Space Grotesk', ui-monospace, monospace !important;
  font-size: 12px !important;
  padding: 6px 10px;
  background: rgba(6, 9, 14, 0.65);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#netstat {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

#netstat.off {
  color: #e0604a !important;
}

/* ---- Hotbar glow on active slot ------------------------- */
.slot.active {
  border-color: rgba(93, 204, 64, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 18px rgba(93, 204, 64, 0.35) !important;
}

/* ---- Tutorial panel polish ------------------------------ */
#tutorial {
  border: 1px solid rgba(93, 204, 64, 0.18) !important;
  background: rgba(10, 15, 22, 0.88) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5) !important;
}

.tut-title {
  color: var(--accent) !important;
  font-family: var(--cc-font) !important;
  font-size: 11px !important;
}

.tut-row.cur .tut-txt {
  color: #eef4ee !important;
}

/* ---- Boss bar improvements ------------------------------ */
#boss-name {
  font-family: var(--cc-font) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

#boss-bar-fill {
  background: linear-gradient(90deg, #8b1212, #c0392b, #e74c3c) !important;
}

/* ---- Achievement toasts --------------------------------- */
.adv-toast {
  background: rgba(15, 22, 35, 0.96) !important;
  border: 1px solid rgba(93, 204, 64, 0.5) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(93, 204, 64, 0.12) !important;
  border-radius: 12px !important;
  font-family: var(--cc-font) !important;
  padding: 12px 18px 12px 14px !important;
}

.adv-toast-head {
  font-size: 10px !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
}

/* ---- Chat style polish ---------------------------------- */
#chatlog .who {
  color: var(--accent) !important;
}

#chatinput {
  background: rgba(0, 0, 0, 0.65) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 10px !important;
  font-family: var(--cc-font) !important;
  font-size: 13.5px !important;
  backdrop-filter: blur(6px);
}

#chatinput:focus {
  border-color: rgba(93, 204, 64, 0.5) !important;
}

/* ---- Inventory windows polish --------------------------- */
.inv-window, .chest-window, .fur-window, .anvil-window,
.brew-window, .comp-window, .cut-window, .ench-window, .grind-window,
.adv-window {
  font-family: var(--cc-font) !important;
  background: rgba(10, 16, 26, 0.95) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8) !important;
  border-radius: 16px !important;
}

/* ---- Pause card ----------------------------------------- */
#pause .card {
  font-family: var(--cc-font) !important;
}

/* ---- Minimap -------------------------------------------- */
#minimap {
  border: 1px solid rgba(93, 204, 64, 0.2) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6), 0 0 0 1px rgba(93, 204, 64, 0.05) !important;
  border-radius: 14px !important;
}

/* ---- Hall of Fame ---------------------------------------- */
.cc-hof {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  background: rgba(10, 16, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 14px 18px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: card-enter 0.7s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}

.cc-hof-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(159, 176, 191, 0.55);
  margin-bottom: 10px;
  font-family: var(--cc-font);
}

.cc-hof-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-hof-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--cc-font);
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
}

.cc-hof-row:hover {
  background: rgba(93, 204, 64, 0.06);
  border-color: rgba(93, 204, 64, 0.12);
}

.cc-hof-medal {
  font-size: 16px;
  flex-shrink: 0;
  width: 22px;
}

.cc-hof-name {
  color: #f2f5f8;
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cc-hof-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}

.cc-hof-score {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.cc-hof-stat {
  color: rgba(159, 176, 191, 0.6);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ---- World status strip --------------------------------- */
.cc-world-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(159, 176, 191, 0.6);
  margin: -10px 0 4px;
  font-family: var(--cc-font);
}

.cc-ws-item {
  font-size: 11.5px;
}

.cc-ws-sep {
  color: rgba(159, 176, 191, 0.25);
}

/* ---- Share / Invite button ------------------------------ */
.cc-share-btn {
  width: 100%;
  background: rgba(255,255,255,0.04) !important;
  border: 1px dashed rgba(255,255,255,0.14) !important;
  border-radius: 10px !important;
  color: rgba(159, 176, 191, 0.7) !important;
  font-size: 12.5px !important;
  font-family: var(--cc-font) !important;
  padding: 9px 14px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 0 !important;
  letter-spacing: 0.2px;
}

.cc-share-btn:hover {
  background: rgba(93, 204, 64, 0.06) !important;
  border-color: rgba(93, 204, 64, 0.25) !important;
  color: #c8dcc0 !important;
}

/* ---- HoF total badge ------------------------------------ */
.cc-hof-total-badge {
  font-size: 10.5px;
  font-weight: 400;
  color: rgba(159, 176, 191, 0.4);
  letter-spacing: 0.3px;
  margin-left: 5px;
}

/* ---- HoF rank for 4th/5th ------------------------------ */
.cc-hof-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 11px;
  font-weight: 700;
  color: rgba(159, 176, 191, 0.55);
  font-family: var(--cc-font);
}

/* ---- HoF play time column ------------------------------- */
.cc-hof-pt {
  color: rgba(159, 176, 191, 0.38);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin-left: auto;
}

/* ---- Live Activity Feed --------------------------------- */
.cc-activity {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  background: rgba(10, 16, 26, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 16px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: card-enter 0.75s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}

.cc-act-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(159, 176, 191, 0.45);
  margin-bottom: 9px;
  font-family: var(--cc-font);
}

.cc-act-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cc-act-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cc-font);
  font-size: 12px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid transparent;
}

.cc-act-kill { border-left-color: rgba(220, 60, 60, 0.5); }
.cc-act-death { border-left-color: rgba(100, 100, 140, 0.4); }
.cc-act-build { border-left-color: rgba(93, 204, 64, 0.45); }
.cc-act-join { border-left-color: rgba(93, 180, 204, 0.4); }
.cc-act-ach { border-left-color: rgba(230, 190, 60, 0.55); }
.cc-act-boss { border-left-color: rgba(190, 100, 230, 0.55); }

.cc-act-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.cc-act-text {
  flex: 1;
  color: rgba(159, 176, 191, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-act-text b {
  color: #e2eae2;
  font-weight: 600;
}

.cc-act-ago {
  color: rgba(159, 176, 191, 0.3);
  font-size: 10.5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ---- Community world-stats bar -------------------------- */
.cc-world-stats-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(440px, 92vw);
  background: rgba(10, 16, 26, 0.55);
  border: 1px solid rgba(93,204,64,0.12);
  border-radius: 14px;
  padding: 11px 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: card-enter 0.7s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}

.cc-ws-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.cc-ws-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #d4f5c0;
  font-family: var(--cc-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.cc-ws-stat-lbl {
  font-size: 10px;
  color: rgba(159,176,191,0.45);
  font-family: var(--cc-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cc-ws-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* ---- Version badge next to title ----------------------- */
.cc-version-badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 11px !important;
  font-weight: 600 !important;
  background: rgba(93,204,64,0.15);
  border: 1px solid rgba(93,204,64,0.3);
  color: var(--accent) !important;
  border-radius: 8px;
  padding: 2px 7px;
  letter-spacing: 0.3px;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  font-family: var(--cc-font);
  position: relative;
  top: -4px;
  margin-left: 4px;
}

/* ---- What's New patch notes ---------------------------- */
.cc-whatsnew {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  background: rgba(10, 16, 26, 0.55);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 12px 16px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: card-enter 0.72s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}

.cc-wn-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(159,176,191,0.45);
  margin-bottom: 9px;
  font-family: var(--cc-font);
}

.cc-wn-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-wn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cc-font);
  font-size: 12px;
  color: rgba(159,176,191,0.75);
  line-height: 1.4;
}

.cc-wn-tag {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 5px;
  padding: 2px 5px;
  font-family: var(--cc-font);
  min-width: 30px;
  text-align: center;
}

.cc-wn-new {
  background: rgba(93,204,64,0.15);
  border: 1px solid rgba(93,204,64,0.3);
  color: #7de860;
}

.cc-wn-upd {
  background: rgba(93,160,204,0.13);
  border: 1px solid rgba(93,160,204,0.25);
  color: #7ec0ee;
}

.cc-wn-fix {
  background: rgba(204,180,93,0.12);
  border: 1px solid rgba(204,180,93,0.22);
  color: #d4b85c;
}

/* ---- Lang select font ----------------------------------- */
.cc-lang-select {
  font-family: var(--cc-font) !important;
}

/* ---- "Now Playing" badge pill in HoF ------------------- */
.cc-hof-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(93,204,64,0.12);
  border: 1px solid rgba(93,204,64,0.22);
  border-radius: 10px;
  font-size: 9.5px;
  color: var(--accent);
  padding: 1px 6px;
  font-weight: 600;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

/* ---- Activity feed: stagger-in animation --------------- */
.cc-act-row {
  animation: act-row-enter 0.35s ease both;
}
.cc-act-rows .cc-act-row:nth-child(1) { animation-delay: 0.05s; }
.cc-act-rows .cc-act-row:nth-child(2) { animation-delay: 0.10s; }
.cc-act-rows .cc-act-row:nth-child(3) { animation-delay: 0.15s; }
.cc-act-rows .cc-act-row:nth-child(4) { animation-delay: 0.20s; }
.cc-act-rows .cc-act-row:nth-child(5) { animation-delay: 0.25s; }
.cc-act-rows .cc-act-row:nth-child(6) { animation-delay: 0.30s; }

@keyframes act-row-enter {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- HoF rows stagger-in ------------------------------- */
.cc-hof-row {
  animation: hof-row-in 0.35s ease both;
}
.cc-hof-rows .cc-hof-row:nth-child(1) { animation-delay: 0.05s; }
.cc-hof-rows .cc-hof-row:nth-child(2) { animation-delay: 0.12s; }
.cc-hof-rows .cc-hof-row:nth-child(3) { animation-delay: 0.19s; }
.cc-hof-rows .cc-hof-row:nth-child(4) { animation-delay: 0.26s; }
.cc-hof-rows .cc-hof-row:nth-child(5) { animation-delay: 0.33s; }

@keyframes hof-row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Feat badge hover glow ------------------------------ */
.cc-feat:hover span:first-child {
  filter: drop-shadow(0 0 5px rgba(93,204,64,0.5));
}

/* ---- Player list panel ---------------------------------- */
#playerlist {
  background: rgba(8, 12, 20, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}

/* ---- Enhanced footer ------------------------------------ */
.cc-footer-enhanced {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  font-size: 11px !important;
  color: rgba(159, 176, 191, 0.32) !important;
  font-family: var(--cc-font) !important;
  position: relative !important;
  bottom: auto !important;
  z-index: 1;
  margin-top: 4px;
}

.cc-footer-sep {
  color: rgba(159, 176, 191, 0.15);
}

.cc-footer-link {
  color: rgba(93, 204, 64, 0.5) !important;
  text-decoration: none !important;
  transition: color 0.15s;
}

.cc-footer-link:hover {
  color: rgba(93, 204, 64, 0.85) !important;
}

/* ============================================================
   In-game HUD polish — round 2 (verified in live gameplay)
   ============================================================ */

/* ---- Hint bar: readable pill (was bare text over terrain) */
#hint {
  background: rgba(8, 12, 20, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  padding: 6px 14px !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  bottom: 8px !important;
  color: rgba(200, 212, 222, 0.85) !important;
  font-family: var(--cc-font) !important;
}

/* ---- Fix: minimap (M) overlapped the player list --------- */
/* Both anchor top-right:12px in the game bundle. When the map
   is open, push the player list below it (192px map + gaps). */
#hud:has(#minimap:not(.hidden)) #playerlist {
  top: 216px !important;
}

/* ---- Survival HUD: subtle grouped backdrop --------------- */
#survival-hud {
  background: rgba(8, 12, 20, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 7px 12px 5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#survival-hud .sv-mode {
  font-family: var(--cc-font);
  font-size: 9.5px !important;
  letter-spacing: 1px !important;
  color: rgba(159, 176, 191, 0.55) !important;
}

/* ---- Chat log: readable backdrop when messages exist ----- */
#chatlog:not(:empty) {
  background: rgba(8, 12, 20, 0.55);
  border-radius: 10px;
  padding: 8px 12px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- Boss bar track polish ------------------------------- */
#boss-bar-track {
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(0, 0, 0, 0.55) !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

/* ---- Potion effect chips --------------------------------- */
.fx-chip {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 4px 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: var(--cc-font);
}

/* ---- Crosshair: subtle glow ------------------------------ */
#crosshair {
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(255, 255, 255, 0.25) !important;
}

/* ---- Tutorial close button hover ------------------------- */
#tut-close:hover {
  color: #fff !important;
  transform: scale(1.15);
}

/* ---- Online-count message under connStatus --------------- */
.cc-online-msg {
  font-size: 12px;
  color: rgba(93, 204, 64, 0.75);
  font-family: var(--cc-font);
  margin: -2px 0 6px;
  min-height: 15px;
}

/* ---- Generic modal framework (recipes/ranking/settings…) - */
.cc-modal {
  background: rgba(14, 19, 29, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(93, 204, 64, 0.05) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--cc-font) !important;
}

.cc-overlay {
  background: rgba(4, 7, 11, 0.65) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.cc-modal-head h2 {
  font-family: var(--cc-font) !important;
  letter-spacing: 0.2px;
}

/* ---- Trading window rows --------------------------------- */
.tr-row {
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  transition: background 0.15s, border-color 0.15s;
}

.tr-row:hover {
  background: rgba(93, 204, 64, 0.05) !important;
  border-color: rgba(93, 204, 64, 0.15) !important;
}

/* ---- In-game leaderboard table (L key) ------------------- */
.lb-table th {
  color: rgba(159, 176, 191, 0.5) !important;
  font-family: var(--cc-font) !important;
}

.lb-table td {
  font-family: var(--cc-font) !important;
  font-variant-numeric: tabular-nums;
}

.lb-table tr:hover td {
  background: rgba(93, 204, 64, 0.05);
}

.lb-table td.rank {
  font-weight: 700;
  color: rgba(93, 204, 64, 0.7) !important;
}

/* ---- Mobile touch controls ------------------------------- */
.tc-btn {
  background: rgba(10, 15, 23, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-family: var(--cc-font) !important;
  transition: transform 0.08s ease, background 0.12s;
}

.tc-btn:active {
  transform: scale(0.92);
  background: rgba(93, 204, 64, 0.2) !important;
}

.tc-place {
  background: rgba(93, 204, 64, 0.28) !important;
  border-color: rgba(93, 204, 64, 0.4) !important;
}

.tc-break {
  background: rgba(224, 106, 90, 0.28) !important;
  border-color: rgba(224, 106, 90, 0.4) !important;
}

.tc-menu-item {
  background: rgba(14, 19, 29, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  font-family: var(--cc-font) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---- Pause overlay: show the world behind ---------------- */
#pause.overlay {
  background: rgba(5, 8, 13, 0.55) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}

#pause .card {
  background: rgba(12, 18, 28, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

/* ---- Death flash overlay --------------------------------- */
#cc-death-flash {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(120, 10, 10, 0.35) 0%, rgba(60, 5, 5, 0.6) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#cc-death-flash.show {
  opacity: 1;
}

.cc-death-inner {
  text-align: center;
  font-family: var(--cc-font);
  transform: translateY(-8px);
}

.cc-death-skull {
  font-size: 54px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  animation: cc-death-pop 0.45s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}

.cc-death-title {
  font-size: 34px;
  font-weight: 700;
  color: #ff6b5e;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  letter-spacing: 1px;
  margin-top: 6px;
}

.cc-death-sub {
  font-size: 13px;
  color: rgba(255, 220, 215, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  margin-top: 4px;
}

@keyframes cc-death-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ---- Mobile improvements -------------------------------- */
@media (max-width: 480px) {
  .cc-features { gap: 6px; }
  .cc-feat { padding: 5px 10px; font-size: 11px; }
  .cc-card-enhanced { padding: 24px 22px !important; }
  .card h1 { font-size: 36px !important; }
  .cc-live-strip { font-size: 11.5px; padding: 6px 13px; }
}

@media (max-height: 700px) {
  .cc-features { display: none; }
  .cc-who { display: none !important; }
}

/* ---- Smooth entrance for feature strip on scroll -------- */
@media (max-height: 800px) {
  .cc-features { max-width: 380px; }
}
