/* Reset + base setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  position: relative;
  color: white;
}
.container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

/* Title and buttons */
.title {
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 3rem;
  font-weight: 700;
  z-index: 10;
}
.enter-btn, .menu-btn {
  padding: 16px 32px;
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  margin: 10px;
  transition: 0.3s ease;
}
.enter-btn:hover, .menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Floating emojis */
.floating-emoji {
  position: absolute;
  font-size: 2rem;
  opacity: 0.2;
  animation: float 10s linear infinite;
}
.floating-emoji:nth-child(3) { top: 80%; left: 10%; animation-delay: 0s; }
.floating-emoji:nth-child(4) { top: 70%; left: 30%; animation-delay: 2s; }
.floating-emoji:nth-child(5) { top: 60%; left: 50%; animation-delay: 4s; }
.floating-emoji:nth-child(6) { top: 90%; left: 70%; animation-delay: 1s; }
.floating-emoji:nth-child(7) { top: 85%; left: 85%; animation-delay: 3s; }
.floating-emoji:nth-child(8) { top: 75%; left: 40%; animation-delay: 5s; }

@keyframes float {
  0% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-40vh) scale(1.2); opacity: 0.6; }
  100% { transform: translateY(-80vh) scale(1); opacity: 0.3; }
}

/* Section visibility toggle */
.section {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

/* Game content styles */
.game-content {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  text-align: center;
  max-width: 500px;
}

/* Stapu game area */
.hopscotch-game-area {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin: 20px 0;
}

.hopscotch-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 8px;
  max-width: 180px;
}

.hopscotch-square {
  width: 80px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.hopscotch-square:hover:not(.stone):not(.blocked) {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.hopscotch-square.completed {
  background: rgba(0, 255, 0, 0.3);
  border-color: rgba(0, 255, 0, 0.6);
}

.hopscotch-square.current {
  background: rgba(255, 255, 0, 0.3);
  border-color: rgba(255, 255, 0, 0.6);
  animation: pulse 1s infinite;
}

.hopscotch-square.stone {
  background: rgba(139, 69, 19, 0.6);
  border-color: rgba(139, 69, 19, 0.8);
  cursor: not-allowed;
}

.hopscotch-square.stone::after {
  content: '🪨';
  position: absolute;
  font-size: 1.5rem;
  animation: bounce 1s infinite;
}

.hopscotch-square.blocked {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.6);
  cursor: not-allowed;
}

.hopscotch-square.jumped {
  background: rgba(0, 255, 255, 0.3);
  border-color: rgba(0, 255, 255, 0.6);
  animation: jumpEffect 0.5s ease-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

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

@keyframes jumpEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.game-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  min-width: 200px;
}

.game-info p {
  margin: 8px 0;
  font-size: 1.1rem;
}

.hopscotch-controls {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

/* Song input */
.song-input {
  padding: 10px 15px;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  margin: 10px;
  backdrop-filter: blur(10px);
  width: 250px;
}

.song-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.song-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
}

/* TV Quiz styles */
.quiz-area {
  width: 100%;
  max-width: 600px;
}

.clue-display {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.clue-display h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.clue-display p {
  font-size: 1.1rem;
  opacity: 0.8;
}

.tv-controls {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

#tv-answer:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#tv-result {
  margin: 15px 0;
  font-size: 1.1rem;
  font-weight: bold;
  min-height: 25px;
}

/* Music player styles */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.music-player-compact {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.music-player-compact p {
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player-compact iframe {
  border-radius: 6px;
  max-width: 100%;
  height: 80px;
}

/* Poster display styles */
.poster-container {
  margin: 20px 0;
  text-align: center;
}

.poster-image {
  max-width: 200px;
  max-height: 300px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.poster-image:hover {
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .music-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }
  
  .music-player-compact iframe {
    width: 100%;
    max-width: 280px;
  }
  
  .poster-image {
    max-width: 150px;
    max-height: 225px;
  }
}
