/**
 * styles.css - 将棋LM ミニマリストスタイル
 * 
 * コンセプト: 極限までシンプル、白黒ベース
 */

/* === リセット === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === 基本 === */
html, body {
  height: 100%;
  font-family: system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #000;
}

.hidden {
  display: none !important;
}

/* === アプリ === */
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
}

/* === 盤面エリア === */
.board-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 648px;
}

#board {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border: 1px solid #000;
}

/* === ツールバー === */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 648px;
  padding: 12px 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 12px;
}

.toolbar-left {
  display: flex;
  gap: 8px;
}

.toolbar-right {
  display: flex;
  align-items: center;
}

.turn {
  font-size: 14px;
  font-weight: 600;
}

/* === ボタン === */
.btn {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 16px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: #f0f0f0;
}

.btn:active {
  background: #e0e0e0;
}

.btn-apply {
  width: 100%;
  margin-top: 12px;
  background: #000;
  color: #fff;
}

.btn-apply:hover {
  background: #333;
}

/* === ドロワー === */
.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #000;
  padding: 16px;
  z-index: 50;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.drawer-content {
  max-width: 400px;
  margin: 0 auto;
}

/* === 設定 === */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.setting-label {
  font-size: 13px;
}

.input {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  width: 160px;
}

.input:focus {
  outline: none;
  border-color: #000;
}

/* === トグル === */
.toggle {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #000;
  cursor: pointer;
  min-width: 48px;
}

.toggle.on {
  background: #000;
  color: #fff;
}

/* === チェックボックス === */
.checkbox-group {
  display: flex;
  gap: 12px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

/* === ヘルプ === */
.help-text {
  font-size: 13px;
  margin-bottom: 12px;
}

.help-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-one { background: #000; }
.dot-two { background: #fff; border: 2px solid #000; box-sizing: border-box; }
.dot-onetwo { 
  background: #000; 
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
  width: 6px;
  height: 6px;
  margin: 3px;
}
.dot-far { 
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #000;
  border-radius: 0;
  background: transparent;
}

/* === オーバーレイ === */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.result-box {
  text-align: center;
}

.result-text {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* === レスポンシブ === */
@media (max-width: 480px) {
  .toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .toolbar-left, .toolbar-right {
    width: 100%;
    justify-content: center;
  }
}
