* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: #05060f;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #e8ecff;
  user-select: none;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#hud {
  display: flex;
  gap: 2.5rem;
  padding: 1.1rem 1.8rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7c89c0;
}

.stat span:last-child {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 12px rgba(120, 170, 255, 0.6);
}

#lives {
  color: #ff5277;
  letter-spacing: 0.12em;
  text-shadow: 0 0 12px rgba(255, 82, 119, 0.6);
}

#overlay,
#game-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10, 14, 40, 0.65), rgba(5, 6, 15, 0.92));
  backdrop-filter: blur(3px);
  pointer-events: auto;
  text-align: center;
  gap: 0.9rem;
  padding: 1.5rem;
}

#overlay h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 28px rgba(90, 150, 255, 0.85), 0 0 6px rgba(150, 200, 255, 0.9);
}

#game-over h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ff5277;
  text-shadow: 0 0 26px rgba(255, 82, 119, 0.7);
}

.subtitle {
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #6fb4ff;
  margin-top: -0.3rem;
}

#overlay p,
#game-over p {
  color: #c4ccf0;
  font-size: 1.05rem;
  max-width: 32rem;
}

.controls {
  margin: 0.6rem 0 1rem;
  line-height: 2.1;
  color: #aeb8e6;
}

kbd {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: #1a2148;
  border: 1px solid #38427e;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #dbe3ff;
  box-shadow: 0 2px 0 #10173a;
}

button {
  margin-top: 0.6rem;
  padding: 0.9rem 3rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #04122a;
  background: linear-gradient(180deg, #6fd6ff, #2a9bff);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  pointer-events: auto;
}

button:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 30px rgba(70, 170, 255, 0.7);
}

button:active {
  transform: scale(0.98);
}

#best-line {
  color: #ffd166;
  font-size: 0.95rem;
}

#shop-btn {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #8a6310, 0 0 18px rgba(255, 200, 60, 0.4);
  pointer-events: auto;
}

#shop-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 0 #8a6310, 0 0 26px rgba(255, 200, 60, 0.6);
}

.shop-icon {
  font-size: 1.4rem;
  line-height: 1;
}

#pass-btn {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(180deg, #9a7bff, #5a3ee0);
  color: #fff;
  border: 2px solid #3a25a0;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #2a1a7a, 0 0 18px rgba(140, 110, 255, 0.4);
  pointer-events: auto;
}

#pass-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 0 #2a1a7a, 0 0 26px rgba(140, 110, 255, 0.6);
}

#trophy-btn {
  position: absolute;
  left: 1.2rem;
  bottom: 4.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(180deg, #ffcf5a, #e08a1e);
  color: #3a2300;
  border: 2px solid #a05e10;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #7a4a10, 0 0 18px rgba(255, 180, 60, 0.4);
  pointer-events: auto;
}

#trophy-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 0 #7a4a10, 0 0 26px rgba(255, 180, 60, 0.6);
}

#ach-btn {
  position: absolute;
  left: 1.2rem;
  bottom: 10.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(180deg, #c98bff, #8a3ee0);
  color: #fff;
  border: 2px solid #5a1aa0;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #4a1080, 0 0 18px rgba(180, 110, 255, 0.4);
  pointer-events: auto;
}

#ach-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 0 #4a1080, 0 0 26px rgba(180, 110, 255, 0.6);
}

#ach-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: radial-gradient(ellipse at top, #1e1030, #05060f 75%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.5rem 1rem;
}

#ach-list {
  width: min(560px, 94vw);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 4px;
}

.ach-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem;
  background: rgba(28, 18, 44, 0.8);
  border: 1px solid #4a2a7a;
  border-radius: 12px;
}

.ach-row.unlocked {
  border-color: #c98bff;
}

.ach-row.locked {
  opacity: 0.6;
}

.ach-icon {
  font-size: 1.8rem;
  width: 40px;
  text-align: center;
}

.ach-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}

.ach-name {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.ach-desc {
  font-size: 0.8rem;
  color: #b9a8d8;
}

.ach-prog {
  font-size: 0.72rem;
  color: #8a7aa8;
}

.ach-reward {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffd24a;
  white-space: nowrap;
}

.ach-claim {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  color: #04122a;
  background: linear-gradient(180deg, #6fffa0, #2ad66a);
  border: 2px solid #1a8a44;
  animation: claimpulse 1.2s infinite;
}

.ach-claim.done {
  background: #1f3a24;
  color: #5dd95d;
  border: 1px solid #2e7a2e;
  cursor: default;
  animation: none;
}

.ach-claim.locked {
  background: #2a1f3a;
  color: #7a6a9a;
  border: 1px solid #3a2a5a;
  cursor: default;
  animation: none;
}

#quest-btn {
  position: absolute;
  left: 1.2rem;
  bottom: 7.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(180deg, #4adf9a, #1ca86a);
  color: #032117;
  border: 2px solid #0e6a44;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #0a5436, 0 0 18px rgba(60, 220, 150, 0.4);
  pointer-events: auto;
}

#quest-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 0 #0a5436, 0 0 26px rgba(60, 220, 150, 0.6);
}

#quest-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: radial-gradient(ellipse at top, #0e3026, #05060f 75%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.5rem 1rem;
}

#quest-timer {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4adf9a;
  padding: 0.4rem 0.9rem;
  background: rgba(60, 220, 150, 0.1);
  border: 1px solid rgba(60, 220, 150, 0.35);
  border-radius: 8px;
}

#quest-list {
  width: min(560px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.quest-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  background: rgba(16, 40, 32, 0.8);
  border: 1px solid #1f6a4a;
  border-radius: 12px;
}

.quest-row.done {
  border-color: #4adf9a;
}

.quest-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.quest-desc {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.quest-bar {
  height: 8px;
  background: #0c2018;
  border-radius: 99px;
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1ca86a, #6fffb0);
  transition: width 0.3s;
}

.quest-prog {
  font-size: 0.78rem;
  color: #8fc8ad;
}

.quest-reward {
  font-size: 1rem;
  font-weight: 800;
  color: #ffd24a;
  white-space: nowrap;
}

.quest-claim {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  color: #04122a;
  background: linear-gradient(180deg, #6fffa0, #2ad66a);
  border: 2px solid #1a8a44;
  animation: claimpulse 1.2s infinite;
}

.quest-claim.done {
  background: #1f3a24;
  color: #5dd95d;
  border: 1px solid #2e7a2e;
  cursor: default;
  animation: none;
}

.quest-claim.locked {
  background: #1a2a22;
  color: #6a8a7a;
  border: 1px solid #244a3a;
  cursor: default;
  animation: none;
}

#trophy-screen {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, #3a2a0e, #05060f 75%);
  pointer-events: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1rem;
}

#trophy-count {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffd24a;
  text-shadow: 0 0 18px rgba(255, 200, 60, 0.5);
}

#trophy-road {
  width: min(560px, 94vw);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 4px;
}

.trophy-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: rgba(40, 30, 12, 0.7);
  border: 1px solid #6a4e1a;
  border-radius: 12px;
}

.trophy-row.reached {
  border-color: #ffd24a;
}

.trophy-req {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 800;
  color: #ffd24a;
}

.trophy-reward {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.trophy-claim {
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  color: #04122a;
  background: linear-gradient(180deg, #6fffa0, #2ad66a);
  border: 2px solid #1a8a44;
  animation: claimpulse 1.2s infinite;
}

.trophy-claim.done {
  background: #1f3a24;
  color: #5dd95d;
  border: 1px solid #2e7a2e;
  cursor: default;
  animation: none;
}

.trophy-claim.locked {
  background: #2a2f1a;
  color: #8a7a4a;
  border: 1px solid #4a401a;
  cursor: default;
  animation: none;
}

#pass-screen {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, #1a1640, #05060f 75%);
  pointer-events: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1rem;
}

#vault-drop {
  width: 84px;
  height: 84px;
  cursor: pointer;
  filter: drop-shadow(0 0 14px rgba(255, 210, 74, 0.35));
  transition: transform 0.2s;
}

#vault-drop svg {
  width: 100%;
  height: 100%;
  display: block;
}

#vault-drop .vault-open {
  display: none;
}

#vault-drop:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 0 22px rgba(255, 210, 74, 0.6));
}

#vault-drop:hover .vault-closed {
  display: none;
}

#vault-drop:hover .vault-open {
  display: block;
}

#pass-header {
  width: min(640px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#pass-level-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #cdd4ff;
}

#pass-bar {
  height: 12px;
  background: #1a2148;
  border: 1px solid #38427e;
  border-radius: 99px;
  overflow: hidden;
}

#pass-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9a7bff, #6fd6ff);
  transition: width 0.3s;
}

#pass-cols {
  width: min(640px, 92vw);
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #8a93c8;
}

#pass-cols .col-free { grid-column: 2; text-align: center; }
#pass-cols .col-prem { grid-column: 3; text-align: center; }

#pass-tiers {
  width: min(640px, 92vw);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 4px;
}

.pass-tier {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: 0.6rem;
  align-items: center;
}

.tier-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-weight: 800;
  background: #1a2148;
  border: 1px solid #38427e;
  color: #8a93c8;
}

.pass-tier.reached .tier-num {
  background: linear-gradient(180deg, #9a7bff, #5a3ee0);
  border-color: #3a25a0;
  color: #fff;
}

.reward {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: rgba(20, 26, 56, 0.8);
  border: 1px solid #38427e;
}

.reward.locked {
  color: #6b739a;
  background: rgba(15, 18, 40, 0.7);
}

.reward.premium {
  background: rgba(40, 26, 60, 0.7);
  border-color: #5a3ee0;
}

.reward.claimed {
  color: #5dd95d;
  border-color: #2e7a2e;
  background: rgba(20, 50, 24, 0.6);
}

button.claim-free {
  cursor: pointer;
  color: #04122a;
  background: linear-gradient(180deg, #6fffa0, #2ad66a);
  border: 2px solid #1a8a44;
  animation: claimpulse 1.2s infinite;
}

button.claim-prem {
  cursor: pointer;
  color: #3a2800;
  background: linear-gradient(180deg, #ffe066, #e6b020);
  border: 2px solid #a87810;
  animation: claimpulsegold 1.2s infinite;
}

@keyframes claimpulsegold {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 200, 60, 0); }
  50% { box-shadow: 0 0 16px rgba(255, 200, 60, 0.7); }
}

@keyframes claimpulse {
  0%, 100% { box-shadow: 0 0 0 rgba(60, 230, 120, 0); }
  50% { box-shadow: 0 0 16px rgba(60, 230, 120, 0.7); }
}

#shop-screen {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  overflow-y: auto;
  padding: 4.5rem 1rem 2rem;
}

.shop-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #6fb4ff;
  margin-top: 0.5rem;
}

#upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(540px, 94vw);
}

.up-lvl {
  font-size: 0.8rem;
  color: #6fd6ff;
  font-weight: 800;
}

#skins-list,
#pins-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.pin-emoji {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 130px;
  padding: 1rem 0.8rem;
  background: rgba(20, 26, 56, 0.85);
  border: 1px solid #38427e;
  border-radius: 12px;
}

.skin-card.active {
  border-color: #5dd95d;
  box-shadow: 0 0 16px rgba(60, 220, 90, 0.3);
}

.skin-ship {
  width: 46px;
  height: 50px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.skin-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.skin-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
}

.skin-btn.buy {
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
}

.skin-btn.select {
  background: linear-gradient(180deg, #6fd6ff, #2a9bff);
  color: #04122a;
  border: none;
}

.skin-btn.active {
  background: #1f3a24;
  color: #5dd95d;
  border: 1px solid #2e7a2e;
  cursor: default;
}

.skin-btn.flash {
  animation: buyflash 0.4s;
}

#shop-currency {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  display: flex;
  gap: 1.6rem;
}

#codes-area {
  position: absolute;
  top: 1.4rem;
  left: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

#codes-toggle {
  margin: 0;
  padding: 0.5rem 1.4rem;
  font-size: 1rem;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #7a5cff, #4a2ed6);
  color: #fff;
  border: 2px solid #2a1a8a;
  border-radius: 9px;
}

#codes-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem;
  background: rgba(20, 26, 56, 0.9);
  border: 1px solid #38427e;
  border-radius: 10px;
}

#code-input {
  padding: 0.55rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #0c1130;
  border: 1px solid #4a55a0;
  border-radius: 6px;
  outline: none;
}

#code-input:focus {
  border-color: #7a8cff;
}

#code-submit {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  background: linear-gradient(180deg, #6fd6ff, #2a9bff);
  color: #04122a;
  border: none;
  border-radius: 7px;
}

#code-msg {
  font-size: 0.85rem;
  min-height: 1.1em;
  font-weight: 700;
}

#code-msg.ok { color: #5dd95d; }
#code-msg.err { color: #ff5a6a; }

.currency {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.cur-icon {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
}

.cur-emoji {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(120, 180, 255, 0.5));
}

.shop-title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #ffe066;
  text-shadow: 0 0 26px rgba(255, 200, 60, 0.6);
}

.shop-hint {
  color: #9aa3c8;
  font-size: 1rem;
}

#shop-timer {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffd24a;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 200, 60, 0.1);
  border: 1px solid rgba(255, 200, 60, 0.35);
  border-radius: 8px;
}

#starr-panel {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: min(540px, 94vw);
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, rgba(60, 45, 14, 0.9), rgba(30, 22, 8, 0.9));
  border: 1px solid #a87810;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 200, 60, 0.2);
}

#starr-panel .starr-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px rgba(255, 210, 74, 0.8));
}

#starr-panel .starr-info {
  flex: 1;
  text-align: left;
}

.starr-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffd24a;
}

.starr-have {
  font-size: 0.85rem;
  color: #e8d9b0;
}

#starr-free-btn,
#starr-open-btn,
#starr-openall-btn {
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 9px;
  cursor: pointer;
}

#starr-openall-btn {
  background: linear-gradient(180deg, #ff9a5a, #e06a1e);
  color: #2a1500;
  border: 2px solid #a04e10;
}

#starr-openall-btn:disabled {
  background: #2a2f1a;
  color: #8a7a4a;
  border-color: #4a401a;
  cursor: default;
}

.starr-all-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 0.8rem;
  width: min(360px, 86vw);
}

.starr-all-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 26, 56, 0.8);
  border-left: 4px solid #888;
  border-radius: 7px;
}

#starr-free-btn {
  background: linear-gradient(180deg, #6fffa0, #2ad66a);
  color: #04122a;
  border: 2px solid #1a8a44;
}

#starr-open-btn {
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
}

#starr-free-btn:disabled,
#starr-open-btn:disabled {
  background: #2a2f1a;
  color: #8a7a4a;
  border-color: #4a401a;
  cursor: default;
}

#starr-open {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: radial-gradient(ellipse at center, rgba(40, 30, 8, 0.85), rgba(5, 6, 15, 0.96));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  pointer-events: auto;
}

#starr-star {
  font-size: 6rem;
  filter: drop-shadow(0 0 30px rgba(255, 210, 74, 0.9));
}

#starr-star.shaking {
  animation: starShake 0.12s infinite;
}

#starr-star.burst {
  animation: starBurst 0.55s forwards;
}

@keyframes starShake {
  0%, 100% { transform: rotate(-7deg) scale(1.05); }
  50% { transform: rotate(7deg) scale(1.18); }
}

@keyframes starBurst {
  0% { transform: scale(1); opacity: 1; }
  55% { transform: scale(1.9); opacity: 1; filter: drop-shadow(0 0 60px rgba(255,230,150,1)); }
  100% { transform: scale(0.2); opacity: 0; }
}

#starr-reward {
  text-align: center;
  animation: rewardPop 0.4s ease-out;
}

@keyframes rewardPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.starr-rarity {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.starr-reward-label {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  margin-top: 0.4rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

#starr-continue {
  padding: 0.8rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
  border-radius: 10px;
}

#shop-items {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(540px, 94vw);
  margin-top: 0.3rem;
}

.offer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, rgba(34, 42, 80, 0.9), rgba(20, 26, 56, 0.9));
  border: 1px solid #38427e;
  border-left: 5px solid #ffd24a;
  border-radius: 12px;
}

.offer-badge {
  position: absolute;
  top: -8px;
  left: -6px;
  background: #ff3355;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: rotate(-8deg);
}

.offer-oldprice {
  text-decoration: line-through;
  opacity: 0.6;
  font-size: 0.78rem;
  margin-right: 0.35rem;
  font-weight: 700;
}

.offer-icon {
  font-size: 2.2rem;
  line-height: 1;
  width: 48px;
  text-align: center;
}

.offer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

.offer-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.offer-desc {
  font-size: 0.85rem;
  color: #aeb8e6;
}

.offer-owned {
  font-size: 0.78rem;
  color: #ffd24a;
}

.offer-btn {
  flex-shrink: 0;
  min-width: 92px;
  padding: 0.6rem 1.1rem;
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
  border-radius: 9px;
  cursor: pointer;
}

.offer-btn.cant {
  background: #2a2f4a;
  color: #6b739a;
  border-color: #2a2f4a;
}

.offer-btn.flash {
  animation: buyflash 0.4s;
}

.buy-btn {
  margin-top: 0.3rem;
  padding: 0.6rem 1.6rem;
  font-size: 1.05rem;
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
  border-radius: 9px;
}

.buy-btn.flash {
  animation: buyflash 0.4s;
}

@keyframes buyflash {
  0%, 100% { background: linear-gradient(180deg, #ffe066, #e6b020); }
  50% { background: #ff5a5a; }
}

#shop-back {
  margin-top: 1.5rem;
  background: linear-gradient(180deg, #ffe066, #e6b020);
  color: #3a2800;
  border: 2px solid #a87810;
}

#name-screen {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(10, 14, 40, 0.7), rgba(5, 6, 15, 0.95));
  pointer-events: auto;
}

#name-input {
  width: min(320px, 80vw);
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.06em;
  color: #fff;
  background: #0c1130;
  border: 2px solid #4a55a0;
  border-radius: 8px;
  outline: none;
}

#name-input:focus {
  border-color: #7a8cff;
  box-shadow: 0 0 16px rgba(110, 140, 255, 0.4);
}

#name-error {
  min-height: 1.2em;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ff5a6a;
}

#player-line {
  color: #6fb4ff !important;
  font-weight: 700;
}

#player-name {
  color: #fff;
}

.modes-label {
  color: #9aa3c8;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

#map-line {
  color: #6fb4ff !important;
  font-weight: 700;
}

#map-name {
  color: #fff;
}

#map-btn {
  margin: 0 0 0 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  text-transform: none;
  background: #1a2148;
  color: #cdd4ff;
  border: 1px solid #38427e;
}

#map-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: radial-gradient(ellipse at center, rgba(10, 14, 40, 0.7), rgba(5, 6, 15, 0.96));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  pointer-events: auto;
}

#map-type-list,
#map-map-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.map-type-btn {
  margin: 0;
  padding: 1rem 1.6rem;
  font-size: 1.1rem;
}

.map-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 150px;
  padding: 0.8rem;
  background: rgba(20, 26, 56, 0.85);
  border: 2px solid #38427e;
  border-radius: 12px;
  cursor: pointer;
}

.map-card.selected {
  border-color: #6fd6ff;
  box-shadow: 0 0 16px rgba(90, 170, 255, 0.4);
}

.map-preview {
  width: 100%;
  height: 70px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.map-card .map-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

#map-type-back {
  background: #1a2148;
  color: #cdd4ff;
  border: 1px solid #38427e;
}

#mute-btn {
  margin-top: 0.8rem;
  padding: 0.5rem 1.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: none;
  background: #1a2148;
  color: #cdd4ff;
  border: 1px solid #38427e;
}

.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.mode-btn {
  margin: 0;
  padding: 0.85rem 1.4rem;
  font-size: 1rem;
}

.mode-btn[data-mode="bossrush"] {
  background: linear-gradient(180deg, #ffcf5a, #e08a1e);
  color: #3a2300;
}

.mode-btn[data-mode="hardcore"] {
  background: linear-gradient(180deg, #ff6a6a, #d62a2a);
  color: #fff;
}

.go-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

#menu-btn {
  background: linear-gradient(180deg, #7a86b8, #4a5588);
}

#revive-screen {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(40, 10, 14, 0.7), rgba(5, 6, 15, 0.95));
  pointer-events: auto;
}

#revive-screen h2 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ff5277;
  text-shadow: 0 0 24px rgba(255, 82, 119, 0.6);
}

#revive-btn {
  background: linear-gradient(180deg, #8be3ff, #2a9bff);
  color: #04122a;
  border: 2px solid #1a6aa0;
}

#revive-btn:disabled {
  background: #2a2f4a;
  color: #6b739a;
  border-color: #2a2f4a;
  cursor: not-allowed;
}

#revive-no {
  background: #2a2f4a;
  color: #cdd4ff;
  border: 1px solid #4a5588;
  font-size: 0.95rem;
  padding: 0.6rem 1.8rem;
}

.gem-i {
  color: #3fdb4a;
  text-shadow: 0 0 6px rgba(80, 230, 110, 0.6);
}

.hidden {
  display: none !important;
}
