:root {
  --bg-0: #f4f7fb;
  --bg-1: #ffffff;
  --ink-0: #0f172a;
  --ink-1: #334155;
  --ink-2: #64748b;
  --line: #dbe3ee;
  --accent: #ff5a1f;
  --accent-2: #0a84ff;
  --ok: #17a34a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink-0);
  background: radial-gradient(circle at 10% 10%, #ffffff 0%, var(--bg-0) 35%, #e6edf8 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(120deg, rgba(255, 90, 31, 0.09), transparent 35%),
    linear-gradient(240deg, rgba(10, 132, 255, 0.1), transparent 40%);
}

.loading-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed #cddff7;
  border-radius: 12px;
  background: #f8fbff;
}

.loading-widget.compact {
  width: 100%;
  justify-content: center;
}

.loading-label {
  color: #476287;
  font-size: 13px;
  font-weight: 800;
}

.basketball-loader {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 30% 30%, #ffb46f 0%, #ff8a3d 45%, #ea5f1b 100%);
  box-shadow: 0 3px 8px rgba(234, 95, 27, 0.35);
  animation: basketball-bounce 0.95s ease-in-out infinite;
}

.basketball-loader::before,
.basketball-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.basketball-loader::before {
  border: 1.6px solid rgba(44, 29, 17, 0.55);
  border-top-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(24deg);
}

.basketball-loader::after {
  width: 1.6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(44, 29, 17, 0.55);
}

@keyframes basketball-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.site-header {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 18px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.brand-wrap {
  width: 100%;
}

.main-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.header-main-menu {
  margin-top: 0;
  margin-left: auto;
}

.menu-button {
  border: 1px solid #d8e4f5;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.menu-button.active {
  border-color: #0a84ff;
  background: #ebf5ff;
  color: #0553a3;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.header-carousel {
  min-width: 0;
  flex: 1;
  margin-left: auto;
  padding-left: 8px;
}

.header-carousel-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.header-carousel-title {
  margin: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.header-carousel-nav {
  display: inline-flex;
  gap: 6px;
}

.header-carousel-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  background: #fff;
  color: #1e3a5f;
  font-weight: 900;
  cursor: pointer;
}

.header-games-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 2px;
}

.header-games-track::-webkit-scrollbar {
  height: 8px;
}

.header-games-track::-webkit-scrollbar-thumb {
  background: #c8d8ee;
  border-radius: 999px;
}

.header-day-marker {
  width: 64px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: linear-gradient(160deg, #ffffff, #eff5ff);
  padding: 8px 6px;
  text-align: center;
}

.header-day-marker-dow {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.header-day-marker-date {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.header-tournament-marker {
  width: 100%;
  border: 1px dashed #c9d9ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 7px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.header-tournament-marker p {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  color: #35567f;
  text-transform: uppercase;
  line-height: 1.25;
}

.header-tournament-series-line {
  font-weight: 900;
  color: #35567f;
  letter-spacing: 0.2px;
}

.header-tournament-series {
  font-weight: 800;
  color: #7a94b3;
}

.header-tournament-group {
  width: max-content;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-tournament-games {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
}

.header-game-card {
  width: 250px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
}

.header-game-card:hover {
  border-color: #9cc4ff;
}

.header-game-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.header-game-tournament {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-game-status {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.header-game-status.is-final {
  background: #eaf7ef;
  color: #116530;
}

.header-game-status.is-pending {
  background: #ebf5ff;
  color: #0b5aa9;
}

.header-game-league {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-team-row+.header-team-row {
  margin-top: 5px;
}

.header-team-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.header-team-inline span {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-team-record {
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #d7e5f8;
  background: #f2f7ff;
  color: #4a6382;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.header-team-logo-mini,
.header-team-fallback {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #d5dfec;
  background: #fff;
  flex-shrink: 0;
}

.header-team-logo-mini {
  object-fit: cover;
}

.header-team-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  color: #334155;
}

.header-team-score {
  font-size: 23px;
  font-weight: 900;
  color: #0f172a;
  min-width: 18px;
  text-align: right;
  line-height: 1;
}

.header-team-score.is-loser {
  color: #6b7c93;
}

.header-game-sub {
  margin: 6px 0 0;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.brand-logo {
  width: 180px;
  max-width: 45vw;
  height: auto;
}

.brand-pill {
  display: inline-block;
  margin-bottom: 14px;
  background: var(--ink-0);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.site-header h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.4px;
  line-height: 1.1;
  max-width: 920px;
  white-space: nowrap;
}

.site-header p {
  margin: 12px 0 0;
  max-width: 700px;
  color: var(--ink-1);
}

.refresh-button {
  border: 0;
  background: linear-gradient(130deg, var(--accent), #ff834f);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 34px;
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-areas:
    "news news"
    "active active"
    "details list"
    "standings standings";
  gap: 16px;
}

.active-banner-panel {
  grid-area: active;
  padding: 16px;
  border: 1px solid #ffd6c8;
  background: linear-gradient(135deg, #fff6f2, #fff8eb);
}

.panel {
  background: color-mix(in srgb, var(--bg-1) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.tournaments-panel {
  grid-area: list;
  padding: 18px;
}

.details-panel {
  grid-area: details;
}

.standings-bottom-panel {
  grid-area: standings;
  padding: 18px;
}

.news-panel {
  grid-area: news;
  padding: 18px;
}

.players-panel {
  padding: 18px;
}

.admin-panel {
  padding: 18px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-title {
  margin: 0;
  font-size: 1.2rem;
}

.admin-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card {
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.admin-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.admin-form {
  display: grid;
  gap: 8px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.admin-news-list,
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.admin-item {
  border: 1px solid #dce7f5;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
}

.admin-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.admin-item-title {
  margin: 0;
  font-weight: 800;
  font-size: 13px;
}

.admin-item-meta {
  margin: 2px 0 0;
  font-size: 11px;
  color: #64748b;
}

.admin-actions {
  display: inline-flex;
  gap: 6px;
}

.admin-btn {
  border: 1px solid #cfe0f6;
  background: #fff;
  color: #1e3a5f;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.admin-btn.primary {
  border-color: #0a84ff;
  background: #0a84ff;
  color: #fff;
}

.admin-btn.danger {
  border-color: #ef9a9a;
  background: #fff5f5;
  color: #b42318;
}

.admin-login-wrap {
  max-width: 460px;
  margin: 0 auto;
}

.contact-panel {
  padding: 18px;
}

.players-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 30px;
}

.players-tools {
  margin-bottom: 10px;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.teams-browser {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
}

.teams-tournament-list {
  display: grid;
  gap: 10px;
}

.teams-tournament-button.is-selected {
  border-color: #1e90ff;
  box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.12);
}

.teams-results-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.team-browser-card {
  border: 1px solid #d7e5f8;
  border-radius: 18px;
  background: #fff;
  padding: 18px 14px;
  display: grid;
  gap: 12px;
  justify-items: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.team-browser-card:hover {
  transform: translateY(-2px);
  border-color: #1e90ff;
  box-shadow: 0 12px 30px rgba(30, 64, 175, 0.08);
}

.team-browser-card-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 1px solid #d7e5f8;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #38598a;
  font-weight: 900;
  font-size: 1.4rem;
}

.team-browser-card-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.team-browser-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: #13203b;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-align: center;
}

.player-row-button {
  width: 100%;
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}

.player-row-button:hover {
  border-color: #9dc4ff;
  background: #f7fbff;
}

.player-row-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.player-row-info {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-row-meta-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.player-tournament-toggle {
  border: 0;
  background: transparent;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.player-tournament-toggle.expanded {
  color: #0a84ff;
}

.player-tournament-row {
  cursor: pointer;
}

.player-tournament-row:hover td {
  background: #f8fbff;
}

.player-tournament-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-tournament-indicator {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.player-tournament-expand-row td {
  background: #f8fbff;
}

.player-games-table th,
.player-games-table td {
  font-size: 13px;
}

.player-game-row {
  cursor: pointer;
}

.player-game-row:hover td {
  background: #f3f8ff;
}

.player-game-link {
  color: #0a84ff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.player-game-meta {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  font-family: "Manrope", sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.news-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.news-grid::-webkit-scrollbar {
  height: 8px;
}

.news-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.news-carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-archive-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.news-archive-head h2 {
  margin: 0;
}

.news-archive-panel {
  display: grid;
  gap: 14px;
}

.news-archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.news-archive-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
  display: block;
  flex: 0 0 calc((100% - 24px) / 3);
  text-decoration: none;
  color: inherit;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  scroll-snap-align: start;
}

.news-card-button {
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  border-color: #9dc4ff;
}

.news-card-media {
  position: relative;
}

.news-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.news-card-category {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-card-body {
  padding: 10px 12px 12px;
}

.news-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  line-height: 1.25;
}

.news-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.news-detail-panel {
  display: grid;
  gap: 16px;
}

.news-detail-hero {
  border-radius: 16px;
  overflow: hidden;
}

.news-detail-hero img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.news-detail-content {
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.75;
}

.news-detail-content p:first-child {
  margin-top: 0;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.news-detail-content iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 14px;
}

.site-footer {
  margin-top: 22px;
  border-top: 1px solid #d7e3f2;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.app-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.95);
  z-index: 200;
}

.app-loading.hidden {
  display: none;
}

.app-loading img {
  width: 120px;
  height: 120px;
  animation: appPulse 1.6s ease-in-out infinite;
}

@keyframes appPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.contact-modal-panel {
  width: min(640px, calc(100% - 24px));
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 26px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-footer-brand {
  margin: 0;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.site-footer-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer-logo {
  width: 56px;
  height: auto;
}

.site-footer-copy {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.site-footer-links {
  display: flex;
  gap: 12px;
}

.site-footer-links a {
  color: #0a4f9e;
  font-weight: 700;
  text-decoration: none;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.badge {
  padding: 5px 10px;
  background: #ebf5ff;
  color: #0553a3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.active-tournaments-top {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.active-top-card {
  border: 1px solid #b8d9ff;
  background: linear-gradient(140deg, #ecf5ff, #d7ebff);
  color: #0f2f57;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex: 1;
  min-width: 0;
}

.active-top-card:hover {
  transform: translateY(-2px);
}

.active-top-card.selected {
  border-color: #ffc8b3;
  background: linear-gradient(140deg, #ff6128, #ff8f4f);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 170, 140, 0.45), 0 14px 30px rgba(255, 96, 40, 0.28);
}



.active-top-kicker {
  margin: 0;
  font-size: 11px;
  opacity: 0.9;
}

.active-top-name {
  margin: 6px 0 4px;
  font-weight: 800;
}

.active-top-meta {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.tournaments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 600px;
  overflow: auto;
}

.completed-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.completed-search-input {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.completed-search-input:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.tournament-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tournament-card:hover {
  transform: translateY(-2px);
  border-color: #9fc7ff;
}

.tournament-card.active {
  border-color: #ffc8b3;
  background: linear-gradient(140deg, #ff6128, #ff8f4f);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 170, 140, 0.45), 0 14px 30px rgba(255, 96, 40, 0.28);
}

.tournament-card.active .category,
.tournament-card.active .name,
.tournament-card.active .meta {
  color: #fff !important;
}

.tournament-card.active .live.inactive {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}



.tournament-card .category {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.tournament-card .name {
  margin: 4px 0;
  font-size: 15px;
  font-weight: 800;
}

.tournament-card .meta {
  margin: 0;
  color: var(--ink-1);
  font-size: 12px;
}

.live {
  background: #e9faef;
  color: var(--ok);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.live.inactive {
  background: #f1f5f9;
  color: #334155;
}

.details-panel {
  padding: 18px;
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-1);
}

.hidden {
  display: none;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-category {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.details-header h3 {
  margin: 4px 0;
  font-size: 1.5rem;
}

.detail-meta {
  margin: 0;
  color: var(--ink-1);
}

.status-chip {
  background: #fff0ea;
  color: #bf360c;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.details-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 14px;
  overflow: hidden;
}

.standings-card {
  grid-column: 1 / -1;
}

.card h4 {
  margin: -14px -14px 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  border-bottom: 1px solid #d7e6fb;
  letter-spacing: 0.2px;
}

.card h4::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a84ff, #49a6ff);
}

.standings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.standings-split {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.standings-split.hidden {
  display: none !important;
}

.standings-series-wrap {
  padding: 10px;
  border: 1px solid #dfe8f5;
  border-radius: 12px;
  background: #fbfdff;
}

.series-table-section+.series-table-section {
  margin-top: 12px;
}

.series-table-section h5 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #334155;
}

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

.series-particular-table th,
.series-particular-table td {
  text-align: center;
  padding: 8px;
  border-bottom: 1px solid #e8eef8;
}

.series-head-label {
  width: 42%;
  background: #4a8dc0;
}

.series-head-team {
  background: #4a8dc0;
}

.series-head-team .team-logo-xs {
  width: 28px;
  height: 28px;
}

.series-team-cell {
  text-align: left !important;
  color: #2f7db4;
  font-weight: 700;
}

.series-diagonal {
  background: #eef0f4;
}

.standings-mode-tabs {
  display: flex;
  gap: 8px;
  margin: -14px -14px 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  border-bottom: 1px solid #d7e6fb;
}

.standings-mode-tabs .planilla-tab {
  background: #ffffff;
  border-color: #cfe2ff;
  color: #334155;
  font-weight: 800;
}

.standings-mode-tabs .planilla-tab.active {
  background: linear-gradient(130deg, #0a84ff, #3ea0ff);
  border-color: #0a84ff;
  color: #fff;
}

.list-mode-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

.leaders-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leaders-grid.hidden {
  display: none !important;
}

.leader-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.leader-card h5 {
  margin: 0;
  padding: 12px;
  border-left: 4px solid #f97316;
  background: #f8fafc;
  text-transform: uppercase;
  font-size: 1rem;
  color: #334155;
}

.leader-card table th,
.leader-card table td {
  font-size: 12px;
}

.leader-team {
  color: var(--ink-2);
  font-size: 11px;
}

.team-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-logo-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dbe3ee;
  background: #fff;
}

.team-logo-xs {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dbe3ee;
  background: #fff;
}

.leader-player-link {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #f97316;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.leader-player-link:hover {
  text-decoration: underline;
}

.player-profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.player-profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.player-profile-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-icon-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-2);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.share-icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.player-compare-toggle {
  min-width: 170px;
}

.player-back-button {
  min-width: 120px;
}

.player-profile-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.player-profile-summary {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid rgba(117, 154, 198, 0.22);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88) 44%),
    linear-gradient(135deg, rgba(232, 242, 255, 0.88), rgba(246, 250, 255, 0.98));
  box-shadow: 0 22px 50px rgba(37, 61, 99, 0.12);
}

.player-profile-summary-media {
  display: grid;
  place-items: center;
  align-self: center;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  padding: 34px;
  margin-inline: auto;
  border-radius: 40px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(231, 240, 252, 0.92));
  border: 1px solid rgba(138, 168, 207, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 30px rgba(73, 108, 154, 0.12);
}

.player-profile-photo,
.player-profile-photo-fallback {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  height: min(100%, 280px);
  aspect-ratio: 1 / 1;
  border-radius: 32px;
}

.player-profile-photo {
  display: block;
  object-fit: contain;
  border: 1px solid rgba(138, 168, 207, 0.24);
  background: #f7fbff;
  box-shadow: 0 18px 35px rgba(19, 34, 62, 0.12);
}

.player-profile-photo.hidden,
.player-profile-photo-fallback.hidden {
  display: none;
}

.player-profile-photo-fallback {
  display: grid;
  place-items: center;
  color: #3f5f84;
  font-size: 3rem;
  font-weight: 900;
  border: 1px solid #dbe6f5;
  background: #f7fbff;
}

.player-profile-summary-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-content: center;
}

.player-profile-summary-info p {
  margin: 0;
  color: #334155;
  font-size: 0.98rem;
}

@media (max-width: 900px) {
  .player-profile-summary {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .player-profile-summary-media {
    width: min(100%, 360px);
    padding: 28px;
  }

  .player-profile-photo,
  .player-profile-photo-fallback {
    width: min(100%, 230px);
    height: min(100%, 230px);
  }
}

@media (max-width: 720px) {
  .pbp-edit-shot-grid {
    grid-template-columns: 1fr;
  }

  .pbp-edit-shot-court-wrap {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .player-profile-head {
    align-items: flex-start;
    gap: 14px;
  }

  .player-profile-summary {
    padding: 18px;
    gap: 18px;
  }

  .player-profile-summary-media {
    width: min(100%, 300px);
    padding: 22px;
    border-radius: 28px;
  }

  .player-profile-photo,
  .player-profile-photo-fallback {
    width: min(100%, 200px);
    height: min(100%, 200px);
    border-radius: 24px;
  }

  .player-profile-head h2 {
    font-size: 2rem;
  }
}

.player-compare-panel {
  padding: 14px;
  margin-bottom: 12px;
}

.player-compare-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.player-compare-controls label {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.player-compare-controls input {
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.player-compare-controls input:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.player-compare-add-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 8px;
}

.player-compare-add-item {
  width: 100%;
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
}

.player-compare-add-item:hover {
  border-color: #9dc4ff;
  background: #f7fbff;
}

.player-compare-add-name {
  font-weight: 800;
  color: #0f172a;
}

.player-compare-add-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.player-compare-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.player-compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe2ff;
  background: #f0f7ff;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  color: #1e3a5f;
}

.player-compare-chip button {
  border: 0;
  background: transparent;
  color: #1e3a5f;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}

.player-compare-result .loading-widget {
  width: 100%;
  justify-content: center;
}

.player-compare-table th,
.player-compare-table td {
  text-align: center;
  font-size: 13px;
}

.player-compare-table th:first-child,
.player-compare-table td:first-child {
  text-align: left;
  font-weight: 800;
}

.player-compare-main-row {
  cursor: pointer;
}

.player-compare-main-row:hover td {
  background: #f6faff;
}

.player-compare-detail-row>td {
  background: #fbfdff;
}

.player-compare-tournaments-table th,
.player-compare-tournaments-table td {
  font-size: 12px;
}

.compare-player-tournament-row {
  cursor: pointer;
}

.compare-player-tournament-row:hover td {
  background: #f2f8ff;
}

.compare-win {
  color: #0a84ff;
  font-weight: 900;
}

.player-profile-card {
  padding: 16px;
}

.player-profile-card h3 {
  margin: 0;
}

.player-profile-legend {
  margin: 10px 2px 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.player-profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.player-profile-view-tabs {
  display: inline-flex;
  gap: 8px;
}

.player-profile-view-tabs .planilla-tab {
  background: #fff;
  border-color: #cfe2ff;
  color: #334155;
}

.player-profile-view-tabs .planilla-tab.active {
  background: linear-gradient(130deg, #0a84ff, #3ea0ff);
  border-color: #0a84ff;
  color: #fff;
}

.player-group-row td {
  background: #f4f8ff;
  border-top: 1px solid #dbe6f5;
  border-bottom: 1px solid #dbe6f5;
  font-size: 12px;
  font-weight: 800;
  color: #3f5f84;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-pager {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.day-nav-button {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.day-nav-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.day-nav-label {
  margin: 0;
  text-align: center;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.game-item {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.game-item>div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.game-item-button {
  width: 100%;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-item-button:hover {
  transform: translateY(-2px);
  border-color: #95c1ff;
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.12);
}

.game-item-button:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.25);
  outline-offset: 1px;
}

.teams {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
  line-height: 1.25;
  color: #10243f;
}

.list-game-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.list-game-status {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.list-game-status.is-final {
  background: #eaf7ef;
  color: #116530;
}

.list-game-status.is-pending {
  background: #ebf5ff;
  color: #0b5aa9;
}

.list-game-tournament {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-team-row+.list-team-row {
  margin-top: 5px;
}

.game-team-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.game-team-inline span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 800;
}

.list-team-record {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #d7e5f8;
  background: #f2f7ff;
  color: #4a6382;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.list-team-score {
  min-width: 18px;
  text-align: right;
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
}

.list-team-score.is-loser {
  color: #6b7c93;
}

.game-team-vs {
  margin: 0 8px;
  color: #5f7591;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.game-team-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cfe0f4;
  background: #fff;
}

.game-team-fallback {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #cfe0f4;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  color: #334155;
}

.info {
  margin: 6px 0 0;
  color: #58708c;
  font-size: 10px;
  text-align: left;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  margin: 0;
  font-weight: 900;
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #102c52;
  color: #fff;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 11px;
  text-transform: uppercase;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid #edf1f7;
  font-size: 14px;
}

th {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.standings-section-row td {
  background: #eef5ff;
  color: #0f3f75;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.standings-spacer-row td {
  border-bottom: 0;
  height: 8px;
  padding: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
}

.modal-panel {
  position: relative;
  width: min(1280px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-weight: 800;
}

.modal-share-button {
  position: absolute;
  right: 50px;
  top: 10px;
}

.share-modal-panel {
  width: min(520px, calc(100% - 24px));
}

.share-modal-title {
  margin: 4px 0 6px;
  font-size: 1.4rem;
}

.share-apps-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-app-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.share-app-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

.share-app-button.is-whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.share-app-button.is-telegram {
  background: #2aabee;
  border-color: #2aabee;
  color: #fff;
}

.share-app-button.is-facebook {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.share-app-button.is-x {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.share-app-button.is-email {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.share-app-button.is-copy,
.share-app-button.is-native {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.modal-hero {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.modal-team-col {
  text-align: center;
}

.modal-team-col-away {
  text-align: center;
}

.modal-team-logo-wrap {
  min-height: 92px;
  display: grid;
  place-items: center;
}

.modal-team-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.modal-score-col {
  text-align: center;
}

.modal-tournament-label {
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #334155;
}

.modal-final-label {
  margin: 6px 0 0;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.modal-series-label {
  margin: 4px 0 0;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.score-label {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.score-team {
  margin: 4px 0 0;
  font-weight: 800;
}

.modal-score {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
}

.modal-stats-strip {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.pre-game-summary {
  display: grid;
  gap: 6px;
}

.pre-game-summary p {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.modal-stats-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.fiba-boxscore-layout {
  gap: 14px;
}

.fiba-scoreboard-wrap {
  background: #f8fbff;
}

.modal-period-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}

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

.modal-period-table th,
.modal-period-table td {
  border-bottom: 1px solid #e7edf7;
  padding: 8px 10px;
  text-align: center;
}

.modal-period-table th:first-child,
.modal-period-table td:first-child {
  text-align: left;
  min-width: 190px;
}

.modal-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.modal-card h4 {
  margin: 0 0 8px;
}

.planilla-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.planilla-tab {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--ink-1);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;

}

.planilla-tab.active {
  border-color: var(--accent-2);
  background: #ebf5ff;
  color: #0553a3;
}

.planilla-tab:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.boxscore-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.boxscore-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  --boxscore-cell-padding-y: 6px;
  --boxscore-cell-padding-x: 5px;
  --boxscore-cell-font-size: 11px;
  --boxscore-header-font-size: 10px;
  --boxscore-subheader-font-size: 11px;
}

.boxscore-table th,
.boxscore-table td {
  border-bottom: 1px solid #e6edf6;
  padding: var(--boxscore-cell-padding-y) var(--boxscore-cell-padding-x);
  text-align: left;
  font-size: var(--boxscore-cell-font-size);
  white-space: nowrap;
}

.boxscore-table th:not(:first-child):not(:nth-child(2)),
.boxscore-table td:not(:first-child):not(:nth-child(2)) {
  text-align: right;
}

.boxscore-table th {
  background: #f4f8ff;
  color: #4a5f7f;
  font-weight: 800;
}

.boxscore-table thead tr:first-child th {
  text-transform: uppercase;
  font-size: var(--boxscore-header-font-size);
  letter-spacing: 0.2px;
  text-align: right;
}

.boxscore-table thead tr:nth-child(2) th {
  font-size: var(--boxscore-subheader-font-size);
  text-align: right;
}

.boxscore-table td:nth-child(2) {
  font-weight: 700;
}

.game-boxscore-table {
  min-width: 100%;
}

.game-boxscore-table th,
.game-boxscore-table td {
  padding: 5px 4px;
  font-size: 10.5px;
}

.game-boxscore-table thead tr:first-child th,
.game-boxscore-table thead tr:nth-child(2) th {
  font-size: 10px;
}

.team-series-stats-section .boxscore-table {
  min-width: 100%;
}

.team-series-stats-section .boxscore-table th,
.team-series-stats-section .boxscore-table td {
  padding: 5px 4px;
  font-size: 10.5px;
}

.team-series-stats-section .boxscore-table thead tr:first-child th,
.team-series-stats-section .boxscore-table thead tr:nth-child(2) th {
  font-size: 10px;
}

.game-boxscore-table th.game-number-col,
.game-boxscore-table th.game-player-name-col,
.game-boxscore-table td:nth-child(1),
.game-boxscore-table td:nth-child(2),
.team-series-stats-section .boxscore-table th.team-number-col,
.team-series-stats-section .boxscore-table th.team-player-name-col,
.team-series-stats-section .boxscore-table td.team-number-col,
.team-series-stats-section .boxscore-table td.team-player-name-col {
  text-align: left;
}

.game-boxscore-table td:nth-child(2),
.team-series-stats-section .boxscore-table td.team-player-name-col {
  overflow: visible;
  text-overflow: clip;
}

.game-boxscore-table td:nth-child(2) > *,
.team-series-stats-section .boxscore-table td.team-player-name-col > * {
  display: block;
  max-width: 100%;
}

.game-boxscore-table thead th.game-number-col,
.game-boxscore-table thead th.game-player-name-col,
.team-series-stats-section .boxscore-table thead th.team-number-col,
.team-series-stats-section .boxscore-table thead th.team-player-name-col {
  text-align: left;
}

.game-boxscore-table thead tr:first-child th[colspan],
.team-series-stats-section .boxscore-table thead tr:first-child th[colspan] {
  text-align: center;
}

.game-boxscore-table thead tr:first-child th[rowspan="2"]:not(.game-number-col):not(.game-player-name-col),
.team-series-stats-section .boxscore-table thead tr:first-child th:not(.team-number-col):not(.team-player-name-col),
.game-boxscore-table thead tr:nth-child(2) th,
.team-series-stats-section .boxscore-table thead tr:nth-child(2) th,
.game-boxscore-table .boxscore-total-row td:not(:first-child),
.team-series-stats-section .boxscore-table tfoot td:not(:first-child) {
  text-align: right;
}

.game-boxscore-table col.game-col-number {
  width: var(--game-number-col-width, 42px);
}

.game-boxscore-table col.game-col-player {
  width: var(--game-player-col-width, 180px);
}

.game-boxscore-table col.game-col-min {
  width: 64px;
}

.game-boxscore-table col.game-col-stat {
  width: calc((100% - var(--game-number-col-width, 42px) - var(--game-player-col-width, 180px) - 64px) / 20);
}

.team-series-stats-section .boxscore-table col.team-col-number {
  width: var(--team-number-col-width, 40px);
}

.team-series-stats-section .boxscore-table col.team-col-player {
  width: var(--team-player-col-width, 210px);
}

.team-series-stats-section .boxscore-table col.team-col-stat {
  width: calc((100% - var(--team-number-col-width, 40px) - var(--team-player-col-width, 210px)) / 11);
}

@media (max-width: 960px) {
  .boxscore-table {
    --boxscore-cell-padding-y: 4px;
    --boxscore-cell-padding-x: 3px;
    --boxscore-cell-font-size: 10px;
    --boxscore-header-font-size: 9px;
    --boxscore-subheader-font-size: 9.5px;
  }

  .boxscore-table-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .game-boxscore-table {
    min-width: calc(var(--game-number-col-width, 42px) + var(--game-player-col-width, 180px) + 64px + (20 * 44px));
  }

  .game-boxscore-table col.game-col-min,
  .game-boxscore-table col.game-col-stat {
    width: 44px;
  }

  .team-series-stats-section .boxscore-table {
    min-width: calc(var(--team-number-col-width, 40px) + var(--team-player-col-width, 210px) + (11 * 44px));
  }

  .team-series-stats-section .boxscore-table col.team-col-stat {
    width: 44px;
  }

  .game-boxscore-table thead th.game-number-col,
  .game-boxscore-table tbody td:nth-child(1),
  .team-series-stats-section .boxscore-table thead th.team-number-col,
  .team-series-stats-section .boxscore-table tbody td.team-number-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
  }

  .game-boxscore-table thead th.game-player-name-col,
  .game-boxscore-table tbody td:nth-child(2),
  .team-series-stats-section .boxscore-table thead th.team-player-name-col,
  .team-series-stats-section .boxscore-table tbody td.team-player-name-col {
    position: sticky;
    left: var(--game-number-col-width, 42px);
    z-index: 3;
    background: #fff;
    box-shadow: 1px 0 0 #e6edf6;
  }

  .game-boxscore-table td:nth-child(2),
  .team-series-stats-section .boxscore-table td.team-player-name-col {
    white-space: normal;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
  }

  .game-boxscore-table td:nth-child(2) .leader-player-link,
  .team-series-stats-section .boxscore-table td.team-player-name-col .leader-player-link {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
  }

  .game-boxscore-table td:nth-child(2) > *:not(.leader-player-link),
  .team-series-stats-section .boxscore-table td.team-player-name-col > *:not(.leader-player-link) {
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
  }

  .game-boxscore-table td:nth-child(2),
  .team-series-stats-section .boxscore-table td.team-player-name-col {
    max-width: var(--game-player-col-width, 180px);
  }

  .team-series-stats-section .boxscore-table td.team-player-name-col {
    max-width: var(--team-player-col-width, 210px);
  }

  .team-series-stats-section .boxscore-table thead th.team-player-name-col,
  .team-series-stats-section .boxscore-table tbody td.team-player-name-col {
    left: var(--team-number-col-width, 40px);
  }

  .game-boxscore-table thead th.game-number-col,
  .game-boxscore-table thead th.game-player-name-col,
  .team-series-stats-section .boxscore-table thead th.team-number-col,
  .team-series-stats-section .boxscore-table thead th.team-player-name-col {
    background: #f4f8ff;
    z-index: 4;
  }
}

.team-player-number-inline {
  color: #7b8ca6;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.team-profile-sort-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0;
  width: 100%;
  text-align: inherit;
  cursor: pointer;
}

@media (max-width: 640px) {
  .boxscore-table {
    --boxscore-cell-font-size: 9.5px;
    --boxscore-header-font-size: 8.5px;
    --boxscore-subheader-font-size: 9px;
  }
}

.boxscore-team-section+.boxscore-team-section {
  margin-top: 16px;
}

.boxscore-summary-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  max-width: 1120px;
}

.boxscore-summary-table-wrap {
  overflow: auto;
}

.boxscore-summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 360px;
  background: #fff;
}

.boxscore-summary-table th,
.boxscore-summary-table td {
  border: 2px solid #2f2f2f;
  padding: 5px 8px;
  font-size: 0.8rem;
  line-height: 1.05;
}

.boxscore-summary-table thead th {
  font-weight: 900;
  text-align: center;
  color: #111827;
  font-size: 0.78rem;
}

.boxscore-summary-table tbody th {
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  font-size: 0.76rem;
}

.boxscore-summary-table tbody td {
  text-align: center;
  font-weight: 700;
  color: #111827;
  font-size: 0.78rem;
}

.boxscore-team-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.boxscore-table td:nth-child(14),
.boxscore-table td:nth-child(15),
.boxscore-table td:nth-child(22),
.boxscore-table td:nth-child(23),
.boxscore-table th:nth-child(14),
.boxscore-table th:nth-child(15),
.boxscore-table th:nth-child(22),
.boxscore-table th:nth-child(23) {
  font-weight: 800;
  color: #0f172a;
}

.boxscore-total-row td {
  background: #f9fbff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "news"
      "active"
      "details"
      "list"
      "standings";
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-row {
    flex-wrap: wrap;
  }

  .header-carousel {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    padding-left: 0;
  }

  .header-carousel-head {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-main-menu {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .refresh-button {
    width: 100%;
  }

  /* Removed grid override to keep single line */
}

@media (max-width: 720px) {
  .details-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .news-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .brand-row {
    flex-direction: column;
    align-items: stretch;
  }

  .active-tournaments-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex-wrap: wrap;
  }

  .active-top-card {
    min-width: 0;
  }

  .site-header {
    padding-top: 20px;
  }

  .brand-logo {
    width: 150px;
    max-width: 100%;
  }

  .site-header h1 {
    white-space: normal;
  }

  .header-main-menu {
    gap: 6px;
  }

  .header-carousel {
    width: 100%;
    max-width: 100%;
  }

  .header-carousel-head {
    justify-content: space-between;
    align-items: flex-start;
  }

  .header-games-track {
    grid-auto-columns: max-content;
    width: 100%;
    max-width: 100%;
  }

  /* Removed grid override to keep single line */

  .leaders-grid {
    grid-template-columns: 1fr;
  }

  .standings-split {
    grid-template-columns: 1fr;
  }

  .news-carousel-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .news-archive-head {
    flex-direction: column;
  }

  .news-archive-list {
    grid-template-columns: 1fr;
  }

  .game-item {
    grid-template-columns: 1fr;
  }

  .player-profile-head {
    flex-direction: column;
    align-items: stretch;
  }

  .player-profile-actions {
    margin-left: 0;
    justify-content: flex-end;
  }

  .player-profile-summary {
    grid-template-columns: 1fr;
  }

  .player-profile-summary-info {
    grid-template-columns: 1fr;
  }

  .player-compare-controls {
    grid-template-columns: 1fr;
  }

  .player-profile-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-apps-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-hero {
    grid-template-columns: 1fr;
  }

  .modal-stats-layout {
    grid-template-columns: 1fr;
  }

  .boxscore-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .planilla-tabs {
    flex-wrap: wrap;
  }

}

@media (max-width: 520px) {
  .boxscore-summary-section {
    grid-template-columns: 1fr;
  }

  .active-tournaments-top {
    grid-template-columns: 1fr;
  }
}

.team-page-link,
.team-profile-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.team-page-link:hover,
.team-profile-link-btn:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.playbyplay-page {
  width: 100%;
  max-width: var(--layout-max, 1280px);
  margin: 16px auto;
  padding: 16px 20px 24px;
  font-family: "Barlow Condensed", "Oswald", "Segoe UI", sans-serif;
}

.playbyplay-page.has-selected-game #pbpListControls {
  display: none;
}

.playbyplay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.playbyplay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.playbyplay-control-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
  margin: 20px;
}

.playbyplay-control-row select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.playbyplay-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.playbyplay-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.playbyplay-detail-meta-wrap {
  margin-left: auto;
  text-align: right;
  min-width: 0;
}

.playbyplay-detail-title-hidden {
  display: none;
}

.playbyplay-detail-head .detail-meta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  color: #64748b;
  white-space: nowrap;
}

.pbp-settings-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
}

.playbyplay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 10px;
  margin-top: 8px;
}

.playbyplay-matches h3,
.playbyplay-detail h3 {
  margin-top: 0;
}

.playbyplay-detail {
  grid-column: 1 / -1;
  width: 100%;
  padding: 14px;
  box-sizing: border-box;
}

.playbyplay-matches.full-width {
  grid-column: 1 / -1;
}

.playbyplay-match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playbyplay-match-grid-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.playbyplay-match-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.playbyplay-grid-search {
  min-width: min(320px, 100%);
  flex: 1 1 280px;
  border: 1px solid #d7e5f8;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: #0f172a;
  background: #fff;
}

.playbyplay-grid-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.playbyplay-match-grid-wrap {
  overflow: auto;
  border: 1px solid #d7e5f8;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.playbyplay-match-grid-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.playbyplay-match-grid-table th,
.playbyplay-match-grid-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6eef8;
  text-align: left;
  white-space: nowrap;
}

.playbyplay-match-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
}

.playbyplay-grid-sort {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 800;
  color: #1e3a5f;
  cursor: pointer;
}

.playbyplay-grid-sort.active {
  color: #0b5aa9;
}

.playbyplay-match-filter-row th {
  background: #fff;
}

.playbyplay-grid-filter {
  width: 100%;
  min-width: 110px;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
}

.playbyplay-match-row {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.playbyplay-match-row:hover,
.playbyplay-match-row:focus-visible {
  background: #f8fbff;
  outline: none;
}

.playbyplay-match-row.active {
  background: rgba(11, 90, 169, 0.08);
}

.playbyplay-match-empty {
  text-align: center !important;
  color: #64748b;
  padding: 18px 12px !important;
}

.playbyplay-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}

.playbyplay-rosters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.playbyplay-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.playbyplay-roster-head h4 {
  margin: 0;
}

.playbyplay-roster-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.playbyplay-roster-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.playbyplay-roster-row {
  display: grid;
  grid-template-columns: 64px 40px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.playbyplay-roster-row input,
.playbyplay-roster-row select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d7e5f8;
  font-weight: 700;
}

.pbp-player-name {
  width: 100%;
  min-width: 260px;
}

.pbp-starter-toggle {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.playbyplay-roster-remove {
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 800;
}

.playbyplay-event-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.playbyplay-event-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.playbyplay-event-form select,
.playbyplay-event-form input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d7e5f8;
  font-weight: 700;
}

.playbyplay-event-note {
  grid-column: span 2;
}

.playbyplay-event-log {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  max-height: var(--pbp-log-max-height, 520px);
  overflow: auto;
  padding-right: 4px;
}

.playbyplay-court {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.court-surface {
  position: relative;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 94 / 50;
  border-radius: 12px;
  border: 1px solid #d7e5f8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 49.5%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.4) 50.5%),
    repeating-linear-gradient(90deg, #f2c89b 0, #f2c89b 22px, #e8b989 22px, #e8b989 44px);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  cursor: crosshair;
}

.court-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.court-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0b5aa9;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(11, 90, 169, 0.35);
}

.playbyplay-event-item {
  border: 1px solid #9ca3af;
  border-radius: 2px;
  padding: 0;
  display: grid;
  gap: 0;
  background: #f5f5f5;
}

.playbyplay-event-item strong {
  font-size: 12px;
}

.pbp-actions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: stretch;
}

.pbp-actions-left,
.pbp-actions-right {
  background: #f4f6f8;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 12px;
  min-height: 100%;
}

.pbp-actions-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.pbp-actions-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.pbp-actions-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pbp-actions-title h4 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.4px;
}

.pbp-actions-status {
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.pbp-event-form-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pbp-event-form-compact label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pbp-event-form-compact select,
.pbp-event-form-compact input {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  padding: 8px 10px;
  font-weight: 700;
}

.pbp-primary-action {
  grid-column: span 2;
  background: #0f172a;
  color: #fff;
  border: none;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.pbp-scoreboard {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.pbp-scorebox {
  background: #fff;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 110px;
}

.pbp-scorebox-wide {
  background: #101827;
  color: #fff;
  border-radius: 10px;
  padding: 10px;
  width: 250px;
  justify-self: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  min-height: 110px;
  height: 100%;
}

.pbp-score-team-btn {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none !important;
}

.pbp-scorebox.is-clickable {
  cursor: pointer;
}

.pbp-score-team-btn:hover {
  opacity: 1;
  transform: none;
  text-decoration: none !important;
}

.pbp-scorebox.is-clickable:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(15, 23, 42, 0.08);
}

.pbp-score-team-media {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e5f8;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
}

.pbp-score-team-logo,
.pbp-score-team-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.pbp-score-team-logo {
  object-fit: cover;
}

.pbp-score-team-fallback {
  display: grid;
  place-items: center;
  background: #1f3b64;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.pbp-score-team-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.05;
  font-weight: 500;
  text-transform: uppercase;
}

.pbp-score-value {
  margin: 0;
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
  color: #0f172a;
}

.pbp-scorebox-home .pbp-score-value {
  order: 2;
}

.pbp-scorebox-home .pbp-score-team-btn {
  order: 1;
}

.pbp-scorebox-away .pbp-score-team-btn {
  order: 2;
  justify-content: flex-end;
}

.pbp-scorebox-away .pbp-score-value {
  order: 1;
}

.pbp-scorebox-away .pbp-score-team-name {
  text-align: right;
}

.pbp-clock-top {
  background: #1f2937;
  color: #fff;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 6px;
  text-align: center;
}

.pbp-clock-main {
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  gap: 6px;
  align-items: center;
  justify-items: center;
}

.pbp-clock-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
}

.pbp-clock-value {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
}

.pbp-clock-toggle {
  background: #dc2626;
  border: none;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}


.pbp-clock-shortcut {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.pbp-clock-arrow {
  background: #1f2937;
  color: #fff;
  border: 1px solid #374151;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.pbp-court-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 10px;
}

.pbp-log-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pbp-log-all {
  border: 1px solid #c8d6ee;
  background: #f5f7fb;
  color: #1f3b66;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.pbp-event-group.is-clickable {
  cursor: pointer;
}

.pbp-log-all:hover {
  background: #e9f0fb;
}

.pbp-all-modal-panel {
  width: min(720px, calc(100% - 24px));
  max-height: min(82vh, 820px);
  display: flex;
  flex-direction: column;
}

.pbp-substitution-modal-panel {
  width: min(980px, calc(100% - 24px));
  max-height: min(84vh, 860px);
  display: flex;
  flex-direction: column;
}

.pbp-substitution-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  margin-top: 12px;
  border: 1px solid #d6dde8;
  border-radius: 14px;
  overflow: hidden;
  align-items: start;
}

.pbp-substitution-team-column {
  background: #f7f9fc;
  border-right: 1px solid #d6dde8;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
  align-items: start;
  min-height: 100%;
}

.pbp-substitution-team-column:last-child {
  border-right: none;
}

.pbp-substitution-team-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #12223b;
  text-transform: uppercase;
  text-align: center;
}

.pbp-substitution-team-head {
  display: grid;
  gap: 8px;
  align-content: start;
}

.pbp-substitution-multi-btn {
  width: 100%;
}

.pbp-substitution-section {
  display: grid;
  gap: 8px;
  align-content: start;
  width: 100%;
}

.pbp-substitution-section-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.pbp-substitution-oncourt {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  align-items: start;
  min-height: 56px;
}

.pbp-substitution-outgoing,
.pbp-substitution-bench {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  align-items: start;
  align-content: start;
  min-height: 112px;
}

.pbp-substitution-tile {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  text-align: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 52px;
  justify-self: start;
  margin: 0;
}

.pbp-substitution-tile span {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: #0f172a;
}

.pbp-substitution-tile.is-empty {
  opacity: 0.4;
}

.pbp-substitution-tile.is-changed,
.pbp-substitution-tile.is-active {
  border-color: #f97316;
  background: #ff6b1a;
}

.pbp-substitution-tile.is-changed span,
.pbp-substitution-tile.is-active span {
  color: #fff;
}

.pbp-substitution-tile.is-bench {
  background: #bfc5cc;
}

.pbp-substitution-tile.is-outgoing {
  background: #9ca3af;
}

.pbp-substitution-tile.is-outgoing span {
  color: #111827;
}

.pbp-substitution-footer-note {
  margin: 12px 0 0;
  text-align: center;
}

@media (max-width: 900px) {
  .pbp-substitution-layout {
    grid-template-columns: 1fr;
  }

  .pbp-substitution-team-column {
    border-right: none;
    border-bottom: 1px solid #d6dde8;
  }

  .pbp-substitution-team-column:last-child {
    border-bottom: none;
  }

  .pbp-substitution-oncourt {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .pbp-substitution-outgoing,
  .pbp-substitution-bench {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pbp-substitution-oncourt {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pbp-substitution-outgoing,
  .pbp-substitution-bench {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pbp-all-modal-body {
  margin-top: 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}

.pbp-all-period {
  background: #f7f9fc;
  border: 1px solid #d6dde8;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.pbp-all-period h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #12223b;
}

.pbp-court-board {
  width: 100%;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  gap: 6px;
  align-items: start;
}

.pbp-side-panel {
  background: #f3f5f7;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.pbp-side-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pbp-side-btn {
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 0;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.4px;
}

.pbp-side-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: stretch;
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
}

.pbp-side-stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.4px;
}

.pbp-side-right-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-right: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.pbp-side-left-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-left: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  color: #334155;
}

.pbp-side-btn.is-active,
.pbp-side-action.is-active,
.pbp-player-btn.is-active,
.pbp-side-player.is-active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1e40af;
}

.pbp-side-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #c0c5cd;
}

.pbp-side-player {
  background: #d9dce1;
  border: 1px solid #c0c5cd;
  border-radius: 0;
  padding: 12px 0;
  font-weight: 800;
  min-height: 44px;
}

.pbp-side-player.is-empty {
  color: transparent;
}

.pbp-side-player.is-bench,
.pbp-side-player.is-coach {
  background: #cfd3d8;
  font-size: 11px;
  letter-spacing: 0.4px;
  grid-column: 1 / -1;
}


.pbp-side-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pbp-side-right .pbp-side-body {
  grid-template-areas: "actions players";
}

.pbp-side-right .pbp-side-actions {
  grid-area: actions;
}

.pbp-side-right .pbp-side-players {
  grid-area: players;
}

.pbp-side-actions {
  display: grid;
  gap: 8px;
}

.pbp-side-action {
  background: #cfd3d8;
  border: 1px solid #bcc2ca;
  border-radius: 8px;
  padding: 14px 0;
  font-weight: 900;
  letter-spacing: 0.4px;
  font-size: 12px;
}

.pbp-side-action:disabled,
.pbp-side-btn:disabled,
.pbp-side-player:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
  box-shadow: none;
}

@media (max-width: 1100px) {
  .pbp-court-board {
    grid-template-columns: 1fr;
  }
}

.pbp-court-players {
  width: 100%;
  max-width: 820px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.pbp-court-side {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.pbp-court-side-right {
  justify-items: stretch;
}

.pbp-action-label {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90%);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

.pbp-action-cancel {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  pointer-events: auto;
}

.pbp-court-secondary-action {
  flex: 0 0 auto;
  border: none;
  background: #374151;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: auto;
}

.pbp-court-secondary-action.is-active {
  background: #f59e0b;
  color: #111827;
}

.pbp-court-secondary-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pbp-below-court-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pbp-shot-toggle {
  min-width: 140px;
  position: relative;
  padding-left: 44px;
  text-align: left;
}

.pbp-shot-toggle::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid currentColor;
  transform: translateY(-50%);
  opacity: 0.75;
}

.pbp-shot-toggle.active::before {
  background: currentColor;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.pbp-player-btn {
  background: #f1f5f9;
  border: 1px solid #d7e5f8;
  border-radius: 6px;
  padding: 0;
  aspect-ratio: 1 / 1;
  font-weight: 800;
  cursor: pointer;
}

.pbp-player-btn-home {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #0f172a;
}

.pbp-player-btn-away {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #0f172a;
}

.pbp-player-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.pbp-player-btn.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.pbp-court-wrap .detail-meta {
  margin: 0;
}

.pbp-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pbp-log-head h4 {
  margin: 0;
}

.pbp-log-status {
  background: #16a34a;
  color: #fff;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.4px;
}

.pbp-event-log .playbyplay-event-item {
  background: #f5f5f5;
  border: 1px solid #9ca3af;
}

.pbp-rebound-wrap {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #eef2f7;
  border: 1px solid #d6dde8;
}

.pbp-rebound-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.pbp-rebound-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pbp-rebound-controls select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  background: #fff;
  font-weight: 700;
}

.pbp-followup-wrap {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #eef2f7;
  border: 1px solid #d6dde8;
  width: 100%;
  max-width: 820px;
}

.pbp-followup-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pbp-followup-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pbp-followup-controls select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  background: #fff;
  font-weight: 700;
}

.pbp-skip {
  background: #cbd5e1;
}

.pbp-event-group.is-clickable {
  cursor: pointer;
}

.pbp-event-group.is-clickable:hover {
  background: #eceff3;
}

.pbp-edit-actions {
  display: flex;
  gap: 10px;
}

.pbp-edit-shot-section {
  grid-column: 1 / -1;
  border: 1px solid #dbe6f5;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #f9fbff, #f2f7ff);
}

.pbp-edit-shot-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pbp-edit-shot-heading,
.pbp-edit-shot-field label {
  display: block;
  margin: 0 0 10px;
  font-weight: 800;
  color: #22334d;
}

.pbp-edit-shot-court {
  position: relative;
  width: 100%;
  aspect-ratio: 47 / 50;
  border-radius: 16px;
  border: 1px solid #d7e5f8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 49.5%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.22) 50.5%),
    repeating-linear-gradient(90deg, #f2c89b 0, #f2c89b 18px, #e8b989 18px, #e8b989 36px);
  cursor: crosshair;
  overflow: hidden;
}

.pbp-edit-shot-court-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pbp-edit-shot-options {
  display: grid;
  gap: 16px;
}

.pbp-edit-shot-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pbp-edit-shot-result-actions .planilla-tab {
  min-width: 120px;
  justify-content: center;
}

.pbp-edit-shot-field {
  display: grid;
  gap: 10px;
}

.pbp-edit-shot-field select {
  width: 100%;
}

.pbp-jumpball-winner-block {
  grid-column: 1 / -1;
}

.pbp-jumpball-layout {
  display: grid;
  gap: 18px;
}

.pbp-jumpball-players-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pbp-jumpball-team-column {
  display: grid;
  gap: 12px;
}

.pbp-jumpball-players {
  grid-template-columns: repeat(5, minmax(46px, 1fr));
}

.pbp-jumpball-team-pick {
  width: 72px;
  min-height: 54px;
  border: 1px solid #d7e5f8;
  background: #fff;
  color: #1e293b;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
}

.pbp-jumpball-team-pick.is-selected {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.pbp-jumpball-team-pick-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.pbp-jumpball-winner-grid {
  display: grid;
  gap: 12px;
}

.pbp-jumpball-winner-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pbp-jumpball-winner-row .pbp-jumpball-players {
  grid-template-columns: repeat(5, minmax(46px, 1fr));
}

.pbp-jumpball-winner-player-wrap {
  display: grid;
  gap: 12px;
}

.pbp-jumpball-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
}

@media (max-width: 720px) {
  .pbp-jumpball-players-grid {
    grid-template-columns: 1fr;
  }

  .pbp-jumpball-players {
    grid-template-columns: repeat(5, minmax(40px, 1fr));
  }

  .pbp-jumpball-winner-row {
    grid-template-columns: 1fr;
  }

  .pbp-jumpball-team-pick {
    width: 100%;
  }
}

.pbp-delete-action {
  border: 1px solid #dc2626;
  background: #fff1f2;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.pbp-event-group {
  position: relative;
  font-size: 11px;
  display: flex;
  flex-direction: column;
}

.pbp-event-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid #d1d5db;
  background: #fafafa;
}

.pbp-event-head-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
}

.pbp-event-period {
  font-size: 12px;
  font-weight: 800;
  color: #1d4ed8;
}

.pbp-event-time {
  position: static;
  font-size: 11px;
  color: #334155;
}

.pbp-event-score {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.2;
}

.pbp-event-head-side {
  display: flex;
  align-items: stretch;
}

.pbp-event-status {
  width: 30px;
  background: #2ca01c;
  border-left: 1px solid #9ca3af;
  position: relative;
}

.pbp-event-status::before {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.pbp-event-title {
  padding: 6px 10px 1px;
  font-size: 12px;
  line-height: 1.05;
  font-weight: 500;
  color: #111827;
  text-transform: uppercase;
}

.pbp-event-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
}

.pbp-event-main {
  font-weight: 500;
}

.pbp-event-player {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  color: #111827;
}

.pbp-event-player-number {
  flex: 0 0 auto;
}

.pbp-event-player-name {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbp-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: #64748b;
  letter-spacing: 0;
  margin-right: 2px;
  min-width: 58px;
  height: 18px;
  line-height: 18px;
  text-transform: uppercase;
}

.pbp-action-badge-home {
  background: #f97316;
}

.pbp-action-badge-away {
  background: #f97316;
}

.pbp-action-badge-neutral {
  background: #9ca3af;
  color: #111827;
}

.pbp-action-badge-sub-out {
  background: #ef4444;
  color: #fff;
}

.pbp-action-badge-sub-in {
  background: #22c55e;
  color: #fff;
}

.pbp-event-note {
  font-size: 11px;
  color: #64748b;
  padding: 1px 10px 0;
}

.pbp-free-game-form {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
}

.pbp-free-game-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pbp-free-game-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

.pbp-free-game-grid input {
  width: 100%;
  min-width: 0;
}

.pbp-free-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-btn.danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

.playbyplay-row-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
}

.pbp-related {
  margin-top: 0;
  padding-bottom: 4px;
  margin-top: auto;
  padding-top: 0;
  border-top: none;
  display: grid;
  gap: 1px;
}

.pbp-related-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
  font-size: 11px;
  color: #334155;
}

.pbp-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
}

@media (max-width: 1100px) {
  .pbp-actions-layout {
    grid-template-columns: 1fr;
  }

  .pbp-actions-right,
  .pbp-actions-left {
    order: 1;
  }

  .pbp-actions-center {
    order: 0;
  }
}

/* Keep play-by-play layout consistent across screen sizes */
.playbyplay-detail .pbp-actions-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.playbyplay-detail .pbp-court-board {
  grid-template-columns: 180px minmax(0, 1fr) 180px;
}

.pbp-edit-modal-panel {
  width: min(560px, calc(100% - 24px));
}

.pbp-edit-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.pbp-edit-form {
  margin-top: 6px;
}

@media (max-width: 980px) {
  .playbyplay-grid {
    grid-template-columns: 1fr;
  }

  .playbyplay-rosters {
    grid-template-columns: 1fr;
  }

  .playbyplay-event-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playbyplay-event-note {
    grid-column: span 2;
  }
}

.leader-team.team-page-link {
  font-size: 11px;
  display: inline-block;
  margin-top: 2px;
}

.player-reinforcement-tag {
  color: #b45309;
  font-weight: 800;
}

#teamProfilePage .details-grid {
  margin-top: 20px;
}

#teamProfilePage .card {
  min-height: 300px;
}

.team-profile-page .player-profile-head {
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.team-profile-page .player-profile-head h2 {
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 6px 0 8px;
}

.team-profile-page .detail-meta {
  font-size: 1.25rem;
  color: #4a6486;
}

.team-profile-hero {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid rgba(117, 154, 198, 0.22);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88) 44%),
    linear-gradient(135deg, rgba(232, 242, 255, 0.88), rgba(246, 250, 255, 0.98));
  box-shadow: 0 22px 50px rgba(37, 61, 99, 0.12);
}

.team-profile-hero-media {
  align-self: center;
}

.team-profile-logo-shell {
  width: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(231, 240, 252, 0.92));
  border: 1px solid rgba(138, 168, 207, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 30px rgba(73, 108, 154, 0.12);
}

.team-profile-logo {
  width: 190px;
  height: 190px;
  border-radius: 28px;
  background: transparent;
  border: 0;
  box-shadow: 0 18px 35px rgba(19, 34, 62, 0.12);
}

.team-profile-hero-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  align-content: stretch;
}

.team-profile-kicker,
.team-profile-record-title,
.team-profile-meta-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
  color: #6c83a3;
}

.team-profile-full-name {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #10203c;
  text-transform: uppercase;
}

.team-profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.team-profile-tournament-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b66ff, #0ea5e9);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(27, 102, 255, 0.24);
}

.team-profile-record-block {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(191, 210, 235, 0.8);
}

.team-profile-series-record {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-profile-series-record p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #eef5ff;
  color: #163559;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(188, 208, 235, 0.72);
}

.team-roster-stats-card {
  margin-top: 14px;
}

.team-roster-stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.team-roster-stats-head h4 {
  margin: 0;
}

.team-series-stats-section+.team-series-stats-section {
  margin-top: 18px;
}

.team-series-stats-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #1e3a5f;
}

.team-profile-pager-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-profile-pager-inline .day-nav-label {
  margin: 0;
  text-align: center;
  flex: 1;
}

@media (max-width: 900px) {
  .team-profile-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .team-profile-logo-shell {
    min-height: 200px;
  }

  .team-profile-logo {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 640px) {
  .team-profile-page .player-profile-head {
    align-items: flex-start;
    gap: 14px;
  }

  .team-profile-page .detail-meta {
    font-size: 1rem;
  }

  .team-profile-hero {
    padding: 18px;
    gap: 18px;
  }

  .team-profile-logo-shell {
    min-height: 170px;
    border-radius: 24px;
  }

  .team-profile-logo {
    width: 136px;
    height: 136px;
  }

  .team-profile-full-name {
    font-size: 2rem;
  }
}

/* ─── Foul Type Modal ─────────────────────────────── */
.pbp-foul-modal-panel {
  width: min(700px, calc(100% - 24px));
}

.pbp-foul-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pbp-shot-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pbp-missed-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.pbp-court-overlay {
  position: absolute;
  inset: 72px 18px auto 18px;
  z-index: 12;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#pbpMissedShotModal.hidden {
  display: none;
}

.pbp-court-overlay-panel {
  width: min(720px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 16px 18px 14px;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.pbp-shot-type-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pbp-foul-btn {
  background: #5c6068;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 18px 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.pbp-foul-btn:hover:not(:disabled) {
  background: #3e4249;
  transform: scale(1.02);
}

.pbp-foul-btn.is-shooting {
  background: #111;
  color: #fff;
}

.pbp-foul-btn.is-shooting:hover {
  background: #000;
}

.pbp-foul-btn.is-inactive {
  background: #b8bcc4;
  color: #fff;
}

.pbp-foul-btn.is-placeholder {
  background: transparent;
  border: none;
  cursor: default;
  pointer-events: none;
}

/* ─── Free Throw Modal ───────────────────────────── */
.pbp-freethrow-modal-panel {
  width: min(860px, calc(100% - 24px));
}

.pbp-freethrow-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: start;
}

.pbp-freethrow-left {
  border-right: 1px solid #e2e8f0;
  padding-right: 20px;
}

.pbp-freethrow-center {
  min-width: 0;
}

.pbp-freethrow-right {
  border-left: 1px solid #e2e8f0;
  padding-left: 20px;
}

.pbp-freethrow-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1f2937;
}

.pbp-freethrow-committed-info {
  margin-bottom: 6px;
}

.pbp-freethrow-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.pbp-freethrow-player-btn {
  min-width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 2px solid #d6dde8;
  background: #f7f9fc;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
  padding: 0 8px;
}

.pbp-freethrow-player-btn.is-selected {
  background: #f97316;
  border-color: #ea580c;
  color: #fff;
}

.pbp-freethrow-player-btn.is-committed {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.pbp-freethrow-player-btn.is-sub {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.pbp-freethrow-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.pbp-freethrow-opt {
  background: #fff;
  color: #111827;
  border: 2px solid #d6dde8;
  border-radius: 8px;
  padding: 14px 6px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
}

.pbp-freethrow-opt:last-child {
  grid-column: span 1;
}

.pbp-freethrow-opt:hover {
  background: #f8fafc;
}

.pbp-freethrow-opt.is-selected {
  background: #fff7ed;
  color: #c2410c;
  border-color: #f97316;
}

.pbp-freethrow-attempts {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.pbp-freethrow-attempt {
  display: grid;
  gap: 8px;
}

.pbp-freethrow-attempt-label {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.pbp-freethrow-attempt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pbp-freethrow-result-btn {
  min-height: 66px;
  border-radius: 10px;
  border: 2px solid #d6dde8;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.pbp-freethrow-result-btn.is-made {
  border-color: #4caf50;
  color: #1f7a1f;
}

.pbp-freethrow-result-btn.is-missed {
  border-color: #ef4444;
  color: #b91c1c;
}

.pbp-freethrow-result-btn.is-selected.is-made {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 2px #4caf50;
}

.pbp-freethrow-result-btn.is-selected.is-missed {
  background: #fef2f2;
  box-shadow: inset 0 0 0 2px #ef4444;
}

@media (max-width: 680px) {
  .pbp-freethrow-layout {
    grid-template-columns: 1fr;
  }

  .pbp-freethrow-left {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 0;
    padding-bottom: 16px;
  }

  .pbp-freethrow-right {
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding-left: 0;
    padding-top: 16px;
  }

  .pbp-foul-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pbp-shot-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pbp-missed-shot-grid {
    grid-template-columns: 1fr;
  }

  .pbp-court-overlay {
    inset: 56px 10px auto 10px;
  }

  .teams-browser {
    grid-template-columns: 1fr;
  }
}
