/* ==========================================================================
   PitchBoard · 绿茵战术板引擎 (Halo 2.27 Plugin Frontend Styles)
   Matches PitchLight Champions League Night & Matchday Daylight themes
   ========================================================================== */

.pb-root {
  --pb-bg: #081712;
  --pb-surface: #0c2119;
  --pb-surface-2: #102a20;
  --pb-border: rgba(245, 185, 66, 0.22);
  --pb-border-soft: rgba(255, 255, 255, 0.08);
  --pb-gold: #f5b942;
  --pb-gold-dim: rgba(245, 185, 66, 0.16);
  --pb-emerald: #10b981;
  --pb-cyan: #38bdf8;
  --pb-danger: #ef4444;
  --pb-text: #f0f7f4;
  --pb-muted: #93b3a6;

  display: block;
  max-width: 100%;
  min-width: 0;
  margin: 26px 0;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pb-surface) 0%, var(--pb-bg) 100%);
  border: 1px solid var(--pb-border);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--pb-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

/* Header bar */
.pb-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 13px 18px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(245, 185, 66, 0.08) 65%, rgba(8, 23, 18, 0.4));
  border-bottom: 1px solid var(--pb-border-soft);
}

.pb-head-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pb-kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pb-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--pb-gold-dim);
  color: var(--pb-gold);
  border: 1px solid rgba(245, 185, 66, 0.35);
}

.pb-badge-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.pb-view-pill {
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--pb-muted);
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pb-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
}

.pb-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pb-muted);
}

.pb-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pb-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cfe4db;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
}

.pb-chip-btn:hover {
  border-color: rgba(245, 185, 66, 0.5);
  color: #fff;
  background: rgba(245, 185, 66, 0.12);
}

.pb-chip-btn.is-active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}

.pb-chip-btn.is-actual.is-active {
  background: rgba(245, 185, 66, 0.18);
  border-color: rgba(245, 185, 66, 0.6);
  color: var(--pb-gold);
}

/* SVG Stage */
.pb-stage {
  position: relative;
  width: 100%;
  background: radial-gradient(ellipse at 50% 35%, #113a28 0%, #092016 70%, #06140e 100%);
  overflow: hidden;
  user-select: none;
}

.pb-svg {
  display: block;
  width: 100%;
  height: auto;
}

.pb-player-target[role="button"] {
  cursor: pointer;
}

.pb-player-target:focus-visible {
  outline: 2px solid var(--pb-gold);
  outline-offset: 2px;
}

.pb-player-readout {
  padding: 6px 16px;
  color: #b8d6c9;
  background: #0c2119;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Smooth animated player & ball gliding between tactical phases */
.pb-player-group,
.pb-ball-group {
  transition: transform 0.82s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.pb-arrow-dashed {
  animation: pb-dash-flow 1.4s linear infinite;
}

@keyframes pb-dash-flow {
  from { stroke-dashoffset: 34; }
  to { stroke-dashoffset: 0; }
}

.pb-pulse-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: pb-pulse 1.9s ease-out infinite;
}

@keyframes pb-pulse {
  0% { transform: scale(0.95); opacity: 0.92; }
  75% { transform: scale(1.55); opacity: 0.08; }
  100% { transform: scale(1.62); opacity: 0; }
}

.pb-zone-poly {
  animation: pb-zone-breathe 2.8s ease-in-out infinite;
}

@keyframes pb-zone-breathe {
  0%, 100% { fill-opacity: 0.22; }
  50% { fill-opacity: 0.34; }
}

/* Controls & Phase Timeline */
.pb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 11px 16px;
  background: rgba(6, 18, 13, 0.85);
  border-top: 1px solid var(--pb-border-soft);
}

.pb-play-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pb-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(245, 185, 66, 0.55);
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.24), rgba(16, 185, 129, 0.16));
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pb-play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 185, 66, 0.28);
}

.pb-phases {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pb-phase-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pb-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pb-phase-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pb-phase-btn.is-active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #ffffff;
}

.pb-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.73rem;
  color: var(--pb-muted);
}

.pb-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pb-swatch-dashed {
  display: inline-block;
  width: 20px;
  height: 0;
  border-top: 2.5px dashed #38bdf8;
}

.pb-swatch-solid {
  display: inline-block;
  width: 20px;
  height: 0;
  border-top: 3px solid #f5b942;
}

.pb-swatch-zone {
  display: inline-block;
  width: 13px;
  height: 10px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.35);
  border: 1.5px solid #ef4444;
}

.pb-caption {
  padding: 12px 18px 14px;
  font-size: 0.87rem;
  line-height: 1.62;
  color: #d6ebe2;
  background: rgba(8, 22, 16, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pb-caption strong {
  color: var(--pb-gold);
}

/* ==========================================================================
   Homepage Card Cover Mode (Compact Live Hover-Animated Tactical Banner)
   ========================================================================== */
.pb-root.pb-mode-card {
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(245, 185, 66, 0.2);
  box-shadow: none;
}

.pb-mode-card .pb-stage {
  aspect-ratio: 1050 / 680;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pb-mode-card .pb-svg {
  width: 100%;
  height: 100%;
  max-height: none;
}

.pb-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #0c2119;
  border-bottom: 1px solid var(--pb-border-soft);
}

.pb-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(6, 18, 13, 0.82);
  border: 1px solid rgba(245, 185, 66, 0.42);
  color: #fde68a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pb-card-badge-txt,
.pb-card-phase-pill,
.pb-card-caption {
  overflow-wrap: anywhere;
}

.pb-card-phase-pill {
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(6, 18, 13, 0.78);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  font-size: 0.69rem;
  font-weight: 700;
}

.pb-card-caption {
  padding: 7px 12px;
  border-top: 1px solid var(--pb-border-soft);
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2f5ec;
}

/* ==========================================================================
   Homepage Spotlight Section Wrapper
   ========================================================================== */
.pb-spotlight-wrap {
  margin: 0 0 28px;
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(12, 34, 25, 0.96), rgba(7, 19, 14, 0.98));
  border: 1px solid rgba(245, 185, 66, 0.28);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.pb-spotlight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pb-spotlight-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pb-spotlight-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.pb-spotlight-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 185, 66, 0.35) transparent;
}

.pb-spotlight-tab {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #9fc2b4;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pb-spotlight-tab:hover {
  color: #fff;
  border-color: rgba(245, 185, 66, 0.5);
}

.pb-spotlight-tab.is-active {
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.24), rgba(16, 185, 129, 0.2));
  border-color: #f5b942;
  color: #fef3c7;
}

.pb-spotlight-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: #93b3a6;
}

.pb-spotlight-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(245, 185, 66, 0.16);
  border: 1px solid rgba(245, 185, 66, 0.5);
  color: #fde68a !important;
  font-weight: 800;
  text-decoration: none !important;
  transition: all 0.18s ease;
}

.pb-spotlight-cta:hover {
  background: rgba(245, 185, 66, 0.28);
  transform: translateX(2px);
}

/* Lightbox Modal */
.pb-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 10, 7, 0.86);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pb-modal-inner {
  width: min(1120px, 96vw);
  max-height: 92vh;
  overflow: auto;
  position: relative;
}

.pb-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 22, 16, 0.9);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .pb-spotlight-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pb-spotlight-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    width: 100%;
    max-width: 100%;
    padding: 0 0 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .pb-spotlight-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    max-width: 78vw;
    overflow: hidden;
    text-overflow: ellipsis;
    scroll-snap-align: start;
    padding: 6px 12px;
    font-size: 0.76rem;
  }
}

@media (max-width: 720px) {
  .pb-root {
    margin: 18px 0;
    border-radius: 12px;
  }
  .pb-root.pb-mode-card {
    margin: 0;
    border-radius: 0;
  }
  .pb-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .pb-title {
    font-size: 0.92rem;
  }
  .pb-subtitle {
    font-size: 0.75rem;
    line-height: 1.45;
  }
  .pb-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .pb-tools::-webkit-scrollbar,
  .pb-phases::-webkit-scrollbar {
    display: none;
  }
  .pb-chip-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 5px 9px;
    font-size: 0.72rem;
  }
  .pb-player-readout {
    padding: 5px 12px;
    font-size: 0.74rem;
  }
  .pb-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .pb-play-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pb-play-btn {
    align-self: flex-start;
    padding: 6px 12px;
    font-size: 0.74rem;
  }
  .pb-phases {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .pb-phase-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    max-width: 82vw;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 10px;
    font-size: 0.74rem;
  }
  .pb-legend {
    gap: 6px 12px;
    font-size: 0.7rem;
  }
  .pb-caption {
    padding: 10px 12px 12px;
    font-size: 0.82rem;
    line-height: 1.56;
  }
  .pb-card-meta {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
  }
  .pb-card-pill {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.66rem;
    padding: 2px 8px;
  }
  .pb-card-phase-pill {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    padding: 2px 8px;
  }
  .pb-card-caption {
    padding: 6px 10px;
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pb-spotlight-wrap {
    padding: 14px 12px;
    border-radius: 14px;
    margin-bottom: 20px;
  }
  .pb-spotlight-title {
    font-size: 1rem !important;
  }
  .pb-spotlight-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
  }
  .pb-modal-backdrop {
    padding: 10px;
  }
}
