:root {
  --bg-main: #080b12;
  --bg-surface: rgba(12, 16, 24, 0.82);
  --text-primary: #f8fbff;
  --text-secondary: #a1b0c7;
  --accent-cyan: #6ee7ff;
  --accent-purple: #a78bfa;
  --accent-green: #7ef7b5;
  --panel-bg: rgba(9, 12, 20, 0.74);
  --panel-border: rgba(148, 163, 184, 0.24);
  --panel-radius: 16px;
  --control-radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  color: var(--text-primary);
  font-family: "JetBrains Mono", "Fira Code", Inter, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px circle at 8% -12%, rgba(110, 231, 255, 0.12), transparent 42%),
    radial-gradient(900px circle at 96% 112%, rgba(167, 139, 250, 0.12), transparent 44%),
    linear-gradient(180deg, #0a0d13 0%, var(--bg-main) 100%);
}

body {
  min-height: 100vh;
  overflow: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100vh;
}

.canvas-panel {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.canvas-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.map-coords {
  position: absolute;
  top: 16px;
  left: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(9, 12, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.quick-mode-hud .map-coords,
.map-coords.map-coords--hud {
  position: static;
  top: auto;
  left: auto;
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(9, 16, 28, 0.8);
  border-color: rgba(110, 231, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.map-coords strong {
  min-width: 36px;
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

#mapCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #ffffff;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  image-rendering: pixelated;
}

#bottom-banner-container,
.bottom-banner-slot,
.bottom-banner-slot iframe,
.bottom-banner-placeholder {
  min-height: 90px;
}

#bottom-banner-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: auto;
  transform: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(390px, calc(100vw - 36px));
  min-height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(9, 12, 20, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  z-index: 23;
}

.bottom-banner-slot {
  position: relative;
  display: block;
  width: 100%;
  height: 90px;
  overflow: hidden;
}

.bottom-banner-slot iframe,
.bottom-banner-slot script {
  display: block;
  width: 100%;
  height: 90px;
  border: 0;
  border-radius: 14px;
}

.bottom-banner-placeholder {
  width: 100%;
  height: 90px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 32, 0.7);
  color: rgba(229, 238, 251, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hud-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 193, 110, 0.3);
  background: linear-gradient(135deg, rgba(52, 17, 7, 0.82), rgba(24, 11, 7, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 215, 120, 0.12);
}

.hud-credits {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.hud-credits__label {
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 234, 180, 0.76);
}

#hudCreditsValue {
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  color: #ffd374;
  text-shadow: 0 0 12px rgba(255, 182, 58, 0.35);
}

.hud-topup {
  position: relative;
  display: flex;
  justify-content: center;
}

.hud-topup-btn {
  border: 1px solid rgba(110, 231, 255, 0.4);
  background: rgba(110, 231, 255, 0.08);
  color: #ebfbff;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hud-topup-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.86);
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.18);
}

.hud-topup-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(200px, 52vw);
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(110, 231, 255, 0.2);
  background: rgba(8, 12, 20, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.hud-topup-option {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(18, 27, 39, 0.96);
  color: var(--text-primary);
  border-radius: 10px;
  text-align: left;
  padding: 8px 10px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 12px 12px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.compact-panel {
  padding: 10px 12px;
}

.palette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.swatch {
  appearance: none;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: var(--swatch);
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(110, 231, 255, 0.2);
}

.swatch.is-active {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.28), 0 0 18px rgba(167, 139, 250, 0.22);
}

.auth-action {
  display: grid;
}

.auth-action button,
.auth-modal__close {
  border: 1px solid rgba(110, 231, 255, 0.36);
  background: rgba(110, 231, 255, 0.08);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.auth-action button:hover,
.auth-modal__close:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.7);
  box-shadow: 0 0 16px rgba(110, 231, 255, 0.12);
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 6, 12, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 120;
}

.auth-modal__content {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 22px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(9, 12, 20, 0.96);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

.auth-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.auth-form input,
.chat-input-row input {
  width: 100%;
 
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(7, 10, 18, 0.8);
  color: var(--text-primary);
  padding: 9px 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input::placeholder,
.chat-input-row input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.auth-form input:focus,
.chat-input-row input:focus {
  border-color: rgba(110, 231, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.12);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.auth-social-login {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(110, 231, 255, 0.7), rgba(148, 163, 184, 0));
}

.auth-divider span {
  padding: 0 12px;
}

.auth-social-login__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-social-login__button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.auth-social-login__button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 46%);
  opacity: 0.7;
}

.auth-social-login__button--google {
  border-color: rgba(34, 211, 238, 0.56);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.auth-social-login__button--discord {
  border-color: rgba(168, 85, 247, 0.56);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.08);
}

.auth-actions button,
.chat-input-row button,
#chatSend,
#signInBtn,
#signUpBtn,
#btn-reward-video,
#btn-buy-pack-100 {
  border: 1px solid rgba(110, 231, 255, 0.36);
  background: rgba(110, 231, 255, 0.08);
  color: var(--text-primary);
  padding: 9px 10px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.auth-actions button.secondary {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.08);
}

.auth-actions button:hover,
.chat-input-row button:hover,
#chatSend:hover,
#signInBtn:hover,
#signUpBtn:hover,
.auth-social-login__button:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.7);
  box-shadow: 0 0 16px rgba(110, 231, 255, 0.12);
}

.auth-social-login__button--google:hover {
  border-color: rgba(103, 232, 249, 0.86);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.28), 0 0 18px rgba(34, 211, 238, 0.25), 0 0 38px rgba(34, 211, 238, 0.15);
}

.auth-social-login__button--discord:hover {
  border-color: rgba(192, 132, 252, 0.86);
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.28), 0 0 18px rgba(168, 85, 247, 0.25), 0 0 38px rgba(168, 85, 247, 0.15);
}

.auth-legal-consent {
  margin: 10px 0 0;
  text-align: center;
  color: rgba(212, 220, 234, 0.62);
  font-size: 0.68rem;
  line-height: 1.45;
}

.auth-legal-consent a {
  color: rgba(222, 231, 247, 0.76);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-legal-consent a:hover {
  color: rgba(246, 250, 255, 0.94);
}

.action-confirm-popover {
  position: fixed;
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -100%);
}

.action-confirm-popover__btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(14, 23, 37, 0.92);
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.action-confirm-popover__btn:hover {
  transform: translateY(-1px);
}

.action-confirm-popover__btn--confirm {
  color: #8affc3;
  border-color: rgba(126, 247, 181, 0.52);
  box-shadow: 0 0 12px rgba(126, 247, 181, 0.18);
}

.action-confirm-popover__btn--cancel {
  color: #ff9e9e;
  border-color: rgba(255, 126, 126, 0.46);
  box-shadow: 0 0 12px rgba(255, 126, 126, 0.16);
}

#authFormContainer.hidden,
.hidden {
  display: none !important;
}

.cookie-consent-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(110, 231, 255, 0.48);
  background: rgba(7, 11, 18, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(126, 247, 181, 0.08), 0 14px 34px rgba(0, 0, 0, 0.35), 0 0 24px rgba(110, 231, 255, 0.12);
  z-index: 130;
}

.cookie-consent-banner__text {
  margin: 0;
  color: rgba(227, 236, 250, 0.86);
  font-size: 0.76rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.cookie-consent-banner__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-consent-banner__button {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(16, 24, 38, 0.92);
  color: #ebf5ff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cookie-consent-banner__button:hover {
  transform: translateY(-1px);
}

.cookie-consent-banner__button--accept {
  border-color: rgba(126, 247, 181, 0.5);
  box-shadow: 0 0 14px rgba(126, 247, 181, 0.16);
}

.cookie-consent-banner__button--reject {
  border-color: rgba(255, 140, 140, 0.46);
  box-shadow: 0 0 14px rgba(255, 126, 126, 0.14);
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 5, 12, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-modal__dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 820px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(110, 231, 255, 0.28);
  background: rgba(9, 14, 20, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.46), 0 0 22px rgba(110, 231, 255, 0.12);
  overflow: hidden;
}

.legal-modal__header h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #e8f5ff;
}

.legal-modal__content {
  overflow-y: auto;
  padding-right: 8px;
  color: rgba(232, 244, 255, 0.9);
  font-size: 0.8rem;
  line-height: 1.65;
}

.legal-modal__content p {
  margin: 0 0 0.85rem;
  color: rgba(232, 244, 255, 0.9);
}

.legal-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 32, 0.94);
  color: #edf3ff;
  font-size: 1.2rem;
  cursor: pointer;
}

.legal-modal__close:hover {
  border-color: rgba(110, 231, 255, 0.46);
}

.welcome-label {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.credits-box,
.credits-box.small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 17, 24, 0.82);
  border: 1px solid rgba(126, 247, 181, 0.34);
}

.credits-box span {
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.credits-box strong,
#credits-balance {
  font-size: 1rem;
  color: var(--accent-green);
}

.panel-chat {
  display: grid;
  gap: 10px;
}

.chat-box {
  display: grid;
  gap: 8px;
}

.chat-messages {
  min-height: 100px;
  max-height: 180px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 12, 20, 0.7);
  padding: 8px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.chat-message {
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-primary);
  word-break: break-word;
}

.chat-message strong {
  color: var(--accent-cyan);
  margin-right: 5px;
}

.chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quick-mode-hud {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 25;
  display: grid;
  width: 200px;
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(9, 12, 20, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.quick-mode-hud__buttons {
  display: grid;
  gap: 6px;
}

.quick-mode-hud__action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 6px;
}

.quick-mode-hud__button {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(15, 23, 32, 0.9);
  color: #e5eefb;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.action-help-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-help {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(110, 231, 255, 0.42);
  background: rgba(8, 22, 32, 0.8);
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quick-mode-hud__button[data-action='paint'] {
  border-color: rgba(110, 231, 255, 0.42);
  background: rgba(14, 70, 96, 0.4);
}

.quick-mode-hud__button[data-action='shield'] {
  border-color: rgba(255, 193, 110, 0.42);
  background: rgba(92, 62, 10, 0.4);
}

.quick-mode-hud__button[data-action='bomb'] {
  border-color: rgba(255, 121, 121, 0.42);
  background: rgba(112, 18, 18, 0.36);
}

.quick-mode-hud__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.16);
}

.quick-mode-hud__button.is-active {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.12), 0 0 18px rgba(110, 231, 255, 0.14);
}

.quick-mode-hud__status {
  width: 100%;
  min-height: 16px;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(229, 238, 251, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-mode-hud__status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.quick-mode-hud__status-plus {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(126, 247, 181, 0.55);
  border-radius: 999px;
  background: rgba(12, 48, 30, 0.75);
  color: #d9ffe9;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.quick-mode-hud__status-plus:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(126, 247, 181, 0.82);
  box-shadow: 0 0 12px rgba(126, 247, 181, 0.28);
}

.quick-mode-hud__footer {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.quick-mode-hud__legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-mode-hud__legal-links a {
  color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
  transition: color 0.16s ease, opacity 0.16s ease;
}

.quick-mode-hud__legal-links a:hover {
  color: #e5eefb;
  opacity: 1;
}

.quick-mode-hud__legal-links span {
  color: rgba(148, 163, 184, 0.7);
}

.credits-guide-modal {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.credits-guide-modal:not(.hidden) {
  pointer-events: auto;
}

.credits-guide-modal__content {
  position: relative;
  width: min(94vw, 760px);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 20px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(126, 247, 181, 0.2);
  background:
    radial-gradient(600px circle at 12% -20%, rgba(126, 247, 181, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(11, 16, 24, 0.96) 0%, rgba(7, 12, 20, 0.96) 100%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.4);
}

.credits-guide-modal__content h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.credits-guide-modal__subtitle {
  margin: 8px 0 14px;
  color: var(--text-secondary);
  line-height: 1.35;
  font-size: 0.88rem;
}

.credits-guide-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.credits-guide-modal__card {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(10, 18, 28, 0.78);
  padding: 16px;
}

.credits-guide-modal__card--compact {
  padding: 11px 12px;
}

.credits-guide-modal__card--buy {
  grid-column: 1 / -1;
  padding: 16px;
}

.credits-guide-modal__card h3 {
  margin: 0 0 8px;
  color: var(--accent-cyan);
  font-size: 0.94rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.credits-guide-modal__card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.credits-guide-modal__card--compact h3 {
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.credits-guide-modal__card--compact p {
  font-size: 0.74rem;
  line-height: 1.35;
}

.credits-guide-modal__progress {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  color: var(--text-primary) !important;
}

.credits-guide-modal__action {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(110, 231, 255, 0.46);
  border-radius: 10px;
  background: rgba(18, 63, 86, 0.42);
  color: #e5f7ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 10px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.credits-guide-modal__action:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 231, 255, 0.72);
  box-shadow: 0 0 16px rgba(110, 231, 255, 0.2);
}

.credits-guide-modal__action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.credits-guide-modal__action--buy {
  border-color: rgba(126, 247, 181, 0.46);
  background: rgba(12, 67, 38, 0.46);
  color: #dcffe9;
}

.credits-guide-modal__action--buy:hover {
  border-color: rgba(126, 247, 181, 0.75);
  box-shadow: 0 0 16px rgba(126, 247, 181, 0.22);
}

.credits-guide-modal__card--promo {
  grid-column: 1 / -1;
}

.credits-guide-modal__promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.credits-guide-modal__promo-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background: rgba(8, 14, 20, 0.9);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 0.82rem;
}

.credits-guide-modal__promo-input:focus {
  outline: 2px solid rgba(110, 231, 255, 0.38);
  outline-offset: 1px;
}

.credits-guide-modal__promo-message {
  min-height: 1.2em;
  margin-top: 8px !important;
  font-size: 0.72rem !important;
  color: #a7f3d0 !important;
}

.credits-guide-modal__promo-message.is-error {
  color: #fca5a5 !important;
}

.credits-guide-modal__buy-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.credits-guide-modal__buy-option {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(126, 247, 181, 0.42);
  border-radius: 12px;
  background: rgba(11, 56, 34, 0.46);
  color: #dcffe9;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.credits-guide-modal__buy-option:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 247, 181, 0.75);
  box-shadow: 0 0 16px rgba(126, 247, 181, 0.2);
}

.credits-guide-modal__buy-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.credits-guide-modal__buy-cp {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.credits-guide-modal__buy-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f3fffa;
}

.credits-guide-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(9, 12, 20, 0.9);
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.discord-join-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #5865f2 0%, #4f46e5 100%);
  color: #f9faff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 26px rgba(88, 101, 242, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.discord-join-button--profile {
  margin-top: 4px;
}

.discord-join-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(88, 101, 242, 0.34);
  filter: brightness(1.04);
}

.discord-join-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.discord-join-button__label {
  white-space: nowrap;
}

.quick-mode-hud__auth {
  display: grid;
  gap: 6px;
  width: 100%;
}

#admin-control-panel,
.admin-control-panel {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px 11px;
  border-radius: 12px;
  border: 1px solid rgba(110, 231, 255, 0.26);
  background: rgba(10, 17, 24, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 18px rgba(110, 231, 255, 0.06);
}

.admin-control-panel__title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3fdff;
  text-shadow: 0 0 14px rgba(110, 231, 255, 0.3);
}

.admin-control-panel__section {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-control-panel__section-title {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.admin-control-panel__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-control-panel__row--stacked {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.admin-control-panel__inspector-result {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(110, 231, 255, 0.18);
  background: rgba(7, 10, 18, 0.8);
  color: #dffcff;
  font-size: 0.66rem;
  line-height: 1.45;
  letter-spacing: 0.03em;
  word-break: break-word;
}

.admin-control-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-control-panel__field {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-control-panel__input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(7, 10, 18, 0.8);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 0.7rem;
  outline: none;
}

.admin-control-panel__input:focus {
  border-color: rgba(110, 231, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.12);
}

.admin-control-panel__button {
  min-height: 32px;
  border: 1px solid rgba(110, 231, 255, 0.36);
  background: rgba(110, 231, 255, 0.08);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-control-panel__button--danger {
  border-color: rgba(255, 120, 120, 0.42);
  background: rgba(255, 120, 120, 0.08);
}

.admin-control-panel__button--warning {
  border-color: rgba(255, 186, 60, 0.88);
  background: rgba(255, 168, 58, 0.12);
  color: #ffe7b0;
  box-shadow: 0 0 18px rgba(255, 168, 58, 0.14);
}

.admin-control-panel__button--success {
  border-color: rgba(110, 231, 255, 0.7);
  background: rgba(110, 231, 255, 0.12);
  color: #dffcff;
}

.admin-control-panel__button:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.75);
  box-shadow: 0 0 16px rgba(110, 231, 255, 0.12);
}

.admin-control-panel__button--warning:hover {
  border-color: rgba(255, 196, 90, 0.96);
  box-shadow: 0 0 18px rgba(255, 181, 74, 0.18);
}

.admin-control-panel__button--danger:hover {
  border-color: rgba(255, 146, 146, 0.8);
  box-shadow: 0 0 16px rgba(255, 120, 120, 0.15);
}

.game-pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 11, 18, 0.74);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: all;
}

.game-pause-overlay.hidden {
  display: none !important;
}

.game-pause-overlay__card {
  display: grid;
  gap: 10px;
  max-width: min(640px, 90%);
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 186, 60, 0.8);
  background: rgba(15, 16, 22, 0.88);
  box-shadow: 0 0 0 1px rgba(255, 186, 60, 0.2), 0 25px 50px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.game-pause-overlay__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd48a;
  text-shadow: 0 0 20px rgba(255, 186, 60, 0.45);
}

.game-pause-overlay__message {
  margin: 0;
  color: #f8fbff;
  font-size: 0.95rem;
  line-height: 1.6;
}

#admin-control-panel.hidden,
.admin-control-panel.hidden,
#banned-account-overlay.hidden {
  display: none !important;
}

#banned-account-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 6, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.banned-account-overlay__card {
  width: min(560px, 100%);
  padding: 24px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 120, 120, 0.42);
  background: rgba(15, 20, 30, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.banned-account-overlay__card h2 {
  margin: 0 0 14px;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb4b4;
}

.banned-account-overlay__message {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
}

.profile-widget-shell {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(110, 231, 255, 0.26);
  background: rgba(10, 17, 24, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 18px rgba(110, 231, 255, 0.06);
}

.profile-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-widget__title {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
}

.profile-widget__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#current-username-display {
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.profile-widget__edit,
#btn-save-username {
  border: 1px solid rgba(110, 231, 255, 0.36);
  background: rgba(110, 231, 255, 0.08);
  color: var(--text-primary);
  border-radius: 8px;
  min-width: 32px;
  min-height: 28px;
  padding: 5px 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-widget__edit:hover,
#btn-save-username:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.7);
  box-shadow: 0 0 14px rgba(110, 231, 255, 0.12);
}

.profile-widget__editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.profile-widget__editor input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(7, 10, 18, 0.8);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 0.72rem;
  outline: none;
}

.profile-widget__editor input:focus {
  border-color: rgba(110, 231, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.12);
}

.right-side-dock {
  position: fixed;
  top: 18px;
  right: 18px;
  width: min(390px, calc(100vw - 36px));
  height: calc(100vh - 132px);
  z-index: 24;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(9, 12, 20, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.right-side-dock__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.right-side-dock__tab {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(13, 20, 32, 0.9);
  color: rgba(229, 238, 251, 0.84);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.right-side-dock__tab:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.56);
  box-shadow: 0 0 14px rgba(110, 231, 255, 0.16);
}

.right-side-dock__tab.is-active {
  border-color: rgba(132, 241, 255, 0.72);
  color: #f3fdff;
  background: linear-gradient(180deg, rgba(18, 52, 78, 0.9) 0%, rgba(12, 28, 42, 0.9) 100%);
}

.right-side-dock__view {
  min-height: 0;
}

.right-side-dock__view--chat,
.right-side-dock__chat-box {
  height: 100%;
}

.right-side-dock__chat-box {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

.right-side-dock__chat-messages {
  min-height: 0;
  height: 100%;
  max-height: none;
}

.right-side-dock__chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.right-side-dock__empty {
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 12, 20, 0.7);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 14px;
}

.right-side-dock__empty h3 {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.right-side-dock__empty p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.leaderboard-panel {
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 12, 20, 0.7);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
}

.leaderboard-panel__title {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.leaderboard-panel__switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.leaderboard-panel__mode {
  min-height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(13, 20, 32, 0.9);
  color: rgba(229, 238, 251, 0.84);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.leaderboard-panel__mode:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.56);
  box-shadow: 0 0 12px rgba(110, 231, 255, 0.14);
}

.leaderboard-panel__mode.is-active {
  border-color: rgba(132, 241, 255, 0.72);
  color: #f3fdff;
  background: linear-gradient(180deg, rgba(18, 52, 78, 0.9) 0%, rgba(12, 28, 42, 0.9) 100%);
}

.leaderboard-panel__subtitle {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.leaderboard-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}

.leaderboard-panel__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(13, 20, 32, 0.78);
}

.leaderboard-panel__rank {
  font-size: 0.63rem;
  font-weight: 700;
  color: rgba(132, 241, 255, 0.92);
}

.leaderboard-panel__user {
  min-width: 0;
  font-size: 0.7rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-panel__value {
  font-size: 0.66rem;
  color: rgba(221, 234, 251, 0.9);
}

.leaderboard-panel__empty {
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  padding: 10px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.leaderboard-panel__updated-at {
  margin: 0;
  font-size: 0.62rem;
  color: rgba(161, 176, 199, 0.92);
}

.quick-mode-hud__auth-button {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(110, 231, 255, 0.36);
  background: rgba(110, 231, 255, 0.08);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 10px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-mode-hud__auth-button--logout {
  border-color: rgba(255, 166, 166, 0.42);
  background: rgba(255, 107, 107, 0.08);
}

.quick-mode-hud__auth-button:hover {
  transform: translateY(-1px);
  border-color: rgba(132, 241, 255, 0.7);
  box-shadow: 0 0 16px rgba(110, 231, 255, 0.12);
}

.quick-mode-hud .palette,
.quick-mode-hud__palette {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  min-height: 92px;
}

.quick-mode-hud .swatch {
  border-radius: 8px;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: stretch;
}

.action-button {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.action-button[data-action='paint'] {
  border-color: rgba(110, 231, 255, 0.42);
  background: rgba(27, 92, 130, 0.26);
}

.action-button[data-action='shield'] {
  border-color: rgba(255, 193, 110, 0.42);
  background: rgba(110, 72, 14, 0.2);
}

.action-button[data-action='bomb'] {
  border-color: rgba(255, 121, 121, 0.42);
  background: rgba(110, 18, 18, 0.2);
}

.action-button__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
}

.action-button__name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.action-button__cost {
  font-size: 0.62rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.action-button.is-active {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(110, 231, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.action-button.is-active .action-button__cost {
  color: var(--text-primary);
}

.action-status {
  min-height: 18px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.4;
}

.action-help-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.action-help {
  width: 30px;
  height: 100%;
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(110, 231, 255, 0.42);
  background: rgba(8, 22, 32, 0.8);
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  font-weight: 700;
}

.action-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: 170px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(13, 18, 26, 0.96);
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.35;
  padding: 8px 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 20;
}

.action-help-wrap:hover .action-tooltip,
.action-help-wrap:focus-within .action-tooltip,
.action-help-wrap.is-open .action-tooltip {
  opacity: 1;
  visibility: visible;
}

.reward-video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.reward-video-modal__content {
  position: relative;
  width: min(92vw, 480px);
  padding: 24px 20px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 13, 19, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.reward-video-player {
  position: relative;
  display: block;
  min-height: 220px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 14, 20, 1) 0%, rgba(7, 10, 20, 1) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.reward-video-content {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: block;
  opacity: 0;
  pointer-events: none;
}

.reward-video-ad-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#video-countdown {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.reward-video-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(9, 12, 20, 0.9);
  color: var(--text-primary);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  #bottom-banner-container {
    right: 18px;
    left: auto;
    transform: none;
    width: min(340px, calc(100vw - 36px));
    bottom: 16px;
  }

  .map-coords {
    left: 128px;
  }

  .right-side-dock {
    width: min(340px, calc(100vw - 36px));
    height: calc(100vh - 128px);
  }
}

@media (max-width: 560px) {
  .quick-mode-hud .map-coords,
  .map-coords.map-coords--hud {
    display: flex;
    padding: 6px 8px;
  }


  .credits-guide-modal {
    padding: 14px;
  }

  .credits-guide-modal__content {
    width: min(96vw, 820px);
    padding: 22px 16px 16px;
  }

  .credits-guide-modal__content h2 {
    font-size: 1.15rem;
    padding-right: 40px;
  }

  .credits-guide-modal__grid {
    grid-template-columns: 1fr;
  }

  .credits-guide-modal__card--buy {
    grid-column: auto;
  }

  .credits-guide-modal__buy-list {
    grid-template-columns: 1fr;
  }

  .discord-join-button {
    padding: 8px 12px;
    font-size: 0.7rem;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .cookie-consent-banner {
    width: calc(100vw - 24px);
    padding: 11px 12px;
    bottom: 12px;
  }

  .cookie-consent-banner__actions {
    justify-content: stretch;
  }

  .cookie-consent-banner__button {
    flex: 1;
  }

  .chat-input-row {
    grid-template-columns: 1fr;
  }

  #bottom-banner-container {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 16px;
  }

  .right-side-dock {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 116px;
    width: auto;
    height: min(40vh, 320px);
    padding: 10px;
  }

  .right-side-dock__chat-input-row {
    grid-template-columns: 1fr;
  }

  .action-tooltip {
    right: 0;
    top: calc(100% + 8px);
    transform: none;
    width: min(72vw, 180px);
  }
}

.mobile-drawer-toggle,
.mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .mobile-drawer-toggle {
    position: fixed;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(110, 231, 255, 0.46);
    border-radius: 999px;
    background: rgba(7, 16, 28, 0.88);
    color: #e8f7ff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  }

  .mobile-drawer-toggle--left {
    left: 12px;
    top: 12px;
  }

  .mobile-drawer-toggle--right {
    right: 12px;
    top: 12px;
  }

  .mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 48;
    border: 0;
    background: rgba(2, 8, 18, 0.52);
  }

  .quick-mode-hud {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    z-index: 55;
    padding: 10px;
    gap: 8px;
    border-radius: 14px;
    background: rgba(8, 14, 24, 0.88);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  }

  .quick-mode-hud__buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-mode-hud__action-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-mode-hud .action-help-wrap {
    display: none;
  }

  .quick-mode-hud__button {
    min-height: 44px;
    padding: 10px 6px;
    border-radius: 10px;
    font-size: 0.66rem;
  }

  .quick-mode-hud .palette,
  .quick-mode-hud__palette {
    display: flex;
    width: 100%;
    min-height: auto;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .quick-mode-hud .swatch {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    border-radius: 9px;
  }

  .quick-mode-hud .map-coords,
  .quick-mode-hud__status-row,
  .quick-mode-hud__auth,
  .quick-mode-hud__footer,
  .quick-mode-hud .profile-widget-shell,
  .quick-mode-hud #admin-control-panel {
    display: none;
  }

  body.mobile-hud-expanded .quick-mode-hud {
    bottom: 62px;
    max-height: min(76vh, 600px);
    overflow-y: auto;
  }

  body.mobile-hud-expanded .quick-mode-hud__status-row,
  body.mobile-hud-expanded .quick-mode-hud__auth,
  body.mobile-hud-expanded .quick-mode-hud__footer,
  body.mobile-hud-expanded .quick-mode-hud .profile-widget-shell,
  body.mobile-hud-expanded .quick-mode-hud #admin-control-panel {
    display: grid;
  }

  body.mobile-hud-expanded .quick-mode-hud__footer {
    display: block;
  }

  .right-side-dock {
    top: 68px;
    right: 12px;
    left: auto;
    bottom: 12px;
    width: min(92vw, 360px);
    height: auto;
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    z-index: 56;
  }

  body.mobile-social-open .right-side-dock {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  #bottom-banner-container {
    right: 12px;
    left: auto;
    width: min(320px, calc(100vw - 24px));
    bottom: 116px;
    z-index: 49;
  }

  .auth-modal__content,
  .reward-video-modal__content,
  .legal-modal__dialog,
  .credits-guide-modal__content {
    width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
  }

  .credits-guide-modal {
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(2, 8, 18, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .auth-modal button,
  .reward-video-modal button,
  .credits-guide-modal button,
  .legal-modal button {
    min-height: 44px;
  }

  .auth-modal input,
  .credits-guide-modal__buy-option,
  .chat-input-row input,
  .chat-input-row button {
    min-height: 44px;
  }

  .auth-social-login__buttons,
  .auth-actions {
    grid-template-columns: 1fr;
  }
}
