/* ════════════════════════════════════════════════════════════════
   SOCCER HUD  ── TV-style scoreboard top-left
   Migrated from Electron overlay.css — DO NOT Tailwind-ify
   ════════════════════════════════════════════════════════════════ */
.hud-box {
  position: absolute;
  top: 28px;
  left: 28px;
  width: var(--hud-w);
}

/* ── Score bar ── */
.hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  height: 60px;
  background: linear-gradient(180deg, rgba(22,22,28,0.98) 0%, rgba(8,8,12,0.98) 100%);
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  /* white top line = TV broadcast feel */
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Team cells */
.hud-team {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  position: relative;
  overflow: hidden;
}
.hud-team.home { justify-content: flex-start; }
.hud-team.away { justify-content: flex-end; }

/* チームカラーの縦バー */
.hud-team.home::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--home-color, #888);
}
.hud-team.away::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--away-color, #888);
}

.team-color { display: none; }

.team-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.team-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Score center ── 白抜きボックス */
.hud-score {
  min-width: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.92);
  color: #0a0a0a;
  padding: 0 10px;
  flex-shrink: 0;
}

/* ── Clock row: hud-box と同幅。ATは右にはみ出す ── */
.hud-bottom-row {
  position: relative;   /* ATのabsolute基点 */
  display: flex;
  align-items: stretch;
  height: 30px;
  /* hud-topと同じ幅 = hud-box幅 (var(--hud-w)) で自動的に合う */
}

/* Clock strip ─ hud-topと完全同幅 */
.hud-bottom {
  flex: 1;              /* hud-bottomが親全幅を使う */
  background: rgba(8,8,12,0.95);
  border-top: 1.5px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0 0 3px 3px;
}

/* AT badge ─ 右端にはみ出し表示 */
.hud-at {
  position: absolute;
  left: 100%;           /* hud-bottom右端のすぐ外 */
  top: 0;
  height: 100%;
  width: var(--at-w);
  background: #d4a800;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 3px 0;
  border-top: 1.5px solid #d4a800;
}


/* ════════════════════════════════════════════════════════════════
   SOCCER POP  ── TV lower-third style, bottom-left
   ════════════════════════════════════════════════════════════════ */
.pop-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 0 60px 44px;
  pointer-events: none;
}

.pop {
  display: flex;
  flex-direction: column;
  min-width: 460px;
  max-width: 760px;
  border-radius: 0 3px 3px 0;
  overflow: hidden;
  filter: drop-shadow(0 8px 40px rgba(0,0,0,0.8));
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.20s ease, transform 0.20s ease;
}
.pop.show {
  opacity: 1;
  transform: translateY(0);
}

/* 左端のアクセントバー ─ ヘッダー色と連動（デフォルト黄色） */
.pop::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #e6b800;
  z-index: 2;
}
.pop.pop-red::before    { background: var(--danger); }

/* ── Type header ── デフォルト: 黄色 */
.pop-header {
  background: #e6b800;
  color: #0a0a0a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  padding: 5px 16px 4px 20px;
}

/* ── Body ── */
.pop-body {
  background: var(--dark2);
  padding: 11px 18px 13px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.pop-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}

.pop-sub {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.72;
  letter-spacing: 0.03em;
}

.pop-score {
  font-size: 16px;
  font-weight: 900;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.10em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Substitution */
.pop-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 5px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.pop-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}
.pop-badge.in  { background: var(--success); color: #fff; }
.pop-badge.out { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.80); }

/* Card strip */
.pop-card-strip {
  height: 3px;
  margin-top: 8px;
  border-radius: 1px;
}
.pop-card-strip.yellow { background: #f5c400; }
.pop-card-strip.red    { background: var(--danger); }

/* Card header overrides */
.pop-header.card-yellow {
  background: #e6b800;
  color: #0a0a0a;
}
.pop-header.card-red {
  background: var(--danger);
  color: #fff;
}


/* ════════════════════════════════════════════════════════════════
   SOCCER PK  ── 5本固定グリッド表示
   ════════════════════════════════════════════════════════════════ */
.pk {
  position: absolute;
  top: 105px;
  left: calc(28px + var(--hud-w) / 2);
  transform: translateX(-50%);
  width: max-content;
  min-width: 260px;
  max-width: var(--hud-w);
  background: linear-gradient(180deg, rgba(22,22,28,0.98) 0%, rgba(8,8,12,0.98) 100%);
  border-radius: 0 0 3px 3px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.pk-header {
  background: rgba(255,255,255,0.92);
  color: #0a0a0a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  padding: 5px 14px;
  text-align: center;
}

.pk-body {
  padding: 8px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* 1チーム行: チーム名 | キック枠 | スコア */
.pk .team-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pk .team-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
  width: 56px;
  flex-shrink: 0;
}

/* キックdotsコンテナ */
.pk .kicks {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

/* 通常キック枠（5本分） */
.pk .kick {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.18);
  flex-shrink: 0;
  display: inline-block;
}
/* 未使用枠 */
.pk .kick.empty {
  background: transparent;
  border-color: rgba(255,255,255,0.14);
}
.pk .goal {
  background: var(--success);
  border-color: transparent;
  box-shadow: 0 0 4px rgba(39,174,96,0.7);
}
.pk .miss {
  background: var(--danger);
  border-color: transparent;
  box-shadow: 0 0 4px rgba(232,49,58,0.6);
}
/* 6本目以降: 小さめドット */
.pk .kick.extra {
  width: 14px;
  height: 14px;
}

/* セパレーター */
.pk-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
  align-self: center;
}

.pk .pk-score {
  font-size: 20px;
  font-weight: 900;
  text-align: right;
  color: rgba(255,255,255,0.90);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  width: 24px;
  flex-shrink: 0;
}

.pk-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
}

/* サドンデス時: ヘッダーを赤寄りに */
.pk.pk-sudden .pk-header {
  background: #b03030;
  color: #fff;
  letter-spacing: 0.12em;
}
