﻿/* 全体レイアウト */
body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 20px;
}

#game {
  max-width: 800px;
  margin: auto;
}

/* 各エリアのタイトル部分はそのまま */
#cpu-area, #table-area, #player-area {
  margin-bottom: 20px;
}

/* 各カードエリアに固定枠を設定 */
#cpu-hand, #table-cards, #player-hand {
  min-height: 120px;       /* カードがなくても高さが崩れない */
  border: 1px solid #ccc;  /* 枠線を追加 */
  padding: 10px;
  box-sizing: border-box;  /* 内側のパディングを含めたサイズ計算 */
  background-color: #fff;  /* 背景色を設定 */
  display: flex;
  gap: 10px;
}

/* カードのスタイル */
.card {
  width: 60px;
  height: 90px;
  border: 1px solid #333;
  border-radius: 5px;
  background-color: #fff;
  text-align: center;
  line-height: 90px;
  font-size: 20px;
  cursor: pointer;
  position: relative;
  transition: transform 0.5s;
}

.card.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.card.selected {
  border: 2px solid blue;
  transform: translateY(-10px);
}

/* CPUの手札は裏面表示 */
#cpu-hand .card {
  background-color: #333;
  color: #333;
  cursor: default;
}

/* 操作ボタン・エフェクト */
#controls {
  margin: 20px 0;
}

#winner {
  animation: glow 1s infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 10px gold; }
  to { box-shadow: 0 0 20px orange; }
}

/* モーダルのスタイル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content ul {
  text-align: left;
  padding-left: 20px;
}

/* レスポンシブ対応（画面幅600px以下の場合） */
@media screen and (max-width: 600px) {
  /* ゲームコンテナのパディングを調整 */
  body {
    padding: 10px;
  }
  /* カードエリアの最小高さをやや大きめに */
  #cpu-hand, #table-cards, #player-hand {
    min-height: 150px;
    padding: 10px;
  }
  /* カードサイズを拡大 */
  .card {
    width: 80px;
    height: 120px;
    font-size: 24px;
    line-height: 120px;
  }
}
