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

body {
  font-family: 'Montserrat', sans-serif;
  overflow: auto;
  background: #000;
  user-select: none;
}

#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.hud-top {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  width: 100%;
}

.stat-box {
  background: rgba(4, 26, 47, 0.6);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: skew(-10deg);
  text-align: center;
}

.stat-label {
  font-size: 10px;
  color: #8ecae6;
  letter-spacing: 2px;
  font-weight: 700;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

#main-menu,
#game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
  transition: opacity 0.5s;
}

.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

h1 {
  font-size: 80px;
  color: #fff;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -2px;
  background: linear-gradient(180deg, #fff 0%, #8ecae6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  text-align: center;
  filter: drop-shadow(0 0 20px rgba(142, 202, 230, 0.5));
}

.info-row {
  display: flex;
  gap: 40px;
  margin-bottom: 30px;
}

.info-item {
  text-align: center;
  color: #fff;
}

.info-label {
  font-size: 14px;
  color: #8ecae6;
  font-weight: 700;
  letter-spacing: 1px;
}

.info-val {
  font-size: 32px;
  font-weight: 800;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

h2 {
  font-size: 60px;
  color: #ff6b6b;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

p {
  color: #8ecae6;
  font-size: 18px;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.btn {
  background: linear-gradient(135deg, #2196F3 0%, #00BCD4 100%);
  border: none;
  padding: 15px 50px;
  border-radius: 50px;
  color: white;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 10px 30px rgba(33, 150, 243, 0.4);
  margin-top: 20px;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(33, 150, 243, 0.6);
}

#viewpoint-btn {
  pointer-events: auto;
  position: absolute;
  bottom: 40px;
  left: 40px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: white;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  line-height: 1.2;
}

#viewpoint-btn:hover {
  transform: scale(1.1);
}

#viewpoint-btn:active {
  transform: scale(0.9);
}

.btn-shop {
  background: linear-gradient(135deg, #E91E63 0%, #9C27B0 100%);
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
}

.btn-spin {
  background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
  color: #000;
  text-shadow: none;
}

.btn-close {
  background: #444;
  margin-top: 30px;
  width: 150px;
  font-size: 16px;
}

#ability-btn {
  pointer-events: auto;
  position: absolute;
  bottom: 40px;
  right: 40px;
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: white;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  line-height: 1.2;
  z-index: 100;
}

#ability-btn.ready {
  opacity: 1;
  cursor: pointer;
  transform: scale(1.1);
}

#ability-btn.active {
  transform: scale(0.9);
}

#tutorial-overlay {
  position: absolute;
  top: 15%;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  text-shadow: 0 0 10px #000;
  pointer-events: none;
  transition: opacity 1s;
  z-index: 5;
  line-height: 1.5;
}

#shop-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 20, 0.8);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
  transition: opacity 0.5s;
}

#shop-modal .info-row {
  margin-bottom: 20px;
}

#shop-modal h1 {
  margin-bottom: 10px;
  font-size: 36px;
}

#shop-modal .sled-display {
  width: 220px;
  height: 130px;
  margin: 15px 0;
}

#shop-modal .btn {
  padding: 12px 30px;
  margin-top: 10px;
}


.sled-display {
  width: 250px;
  height: 150px;
  background: rgba(0, 0, 0, 0.5);
  margin: 20px 0;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #888;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.sled-card {
  padding: 20px;
  text-align: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.rarity-legendary {
  border: 2px solid #FFD700;
  box-shadow: 0 0 15px #FFD700;
  color: #FFD700;
}

.rarity-fabled {
  border: 2px solid #E91E63;
  box-shadow: 0 0 15px #E91E63;
  color: #E91E63;
}

.rarity-rare {
  border: 2px solid #00BCD4;
  box-shadow: 0 0 10px #00BCD4;
  color: #00BCD4;
}

.rarity-uncommon {
  border: 2px solid #4CAF50;
  color: #4CAF50;
}

.rarity-common {
  border: 2px solid #888;
  color: #ccc;
}

#jump-cooldown-indicator {
  pointer-events: auto;
  position: absolute;
  bottom: 40px;
  left: 130px;
  background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.6);
  transition: 0.2s;
  text-align: center;
  line-height: 1.2;
}

#jump-cooldown-text {
  font-size: 18px;
  font-weight: 800;
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sled-name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.sled-rarity {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.sled-bonus {
  font-size: 12px;
  color: #fff;
  margin-top: 5px;
  font-style: italic;
}

/* Celestial Jumper special text styling */
.celestial-text {
  background: linear-gradient(90deg, #00ffff, #0080ff, #00ffff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: celestialGradient 3s ease infinite;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

@keyframes celestialGradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

body.theme-magma h1 {
  background: linear-gradient(180deg, #fff 0%, #ff4d4d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.5));
}

body.theme-magma .stat-box {
  border-color: #ff4d4d;
}

body.theme-magma .stat-label {
  color: #ff9999;
}

body.theme-gold h1 {
  background: linear-gradient(180deg, #fff 0%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-gold .stat-box {
  border-color: #FFD700;
}

body.theme-neon h1 {
  background: linear-gradient(180deg, #fff 0%, #E91E63 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-neon .stat-box {
  border-color: #E91E63;
}

#extra-life-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#extra-life-modal h2 {
  font-size: 40px;
  color: #ffd700;
  text-shadow: 0 0 10px #ffaa00;
  margin-bottom: 20px;
}

#invincible-msg {
  position: absolute;
  top: 30%;
  width: 100%;
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 15px #0088ff;
  display: none;
  z-index: 15;
  pointer-events: none;
}

#collection-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow-y: auto;
}

.wipeout-text {
  font-size: 80px;
  background: linear-gradient(180deg, #ff0000 0%, #ff8800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 5px 0 #550000;
  letter-spacing: -2px;
  transform: skew(-10deg) rotate(-5deg);
  margin-bottom: 10px;
}

/* Sled Catalog Styles */
.catalog-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin: 10px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.catalog-item:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.1);
}

.locked {
  filter: grayscale(100%) opacity(0.5);
}

.locked .sled-name {
  color: #888 !important;
}

/* Teleport Modal */
#teleport-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 15, 30, 0.95);
  padding: 30px;
  border: 4px solid #00BCD4;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3000;
  box-shadow: 0 0 50px rgba(0, 188, 212, 0.5);
}

#map-container {
  position: relative;
  width: 300px;
  height: 400px;
  background: #000;
  border: 2px solid #333;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
}

#teleport-map {
  width: 100%;
  height: 100%;
}

#player-marker {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  z-index: 10;
}

#shop-close:hover {
  background: #cc0000;
  transform: scale(1.05);
}