:root {
  --bg: #09090f;
  --bg-2: #10101c;
  --card: rgba(18, 18, 32, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --pink: #ff2a85;
  --cyan: #00f0ff;
  --orange: #ff7a00;
  --gold: #ffd700;
  --red: #ff1e42;
  --green: #00e676;
  --text: #f4f4ff;
  --muted: #8b8ca8;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255, 42, 133, 0.14), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(0, 240, 255, 0.12), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}

#rage-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-shadow: inset 0 0 90px 24px rgba(255, 30, 66, 0.72), inset 0 0 180px 40px rgba(255, 122, 0, 0.38);
}

body.rage-active #rage-vignette {
  opacity: 1;
  animation: ragePulse 0.55s ease-in-out infinite alternate;
}

@keyframes ragePulse {
  from {
    box-shadow: inset 0 0 75px 18px rgba(255, 30, 66, 0.62), inset 0 0 150px 30px rgba(255, 122, 0, 0.32);
  }
  to {
    box-shadow: inset 0 0 115px 32px rgba(255, 30, 66, 0.85), inset 0 0 210px 52px rgba(255, 122, 0, 0.52);
  }
}

/* Screen shake */
.app.shake-crit {
  animation: shakeCrit 0.24s cubic-bezier(.36,.07,.19,.97) both;
}

.app.shake-rage {
  animation: shakeRage 0.42s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeCrit {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-5px, 3px, 0); }
  40% { transform: translate3d(5px, -4px, 0); }
  60% { transform: translate3d(-4px, -2px, 0); }
  80% { transform: translate3d(3px, 3px, 0); }
}

@keyframes shakeRage {
  0%, 100% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-8px, 5px, 0) rotate(-0.6deg); }
  30% { transform: translate3d(8px, -6px, 0) rotate(0.6deg); }
  45% { transform: translate3d(-7px, -4px, 0) rotate(-0.4deg); }
  60% { transform: translate3d(6px, 5px, 0) rotate(0.4deg); }
  75% { transform: translate3d(-4px, 2px, 0); }
}

/* Layout */
.app {
  min-height: 100dvh;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
  position: relative;
  z-index: 10;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(255, 42, 133, 0.7));
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-text h1 {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(17px, 2.5vw, 22px);
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff 0%, var(--cyan) 55%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badge-18 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.45);
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
}

.icon-btn.danger:hover {
  border-color: var(--pink);
  background: rgba(255, 42, 133, 0.16);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Main 2-column grid */
.layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Rank card */
.rank-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.rank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.rank-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.rank-name {
  font-family: 'Russo One', sans-serif;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
  text-align: right;
}

.rank-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
  transition: width 0.25s ease;
}

.rank-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Score block */
.score-block {
  text-align: center;
  margin-bottom: 14px;
}

.score-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.mats-count {
  font-family: 'Russo One', 'JetBrains Mono', monospace;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 42, 133, 0.65), 0 0 36px rgba(0, 240, 255, 0.25);
  transition: transform 0.08s ease;
}

.mats-count.bump {
  transform: scale(1.07);
}

.mats-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--pink);
  margin-top: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-k {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.stat-v.cyan { color: var(--cyan); }
.stat-v.pink { color: var(--pink); }
.stat-v.gold { color: var(--gold); }

/* Rage bar */
.rage-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 122, 0, 0.24);
  border-radius: 14px;
  padding: 9px 14px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.rage-active .rage-box {
  border-color: var(--red);
  box-shadow: 0 0 22px rgba(255, 30, 66, 0.45);
  background: rgba(255, 30, 66, 0.12);
}

.rage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.rage-label {
  color: var(--orange);
  letter-spacing: 0.04em;
}

body.rage-active .rage-label {
  color: #fff;
  text-shadow: 0 0 10px var(--red);
}

.rage-status {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
}

.rage-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.rage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--red));
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 122, 0, 0.7);
  transition: width 0.08s linear;
}

/* Click Arena */
.click-arena {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 250px;
  padding: 12px 0 4px;
}

.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  overflow: hidden;
}

.click-btn {
  position: relative;
  width: 224px;
  height: 224px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 32% 28%, #2a1538 0%, #140c24 58%, #0c0916 100%);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 3px rgba(255, 42, 133, 0.85),
    0 0 28px rgba(255, 42, 133, 0.55),
    0 0 65px rgba(0, 240, 255, 0.25),
    inset 0 0 26px rgba(255, 42, 133, 0.35);
  transition: transform 0.07s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.15s ease;
  animation: btnBreathe 2.4s ease-in-out infinite;
  outline: none;
}

@keyframes btnBreathe {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(255, 42, 133, 0.85),
      0 0 28px rgba(255, 42, 133, 0.55),
      0 0 60px rgba(0, 240, 255, 0.22),
      inset 0 0 24px rgba(255, 42, 133, 0.32);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(0, 240, 255, 0.9),
      0 0 38px rgba(255, 42, 133, 0.72),
      0 0 82px rgba(0, 240, 255, 0.36),
      inset 0 0 32px rgba(0, 240, 255, 0.28);
  }
}

body.rage-active .click-btn {
  background: radial-gradient(circle at 35% 30%, #4d1022 0%, #240812 60%, #14050a 100%);
  box-shadow:
    0 0 0 4px var(--orange),
    0 0 42px rgba(255, 30, 66, 0.9),
    0 0 95px rgba(255, 122, 0, 0.65),
    inset 0 0 36px rgba(255, 122, 0, 0.55);
  animation: none;
}

.click-btn.pressed {
  transform: scale(0.91);
}

.btn-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 240, 255, 0.32);
  animation: spinRing 18s linear infinite;
  pointer-events: none;
}

body.rage-active .btn-ring {
  border-color: rgba(255, 122, 0, 0.7);
  animation-duration: 3.5s;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.btn-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.btn-emoji {
  font-size: 54px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255, 42, 133, 0.7));
}

.btn-title {
  font-family: 'Russo One', sans-serif;
  font-size: 23px;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 12px var(--pink);
}

.btn-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}

body.rage-active .btn-sub {
  color: var(--gold);
}

.arena-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.arena-hint kbd {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #fff;
}

/* Ripple ring */
.ripple-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  pointer-events: none;
  z-index: 42;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0.95;
  animation: rippleOut 0.48s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

.ripple-ring.crit {
  border-color: var(--gold);
  border-width: 4px;
  box-shadow: 0 0 18px var(--gold);
}

.ripple-ring.rage {
  border-color: var(--orange);
  box-shadow: 0 0 16px var(--red);
}

@keyframes rippleOut {
  to {
    transform: translate(-50%, -50%) scale(4.2);
    opacity: 0;
  }
}

/* Floating words */
.float-word {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  font-family: 'Russo One', sans-serif;
  font-size: 20px;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 14px var(--pink);
  will-change: transform, opacity;
  animation: floatUp 0.92s cubic-bezier(0.16, 0.85, 0.3, 1) forwards;
}

.float-word .float-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78em;
  color: var(--cyan);
  margin-left: 6px;
}

.float-word.rage {
  color: #fff2e6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 16px var(--orange), 0 0 28px var(--red);
}

.float-word.rage .float-num {
  color: var(--gold);
}

.float-word.crit {
  font-size: 25px;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 0 18px var(--gold), 0 0 34px var(--orange);
  animation-duration: 1.15s;
}

.float-word.crit .float-num {
  color: #fff;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(calc(var(--x) - 50%), calc(var(--y) - 10px)) scale(0.75) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translate(calc(var(--x) - 50%), calc(var(--y) - 34px)) scale(1.08) rotate(var(--rot));
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--x) + var(--dx) - 50%), calc(var(--y) - 145px)) scale(0.95) rotate(var(--rot));
  }
}

/* Side panel (Desktop tabs + Shop + Achievements) */
.desktop-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.dtab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dtab.active {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.22), rgba(0, 240, 255, 0.16));
  border-color: rgba(0, 240, 255, 0.45);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.18);
}

.tab-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
}

.tab-badge.neutral {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cyan);
}

.hidden {
  display: none !important;
}

.side-content {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.side-content.active {
  display: flex;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-head h2 {
  font-family: 'Russo One', sans-serif;
  font-size: 18px;
  color: #fff;
}

.section-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Shop list */
.shop-list,
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: calc(100dvh - 190px);
}

.shop-list::-webkit-scrollbar,
.achievements-list::-webkit-scrollbar {
  width: 6px;
}

.shop-list::-webkit-scrollbar-thumb,
.achievements-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.upgrade-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  width: 100%;
  color: inherit;
  cursor: pointer;
}

.upgrade-card.affordable {
  border-color: rgba(0, 240, 255, 0.55);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.09), rgba(255, 42, 133, 0.08));
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.14);
}

.upgrade-card.affordable:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.28);
}

.upgrade-card.affordable:active {
  transform: scale(0.98);
}

.upgrade-card.locked {
  opacity: 0.58;
  cursor: not-allowed;
}

.upgrade-card.maxed {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.07);
  cursor: default;
}

.upg-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 24px;
}

.upg-info {
  min-width: 0;
}

.upg-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.upg-name {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upg-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.14);
  padding: 1px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.upg-bonus {
  font-size: 12px;
  color: var(--muted);
}

.upg-bonus strong {
  color: var(--pink);
}

.upg-price-wrap {
  text-align: right;
  flex-shrink: 0;
}

.upg-price {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.upgrade-card.affordable .upg-price {
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.45);
}

.upgrade-card.maxed .upg-price {
  background: rgba(255, 215, 0, 0.2);
  color: var(--gold);
}

/* Achievements */
.ach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0.55;
  transition: all 0.2s ease;
}

.ach-card.unlocked {
  opacity: 1;
  border-color: rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 42, 133, 0.08));
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.14);
}

.ach-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.ach-card.unlocked .ach-icon {
  background: rgba(255, 215, 0, 0.18);
}

.ach-title {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.ach-desc {
  font-size: 12px;
  color: var(--muted);
}

.ach-check {
  margin-left: auto;
  font-size: 16px;
}

/* Toasts */
#toast-container {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(16, 16, 30, 0.96);
  border: 1px solid var(--gold);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.35);
  animation: toastIn 0.28s ease forwards;
}

.toast.fade-out {
  animation: toastOut 0.3s ease forwards;
}

.toast-icon {
  font-size: 24px;
}

.toast-k {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}

.toast-v {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-12px) scale(0.95); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 12, 0.78);
  backdrop-filter: blur(6px);
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: min(100%, 360px);
  background: #141426;
  border: 1px solid rgba(255, 42, 133, 0.45);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 0 36px rgba(255, 42, 133, 0.25);
}

.modal-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 19px;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 16px;
  border-radius: 11px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.modal-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.modal-btn.danger {
  background: linear-gradient(135deg, var(--pink), var(--red));
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 30, 66, 0.45);
}

/* Mobile bottom nav */
.mobile-nav {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 860px) {
  .app {
    padding: 8px 10px calc(76px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .panel {
    padding: 14px;
    border-radius: 18px;
  }

  .arena-panel {
    display: none;
  }

  .arena-panel.active-mobile {
    display: flex;
  }

  .side-panel {
    display: none;
  }

  .side-panel.active-mobile {
    display: flex;
  }

  .desktop-tabs {
    display: none;
  }

  .rank-card {
    margin-bottom: 10px;
    padding: 8px 12px;
  }

  .score-block {
    margin-bottom: 10px;
  }

  .stats-grid {
    gap: 6px;
  }

  .stat-pill {
    padding: 6px 4px;
  }

  .stat-v {
    font-size: 12px;
  }

  .rage-box {
    margin-bottom: 10px;
    padding: 8px 12px;
  }

  .click-arena {
    min-height: 220px;
    padding: 8px 0 0;
  }

  .click-btn {
    width: 196px;
    height: 196px;
  }

  .btn-emoji {
    font-size: 46px;
  }

  .btn-title {
    font-size: 20px;
  }

  .arena-hint {
    margin-top: 12px;
    font-size: 11px;
  }

  .shop-list,
  .achievements-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 18, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    z-index: 50;
  }

  .mnav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 6px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .mnav-btn.active {
    background: linear-gradient(135deg, rgba(255, 42, 133, 0.22), rgba(0, 240, 255, 0.14));
    border-color: rgba(0, 240, 255, 0.4);
    color: #fff;
  }

  .mnav-icon {
    font-size: 19px;
    line-height: 1;
  }

  .mnav-label {
    font-size: 11px;
  }

  .mnav-badge {
    position: absolute;
    top: 3px;
    right: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
  }

  .mnav-badge.neutral {
    background: rgba(255, 255, 255, 0.14);
    color: var(--cyan);
  }
}
