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

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.game-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 30px;
  max-width: 800px;
}

.game-header {
  text-align: center;
  margin-bottom: 30px;
}

.game-header h1 {
  color: #667eea;
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-content {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: flex-start;
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 180px;
}

.score-board, .level-board, .next-piece, .controls {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 15px;
  border-radius: 10px;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.score-board h2, .level-board h2, .next-piece h2, .controls h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
  text-align: center;
}

#score, #level {
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.next-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#nextCanvas {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  margin-top: 10px;
}

.controls p {
  margin: 8px 0;
  font-size: 0.9em;
}

.game-area {
  position: relative;
}

#gameCanvas {
  border: 4px solid #667eea;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: #000;
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.98);
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  min-width: 250px;
}

.game-over.hidden {
  display: none;
}

.game-over h2 {
  color: #667eea;
  font-size: 2em;
  margin-bottom: 20px;
}

.game-over p {
  font-size: 1.3em;
  margin-bottom: 20px;
  color: #333;
}

#restartBtn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.1em;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#restartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#restartBtn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .game-content {
    flex-direction: column;
    align-items: center;
  }
  
  .info-panel {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  
  .score-board, .level-board, .next-piece, .controls {
    flex: 1;
    min-width: 150px;
  }
}
