/* 麻雀風スタイル - style.css */

body {
    font-family: 'Helvetica Neue', sans-serif;
    background: #1a3d2f; /* 深緑の雀卓風 */
    color: #f0f0e0;
    margin: 0;
    padding: 32px;
    text-align: center;
}

h2, h3, h4 {
    color: #e4d9a3; /* 薄い金色 */
    margin-bottom: 12px;
}

section {
    width: 75%;
    margin-left: 12.5%;
    margin-right: 12.5%;
    max-width: 1200px;
}

.tiles {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 80px;
  background: #ffffff; /* ← 背景を白に */
  padding: 16px;
  border-radius: 8px;
  width: 808px; /* ← 14牌 + 隙間ぴったりのサイズ */
  margin: 0 auto;
  box-sizing: border-box;
  justify-content: flex-start;
  overflow-x: auto;
  box-shadow: 0 0 8px rgba(0,0,0,0.1); /* お好みで影を追加 */
}


.tile {
    width: 48px;
    height: 64px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #fffdf2;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: grab;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #a22;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    cursor: pointer;
    display: none;
}

.tile:hover .remove-btn {
    display: block;
}

.add-tile {
    margin-top: 24px;
    text-align: center;
}

select, button {
    font-size: 16px;
    padding: 6px 12px;
    margin: 6px;
    border-radius: 6px;
    border: 1px solid #888;
    background: #4d7c5e;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #5c9672;
}

ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 0 auto;
    display: inline-block;
}

li {
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
}

.example-hand {
    display: inline-block;
    margin-top: 4px;
}

.example-hand .tile {
    cursor: default;
}

#tile-add-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    justify-content: center;
    padding: 16px;
}

.mahjong-terms-section {
  margin-top: 48px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.mahjong-terms-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.mahjong-terms-column {
  flex: 1;
  min-width: 320px;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 8px;
}

.mahjong-terms-column ul {
  list-style: none;
  padding-left: 0;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

.mahjong-terms-column li {
  margin-bottom: 12px;
}

.example-hand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  width: 100%;
}

#tile-add-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.tile-select-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  width: auto;
  height: auto;
}

.tile-select-button img {
  width: 48px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.reference-section {
  background-color: #004d4d;
  color: #ffffff;
  padding: 24px 32px;
  margin-top: 48px;
  border-top: 2px solid #007777;
  font-size: 14px;
}

.reference-section h2 {
  margin-top: 0;
  color: #e4d9a3;
  font-size: 20px;
}

.reference-section ul {
  padding-left: 20px;
  line-height: 1.8;
}

.reference-section a {
  color: #a9f0ff;
  text-decoration: none;
}

.reference-section a:hover {
  text-decoration: underline;
}
