: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;
}

.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: flex-start;
  margin-bottom: 14px;
}

.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: 4px 0;
  font-size: 2rem;
}

.player-profile-summary {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-bottom: 12px;
}

.player-profile-summary-media {
  display: grid;
  place-items: center;
}

.player-profile-photo,
.player-profile-photo-fallback {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  border: 1px solid #dbe6f5;
  background: #f7fbff;
}

.player-profile-photo {
  object-fit: cover;
}

.player-profile-photo-fallback {
  display: grid;
  place-items: center;
  color: #3f5f84;
  font-size: 1.8rem;
  font-weight: 900;
}

.player-profile-summary-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

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

.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: 360px minmax(0, 1fr);
}

.modal-stats-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-compare-row {
  display: grid;
  grid-template-columns: 40px 42px 1fr 1fr 40px;
  align-items: center;
  gap: 8px;
}

.stat-label {
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  font-size: 12px;
}

.stat-side-value {
  font-weight: 700;
  text-align: center;
  color: #475569;
}

.stat-bar-side {
  background: #eef2f8;
  border-radius: 999px;
  height: 8px;
  position: relative;
  overflow: hidden;
}

.stat-bar-side span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #ff8a3d;
}

.stat-bar-side.away span {
  background: #0ea5cf;
  margin-left: auto;
}

.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;
  min-width: 1200px;
  width: 100%;
}

.boxscore-table th,
.boxscore-table td {
  border-bottom: 1px solid #e6edf6;
  padding: 7px 8px;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

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

.boxscore-table thead tr:first-child th {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-align: center;
}

.boxscore-table thead tr:nth-child(2) th {
  font-size: 12px;
  text-align: center;
}

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

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

.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 th:nth-child(14),
.boxscore-table th:nth-child(15),
.boxscore-table th:nth-child(22) {
  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"
      "list"
      "details"
      "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;
  }

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

  .brand-logo {
    width: 150px;
  }

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

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

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

  /* Removed grid override to keep single line */

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

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

  .news-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .news-card {
    flex-basis: auto;
  }

  .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;
  }

  .stat-compare-row {
    grid-template-columns: 36px 40px 1fr 1fr 36px;
    gap: 6px;
  }

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

}

.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: 0 auto;
  padding: 12px 16px 20px;
  font-family: "Barlow Condensed", "Oswald", "Segoe UI", sans-serif;
}

.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%;
}

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

.playbyplay-match-card {
  width: 100%;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.playbyplay-match-card.active {
  border-color: #0b5aa9;
  box-shadow: 0 6px 16px rgba(11, 90, 169, 0.15);
}

.playbyplay-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #1e3a5f;
}

.playbyplay-match-body {
  font-weight: 800;
  color: #0f172a;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.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-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;
  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: start;
}

.pbp-actions-left,
.pbp-actions-right {
  background: #f4f6f8;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 12px;
  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: center;
}

.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;
  align-self: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.pbp-score-team-btn {
  width: auto;
  min-width: 0;
  height: auto;
  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-score-team-btn:hover {
  opacity: 1;
  transform: none;
  text-decoration: none !important;
}

.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;
}

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

.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-clock-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  order: -1;
}

.pbp-quarter-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 800;
}

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

.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-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-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-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: 14px;
  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-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-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-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-event-note {
  font-size: 11px;
  color: #64748b;
  padding: 1px 10px 0;
}

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

.pbp-related-row {
  font-size: 11px;
  color: #334155;
}

.pbp-sub-row {
  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-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;
}

/* ─── 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-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);
  }
}
