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

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

body {
  background: #5c94fc;
  font-family: 'Press Start 2P', cursive;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

#game-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #5c94fc;
  padding: 20px;
  gap: 16px;
}

#game-header {
  text-align: center;
}

#game-title {
  color: white;
  font-size: 22px;
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 10px;
}

#game-subtitle {
  color: #ffff00;
  font-size: 9px;
  text-shadow: 2px 2px 0 #000;
}

#game-canvas {
  border: 4px solid #000;
  display: block;
  max-width: 100%;
  image-rendering: pixelated;
  box-shadow: 8px 8px 0 #000;
}

#game-controls {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

#game-controls button {
  background: #e52521;
  color: white;
  border: 3px solid #000;
  font-family: 'Press Start 2P', cursive;
  font-size: 13px;
  padding: 14px 22px;
  cursor: pointer;
  text-shadow: 2px 2px 0 #000;
  box-shadow: 4px 4px 0 #000;
  user-select: none;
  -webkit-user-select: none;
}

#game-controls button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

#mobile-music-note {
  color: white;
  font-size: 8px;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 4px;
}

#main-site {
  background: #5c94fc;
}

#music-bar {
  background: #000;
  color: #ffff00;
  text-align: center;
  padding: 14px 10px;
  font-size: 8px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.2s;
}

#music-bar:hover {
  background: #1a1a00;
}

#music-bar span { display: block; }

#music-bar.playing { color: #aaffaa; }

#yt-container iframe { display: none; }

#hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  background: #5c94fc;
}

.cloud {
  position: absolute;
  width: 96px;
  height: 40px;
  background: white;
  border-radius: 20px;
}

.cloud::before {
  content: '';
  position: absolute;
  width: 52px;
  height: 56px;
  background: white;
  border-radius: 50%;
  top: -26px;
  left: 20px;
}

.cloud::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 44px;
  background: white;
  border-radius: 50%;
  top: -18px;
  right: 6px;
}

#hero-title {
  font-size: clamp(16px, 4.5vw, 40px);
  color: white;
  text-shadow: 4px 4px 0 #000;
  text-align: center;
  margin-bottom: 48px;
  z-index: 2;
  padding: 0 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#hero-mario {
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
  animation: mario-bounce 0.45s ease-in-out infinite alternate;
  width: 32px;
  height: 48px;
}

#hero-mario::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 20px;
  background: #e52521;
  border-radius: 4px 4px 0 0;
}

#hero-mario::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 28px;
  background: #0038a8;
}

@keyframes mario-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

#ground-row {
  display: flex;
  width: 100%;
  justify-content: center;
}

.ground-block {
  width: 64px;
  height: 64px;
  background: #c84c0c;
  border-top: 4px solid #e86030;
  border-left: 4px solid #e86030;
  border-right: 4px solid #8c2800;
  border-bottom: 4px solid #8c2800;
  flex-shrink: 0;
}

#letter-section {
  background: #1a1a2e;
  padding: 70px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 60vh;
}

#letter-section::before {
  content: '?';
  position: absolute;
  top: 28px;
  left: 28px;
  font-size: 36px;
  color: #ffcc00;
  text-shadow: 3px 3px 0 #000;
  font-family: 'Press Start 2P', cursive;
}

#letter-section::after {
  content: '★';
  position: absolute;
  bottom: 28px;
  right: 28px;
  font-size: 30px;
  color: #ffcc00;
  text-shadow: 3px 3px 0 #000;
}

#letter-box {
  max-width: 760px;
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 3px solid #ffcc00;
  padding: 44px 40px;
  box-shadow: 0 0 40px rgba(255, 204, 0, 0.25), 8px 8px 0 #000;
}

#letter-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(13px, 1.8vw, 16px);
  color: #e0d8c8;
  line-height: 2.3;
  letter-spacing: 0.4px;
}

#happy-md,
#happy-md-2 {
  color: white;
  font-weight: bold;
  text-shadow: 0 0 8px #fff, 0 0 18px #fff, 0 0 36px #fff;
  animation: glow 2.2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 8px #fff, 0 0 18px #fff, 0 0 36px #fff;
  }
  50% {
    text-shadow: 0 0 14px #fff, 0 0 30px #fff, 0 0 60px rgba(255, 255, 255, 0.7);
  }
}

#letter-note {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(11px, 1.5vw, 13px);
  color: #a09880;
  line-height: 1.9;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 204, 0, 0.3);
  font-style: italic;
  letter-spacing: 0.3px;
}

#site-footer {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
  flex-wrap: wrap;
}

#site-footer p {
  color: white;
  font-size: 9px;
  text-shadow: 2px 2px 0 #e52521;
}

@media (max-width: 520px) {
  #game-canvas {
    width: 100%;
    height: auto;
  }

  #letter-box {
    padding: 28px 18px;
  }

  .ground-block {
    width: 40px;
    height: 40px;
  }

  #letter-section::before,
  #letter-section::after {
    display: none;
  }
}
