/* ===== 野球スコアボード（シンプル版） ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  --team-home: #5dade2;
  --team-away: #48c9b0;
  --color-accent: #85c1e9;
  --board-bg: #1a2332;
  --board-text: #e8e8f0;
  --board-border: #2a3a4e;
}

.baseball-board {
  background: var(--board-bg);
  border: 2px solid var(--board-border);
  border-radius: 8px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  color: var(--board-text);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  width: fit-content;
}

.baseball-board > .scoreboard-main {
  width: 1000px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.baseball-board > .lineup-panel {
  width: 130px;
  min-height: auto;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.baseball-board > .lineup-panel.home-lineup {
  border-right: 1px solid var(--board-border);
}

.baseball-board > .lineup-panel.away-lineup {
  border-left: 1px solid var(--board-border);
}

/* === ヘッダー === */
.board-header {
  text-align: center;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--board-border);
  color: #a0a0c0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
}

/* === 上段（BSO + テーブル横並び） === */
.board-upper {
  display: flex;
  align-items: stretch;
}

.bso-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--board-border);
  min-width: 94px;
}

/* === イニングスコアテーブル === */
.board-upper .score-table {
  flex: 1;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
}

.score-table th,
.score-table td {
  text-align: center;
  border: 1px solid var(--board-border);
  font-size: 1.8rem;
  padding: 0;
  height: 67px;
  vertical-align: middle;
}

.score-table thead th {
  background: rgba(0, 0, 0, 0.2);
  color: #6a6a8a;
  font-weight: 600;
  font-size: 1.2rem;
  height: 42px;
  letter-spacing: 1px;
}

.score-table thead th.team-header {
  width: 100px;
  border-right: 2px solid var(--board-border);
}

.score-table thead th.separator {
  border-left: 2px solid var(--board-border);
  width: 52px;
}

.score-table .team-name-cell {
  text-align: left;
  padding: 0 14px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 3px;
  width: 100px;
  border-right: 2px solid var(--board-border);
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-table .team-name-cell.home-team {
  color: var(--team-home);
}

.score-table .team-name-cell.away-team {
  color: var(--team-away);
}

.score-table td.inning-score {
  color: var(--board-text);
  width: 48px;
}

.score-table td.inning-score.current-inning {
  background: rgba(255, 255, 255, 0.05);
}

.score-table td.total-col {
  border-left: 2px solid var(--board-border);
  font-weight: 800;
  font-size: 2.2rem;
  width: 52px;
}

.score-table tr.home-row td.total-col {
  color: var(--team-home);
}

.score-table tr.away-row td.total-col {
  color: var(--team-away);
}

.score-table td.stat-col {
  color: #8ac4ff;
  font-size: 1.7rem;
  width: 48px;
}

/* === BSO カウント === */
.bso-box {
  width: 100px;
  padding: 10px;
  gap: 8px;
}

.bso-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bso-label {
  color: #6a6a8a;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 14px;
  text-align: center;
}

.bso-dots {
  display: flex;
  gap: 5px;
}

.bso-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2a2a40;
  transition: background 0.15s;
}

.bso-dot.active-b {
  background: #4cd964;
}

.bso-dot.active-s {
  background: #f0c040;
}

.bso-dot.active-o {
  background: #ff4444;
}

/* === 下段パネル === */
.board-lower {
  display: flex;
  align-items: stretch;
  border-top: 2px solid var(--board-border);
  height: 250px;
  position: relative;
  z-index: 2;
}

.board-lower > div {
  border-right: 1px solid var(--board-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.board-lower > div:last-child {
  border-right: none;
}

/* チームスコアボックス */
.team-score-box {
  width: 110px;
  padding: 10px 8px;
}

.team-score-box .tsb-label {
  font-size: 0.7rem;
  color: #6a6a8a;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.team-score-box .tsb-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-score-box.home .tsb-name {
  color: var(--team-home);
}

.team-score-box.away .tsb-name {
  color: var(--team-away);
}

.team-score-box .tsb-score {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
}

.team-score-box.home .tsb-score {
  color: var(--team-home);
}

.team-score-box.away .tsb-score {
  color: var(--team-away);
}

/* === ダイヤモンド（塁表示） === */
.diamond-box {
  width: 160px;
  padding: 10px;
}

.diamond-field {
  position: relative;
  width: 100px;
  height: 100px;
}

.diamond-field .base {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #2a2a40;
  transition: background 0.2s;
}

.diamond-field .base.active {
  background: var(--team-home);
}

.diamond-field .base-1 {
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.diamond-field .base-2 {
  top: 6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.diamond-field .base-3 {
  left: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.diamond-field .base-home {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: #3a3a54;
  width: 14px;
  height: 14px;
}

.diamond-field .diamond-lines {
  position: absolute;
  top: 14px;
  left: 18px;
  width: 64px;
  height: 64px;
  border: 1px solid #3a3a54;
  transform: rotate(45deg);
}

/* === イニング表示 === */
.inning-box {
  width: 120px;
  padding: 10px;
}

.inning-box .inning-main {
  font-size: 3.9rem;
  font-weight: 800;
  color: var(--board-text);
  line-height: 1;
}

.inning-box .inning-half-label {
  font-size: 1rem;
  color: #a0a0c0;
  margin-top: 4px;
  letter-spacing: 4px;
}

.inning-box .inning-sub {
  font-size: 0.7rem;
  color: #6a6a8a;
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: 2px;
}

/* === カスタム画像エリア === */
.custom-image-box {
  flex: 1;
  min-width: 100px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-placeholder-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80%;
  border: 2px dashed rgba(255, 255, 255, 0.15);
}

.image-placeholder-custom .ph-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* === フッター: 投手・打者 詳細パネル === */
.board-footer-detail {
  display: flex;
  border-top: 2px solid var(--board-border);
  position: relative;
  z-index: 2;
}

.pitcher-panel,
.batter-panel {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pitcher-panel {
  border-right: 1px solid var(--board-border);
}

.panel-header {
  font-size: 0.65rem;
  color: #6a6a8a;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.panel-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-photo {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid var(--board-border);
}

.photo-placeholder {
  width: 40px;
  height: 40px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.photo-placeholder .ph-label {
  font-size: 0.4rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
}

.panel-info {
  display: flex;
  flex-direction: column;
}

.panel-number {
  font-size: 0.7rem;
  color: var(--color-accent);
  font-weight: 700;
}

.panel-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--board-text);
  letter-spacing: 2px;
}

.panel-stats {
  display: flex;
  gap: 12px;
}

.panel-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.psi-label {
  font-size: 0.6rem;
  color: #6a6a8a;
  letter-spacing: 1px;
}

.psi-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--board-text);
}

.psi-value.accent {
  color: var(--color-accent);
}

/* === アニメーション === */
@keyframes scorePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); filter: brightness(1.5); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); filter: brightness(1); }
}

.score-pop { animation: scorePop 0.35s ease-out; }

/* === 表示画面用 === */
.display-body {
  margin: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
