:root {
  --bg: #061a2d;
  --bg2: #0b2b46;
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: #ffffff;
  --text: #071f35;
  --muted: #6d7b88;
  --line: rgba(7, 31, 53, 0.10);
  --blue: #66a6c9;
  --blue-dark: #123957;
  --navy: #071f35;
  --danger: #c83232;
  --ok: #16875d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  --radius: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(102, 166, 201, 0.55), transparent 35%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  color: var(--text);
}

body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

button, input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 900px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 14px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  background: white;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
}

.brand-subtitle {
  font-size: 12px;
  opacity: 0.78;
  margin-top: 2px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: white;
  font-size: 22px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.icon-button:active { transform: scale(.96); }

.hero-card,
.team-hero,
.card,
.notice {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  min-height: 380px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 36px 22px;
}

.hero-card h1 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 8vw, 44px);
  line-height: 1.05;
}

.hero-card p {
  margin: 0 0 22px;
  max-width: 440px;
  color: var(--muted);
}

.ball-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(102,166,201,.16);
  font-size: 38px;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(7,31,53,.12);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  padding: 14px 16px;
  margin-bottom: 12px;
  color: #7a4a00;
  background: #fff5dd;
}

.team-hero {
  padding: 18px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.team-hero-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-logo {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  object-fit: contain;
  background: white;
  padding: 6px;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.team-hero h1 {
  margin: 0;
  font-size: clamp(24px, 7vw, 40px);
  line-height: 1.05;
}

.muted,
.small-muted {
  color: var(--muted);
}

.small-muted {
  font-size: 13px;
  line-height: 1.35;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
  overflow-x: auto;
}

.tab {
  border: 0;
  border-radius: 16px;
  padding: 12px 8px;
  color: white;
  background: rgba(255,255,255,.13);
  cursor: pointer;
  white-space: nowrap;
}

.tab.active {
  color: var(--navy);
  background: white;
  font-weight: 800;
}

.tab-page { display: none; }
.tab-page.active { display: block; }

.grid {
  display: grid;
  gap: 12px;
}

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

.card {
  padding: 16px;
  margin-bottom: 12px;
}

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

.card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(102,166,201,.16);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.primary-button,
.ghost-button,
.text-button {
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  color: white;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(7,31,53,.18);
}

.primary-button.compact {
  padding: 12px 14px;
  border-radius: 14px;
}

.ghost-button {
  color: var(--navy);
  background: rgba(7,31,53,.07);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 800;
  white-space: nowrap;
}

.text-button {
  background: transparent;
  color: var(--blue-dark);
  font-weight: 800;
}

.primary-button:active,
.ghost-button:active,
.text-button:active {
  transform: scale(.98);
}

.toggles {
  display: grid;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child { border-bottom: 0; }

.toggle-row span {
  font-weight: 750;
}

input[type="checkbox"] {
  appearance: none;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #cfd8df;
  position: relative;
  cursor: pointer;
  transition: background .18s ease;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
  transition: transform .18s ease;
}

input[type="checkbox"]:checked {
  background: var(--blue-dark);
}

input[type="checkbox"]:checked::after {
  transform: translateX(22px);
}

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

.stat-grid div {
  border-radius: 16px;
  background: rgba(7,31,53,.05);
  padding: 12px;
}

.stat-grid b {
  display: block;
  font-size: 24px;
}

.stat-grid span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.62);
}

.item-main {
  min-width: 0;
  flex: 1;
}

.item-title {
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.item-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.score {
  min-width: 54px;
  text-align: center;
  font-weight: 900;
  color: var(--navy);
}

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

.player-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-radius: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
}

.player-photo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 15px;
  object-fit: cover;
  background: rgba(7,31,53,.08);
}

.player-name {
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.player-role {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 86vh;
  overflow: auto;
  background: #f7fbfe;
  border-radius: 28px 28px 0 0;
  padding: 10px 14px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,.25);
}


.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.search-box input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: white;
  color: var(--text);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(102,166,201,.9);
  box-shadow: 0 0 0 4px rgba(102,166,201,.18);
}

.search-results {
  padding-top: 10px;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 18px;
  color: white;
  background: rgba(7,31,53,.96);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 750;
}

.hidden { display: none !important; }

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

  .team-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-hero .ghost-button {
    width: 100%;
  }

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

  .tabs {
    grid-template-columns: repeat(4, max-content);
  }

  .tab {
    padding-left: 14px;
    padding-right: 14px;
  }
}


.debug-panel {
  margin-bottom: 12px;
  background: #071f35;
  color: #ffffff;
}

.debug-panel h2 {
  color: #ffffff;
}

.debug-panel pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  color: #d8edf8;
}


/* V3 fast/stable refinements */
.team-logo,
.player-photo {
  background: #ffffff url('./assets/ofb-logo.jpg') center/70% no-repeat;
}

.score {
  white-space: nowrap;
}

.item {
  min-height: 72px;
}


/* V7 tabs */
.tabs {
  grid-template-columns: repeat(6, max-content);
}

.full-width {
  width: 100%;
  margin-top: 14px;
}

.mini-team-summary {
  display: grid;
  gap: 10px;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.summary-value {
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.season-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(7,31,53,.05);
  margin-bottom: 12px;
}

.season-title {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.season-form {
  max-width: 180px;
  text-align: right;
  font-size: 13px;
  font-weight: 900;
  color: var(--blue-dark);
  overflow-wrap: anywhere;
}

.season-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 720px) {
  .tabs {
    grid-template-columns: repeat(6, max-content);
  }

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

  .season-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .season-form {
    text-align: left;
    max-width: 100%;
  }
}


/* V8 league selection */
.team-card-box { margin-top: 12px; }

.league-options {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.league-option {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.74);
  color: var(--text);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.league-option.active {
  border-color: rgba(18,57,87,.55);
  background: rgba(102,166,201,.18);
  font-weight: 900;
}

.team-card-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  padding: 5px;
  border: 1px solid var(--line);
}

.subscribe-line { margin-top: 10px; }

.primary-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}


/* FAST UX V10 */
.match-section { display: grid; gap: 10px; }
.match-section-title {
  margin: 8px 2px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.toggle-row span { display: grid; gap: 2px; }
.toggle-row span small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}
.form-dots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.form-dot {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(7,31,53,.08);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 950;
}


/* V10.2 subscribed league under team name */
.team-league {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 6px 0 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(102,166,201,.16);
  color: var(--blue-dark);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}


/* V10.4 team change warning */
.warning-box {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(200, 50, 50, 0.08);
  color: #7a4a00;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}


/* V10.7 perceived speed improvements */
.button-loading,
.button-loading:disabled {
  opacity: .72;
  cursor: wait;
}

.search-box input:disabled {
  opacity: .72;
}

.league-choice-title {
  margin: 14px 2px 8px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}


/* V10.12 mobile subscribe tap stability */
.subscribe-line {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.subscribe-line[aria-disabled="true"] {
  opacity: .62;
}


/* V10.15 stable element-level mobile taps */
#subscribeSelectedLeagueBtn,
.league-option,
[data-open-team-card] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#subscribeSelectedLeagueBtn {
  position: relative;
  z-index: 3;
}


/* V10.15 selected league clarity */
.league-option { min-height: 48px; }
.league-option:active, #subscribeSelectedLeagueBtn:active { transform: scale(.99); }

/* OFB FIX: stable squad/player cards */
.squad-grid,
.players-grid {
  align-items: stretch !important;
}

.player-card {
  min-height: 148px !important;
  height: auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  overflow: hidden !important;
}

.player-card img {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 50% !important;
  flex: 0 0 58px !important;
  display: block !important;
  margin: 0 auto 6px auto !important;
  background: rgba(255,255,255,0.08) !important;
}

.player-card b {
  width: 100% !important;
  min-height: 32px !important;
  line-height: 1.15 !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.player-card span {
  width: 100% !important;
  min-height: 18px !important;
  line-height: 1.15 !important;
  text-align: center !important;
  display: block !important;
  overflow-wrap: anywhere !important;
}

/* OFB FIX: bigger team logo without fallback bleeding */
.team-logo,
.team-card-logo,
.header-team-logo,
.profile-team-logo {
  width: 86px !important;
  height: 86px !important;
  min-width: 86px !important;
  min-height: 86px !important;
  max-width: 86px !important;
  max-height: 86px !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 22px !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  background: rgba(255,255,255,0.10) !important;
  display: block !important;
  flex: 0 0 86px !important;
}

/* If team logo is inside main header/card */
.team-card-head {
  align-items: center !important;
  gap: 14px !important;
}

.team-card-head .team-card-logo {
  width: 78px !important;
  height: 78px !important;
  min-width: 78px !important;
  min-height: 78px !important;
  flex: 0 0 78px !important;
}

/* Prevent OFB fallback logo from visually sitting under real team logo */
.team-logo-wrap,
.team-logo-box,
.team-avatar,
.team-card-logo-wrap {
  background: transparent !important;
  overflow: hidden !important;
}

/* OFB standings tab */
.standings-table {
  margin-top: 12px;
  overflow-x: auto;
}

.standings-header,
.standings-row {
  display: grid;
  grid-template-columns: 30px minmax(130px, 1fr) 30px 30px 30px 30px 54px 44px 38px;
  gap: 6px;
  align-items: center;
  min-width: 520px;
}

.standings-header {
  padding: 8px 10px;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.standings-row {
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  margin-bottom: 6px;
  font-size: 12px;
}

.standings-row.active {
  background: rgba(30,144,255,0.20);
  outline: 1px solid rgba(255,255,255,0.18);
}

.standings-rank {
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}

.standings-team {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
}

.standings-team img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 7px;
  background: rgba(255,255,255,0.10);
}

.standings-team b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-form {
  grid-column: 2;
  color: rgba(255,255,255,0.52);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* OFB standings polish: softer table labels */
.standings-header span {
  color: rgba(255,255,255,0.42) !important;
  font-weight: 600 !important;
}

.standings-rank {
  color: rgba(255,255,255,0.46) !important;
  font-weight: 600 !important;
}

.standings-row span:not(.standings-team):not(.standings-rank) {
  color: rgba(255,255,255,0.72);
}

.standings-row span:last-child,
.standings-row span:last-child b {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 800 !important;
}

/* OFB standings color reset: readable, not pure white */
.standings-header span {
  color: rgba(255,255,255,0.58) !important;
  font-weight: 700 !important;
}

.standings-rank {
  color: rgba(255,255,255,0.62) !important;
  font-weight: 700 !important;
}

.standings-row span {
  color: rgba(255,255,255,0.78) !important;
}

.standings-team b {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 750 !important;
}

.standings-row span:last-child,
.standings-row span:last-child b {
  color: rgba(255,255,255,0.86) !important;
  font-weight: 800 !important;
}

.standings-form {
  color: rgba(255,255,255,0.56) !important;
}

/* OFB standings final: black text */
.standings-header span,
.standings-row span,
.standings-row b,
.standings-team b,
.standings-rank,
.standings-form {
  color: #111111 !important;
}

.standings-row span:last-child,
.standings-row span:last-child b {
  color: #111111 !important;
  font-weight: 800 !important;
}

.standings-row {
  background: rgba(255,255,255,0.82) !important;
}

.standings-row.active {
  background: rgba(255,255,255,0.95) !important;
  outline: 2px solid rgba(0,0,0,0.18) !important;
}

.standings-header {
  background: rgba(255,255,255,0.70) !important;
  border-radius: 12px !important;
}

/* OFB standings final spacing + subscribed team highlight */
.standings-header {
  margin-bottom: 8px !important;
}

.standings-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}

.standings-row {
  margin-bottom: 0 !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}

.standings-row.active {
  background: #fff4c2 !important;
  border: 2px solid #f0b429 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18) !important;
  transform: scale(1.01);
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #111111 !important;
  font-weight: 900 !important;
}

.standings-row.active .standings-team::after {
  content: "моя команда";
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.10);
  color: #111111;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* OFB standings active team: darker neutral highlight */
.standings-row.active {
  background: #d8d8d8 !important;
  border: 2px solid rgba(0,0,0,0.22) !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #000000 !important;
  font-weight: 900 !important;
}

.standings-row.active .standings-team::after {
  background: rgba(0,0,0,0.12) !important;
  color: #111111 !important;
}

/* OFB standings active team: light neutral highlight, no border */
.standings-row.active {
  background: #eeeeee !important;
  border: 1px solid transparent !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #111111 !important;
  font-weight: 850 !important;
}

.standings-row.active .standings-team::after {
  background: rgba(0,0,0,0.07) !important;
  color: #222222 !important;
}

/* OFB standings active team: same table style, slightly darker row */
.standings-row {
  background: rgba(255,255,255,0.82) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.standings-row.active {
  background: rgba(255,255,255,0.68) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team::after {
  display: none !important;
  content: none !important;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #111111 !important;
  font-weight: 800 !important;
}

/* OFB standings active team: darker row + label */
.standings-row.active {
  background: rgba(255,255,255,0.52) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team::after {
  display: inline-block !important;
  content: "моя команда" !important;
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.12);
  color: #111111 !important;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #111111 !important;
  font-weight: 850 !important;
}

/* OFB standings active team: soft blue transparent highlight */
.standings-row.active {
  background: rgba(64, 145, 255, 0.22) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team::after {
  display: inline-block !important;
  content: "моя команда" !important;
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(64, 145, 255, 0.18) !important;
  color: #0b1f3a !important;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #0b1f3a !important;
  font-weight: 850 !important;
}

/* OFB standings active team: soft blue transparent highlight */
.standings-row.active {
  background: rgba(64, 145, 255, 0.22) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team::after {
  display: inline-block !important;
  content: "моя команда" !important;
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(64, 145, 255, 0.18) !important;
  color: #0b1f3a !important;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #0b1f3a !important;
  font-weight: 850 !important;
}

/* OFB tabs: one horizontal row */
.tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 8px !important;
  padding-bottom: 6px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

.tabs::-webkit-scrollbar {
  display: none !important;
}

.tab {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  min-width: auto !important;
}

/* OFB coach tab */
.coach-box {
  margin-top: 8px;
}

.coach-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: start;
}

.coach-photo {
  width: 86px;
  height: 86px;
  min-width: 86px;
  min-height: 86px;
  object-fit: cover;
  object-position: center;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  display: block;
}

.coach-info {
  min-width: 0;
}

.coach-label {
  color: rgba(255,255,255,0.52);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.coach-name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 5px;
}

.coach-meta {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  margin-bottom: 10px;
}

.coach-facts {
  display: grid;
  gap: 7px;
}

.coach-facts div {
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(255,255,255,0.06);
}

.coach-facts span {
  display: block;
  color: rgba(255,255,255,0.48);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.coach-facts b {
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-weight: 750;
}

.coach-trophies-box {
  display: grid;
  gap: 8px;
}

.coach-trophy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(255,255,255,0.06);
}

.coach-trophy-main {
  min-width: 0;
}

.coach-trophy-main b {
  display: block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
}

.coach-trophy-main span {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  margin-top: 2px;
}

.coach-trophy-place {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(64,145,255,0.18);
  color: rgba(255,255,255,0.90);
  font-size: 11px;
  font-weight: 850;
}

@media (max-width: 420px) {
  .coach-card {
    grid-template-columns: 74px 1fr;
    gap: 12px;
  }

  .coach-photo {
    width: 74px;
    height: 74px;
    min-width: 74px;
    min-height: 74px;
    border-radius: 19px;
  }

  .coach-name {
    font-size: 18px;
  }
}

/* OFB standings: return to main app text colors */
.standings-header {
  background: rgba(255,255,255,0.06) !important;
}

.standings-row {
  background: rgba(255,255,255,0.075) !important;
}

.standings-header span {
  color: rgba(255,255,255,0.58) !important;
  font-weight: 700 !important;
}

.standings-row span,
.standings-row b,
.standings-team b,
.standings-rank,
.standings-form {
  color: rgba(255,255,255,0.86) !important;
}

.standings-rank {
  color: rgba(255,255,255,0.62) !important;
}

.standings-form {
  color: rgba(255,255,255,0.54) !important;
}

.standings-row.active {
  background: rgba(64,145,255,0.22) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: rgba(255,255,255,0.94) !important;
}

.standings-row.active .standings-team::after {
  display: inline-block !important;
  content: "моя команда" !important;
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.86) !important;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* OFB coach career */
.coach-section-title {
  margin: 12px 0 8px;
  color: rgba(255,255,255,0.62);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coach-career-row {
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

.coach-career-main b {
  display: block;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
}

.coach-career-main span {
  display: block;
  color: rgba(255,255,255,0.56);
  font-size: 11px;
  margin-top: 3px;
}

/* OFB final: standings + coach in season-card style */
.standings-header {
  background: rgba(255,255,255,0.72) !important;
  border-radius: 14px !important;
  margin-bottom: 8px !important;
}

.standings-row {
  background: rgba(255,255,255,0.82) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.standings-header span,
.standings-row span,
.standings-row b,
.standings-team b,
.standings-rank,
.standings-form {
  color: #071f35 !important;
}

.standings-header span {
  font-weight: 800 !important;
  opacity: 0.72;
}

.standings-rank {
  font-weight: 800 !important;
  opacity: 0.72;
}

.standings-form {
  opacity: 0.62;
}

.standings-row.active {
  background: rgba(64,145,255,0.20) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.standings-row.active .standings-team b,
.standings-row.active .standings-rank,
.standings-row.active span,
.standings-row.active b {
  color: #071f35 !important;
}

.standings-row.active .standings-team::after {
  display: inline-block !important;
  content: "моя команда" !important;
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(7,31,53,0.10) !important;
  color: #071f35 !important;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Coach tab in same readable blue style */
.coach-card,
.coach-facts div,
.coach-career-row,
.coach-trophy-row {
  background: rgba(255,255,255,0.82) !important;
}

.coach-label,
.coach-section-title {
  color: rgba(7,31,53,0.62) !important;
}

.coach-name,
.coach-info b,
.coach-facts b,
.coach-career-main b,
.coach-trophy-main b {
  color: #071f35 !important;
}

.coach-meta,
.coach-facts span,
.coach-career-main span,
.coach-trophy-main span {
  color: rgba(7,31,53,0.64) !important;
}

.coach-trophy-place {
  background: rgba(64,145,255,0.18) !important;
  color: #071f35 !important;
}

.coach-photo {
  background: rgba(255,255,255,0.90) !important;
}

/* OFB coach card rounded container */
.coach-card {
  border-radius: 18px !important;
  padding: 14px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.coach-photo {
  border-radius: 18px !important;
}

/* OFB player stats in squad */
.player-stat-card {
  cursor: pointer;
}

.player-mini-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.player-mini-stats div {
  padding: 5px 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.72);
  text-align: center;
}

.player-mini-stats b {
  display: block;
  min-height: auto !important;
  color: #071f35 !important;
  font-size: 12px;
  line-height: 1;
}

.player-mini-stats span {
  min-height: auto !important;
  color: rgba(7,31,53,0.62) !important;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.player-rating {
  margin-top: 5px;
  color: rgba(255,255,255,0.64);
  font-size: 10px;
  font-weight: 750;
}

.player-modal.hidden {
  display: none !important;
}

.player-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.player-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.56);
  backdrop-filter: blur(6px);
}

.player-modal-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 16px;
  border-radius: 24px;
  background: #071f35;
  box-shadow: 0 18px 50px rgba(0,0,0,0.38);
}

.player-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 24px;
  line-height: 1;
}

.player-detail-head {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
  padding-right: 34px;
}

.player-detail-head img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
}

.player-detail-label {
  color: rgba(255,255,255,0.56);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.player-detail-head h2 {
  margin: 3px 0 4px;
  color: white;
  font-size: 20px;
  line-height: 1.12;
}

.player-detail-head p {
  margin: 2px 0;
  color: rgba(255,255,255,0.68);
  font-size: 12px;
}

.player-detail-section-title {
  margin: 16px 0 8px;
  color: rgba(255,255,255,0.62);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.player-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.player-detail-grid div {
  padding: 10px;
  border-radius: 15px;
  background: rgba(255,255,255,0.08);
}

.player-detail-grid span {
  display: block;
  color: rgba(255,255,255,0.54);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.player-detail-grid b {
  color: white;
  font-size: 14px;
  font-weight: 850;
}

body.modal-open {
  overflow: hidden;
}

/* OFB goalkeeper player stats */
.goalkeeper-card .player-mini-stats div {
  background: rgba(64,145,255,0.18) !important;
}

.goalkeeper-card .player-rating {
  color: rgba(64,145,255,0.92) !important;
}

/* OFB player stat rectangles: blue style for all players */
.player-mini-stats div {
  background: rgba(64,145,255,0.18) !important;
}

.player-mini-stats b {
  color: #071f35 !important;
}

.player-mini-stats span {
  color: rgba(7,31,53,0.68) !important;
}

.player-rating {
  color: rgba(64,145,255,0.92) !important;
}
