@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
  font-family: 'Press Start 2P', cursive;
  background-color: #87CEEB;
  color: #fff;
  text-align: center;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-image: linear-gradient(to bottom, #87CEEB, #5F9EA0);
}

.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

header {
  margin-bottom: 1rem;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-shadow: 3px 3px 0 #000;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 0 #000;
}

.score-container {
  background-color: #8B4513;
  padding: 1rem;
  border: 4px solid #000;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 0 #5D4037;
}

#points-display {
  font-size: 1.5rem;
}

#block {
  width: 150px;
  height: 150px;
  background-color: #8B4513;
  border: 4px solid;
  border-color: #5D4037 #5D4037 #3E2723 #5D4037;
  border-radius: 8px;
  cursor: pointer;
  margin: 1rem auto;
  transition: transform 0.1s;
  box-shadow: 0 8px 0 #5D4037;
  position: relative;
  overflow: hidden;
}

#block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#block:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #5D4037;
}

.click-effect {
  position: absolute;
  pointer-events: none;
  font-size: 1.2rem;
  color: #FFD700;
  text-shadow: 2px 2px 0 #000;
  animation: floatUp 1s ease-out forwards;
  z-index: 100;
}

@keyframes floatUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px);
    opacity: 0;
  }
}

.upgrades, #achievements-section {
  width: 100%;
  margin-top: 1rem;
}

#upgrades-container, #achievements-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.upgrade {
  background-color: #4CAF50;
  border: 4px solid #000;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: 0 4px 0 #2E7D32;
  min-width: 180px;
}

.upgrade:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2E7D32;
}

.upgrade.disabled {
  background-color: #9E9E9E;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #616161;
}

.achievement {
  background-color: #FFA500;
  border: 4px solid #000;
  border-radius: 8px;
  padding: 1rem;
  min-width: 180px;
  box-shadow: 0 4px 0 #CC7700;
}

.achievement.locked {
  background-color: #9E9E9E;
  box-shadow: 0 4px 0 #616161;
}

.achievement-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.5rem;
  background-color: #FFF;
  border: 2px solid #000;
  border-radius: 4px;
}

.achievement-name {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.achievement-desc {
  font-size: 0.6rem;
  color: #DDD;
}

footer {
  margin-top: auto;
  padding: 1rem;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.2rem;
  }
  
  h2 {
    font-size: 1rem;
  }
  
  #block {
    width: 120px;
    height: 120px;
  }
  
  .score-container {
    padding: 0.8rem;
  }
  
  #points-display {
    font-size: 1.2rem;
  }
  
  .upgrade, .achievement {
    padding: 0.8rem;
    font-size: 0.8rem;
    min-width: 140px;
  }
  
  .achievement-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    gap: 1.5rem;
  }
  
  h1 {
    font-size: 1rem;
  }
  
  h2 {
    font-size: 0.9rem;
  }
  
  #block {
    width: 100px;
    height: 100px;
  }
  
  #points-display {
    font-size: 1rem;
  }
  
  .upgrade, .achievement {
    min-width: 120px;
    padding: 0.6rem;
    font-size: 0.7rem;
  }
  
  .achievement-icon {
    width: 30px;
    height: 30px;
  }
}