:root {
  --bg-dark: #070e0d;
  --panel-bg: #102420;
  --border-bronze: #dfa65d;
  --accent-gold: #f6cf7a;
  --accent-cyan: #4ce0d2;
  --accent-pink: #df4d88;
  --accent-energy: #ffd242;
  --accent-green: #38d684;
  --text: #e7f2eb;
  --nav-bg: #0b1716;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: #040807;
  color: var(--text);
  font-family: 'Tiny5', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: none;
}

#app-shell {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  max-height: 860px;
  background: var(--bg-dark);
  border: 2px solid rgba(223, 166, 93, 0.4);
  box-shadow: 0 0 40px rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-content {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: none;
}
.tab-content.active {
  display: block;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  z-index: 1;
}

.sprite-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}
.badge-icon {
  width: 18px;
  height: 18px;
}
.inline-sprite {
  width: 15px;
  height: 15px;
  margin: 0 2px 0 2px;
  vertical-align: -2px;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6));
}
.btn-inline-sprite {
  width: 18px;
  height: 18px;
  margin: 0 2px 0 2px;
  vertical-align: -2px;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.7));
}

.hidden {
  display: none !important;
}

/* Top HUD Bar */
.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
  z-index: 10;
}
.badge {
  background: rgba(11, 23, 22, 0.92);
  border: 1px solid var(--border-bronze);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 0 #000;
  transition: transform 0.1s ease;
}
.energy-badge { border-color: var(--accent-energy); }
.energy-badge span { color: var(--accent-energy); }
.shards-badge { border-color: var(--accent-cyan); }
.shards-badge span { color: var(--accent-cyan); }

.hud-controls {
  display: flex;
  gap: 4px;
}
.btn-toggle-setting {
  background: rgba(11, 23, 22, 0.92);
  border: 1px solid var(--border-bronze);
  color: #fff;
  font-size: 13px;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 0 #000;
  transition: all 0.1s ease;
}
.btn-toggle-setting.off {
  opacity: 0.45;
  filter: grayscale(1);
  border-color: #555;
}
.btn-toggle-setting:active {
  transform: translateY(1px);
}

.streak-alert {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: linear-gradient(180deg, #df4d88 0%, #992353 100%);
  color: #fff;
  padding: 4px 14px;
  border: 1px solid #fff;
  font-size: 16px;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 3px 0 #3a0d1f, 0 0 12px rgba(223,77,136,0.6);
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 15;
  white-space: nowrap;
}
.streak-alert.active { transform: translateX(-50%) scale(1); }

.fever-alert {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: linear-gradient(180deg, #ff4d00 0%, #ff0055 100%);
  color: #fff;
  padding: 5px 16px;
  border: 2px solid #fff;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-shadow: 1px 2px 0 #000;
  box-shadow: 0 0 20px #ff0055, 0 3px 0 #5c001f;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 16;
  white-space: nowrap;
}
.fever-alert.active { transform: translateX(-50%) scale(1); }

.biome-alert {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: linear-gradient(180deg, #1d4037 0%, #0c211c 100%);
  color: var(--accent-gold);
  padding: 5px 16px;
  border: 1px solid var(--accent-gold);
  font-size: 14px;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 3px 0 #040d0b, 0 0 15px rgba(246,207,122,0.4);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 15;
  white-space: nowrap;
}
.biome-alert.active { transform: translateX(-50%) scale(1); }

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 11, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 18px;
  z-index: 25;
  text-align: center;
  cursor: pointer;
}

/* Header bar inside menu-start for Language Dropdown & Referral Button */
.menu-header-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
}

/* Языковое меню в левом верхнем углу меню */
.lang-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.btn-lang-toggle {
  position: relative;
  background: linear-gradient(180deg, #1c4d40 0%, #0e2a23 100%);
  border: 2px solid var(--border-bronze);
  color: var(--accent-gold);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  height: 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 0 #04120f, 0 0 10px rgba(223, 166, 93, 0.2);
  text-shadow: 1px 1px 0 #000;
  transition: transform 0.08s ease, box-shadow 0.1s ease;
}

.btn-lang-toggle:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 #04120f;
}

.lang-flag-img {
  width: 16px;
  height: 12px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lang-arrow {
  font-size: 8px;
  color: var(--accent-gold);
  margin-left: 2px;
  transform: scale(0.85);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #0d2621;
  border: 2px solid var(--border-bronze);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  min-width: 130px;
}

.lang-dropdown-menu.hidden {
  display: none !important;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.15);
  color: #e7f2eb;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.1s ease;
}

.lang-option:hover, .lang-option:active {
  background: #183e34;
  border-color: var(--accent-gold);
  color: #fff;
}

.btn-ref-header {
  position: relative;
  background: linear-gradient(180deg, #1c4d40 0%, #0e2a23 100%);
  border: 2px solid var(--accent-cyan);
  color: #e0ffff;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  height: 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 0 #04120f, 0 0 10px rgba(76, 224, 210, 0.3);
  text-shadow: 1px 1px 0 #000;
  transition: transform 0.08s ease, box-shadow 0.1s ease;
}
.btn-ref-header .sprite-icon {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8));
}
.btn-ref-header:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 #04120f;
}

.title {
  font-size: 38px;
  color: var(--accent-gold);
  text-shadow: 2px 2px 0 #3a220b, 0 0 16px rgba(246,207,122,0.45);
  margin-bottom: 2px;
  line-height: 1;
  letter-spacing: 1px;
}
.subtitle {
  font-size: 13px;
  color: #8eb3a3;
  margin-bottom: 12px;
}

.stats-card {
  position: relative;
  width: 100%;
  background: rgba(14, 34, 30, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 2px solid rgba(35, 77, 67, 0.7);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 12px rgba(0, 0, 0, 0.4);
}
.stats-card::before, .stats-card::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--border-bronze);
  box-shadow: 0 1px 0 #000;
}
.stats-card::before { top: 3px; left: 3px; }
.stats-card::after { top: 3px; right: 3px; }

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 15px;
}
.stats-row:last-child { margin-bottom: 0; }

/* Выпадающий золотой бейдж рекорда (Вариант 1) */
.record-ribbon-badge {
  position: relative;
  background: linear-gradient(180deg, #ffd94a 0%, #d49a17 50%, #8f6205 100%);
  border: 2px solid #fff299;
  color: #2b1a00;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  padding: 6px 14px;
  margin: -2px auto 8px auto;
  width: fit-content;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(0,0,0,0.4), 0 3px 0 #3d2800, 0 0 16px rgba(255, 217, 74, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: recordDropIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.record-ribbon-badge::before, .record-ribbon-badge::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffffff;
}
.record-ribbon-badge::before { top: 2px; left: 2px; }
.record-ribbon-badge::after { top: 2px; right: 2px; }

@keyframes recordDropIn {
  0% { transform: translateY(-16px) scale(0.7); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.ribbon-sparkle {
  font-size: 11px;
  color: #fff;
  animation: sparkleSpin 1.4s infinite ease-in-out;
}
@keyframes sparkleSpin {
  0%, 100% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; text-shadow: 0 0 6px #fff; }
}

.energy-bar-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(11, 28, 25, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 2px solid rgba(40, 84, 73, 0.7);
  padding: 8px 10px;
  margin-bottom: 4px;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.4), 0 3px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}
.energy-bar-container.full {
  border-color: #ffd242;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 16px rgba(255, 210, 66, 0.45);
}

.menu-energy-icon {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: scale(1.25);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.8)) drop-shadow(0 0 4px rgba(255, 210, 66, 0.5));
}

.energy-visual {
  display: flex;
  gap: 4px;
  flex: 1;
}
.energy-cell {
  height: 16px;
  flex: 1;
  background: rgba(18, 38, 33, 0.8);
  border: 1px solid #1f3f37;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
  transition: all 0.2s ease;
}
.energy-cell.filled {
  background: linear-gradient(180deg, #fff38a 0%, #ffd242 45%, #d99b11 100%);
  border-color: #ffe680;
  box-shadow: 0 0 8px rgba(255, 210, 66, 0.4), inset 0 1px 0 #ffffff;
}
.energy-bar-container.full .energy-cell.filled {
  animation: energyCellPulse 1.8s infinite alternate ease-in-out;
}
@keyframes energyCellPulse {
  0% { box-shadow: 0 0 6px rgba(255, 210, 66, 0.4), inset 0 1px 0 #ffffff; filter: brightness(1); }
  100% { box-shadow: 0 0 14px rgba(255, 210, 66, 0.9), inset 0 1px 0 #ffffff; filter: brightness(1.15); }
}

.energy-timer-hint {
  font-size: 11px;
  color: var(--accent-gold);
  margin-bottom: 10px;
  min-height: 14px;
  text-shadow: 1px 1px 0 #000;
}
.energy-timer-hint.full-glow {
  color: #70ffbd;
  text-shadow: 0 0 8px rgba(112, 255, 189, 0.7);
  letter-spacing: 0.5px;
}

.btn-refill {
  position: relative;
  background: linear-gradient(180deg, #ffd94a 0%, #d49a17 50%, #8f6205 100%);
  border: 2px solid #fff299;
  color: #2b1a00;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 9px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(0,0,0,0.4), 0 3px 0 #3d2800, 0 0 12px rgba(255, 217, 74, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.05s ease;
}
.btn-refill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-refill::before, .btn-refill::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ffffff;
}
.btn-refill::before { top: 2px; left: 2px; }
.btn-refill::after { top: 2px; right: 2px; }
.btn-refill:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #3d2800;
}
.btn-refill:disabled {
  filter: saturate(0.2) brightness(0.7);
  cursor: not-allowed;
  transform: none;
}

/* Quests Tab Styling */
.quests-tab-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.btn-quest-tab {
  background: #091714;
  border: 1px solid rgba(223, 166, 93, 0.35);
  color: #8dafa1;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 0;
  cursor: pointer;
  transition: all 0.12s ease;
}
.btn-quest-tab.active {
  background: linear-gradient(180deg, #cf8240 0%, #803712 100%);
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 6px rgba(0,0,0,0.6);
}

.quests-timer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14, 34, 30, 0.7);
  border: 1px solid rgba(223, 166, 93, 0.35);
  padding: 6px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #a2cbba;
}
.quests-timer-bar strong {
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

/* Bonus Chest Card */
.daily-chest-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(28, 66, 56, 0.95) 0%, rgba(13, 33, 29, 0.98) 100%);
  border: 2px solid var(--accent-gold);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 0 #06110f;
  overflow: visible;
}
.daily-chest-card::before, .daily-chest-card::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  z-index: 2;
}
.daily-chest-card::before { top: 2px; left: 2px; }
.daily-chest-card::after { top: 2px; right: 2px; }

.daily-chest-glow {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.daily-chest-glow::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, rgba(255, 225, 90, 0.55) 0%, rgba(246, 207, 122, 0.25) 55%, transparent 75%);
  box-shadow: 
    0 -3px 0 0 rgba(255, 230, 110, 0.45),
    0 3px 0 0 rgba(255, 230, 110, 0.45),
    -3px 0 0 0 rgba(255, 230, 110, 0.45),
    3px 0 0 0 rgba(255, 230, 110, 0.45),
    0 -7px 0 0 rgba(246, 207, 122, 0.25),
    0 7px 0 0 rgba(246, 207, 122, 0.25),
    -7px 0 0 0 rgba(246, 207, 122, 0.25),
    7px 0 0 0 rgba(246, 207, 122, 0.25);
  z-index: 0;
  pointer-events: none;
  animation: pixelAuraPulse 1.6s steps(4) infinite;
}

.daily-chest-glow::after {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 235, 150, 0.5) 45deg,
    transparent 90deg,
    rgba(255, 235, 150, 0.5) 135deg,
    transparent 180deg,
    rgba(255, 235, 150, 0.5) 225deg,
    transparent 270deg,
    rgba(255, 235, 150, 0.5) 315deg,
    transparent 360deg
  );
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1.5px);
  z-index: 0;
  animation: chestRaysSpin 7s linear infinite;
}

@keyframes pixelAuraPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.65; }
  50% { transform: scale(1.22); opacity: 1; background: radial-gradient(circle, rgba(255, 240, 140, 0.75) 0%, rgba(246, 207, 122, 0.4) 60%, transparent 80%); }
}

@keyframes chestRaysSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pixel-sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ffffff;
  box-shadow: 0 -3px 0 #ffe680, 0 3px 0 #ffe680, -3px 0 #ffe680, 3px 0 #ffe680;
  z-index: 3;
  pointer-events: none;
}

.pixel-sparkle.sp-top-left { top: 0px; left: 1px; animation: sparkleTwinkle 1.3s steps(3) infinite; }
.pixel-sparkle.sp-top-right { top: 1px; right: 0px; animation: sparkleTwinkle 1.6s steps(3) 0.35s infinite; }
.pixel-sparkle.sp-bottom-left { bottom: 1px; left: 2px; animation: sparkleTwinkle 1.4s steps(3) 0.7s infinite; }
.pixel-sparkle.sp-bottom-right { bottom: 0px; right: 1px; animation: sparkleTwinkle 1.7s steps(3) 0.2s infinite; }
.pixel-sparkle.sp-center-top { top: -4px; left: 22px; animation: sparkleTwinkle 1.5s steps(3) 0.5s infinite; }
.pixel-sparkle.sp-center-bottom { bottom: -4px; left: 22px; animation: sparkleTwinkle 1.8s steps(3) 0.9s infinite; }

@keyframes sparkleTwinkle {
  0%, 100% { transform: scale(0); opacity: 0; }
  40%, 60% { transform: scale(1.15); opacity: 1; }
}

.daily-chest-img {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: chestPixelFloat 2.2s steps(4) infinite;
  transform-origin: center center;
}

@keyframes chestPixelFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 6px rgba(255, 215, 75, 0.85));
  }
  50% {
    transform: translateY(-3px) scale(1.04);
    filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 12px rgba(255, 235, 120, 1));
  }
}

.daily-chest-info {
  flex: 1;
  min-width: 0;
}
.daily-chest-title {
  font-size: 14px;
  color: var(--accent-gold);
  line-height: 1.1;
  margin-bottom: 2px;
}
.daily-chest-desc {
  font-size: 10px;
  color: #a2cbba;
  margin-bottom: 2px;
}
.daily-chest-prog {
  font-size: 11px;
  color: #70ffbd;
}

.btn-chest-claim {
  position: relative;
  min-width: 86px;
  background: linear-gradient(180deg, #cf8240 0%, #9e4f20 50%, #6e2e10 100%);
  border: 2px solid #f6cf7a;
  color: #fff6d1;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 0 #240d04;
  white-space: nowrap;
  transition: transform 0.05s ease;
}
.btn-chest-claim:active:not(:disabled) { transform: translateY(1px); }
.btn-chest-claim:disabled {
  background: #182c26;
  border-color: #27473e;
  color: #587d72;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-chest-claim.ready {
  background: linear-gradient(180deg, #38d684 0%, #15693b 100%);
  border-color: #8effba;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 3px 0 #08381e, 0 0 12px rgba(56, 214, 132, 0.6);
  cursor: pointer;
  animation: btnPulseReady 1.8s infinite ease-in-out;
}

@keyframes btnPulseReady {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 3px 0 #08381e, 0 0 8px rgba(56, 214, 132, 0.4); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 3px 0 #08381e, 0 0 16px rgba(112, 255, 189, 0.85); }
}

/* Chest Modal */
.chest-modal-card {
  width: 90%;
  max-width: 320px;
  background: #102823;
  border: 2px solid var(--accent-gold);
  padding: 20px 16px;
  box-shadow: 0 0 30px rgba(0,0,0,0.9), 0 0 24px rgba(246,207,122,0.35);
  text-align: center;
  cursor: default;
  pointer-events: auto;
}

.chest-hits-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.chest-dot {
  width: 10px;
  height: 10px;
  background: #081714;
  border: 1px solid rgba(223, 166, 93, 0.4);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.9), 0 1px 0 #000;
  transition: all 0.12s ease;
}
.chest-dot.filled {
  background: linear-gradient(180deg, #70ffbd 0%, #38d684 50%, #15693b 100%);
  border-color: #8effba;
  box-shadow: inset 0 1px 0 #ffffff, 0 0 8px rgba(56, 214, 132, 0.6), 0 2px 0 #08381e;
}

.chest-crack-target {
  width: 110px;
  height: 110px;
  margin: 4px auto 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, rgba(246, 207, 122, 0.35) 0%, transparent 72%);
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.08s ease;
}
.chest-crack-target:active { transform: scale(0.92); }
.chest-crack-target.hit-wobble { animation: chestShakeHit 0.25s ease; }
@keyframes chestShakeHit {
  0% { transform: scale(1.15) rotate(0deg); }
  25% { transform: scale(0.92) rotate(-8deg); }
  50% { transform: scale(1.08) rotate(8deg); }
  75% { transform: scale(0.96) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.chest-modal-img {
  width: 68px;
  height: 68px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.8)) drop-shadow(0 0 10px rgba(255, 215, 75, 0.8));
}

.chest-crack-banner {
  position: relative;
  width: 100%;
  min-height: 44px;
  background: linear-gradient(180deg, #cf8240 0%, #9e4f20 50%, #6e2e10 100%);
  border: 2px solid #f6cf7a;
  color: #fff6d1;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 4px 0 #240d04, 0 0 12px rgba(246, 207, 122, 0.25);
  text-shadow: 1px 1px 0 #3a1506;
  transition: transform 0.06s ease;
}
.chest-crack-banner::before, .chest-crack-banner::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffe399;
  box-shadow: 0 1px 0 #4a210a;
}
.chest-crack-banner::before { top: 2px; left: 2px; }
.chest-crack-banner::after { top: 2px; right: 2px; }
.chest-crack-banner:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 #240d04;
}

.chest-key-sprite {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.8));
  vertical-align: middle;
}

.chest-rewards-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}
.chest-reward-item {
  background: rgba(14, 34, 30, 0.85);
  border: 2px solid var(--accent-gold);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 3px 0 #06110f;
  animation: bounceReward 0.4s ease;
}
.chest-reward-item img {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}
.chest-reward-item span {
  font-size: 15px;
  color: #70ffbd;
  text-shadow: 0 0 6px rgba(112,255,189,0.5);
  font-weight: bold;
}

/* Quests List */
.quests-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.quest-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 34, 30, 0.85);
  border: 2px solid rgba(223, 166, 93, 0.45);
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #06110f;
}
.quest-item::before, .quest-item::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--border-bronze);
}
.quest-item::before { top: 2px; left: 2px; }
.quest-item::after { top: 2px; right: 2px; }

.quest-item-icon-box {
  width: 36px;
  height: 36px;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
}
.quest-item-icon-box .sprite-icon {
  width: 22px;
  height: 22px;
}

.quest-item-content {
  flex: 1;
  min-width: 0;
}
.quest-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--accent-gold);
}
.quest-item-desc {
  font-size: 10px;
  color: #a2cbba;
  margin: 1px 0 4px;
}
.quest-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quest-progress-bar {
  flex: 1;
  height: 8px;
  background: #081412;
  border: 1px solid #1a3c34;
  position: relative;
  overflow: hidden;
}
.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38d684 0%, #70ffbd 100%);
  transition: width 0.2s ease;
}
.quest-progress-text {
  font-size: 10px;
  color: #fff;
  min-width: 38px;
  text-align: right;
}
.btn-quest-claim {
  background: linear-gradient(180deg, #38d684 0%, #15693b 100%);
  border: 1px solid #8effba;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  padding: 5px 8px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 0 #08381e;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-quest-claim:active { transform: translateY(1px); }
.btn-quest-claim.claimed {
  background: #182c26;
  border-color: #27473e;
  color: #587d72;
  cursor: default;
  box-shadow: none;
}

/* Daily Login Streak */
.daily-streak-section {
  background: rgba(10, 24, 21, 0.9);
  border: 2px solid rgba(223, 166, 93, 0.45);
  padding: 10px 8px 12px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #06110f;
}
.daily-streak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--accent-gold);
  margin-bottom: 8px;
  padding: 0 4px;
}
.daily-streak-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.streak-day-card {
  position: relative;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.25);
  padding: 6px 3px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  text-align: center;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
  transition: all 0.12s ease;
  overflow: hidden;
}

.streak-day-card:nth-child(7) { grid-column: span 2; }
.streak-day-num { font-size: 11px; color: #8dafa1; line-height: 1; }
.streak-day-card .sprite-icon { width: 26px; height: 26px; margin: 2px 0; }
.streak-day-card .sprite-icon[src*="fc688.png"] { transform: scale(1.36); }
.streak-day-card .sprite-icon[src*="fc528.png"] { transform: scale(1.1); }

.streak-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0;
}
.streak-icons-row .sprite-icon { width: 24px; height: 24px; margin: 0; }
.streak-icons-row .sprite-icon[src*="fc688.png"] { transform: scale(1.36); }

.streak-day-val {
  font-size: 11px;
  color: var(--accent-gold);
  line-height: 1.1;
  white-space: nowrap;
}

.streak-day-card.claimed {
  background: linear-gradient(180deg, #071914 0%, #040e0b 100%);
  border: 1px solid #1b4d3f;
  opacity: 0.65;
  cursor: default;
}
.streak-day-card.claimed .streak-day-num { color: #38d684; }
.streak-day-card.claimed .streak-day-val { color: #5d8f7e; text-decoration: line-through; }
.streak-day-card.claimed .sprite-icon { filter: grayscale(0.4) brightness(0.85); }
.streak-badge-claimed {
  width: 100%;
  background: #103328;
  border-top: 1px solid #23614e;
  color: #70ffbd;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 0;
  margin-top: 2px;
  text-shadow: 1px 1px 0 #000;
  letter-spacing: 0.5px;
}

.streak-day-card.today {
  background: linear-gradient(180deg, #1c4d40 0%, #0d2e26 100%);
  border: 2px solid #70ffbd;
  box-shadow: 0 0 14px rgba(112, 255, 189, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
  cursor: pointer;
  transform: translateY(-2px);
  animation: todayCardPulse 1.8s infinite alternate ease-in-out;
}
@keyframes todayCardPulse {
  0% { box-shadow: 0 0 8px rgba(112, 255, 189, 0.4), inset 0 1px 0 rgba(255,255,255,0.3); border-color: #70ffbd; }
  100% { box-shadow: 0 0 16px rgba(112, 255, 189, 0.85), inset 0 1px 0 rgba(255,255,255,0.5); border-color: #afffe0; }
}
.streak-day-card.today .streak-day-num { color: #70ffbd; font-weight: bold; }
.streak-day-card.today .streak-day-val { color: #fff4a8; font-weight: bold; text-shadow: 0 0 6px rgba(255, 244, 168, 0.6); }
.streak-badge-today {
  width: 100%;
  background: linear-gradient(180deg, #38d684 0%, #177340 100%);
  border-top: 1px solid #8effba;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 0;
  margin-top: 2px;
  text-shadow: 1px 1px 0 #052614;
  letter-spacing: 0.5px;
}

.streak-day-card.locked {
  background: #060e0d;
  border: 1px dashed rgba(112, 224, 196, 0.15);
  opacity: 0.55;
  cursor: not-allowed;
}
.streak-day-card.locked .streak-day-num { color: #55776c; }
.streak-day-card.locked .streak-day-val { color: #60887c; }
.streak-badge-locked {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  margin-top: 2px;
}
.streak-badge-locked .streak-lock-sprite {
  width: 13px;
  height: 13px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8));
  opacity: 0.85;
}

/* Pregame Boosters Bar */
.pregame-boosters-bar {
  width: 100%;
  background: rgba(10, 24, 21, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(223, 166, 93, 0.45);
  padding: 8px 10px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 3px 8px rgba(0, 0, 0, 0.4);
}

.pregame-title {
  font-size: 11px;
  color: var(--accent-gold);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000;
}

.booster-toggle-group {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.booster-toggle {
  position: relative;
  width: 46px;
  height: 46px;
  background: linear-gradient(180deg, #16302a 0%, #0d1e1a 100%);
  border: 2px solid rgba(112, 224, 196, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: all 0.12s ease;
}

.booster-toggle .sprite-icon {
  width: 26px;
  height: 26px;
  transition: transform 0.1s ease;
}

.booster-toggle .booster-count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #091714;
  border: 1px solid var(--accent-gold);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  box-shadow: 0 1px 2px #000;
}

.booster-toggle.active {
  background: linear-gradient(180deg, #2b7a66 0%, #154539 100%);
  border-color: #70ffbd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 14px rgba(112, 255, 189, 0.7);
  transform: translateY(-2px);
}

.booster-toggle.active .booster-count {
  background: #115731;
  border-color: #8effba;
  color: #f0fff6;
}

.booster-toggle.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.85);
  border-color: rgba(255, 255, 255, 0.15);
  transform: none !important;
}

.booster-toggle:active:not(.disabled) { transform: scale(0.94); }

.btn-main {
  position: relative;
  width: 100%;
  min-height: 50px;
  background: linear-gradient(180deg, #cf8240 0%, #a85827 50%, #753316 100%);
  border: 2px solid #f6cf7a;
  color: #fff6d1;
  font-family: inherit;
  font-size: 20px;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.4), 0 5px 0 #2b1106, 0 8px 15px rgba(0,0,0,0.7);
  text-shadow: 2px 2px 0 #3a1506;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease;
}
.btn-main span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-main::before, .btn-main::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: #ffe399;
  box-shadow: 0 1px 0 #4a210a;
}
.btn-main::before { top: 3px; left: 3px; }
.btn-main::after { top: 3px; right: 3px; }
.btn-main:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #2b1106, 0 4px 8px rgba(0,0,0,0.6);
}
.btn-main:disabled {
  filter: saturate(0.2) brightness(0.6);
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 1px rgba(255,255,255,0.1), 0 3px 0 #151515;
}

.btn-action-cyan {
  position: relative;
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, #35ccc7 0%, #208783 50%, #125754 100%);
  border: 2px solid #8efff5;
  color: #f0ffff;
  font-family: inherit;
  font-size: 18px;
  padding: 8px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.4), 0 4px 0 #092e2c, 0 0 15px rgba(53, 204, 199, 0.3);
  text-shadow: 1px 2px 0 #0b3634;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}
.btn-action-cyan span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-action-cyan:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #092e2c;
}
.btn-action-cyan:disabled {
  filter: saturate(0.2) brightness(0.6);
  cursor: not-allowed;
  transform: none;
}

.btn-action-cyan.claimed {
  background: linear-gradient(180deg, #38d684 0%, #1c8c50 50%, #115731 100%) !important;
  border-color: #8effba !important;
  color: #f0fff6 !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(0, 0, 0, 0.4), 0 4px 0 #08381e, 0 0 18px rgba(56, 214, 132, 0.4) !important;
  text-shadow: 1px 2px 0 #08381e !important;
  cursor: default !important;
  filter: none !important;
}

.btn-menu-blue {
  position: relative;
  width: 100%;
  min-height: 44px;
  background: linear-gradient(180deg, #3aafe6 0%, #207cb3 50%, #125178 100%);
  border: 2px solid #8fe3ff;
  color: #f0faff;
  font-family: inherit;
  font-size: 17px;
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 4px 0 #0b2b40, 0 0 12px rgba(58, 175, 230, 0.25);
  text-shadow: 1px 2px 0 #0a273b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease;
}
.btn-menu-blue span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-menu-blue::before, .btn-menu-blue::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #b5f0ff;
  box-shadow: 0 1px 0 #071f30;
}
.btn-menu-blue::before { top: 3px; left: 3px; }
.btn-menu-blue::after { top: 3px; right: 3px; }
.btn-menu-blue:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #0b2b40;
}

.btn-giveup {
  position: relative;
  width: 100%;
  min-height: 44px;
  background: linear-gradient(180deg, #b82352 0%, #8c133a 50%, #5e0824 100%);
  border: 2px solid #ff6e99;
  color: #fff0f5;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  margin-top: 6px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.5), 0 4px 0 #3b0516, 0 0 18px rgba(184, 35, 82, 0.55);
  text-shadow: 1px 2px 0 #3b0516;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease, box-shadow 0.1s ease;
}
.btn-giveup span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-giveup::before, .btn-giveup::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffa8c2;
  box-shadow: 0 1px 0 #3b0516;
}
.btn-giveup::before { top: 3px; left: 3px; }
.btn-giveup::after { top: 3px; right: 3px; }
.btn-giveup:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 #3b0516, 0 0 10px rgba(184, 35, 82, 0.4);
}

.btn-ton-withdraw {
  position: relative;
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, #2ea5f5 0%, #1773c2 50%, #0c4e8a 100%);
  border: 2px solid #70cbff;
  color: #f0faff;
  font-family: inherit;
  font-size: 18px;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  margin-top: 6px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.4), 0 4px 0 #062645, 0 0 16px rgba(46, 165, 245, 0.35);
  text-shadow: 1px 2px 0 #072a4c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease, filter 0.1s ease;
}
.btn-ton-withdraw span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ton-withdraw::before, .btn-ton-withdraw::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #b8e7ff;
  box-shadow: 0 1px 0 #062645;
}
.btn-ton-withdraw::before { top: 3px; left: 3px; }
.btn-ton-withdraw::after { top: 3px; right: 3px; }
.btn-ton-withdraw:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #062645;
}
.btn-ton-withdraw.disabled, .btn-ton-withdraw:disabled {
  background: linear-gradient(180deg, #182c38 0%, #101e26 100%);
  border-color: #27475c;
  color: #5c7e94;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 3px 0 #091217;
  text-shadow: none;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.btn-ton-withdraw.disabled::before, .btn-ton-withdraw.disabled::after,
.btn-ton-withdraw:disabled::before, .btn-ton-withdraw:disabled::after {
  background: #395c73;
  box-shadow: none;
}

/* Shop Styles & Geode Carousel */
.shop-balance-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14, 34, 30, 0.85);
  border: 1px solid var(--border-bronze);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 6px rgba(0,0,0,0.5);
}
.shop-balance-bar strong {
  color: var(--accent-cyan);
  font-size: 17px;
  display: flex;
  align-items: center;
}

.shop-section-title {
  color: var(--accent-gold);
  font-size: 16px;
  margin: 14px 0 8px 2px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000;
}

.shop-geode-card {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 61, 52, 0.85) 0%, rgba(13, 33, 29, 0.95) 100%);
  border: 2px solid var(--accent-gold);
  padding: 16px 14px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.12), 0 0 20px rgba(246, 207, 122, 0.2);
}
.shop-geode-card::before, .shop-geode-card::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--accent-gold);
}
.shop-geode-card::before { top: 3px; left: 3px; }
.shop-geode-card::after { top: 3px; right: 3px; }

/* Стрелочная карусель жеод */
.geode-carousel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 85px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 6px;
}
.btn-geode-nav {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.08s ease;
}
.btn-geode-nav .sprite-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.85));
  pointer-events: none;
  transition: transform 0.08s ease;
}
.btn-geode-nav:active .sprite-icon { transform: scale(0.86); }

/* Динамический скругленный контейнер свечения */
.geode-glow-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--geode-glow-color, rgba(168, 218, 220, 0.45)) 0%, transparent 60%);
  transition: background 0.3s ease;
}

/* 4 парящие пиксельные искорки в покое */
.geode-idle-sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--geode-sparkle-color, #a8dadc);
  box-shadow: 0 0 4px var(--geode-sparkle-color, #a8dadc);
  pointer-events: none;
  z-index: 1;
}
.geode-idle-sparkle.sp-1 { top: 12px; left: 14px; animation: idlePixelSparkle 2.4s infinite ease-in-out; }
.geode-idle-sparkle.sp-2 { top: 10px; right: 14px; animation: idlePixelSparkle 2.7s 0.6s infinite ease-in-out; }
.geode-idle-sparkle.sp-3 { bottom: 12px; left: 16px; animation: idlePixelSparkle 2.2s 1.2s infinite ease-in-out; }
.geode-idle-sparkle.sp-4 { bottom: 14px; right: 16px; animation: idlePixelSparkle 2.9s 0.3s infinite ease-in-out; }

@keyframes idlePixelSparkle {
  0%, 100% { transform: scale(0.4) translateY(0); opacity: 0.2; }
  50% { transform: scale(1.1) translateY(-3px); opacity: 0.85; }
}

/* Разлетающиеся пиксельные частицы при смене жеоды */
.geode-burst-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--geode-sparkle-color, #ffffff);
  box-shadow: 0 0 6px var(--geode-sparkle-color, #ffffff);
  pointer-events: none;
  z-index: 4;
  animation: burstParticleFly 0.35s ease-out forwards;
}

@keyframes burstParticleFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--bx, 0px), var(--by, 0px)) scale(0.2); opacity: 0; }
}

.shop-geode-img {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.8));
  animation: geodeFloat 2.2s infinite ease-in-out;
}
@keyframes geodeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); filter: drop-shadow(0 8px 12px rgba(0,0,0,0.6)); }
}

/* Анимации плавного слайда */
@keyframes geodeSlideOutLeft {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(-24px) scale(0.85); opacity: 0; }
}
@keyframes geodeSlideInRight {
  0% { transform: translateX(24px) scale(0.85); opacity: 0; }
  70% { transform: translateX(-2px) scale(1.06); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes geodeSlideOutRight {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(24px) scale(0.85); opacity: 0; }
}
@keyframes geodeSlideInLeft {
  0% { transform: translateX(-24px) scale(0.85); opacity: 0; }
  70% { transform: translateX(2px) scale(1.06); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

.anim-slide-out-left { animation: geodeSlideOutLeft 0.1s ease-in forwards !important; }
.anim-slide-in-right { animation: geodeSlideInRight 0.18s cubic-bezier(0.25, 1, 0.5, 1) forwards !important; }
.anim-slide-out-right { animation: geodeSlideOutRight 0.1s ease-in forwards !important; }
.anim-slide-in-left { animation: geodeSlideInLeft 0.18s cubic-bezier(0.25, 1, 0.5, 1) forwards !important; }

.shop-geode-title {
  font-size: 22px;
  color: var(--accent-gold);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}
.shop-geode-desc {
  font-size: 12px;
  color: #8dafa1;
}

.shop-item-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 34, 30, 0.85);
  border: 2px solid rgba(223, 166, 93, 0.45);
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #06110f;
}
.shop-item-card::before, .shop-item-card::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--border-bronze);
}
.shop-item-card::before { top: 2px; left: 2px; }
.shop-item-card::after { top: 2px; right: 2px; }

.shop-item-icon-box {
  width: 44px;
  height: 44px;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
}
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { font-size: 15px; color: var(--accent-gold); line-height: 1.1; margin-bottom: 2px; }
.shop-item-desc { font-size: 11px; color: #8dafa1; line-height: 1.1; margin-bottom: 3px; }
.shop-item-stock { font-size: 11px; color: #70ffbd; }

.btn-shop-buy {
  position: relative;
  min-width: 80px;
  height: 38px;
  background: linear-gradient(180deg, #cf8240 0%, #9e4f20 50%, #6e2e10 100%);
  border: 2px solid #f6cf7a;
  color: #fff6d1;
  font-family: inherit;
  font-size: 15px;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 0 #240d04;
  text-shadow: 1px 1px 0 #3a1506;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.05s ease;
}
.btn-shop-buy span { display: inline-flex; align-items: center; justify-content: center; }
.btn-shop-buy:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 #240d04; }
.btn-shop-buy.disabled, .btn-shop-buy:disabled { filter: saturate(0.2) brightness(0.6); cursor: not-allowed; transform: none; box-shadow: 0 2px 0 #151515; }

/* Modal Geode Card */
.geode-modal-card {
  width: 90%;
  max-width: 320px;
  background: #102823;
  border: 2px solid var(--accent-gold);
  padding: 20px 16px;
  box-shadow: 0 0 30px rgba(0,0,0,0.9), 0 0 20px rgba(246,207,122,0.3);
  text-align: center;
  cursor: default;
  pointer-events: auto;
}

.geode-hits-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 8px;
}
.geode-dot {
  width: 10px;
  height: 10px;
  background: #081714;
  border: 1px solid rgba(223, 166, 93, 0.4);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.9), 0 1px 0 #000;
  transition: all 0.12s ease;
}
.geode-dot.filled {
  background: linear-gradient(180deg, #fff38a 0%, #ffd242 50%, #d99b11 100%);
  border-color: #fff299;
  box-shadow: inset 0 1px 0 #ffffff, 0 0 8px rgba(255, 210, 66, 0.6), 0 2px 0 #3a220b;
}

.geode-crack-target {
  width: 100px;
  height: 100px;
  margin: 4px auto 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, rgba(246, 207, 122, 0.3) 0%, transparent 70%);
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.08s ease;
}
.geode-crack-target:active { transform: scale(0.92); }
.geode-crack-target.hit-wobble { animation: hitShake 0.25s ease; }
@keyframes hitShake {
  0% { transform: scale(1.1) rotate(0deg); }
  25% { transform: scale(0.95) rotate(-8deg); }
  50% { transform: scale(1.05) rotate(8deg); }
  75% { transform: scale(0.98) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.geode-crack-banner {
  position: relative;
  width: 100%;
  min-height: 44px;
  background: linear-gradient(180deg, #cf8240 0%, #9e4f20 50%, #6e2e10 100%);
  border: 2px solid #f6cf7a;
  color: #fff6d1;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 4px 0 #240d04, 0 0 12px rgba(246, 207, 122, 0.25);
  text-shadow: 1px 1px 0 #3a1506;
  transition: transform 0.06s ease;
}
.geode-crack-banner::before, .geode-crack-banner::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffe399;
  box-shadow: 0 1px 0 #4a210a;
}
.geode-crack-banner::before { top: 2px; left: 2px; }
.geode-crack-banner::after { top: 2px; right: 2px; }
.geode-crack-banner:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 #240d04; }

.geode-reward-display {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
  min-height: 64px;
}
.geode-reward-display img {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.6));
  animation: bounceReward 0.4s ease;
}
@keyframes bounceReward {
  0% { transform: scale(0.3); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.geode-reward-text {
  font-size: 19px;
  color: #70ffbd;
  text-shadow: 0 0 8px rgba(112,255,189,0.5);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.revive-timer-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  background: #142e28;
  box-shadow: 0 0 20px rgba(246, 207, 122, 0.4), inset 0 0 10px rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 36px;
  color: #fff1b8;
  margin-bottom: 16px;
  animation: pulseRevive 1s infinite alternate;
}
@keyframes pulseRevive {
  0% { transform: scale(0.96); box-shadow: 0 0 10px rgba(246, 207, 122, 0.3); }
  100% { transform: scale(1.04); box-shadow: 0 0 25px rgba(246, 207, 122, 0.6); }
}

.view-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px 14px;
}
.view-title {
  font-size: 24px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  text-align: center;
}
.table-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table-list tr { border-bottom: 1px solid rgba(255,255,255,0.08); }
.table-list td { padding: 8px 4px; vertical-align: middle; }

/* Карточка TON кошелька */
.wallet-card-panel {
  position: relative;
  background: rgba(14, 34, 30, 0.85);
  border: 2px solid rgba(223, 166, 93, 0.45);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #06110f;
}
.wallet-card-panel::before, .wallet-card-panel::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--border-bronze);
}
.wallet-card-panel::before { top: 2px; left: 2px; }
.wallet-card-panel::after { top: 2px; right: 2px; }

.wallet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.wallet-status-tag {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid;
  letter-spacing: 0.5px;
}
.wallet-status-tag.tag-unlinked {
  background: rgba(223, 77, 136, 0.15);
  border-color: var(--accent-pink);
  color: #ff8bb7;
}
.wallet-status-tag.tag-linked {
  background: rgba(56, 214, 132, 0.15);
  border-color: #70ffbd;
  color: #70ffbd;
}
.wallet-address-preview {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  color: #7a9e90;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.2);
  padding: 8px 10px;
  margin-bottom: 8px;
  word-break: break-all;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.7);
}
.wallet-address-preview.linked {
  color: var(--accent-cyan);
  font-size: 13px;
  letter-spacing: 0.5px;
}
.btn-wallet-connect {
  position: relative;
  width: 100%;
  min-height: 38px;
  background: linear-gradient(180deg, #1f4d43 0%, #102e28 100%);
  border: 1px solid var(--accent-cyan);
  color: #e0ffff;
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 0 #051412;
  transition: transform 0.05s ease;
}
.btn-wallet-connect:active {
  transform: translateY(1px);
}

.wallet-modal-card {
  width: 90%;
  max-width: 320px;
  background: #102823;
  border: 2px solid var(--accent-gold);
  padding: 20px 16px;
  box-shadow: 0 0 30px rgba(0,0,0,0.9), 0 0 20px rgba(246,207,122,0.3);
  text-align: center;
  cursor: default;
  pointer-events: auto;
}
.wallet-input-box {
  margin-bottom: 8px;
}
.wallet-input-box input {
  width: 100%;
  background: #081714;
  border: 2px solid rgba(112, 224, 196, 0.4);
  color: #ffffff;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 10px 10px;
  text-align: center;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  transition: border-color 0.15s ease;
}
.wallet-input-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(76, 224, 210, 0.4), inset 0 2px 4px rgba(0,0,0,0.8);
}
.wallet-input-error {
  font-size: 11px;
  color: #ff6e99;
  margin-bottom: 6px;
  text-shadow: 1px 1px 0 #000;
}

/* Журнал операций (История) — 5 записей без скролла */
.wallet-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
}
.wallet-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.wallet-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.15);
  padding: 6px 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}
.wallet-history-item-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.wallet-history-item-title {
  color: #e7f2eb;
  font-size: 12px;
}
.wallet-history-item-time {
  color: #628578;
  font-size: 10px;
}
.wallet-history-val-plus {
  color: #70ffbd;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wallet-history-val-minus {
  color: #ff6e99;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wallet-history-val-pending {
  color: var(--accent-gold);
  font-size: 11px;
  text-align: right;
  line-height: 1.1;
}
.wallet-history-empty {
  text-align: center;
  color: #5d7e72;
  font-size: 12px;
  padding: 10px 0;
}

/* ==========================================
   ПОЛНОЭКРАННОЕ ОКНО РЕФЕРАЛЬНОЙ ПРОГРАММЫ
   ========================================== */
.fullscreen-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 9, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 40;
  padding: 0;
  display: flex;
  flex-direction: column;
  cursor: default;
}

.referrals-view-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
}

.referrals-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(223, 166, 93, 0.4);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.referrals-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal-round {
  width: 32px;
  height: 32px;
  background: #091714;
  border: 1px solid var(--border-bronze);
  color: var(--accent-gold);
  font-family: inherit;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 0 #000;
  transition: transform 0.08s ease, background 0.1s ease;
}
.btn-close-modal-round:active {
  transform: scale(0.92);
  background: #142e28;
}

.ref-link-card {
  position: relative;
  background: rgba(14, 34, 30, 0.85);
  border: 2px solid rgba(223, 166, 93, 0.45);
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #06110f;
}
.ref-link-card::before, .ref-link-card::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--border-bronze);
}
.ref-link-card::before { top: 2px; left: 2px; }
.ref-link-card::after { top: 2px; right: 2px; }

.ref-link-label {
  font-size: 11px;
  color: var(--accent-gold);
  margin-bottom: 6px;
  text-align: left;
  letter-spacing: 0.5px;
}

.ref-link-box {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ref-link-box input {
  flex: 1;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.35);
  color: var(--accent-cyan);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  padding: 8px 10px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-ref {
  background: linear-gradient(180deg, #1fc99c 0%, #0e5e48 100%);
  border: 1px solid #70ffbd;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  padding: 7px 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 0 #08382b;
  flex-shrink: 0;
  white-space: nowrap;
  transition: transform 0.05s ease;
}
.btn-copy-ref:active { transform: translateY(1px); }

.ref-levels-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.btn-ref-tab {
  background: #091714;
  border: 1px solid rgba(223, 166, 93, 0.35);
  color: #8dafa1;
  font-family: inherit;
  font-size: 12px;
  padding: 7px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.12s ease;
}

.btn-ref-tab small {
  font-size: 10px;
  color: #70ffbd;
}

.btn-ref-tab.active {
  background: linear-gradient(180deg, #cf8240 0%, #803712 100%);
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 6px rgba(0,0,0,0.6);
}

.btn-ref-tab.active small {
  color: #fff6d1;
  font-weight: bold;
}

.ref-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.referrals-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.referrals-empty {
  text-align: center;
  color: #5d7e72;
  font-size: 12px;
  padding: 24px 10px;
  line-height: 1.4;
}

.ref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #081714;
  border: 1px solid rgba(112, 224, 196, 0.15);
  padding: 6px 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}

.ref-item-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.ref-item-name {
  color: #e7f2eb;
  font-size: 13px;
}

.ref-item-sub {
  color: #628578;
  font-size: 10px;
}

.ref-item-shards {
  color: #70ffbd;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Bottom Nav */
.bottom-nav {
  position: relative;
  z-index: 30;
  height: 62px;
  flex-shrink: 0;
  background: #081211;
  border-top: 2px solid rgba(223, 166, 93, 0.4);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 4px 2px;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.8);
}
.nav-btn {
  position: relative;
  background: linear-gradient(180deg, #172d28 0%, #0e1d1a 100%);
  border: 1px solid rgba(115, 165, 141, 0.2);
  border-top: 3px solid transparent;
  color: #7b9e90;
  font-family: inherit;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  padding: 2px 1px;
  transition: all 0.12s ease;
}
.nav-icon {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6));
  transition: transform 0.1s ease;
}
.nav-btn:active .nav-icon { transform: scale(0.92); }

.nav-btn.active {
  background: linear-gradient(180deg, #b76d37 0%, #6e3725 100%);
  border-color: var(--border-bronze);
  border-top: 3px solid var(--accent-gold);
  color: #fff4ca;
  box-shadow: inset 0 1px 0 rgba(255,230,170,0.5), 0 0 12px rgba(223,166,93,0.35);
  text-shadow: 1px 1px 0 #38190c;
}
.nav-btn.active .nav-icon {
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 6px rgba(255, 230, 170, 0.5));
}

.nav-btn-main {
  border-color: rgba(223, 166, 93, 0.35);
  background: linear-gradient(180deg, #1c3d36 0%, #102420 100%);
}

.nav-btn.disabled,
.nav-btn[disabled] {
  background: #060e0d !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  border-top: 3px solid transparent !important;
  color: #3b5249 !important;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.9), inset 0 0 3px #000 !important;
  opacity: 0.5;
  filter: grayscale(0.85);
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: translateY(1px);
}
.nav-btn.disabled .nav-icon {
  filter: grayscale(0.9) brightness(0.6) !important;
}

.nav-badge-dot {
  position: absolute;
  top: -4px;
  right: 7px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #ff1e38;
  font-family: 'Tiny5', monospace;
  font-size: 25px;
  font-weight: normal;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-text-stroke: 0.5px #ffffff;
  paint-order: stroke fill;
  text-shadow: -1px 0 0 rgba(255, 255, 255, 0.95), 1px 0 0 rgba(255, 255, 255, 0.95), 0 -1px 0 rgba(255, 255, 255, 0.95), 0 1px 0 rgba(255, 255, 255, 0.95);
  pointer-events: none;
  z-index: 10;
  animation: badgePixelFloat 1.5s infinite ease-in-out;
}

@keyframes badgePixelFloat {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 2px rgba(255, 30, 56, 0.6)); }
  50% { transform: translateY(-2.5px); filter: drop-shadow(0 0 6px rgba(255, 30, 56, 0.95)); }
}

.channel-task-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(22, 54, 46, 0.9) 0%, rgba(10, 26, 23, 0.95) 100%);
  border: 2px solid var(--accent-gold);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 3px 0 #06110f, 0 0 12px rgba(246, 207, 122, 0.2);
}
.channel-task-card::before, .channel-task-card::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  box-shadow: 0 1px 0 #000;
}
.channel-task-card::before { top: 2px; left: 2px; }
.channel-task-card::after { top: 2px; right: 2px; }

.channel-task-icon-box {
  width: 40px;
  height: 40px;
  background: #081714;
  border: 1px solid var(--accent-cyan);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8), 0 0 6px rgba(76, 224, 210, 0.25);
}
.channel-task-icon-box .sprite-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8));
}

.channel-task-info {
  flex: 1;
  min-width: 0;
}

.channel-task-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--accent-gold);
  line-height: 1.2;
}
.channel-task-top strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-task-reward {
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 6px;
  transform: translateY(8px);
}

.channel-task-desc {
  font-size: 10px;
  color: #a2cbba;
  margin-top: 2px;
  line-height: 1.1;
}

.btn-channel-task {
  position: relative;
  min-width: 82px;
  height: 34px;
  background: linear-gradient(180deg, #1fc99c 0%, #0e5e48 100%);
  border: 1px solid #70ffbd;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #08382b;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-channel-task:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-channel-task.check-state {
  background: linear-gradient(180deg, #cf8240 0%, #9e4f20 50%, #6e2e10 100%);
  border-color: #f6cf7a;
  color: #fff6d1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #240d04;
  animation: btnPulseCheck 1.5s infinite ease-in-out;
}
.btn-channel-task.claimed,
.btn-channel-task:disabled {
  background: #182c26 !important;
  border-color: #27473e !important;
  color: #587d72 !important;
  cursor: default !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
}

@keyframes btnPulseCheck {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 0 #240d04, 0 0 6px rgba(246, 207, 122, 0.3); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 0 #240d04, 0 0 14px rgba(246, 207, 122, 0.7); }
}