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

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #fce4ec, #e1bee7, #bbdefb);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #5d4037;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  width: 100%;
  padding: 25px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid #fff;
}

.game-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 20px;
  gap: 15px;
}

.score-container, .level-container, .lines-container, 
.next-container, .hold-container, .highscore-container {
  background: linear-gradient(to bottom, #fff5f8, #f8f0ff);
  padding: 12px;
  border-radius: 15px;
  text-align: center;
  flex: 1;
  min-width: 90px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 182, 193, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.score-container:hover, .level-container:hover, .lines-container:hover, 
.next-container:hover, .hold-container:hover, .highscore-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.score-label, .level-label, .lines-label, .next-label, .hold-label, .highscore-label {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 16px;
  color: #ad1457;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score-value, .level-value, .lines-value, .highscore-value {
  font-size: 22px;
  font-weight: 500;
  color: #6a1b9a;
}

.main-game {
  margin-bottom: 25px;
  position: relative;
}

#game-canvas {
  border: 3px solid #f8bbd0;
  background-color: rgba(33, 33, 33, 0.8);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

#next-piece, #hold-piece {
  background-color: rgba(33, 33, 33, 0.8);
  border: 2px solid #f8bbd0;
  border-radius: 10px;
}

.controls {
  width: 100%;
  max-width: 320px;
}

.control-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.control-btn {
  width: 65px;
  height: 65px;
  font-size: 24px;
  background: linear-gradient(135deg, #f8bbd0, #e1bee7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
  background: linear-gradient(135deg, #f48fb1, #ce93d8);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.control-btn:active {
  background: linear-gradient(135deg, #ec407a, #ab47bc);
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#rotate-left, #rotate-right {
  background: linear-gradient(135deg, #bbdefb, #90caf9);
}

#rotate-left:hover, #rotate-right:hover {
  background: linear-gradient(135deg, #90caf9, #64b5f6);
}

#rotate-left:active, #rotate-right:active {
  background: linear-gradient(135deg, #64b5f6, #42a5f5);
}

#hard-drop {
  background: linear-gradient(135deg, #c5e1a5, #aed581);
}

#hard-drop:hover {
  background: linear-gradient(135deg, #aed581, #9ccc65);
}

#hard-drop:active {
  background: linear-gradient(135deg, #9ccc65, #8bc34a);
}

#hold, #pause {
  background: linear-gradient(135deg, #ffe0b2, #ffcc80);
}

#hold:hover, #pause:hover {
  background: linear-gradient(135deg, #ffcc80, #ffb74d);
}

#hold:active, #pause:active {
  background: linear-gradient(135deg, #ffb74d, #ffa726);
}

/* ゲームオーバー表示のスタイル */
.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 2px solid #f8bbd0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.game-over h2 {
  color: #ad1457;
  margin-bottom: 15px;
  font-weight: 700;
}

.game-over button {
  background: linear-gradient(135deg, #f8bbd0, #e1bee7);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.game-over button:hover {
  background: linear-gradient(135deg, #f48fb1, #ce93d8);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* レスポンシブデザイン */
@media (max-width: 480px) {
  .game-container {
    padding: 15px;
  }
  
  .control-btn {
    width: 55px;
    height: 55px;
    font-size: 20px;
  }
  
  .score-label, .level-label, .lines-label, .next-label, .hold-label, .highscore-label {
    font-size: 12px;
  }
  
  .score-value, .level-value, .lines-value, .highscore-value {
    font-size: 18px;
  }
}

/* パステル調のテトリミノの色をコメントとして追加 */
/* 
テトリミノの推奨カラーパレット：
I型: #81d4fa (薄い水色)
O型: #fff59d (パステルイエロー)
T型: #ce93d8 (ラベンダー)
S型: #a5d6a7 (パステルグリーン)
Z型: #ef9a9a (淡い赤)
J型: #90caf9 (パステルブルー)
L型: #ffcc80 (パステルオレンジ)
*/