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

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(160deg, #1a1030 0%, #2d1b4e 55%, #16283f 100%);
  color: #f3e9ff;
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(6px);
}
.logo { font-weight: 800; font-size: 18px; letter-spacing: .3px; }
.coin { font-size: 26px; font-weight: 800; color: #ffd166; text-align: right; }
.stats { font-size: 13px; opacity: .75; text-align: right; margin-top: 2px; }
.dot { margin: 0 6px; }

.layout {
  display: flex; gap: 20px;
  max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px;
}
.clicker-area { flex: 1 1 auto; min-width: 0; }
.shop {
  width: 330px; flex: 0 0 330px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px; padding: 18px;
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .shop { width: 100%; flex: none; }
}

.tail-stage {
  position: relative;
  min-height: 380px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,209,102,.14), transparent 65%);
  border: 1px dashed rgba(255,255,255,.15);
  border-radius: 22px;
  overflow: hidden;
  user-select: none;
}
.kevin {
  position: absolute; top: 26px;
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  filter: drop-shadow(0 0 14px rgba(255,140,0,.35));
}
.tail {
  font-size: 130px; line-height: 1;
  background: none; border: 0; cursor: pointer;
  transition: transform .08s;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.55));
  margin-top: 70px;
}
.tail:active { transform: scale(.92) rotate(-8deg); }
.tail.yank { animation: yank .5s ease; }
@keyframes yank {
  0% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-35deg) scale(1.25); }
  60% { transform: rotate(25deg) scale(1.1); }
  100% { transform: rotate(0) scale(1); }
}
.hint { margin-top: 14px; font-size: 15px; opacity: .7; }

.float {
  position: absolute; pointer-events: none;
  font-weight: 800; font-size: 22px; color: #ffd166;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  animation: rise .8s ease-out forwards;
  z-index: 10;
}
@keyframes rise {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-90px); opacity: 0; }
}

.shop h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .6px; opacity: .8; margin-bottom: 12px; }
.shop h2.mt { margin-top: 22px; }

.shop-list { display: flex; flex-direction: column; gap: 10px; }

.upg {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer; transition: .15s; text-align: left;
  color: inherit; font: inherit; width: 100%;
}
.upg:hover:not(:disabled) { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.upg:disabled { opacity: .45; cursor: not-allowed; }
.upg .ico { font-size: 26px; flex: 0 0 auto; }
.upg .info { flex: 1; min-width: 0; }
.upg .name { font-weight: 700; font-size: 14px; }
.upg .desc { font-size: 12px; opacity: .7; margin-top: 2px; }
.upg .cost { font-weight: 800; font-size: 13px; color: #ffd166; white-space: nowrap; }
.upg .lvl { font-size: 11px; opacity: .6; margin-top: 2px; text-align: right; }

.yank-box {
  background: rgba(255,209,102,.1);
  border: 1px solid rgba(255,209,102,.3);
  border-radius: 14px; padding: 14px;
  font-size: 13px; line-height: 1.5;
}
.yank-btn {
  width: 100%; margin-top: 10px; padding: 12px;
  font-size: 16px; font-weight: 800; font-family: inherit;
  background: linear-gradient(135deg, #ffb703, #ff8500);
  color: #2b1a00; border: 0; border-radius: 12px;
  cursor: pointer; transition: .15s;
}
.yank-btn:hover:not(:disabled) { filter: brightness(1.1); }
.yank-btn:disabled { opacity: .5; cursor: not-allowed; }
.yank-cd { margin-top: 8px; font-size: 12px; opacity: .7; text-align: center; min-height: 15px; }

.reset-btn {
  width: 100%; margin-top: 22px; padding: 10px;
  background: rgba(255,70,70,.15); color: #ff8080;
  border: 1px solid rgba(255,70,70,.35);
  border-radius: 12px; cursor: pointer; font-family: inherit;
  transition: .15s;
}
.reset-btn:hover { background: rgba(255,70,70,.3); }

.achievements { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ach {
  font-size: 13px; padding: 7px 12px;
  background: rgba(255,209,102,.12);
  border: 1px solid rgba(255,209,102,.35);
  border-radius: 999px; animation: pop .3s ease;
}
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(140%);
  background: #ffd166; color: #2b1a00;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  transition: transform .35s cubic-bezier(.2,1.4,.4,1);
  z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.toast.show { transform: translateX(-50%) translateY(0); }
