* {
  box-sizing: border-box;
}

:root {
  --bg: #fffafd;
  --bg-2: #f5efff;
  --panel: rgba(255, 255, 255, 0.72);
  --text: #2d2638;
  --muted: #7b7188;
  --line: rgba(105, 77, 133, 0.14);
  --pink: #f5bedf;
  --purple: #cdbaff;
  --blue: #c8ddff;
  --accent: #9c7ddd;
  --gradient: linear-gradient(135deg, #f6c2e2 0%, #d7c5ff 55%, #c4dcff 100%);
  --max: 1180px;
}

html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  font-family: Inter, Arial, sans-serif;
  min-height: 100vh;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}

.orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(35px);
  opacity: 0.5;
}
.orb-one {
  width: 390px;
  height: 390px;
  right: -100px;
  top: 80px;
  background: var(--pink);
}
.orb-two {
  width: 450px;
  height: 450px;
  left: -160px;
  top: 620px;
  background: var(--purple);
}
.orb-three {
  width: 300px;
  height: 300px;
  right: 12%;
  bottom: 30px;
  background: var(--blue);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 253, 0.75);
  backdrop-filter: blur(20px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  border-radius: 15px 6px 15px 6px;
  background: var(--gradient);
  font-family: Outfit, sans-serif;
  font-weight: 800;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-family: Outfit, sans-serif;
}
.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 2px;
}
.site-header nav {
  display: flex;
  gap: 7px;
}
.site-header nav a {
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.9rem;
}
.site-header nav a:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
}
.nav-admin {
  border: 1px solid var(--line);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: auto;
  padding: 92px 0;
}
.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin: 18px 0 24px;
  font:
    800 clamp(3.5rem, 7vw, 7rem)/0.92 Outfit,
    sans-serif;
  letter-spacing: -0.055em;
}
h1 span {
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
h2 {
  margin: 8px 0 0;
  font:
    800 clamp(2.1rem, 4vw, 3.3rem)/1 Outfit,
    sans-serif;
  letter-spacing: -0.035em;
}
.hero p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 620px;
}
.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-actions {
  margin-top: 32px;
}

.button {
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
}
.button.primary {
  color: white;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(160, 125, 205, 0.2);
}
.button.secondary {
  background: rgba(255, 255, 255, 0.68);
}
.button.full {
  width: 100%;
}

.glass,
.content-card,
.schedule-card,
.ranking-wrap {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 55px rgba(125, 95, 150, 0.1);
}
.hero-panel {
  padding: 25px;
  border-radius: 28px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.stat-grid article {
  padding: 18px 12px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}
.stat-grid strong,
.stat-grid span {
  display: block;
}
.stat-grid strong {
  font:
    800 1.6rem Outfit,
    sans-serif;
}
.stat-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 4px;
}
.connection-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.section-heading.split input,
#leagueSearch {
  width: min(300px, 100%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 255, 255, 0.68);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.content-card {
  min-height: 275px;
  padding: 22px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
}
.content-card h3 {
  margin: 10px 0 8px;
}
.content-card p {
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}
.logo-frame {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  padding: 11px;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 25px rgba(125, 95, 150, 0.09);
  font:
    800 0.8rem Outfit,
    sans-serif;
}
.logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.live-card {
  border-color: rgba(239, 93, 137, 0.25);
}
.live-pill {
  align-self: flex-start;
  padding: 6px 9px;
  color: white;
  background: #ef5d89;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.schedule-list {
  display: grid;
  gap: 13px;
}
.schedule-card {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 20px;
  border-radius: 19px;
}
.schedule-card > div:first-child {
  border-right: 1px solid var(--line);
}
.schedule-card strong,
.schedule-card span {
  display: block;
}
.schedule-card span,
.schedule-card p {
  color: var(--muted);
  font-size: 0.84rem;
}
.schedule-card p {
  margin: 5px 0 0;
}

.ranking-wrap {
  border-radius: 20px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 17px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}
.hidden {
  display: none !important;
}

footer {
  padding: 35px max(24px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
}
footer strong {
  color: var(--text);
  margin-right: 12px;
  font-family: Outfit, sans-serif;
}

.admin-body {
  display: grid;
  place-items: center;
}
.admin-shell {
  width: min(1250px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-card {
  width: min(470px, 100%);
  padding: 30px;
  border-radius: 28px;
}
.admin-brand {
  margin-bottom: 42px;
}
.login-copy h1 {
  font-size: 3.5rem;
  margin-bottom: 12px;
}
.login-copy p {
  color: var(--muted);
  line-height: 1.65;
}
.admin-form label {
  display: block;
  margin-bottom: 15px;
  font-size: 0.82rem;
  font-weight: 700;
}
.admin-form input {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
}
.form-message {
  color: #bd4d70;
  margin: 14px 0 0;
  font-size: 0.85rem;
}

.dashboard {
  width: 100%;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  padding: 20px 0;
}
.admin-sidebar {
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.admin-nav {
  display: grid;
  gap: 8px;
  margin: 38px 0 auto;
}
.admin-nav button {
  text-align: left;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.admin-nav button.active {
  color: white;
  background: var(--gradient);
}
.admin-nav span {
  float: right;
  font-size: 0.65rem;
  opacity: 0.75;
}
.admin-main {
  padding: 24px;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}
.admin-email {
  color: var(--muted);
  font-size: 0.83rem;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dashboard-stats article {
  padding: 22px;
  border-radius: 19px;
}
.dashboard-stats strong,
.dashboard-stats span {
  display: block;
}
.dashboard-stats strong {
  font:
    800 1.8rem Outfit,
    sans-serif;
}
.dashboard-stats span {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.dashboard-panel {
  margin-top: 20px;
  padding: 27px;
  border-radius: 22px;
}
.dashboard-panel h3 {
  font-size: 1.5rem;
  margin: 10px 0;
}
.dashboard-panel p {
  max-width: 700px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 65px;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    min-height: auto;
  }
  .admin-nav {
    margin: 25px 0;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .site-header nav a:not(.nav-admin) {
    display: none;
  }
  .section {
    width: min(var(--max), calc(100% - 28px));
    padding: 72px 0;
  }
  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }
  .stat-grid,
  .card-grid,
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .schedule-card {
    grid-template-columns: 1fr;
  }
  .schedule-card > div:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  .admin-main {
    padding: 8px;
  }
  .admin-topbar {
    align-items: start;
    flex-direction: column;
  }
}

/* PHASE 2 */
.button.danger {
  color: #b74769;
  background: rgba(239, 93, 137, 0.08);
  border-color: rgba(239, 93, 137, 0.22);
}
.admin-tab {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 18px;
  align-items: start;
}
.management-form,
.management-list {
  padding: 24px;
  border-radius: 22px;
}
.form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}
.form-heading h3 {
  margin: 7px 0 0;
  font-size: 1.45rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid label {
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
}
.form-grid input,
.form-grid textarea {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
  resize: vertical;
}
.form-grid input:focus,
.form-grid textarea:focus {
  border-color: rgba(156, 125, 221, 0.5);
  box-shadow: 0 0 0 3px rgba(205, 186, 255, 0.18);
}
.full-span {
  grid-column: 1/-1;
}
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
}
.checkbox-label input {
  width: auto;
  margin: 0;
}
.asset-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.asset-preview img {
  width: 110px;
  height: 75px;
  object-fit: contain;
  padding: 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.admin-list-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.admin-list-row:last-child {
  border-bottom: 0;
}
.admin-list-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  font:
    800 0.7rem Outfit,
    sans-serif;
  overflow: hidden;
}
.admin-list-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}
.admin-list-copy strong,
.admin-list-copy span {
  display: block;
}
.admin-list-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 3px;
}
.admin-row-actions {
  display: flex;
  gap: 7px;
}
.admin-row-actions .button {
  min-height: 37px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.league-page {
  padding-top: 55px;
}
.league-hero {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  padding: 34px;
  border-radius: 30px;
  background-image:
    linear-gradient(
      110deg,
      rgba(255, 250, 253, 0.94),
      rgba(255, 250, 253, 0.66)
    ),
    var(--league-banner);
  background-size: cover;
  background-position: center;
}
.league-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(247, 194, 226, 0.17),
    rgba(196, 220, 255, 0.16)
  );
}
.league-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 30px;
  min-height: 330px;
}
.league-page-logo {
  display: grid;
  place-items: center;
  width: 145px;
  height: 145px;
  padding: 15px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 45px rgba(125, 95, 150, 0.14);
  font:
    800 1.1rem Outfit,
    sans-serif;
}
.league-page-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.league-hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  margin: 12px 0 15px;
}
.league-hero p {
  max-width: 690px;
  color: var(--muted);
  line-height: 1.7;
}
.league-detail-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 18px;
  margin-top: 18px;
}
.detail-panel {
  padding: 24px;
  border-radius: 22px;
}
.large-position {
  margin: 15px 0;
  font:
    800 4rem Outfit,
    sans-serif;
}
.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.mini-stats span {
  padding: 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.75rem;
}
.mini-stats strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 2px;
}
.league-race-list {
  margin-top: 13px;
}
.league-race-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.league-race-row:last-child {
  border-bottom: 0;
}
.league-race-row strong,
.league-race-row small {
  display: block;
}
.league-race-row small,
.muted {
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 950px) {
  .management-layout,
  .league-detail-grid {
    grid-template-columns: 1fr;
  }
  .league-hero-content {
    grid-template-columns: 1fr;
  }
  .league-page-logo {
    width: 115px;
    height: 115px;
  }
}
@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full-span {
    grid-column: auto;
  }
  .admin-list-row {
    grid-template-columns: 48px 1fr;
  }
  .admin-row-actions {
    grid-column: 2;
  }
  .league-hero {
    padding: 22px;
  }
  .league-hero-content {
    min-height: 300px;
  }
  .league-race-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* PHASE 3 */
.form-grid select {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  outline: 0;
}

.race-admin-row {
  grid-template-columns: 74px 1fr auto;
}

.race-date-badge {
  display: grid;
  place-items: center;
  width: 70px;
  min-height: 56px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(216, 198, 255, 0.28);
  text-align: center;
}

.race-date-badge strong,
.race-date-badge span {
  display: block;
}

.race-date-badge strong {
  font-family: Outfit, sans-serif;
  font-size: 0.86rem;
}

.race-date-badge span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.race-admin-row .live-pill {
  display: inline-block;
  margin-right: 6px;
  vertical-align: 1px;
}

@media (max-width: 760px) {
  .race-admin-row {
    grid-template-columns: 64px 1fr;
  }

  .race-admin-row .admin-row-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }
}

/* AUTOMATIC TIMEZONE + MOTION UPGRADE */
body {
  animation: pageFade 0.55s ease both;
}

@keyframes pageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.orb-one {
  animation: orbDriftOne 13s ease-in-out infinite alternate;
}

.orb-two {
  animation: orbDriftTwo 16s ease-in-out infinite alternate;
}

.orb-three {
  animation: orbDriftThree 19s ease-in-out infinite alternate;
}

@keyframes orbDriftOne {
  to {
    transform: translate(-45px, 35px) scale(1.08);
  }
}

@keyframes orbDriftTwo {
  to {
    transform: translate(60px, -35px) scale(0.94);
  }
}

@keyframes orbDriftThree {
  to {
    transform: translate(-30px, -45px) scale(1.1);
  }
}

.hero > div:first-child {
  animation: heroCopyIn 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-panel {
  animation: heroPanelIn 0.85s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes heroCopyIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroPanelIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.content-card,
.schedule-card,
.detail-panel,
.ranking-wrap,
.stat-grid article {
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.content-card:hover,
.schedule-card:hover,
.detail-panel:hover,
.stat-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 65px rgba(125, 95, 150, 0.16);
  border-color: rgba(205, 186, 255, 0.72);
}

.button {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-115%);
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.38),
    transparent 70%
  );
  transition: transform 0.55s ease;
}

.button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.button:hover::after {
  transform: translateX(115%);
}

.logo-frame img,
.league-page-logo img {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.content-card:hover .logo-frame img {
  transform: scale(1.08) rotate(-2deg);
}

.reveal-card,
.section-heading,
.reveal-row {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.58s ease var(--reveal-delay, 0ms),
    transform 0.58s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms);
}

.reveal-card.is-visible,
.section-heading.is-visible,
.reveal-row.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-row {
  transition-delay: var(--row-delay, 0ms);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
  animation: livePulse 1.5s ease-out infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.local-time-line,
.viewer-zone-note {
  margin: 8px 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
}

.original-time {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

.hero-reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.logo-float {
  animation: logoFloat 4.8s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-8px) rotate(-1deg);
  }
}

.admin-sidebar {
  animation: sidebarIn 0.55s ease both;
}

.admin-main {
  animation: adminMainIn 0.65s 0.05s ease both;
}

@keyframes sidebarIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes adminMainIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* PHASE 4 — RANKINGS + CINEMATIC SCROLL */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #f3a9d4, #b99cf6, #9fc8ff);
  box-shadow: 0 2px 14px rgba(174, 132, 225, 0.45);
  pointer-events: none;
}

.site-header nav a {
  position: relative;
}

.site-header nav a::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  border-radius: 99px;
  background: var(--gradient);
  transition: transform 0.3s ease;
}

.site-header nav a.active-section::before {
  transform: scaleX(1);
}

.scroll-scene {
  position: relative;
  transition:
    filter 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.8s ease;
}

.scroll-scene:not(.scene-active) {
  opacity: 0.72;
  transform: scale(0.985);
  filter: saturate(0.86);
}

.scroll-scene.scene-active {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1);
}

.scroll-scene::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  right: -170px;
  top: 12%;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(216, 198, 255, 0.28),
    transparent 68%
  );
  transform: translateY(80px) scale(0.75);
  transition:
    opacity 0.9s ease,
    transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.scroll-scene.scene-active::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section-heading h2 {
  overflow: hidden;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  margin-top: 12px;
  border-radius: 99px;
  background: var(--gradient);
  transform: translateX(-120%);
  transition: transform 0.7s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section-heading.is-visible h2::after,
.scroll-scene.scene-active .section-heading h2::after {
  transform: translateX(0);
}

.content-card,
.schedule-card,
.detail-panel {
  transform-style: preserve-3d;
}

.content-card:hover,
.schedule-card:hover,
.detail-panel:hover {
  transform: translateY(-7px) perspective(900px) rotateX(1.5deg);
}

.ranking-admin-row {
  grid-template-columns: 64px 1fr auto;
}

.ranking-position-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: white;
  background: var(--gradient);
  font:
    800 1rem Outfit,
    sans-serif;
  box-shadow: 0 10px 24px rgba(156, 125, 221, 0.18);
}

.ranking-wrap tbody tr {
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.ranking-wrap tbody tr:hover {
  background: rgba(216, 198, 255, 0.15);
  transform: translateX(4px);
}

.ranking-wrap tbody tr:nth-child(1) td:first-child strong {
  color: #b68a00;
}

.ranking-wrap tbody tr:nth-child(2) td:first-child strong {
  color: #7d8796;
}

.ranking-wrap tbody tr:nth-child(3) td:first-child strong {
  color: #a86845;
}

@media (max-width: 760px) {
  .ranking-admin-row {
    grid-template-columns: 58px 1fr;
  }

  .ranking-admin-row .admin-row-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .scroll-scene:not(.scene-active) {
    transform: none;
    opacity: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-scene,
  .scroll-scene::before {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* PHASE 5 — TIER RANKINGS */
.ranking-wrap {
  overflow: hidden;
}

.ranking-wrap table {
  border-collapse: separate;
  border-spacing: 0 10px;
  padding: 10px;
}

.ranking-wrap thead th {
  border-bottom: 0;
}

.ranking-row td {
  border-top: 1px solid rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.54);
}

.ranking-row td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px 0 0 18px;
}

.ranking-row td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 0 18px 18px 0;
}

.ranking-position-cell {
  width: 90px;
  text-align: center;
}

.ranking-position-cell strong {
  font:
    800 1.3rem Outfit,
    sans-serif;
}

.ranking-league-cell {
  position: relative;
  min-width: 380px;
  overflow: hidden;
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.93),
      rgba(255, 255, 255, 0.72)
    ),
    var(--ranking-banner);
  background-size: cover;
  background-position: center;
}

.ranking-league-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(246, 194, 226, 0.16),
      rgba(196, 220, 255, 0.12)
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}

.ranking-league-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ranking-league-logo {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(125, 95, 150, 0.12);
  overflow: hidden;
  font:
    800 0.72rem Outfit,
    sans-serif;
}

.ranking-league-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ranking-league-content strong,
.ranking-league-content small {
  display: block;
}

.ranking-league-content strong {
  font-size: 1rem;
}

.ranking-league-content small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.ranking-tier-cell {
  width: 150px;
  text-align: center;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font:
    800 0.76rem Outfit,
    sans-serif;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(125, 95, 150, 0.1);
}

.tier-s {
  color: #fff;
  background: linear-gradient(135deg, #f09bc9, #9c7ddd);
  border-color: rgba(156, 125, 221, 0.28);
}

.tier-a {
  color: #5d3d79;
  background: linear-gradient(135deg, #efd6ff, #d6c3ff);
  border-color: rgba(156, 125, 221, 0.2);
}

.tier-b {
  color: #3e5f84;
  background: linear-gradient(135deg, #dbeaff, #bdd8ff);
  border-color: rgba(111, 156, 211, 0.2);
}

.tier-c {
  color: #725768;
  background: linear-gradient(135deg, #f6e1ec, #ead9e7);
  border-color: rgba(160, 119, 145, 0.18);
}

.ranking-row:hover .ranking-league-logo {
  transform: scale(1.06) rotate(-1deg);
}

.ranking-league-logo {
  transition: transform 0.25s ease;
}

.league-tier-display {
  margin-top: 15px;
}

.league-tier-display .tier-badge {
  min-width: 120px;
  padding: 11px 18px;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .ranking-league-cell {
    min-width: 250px;
  }

  .ranking-league-logo {
    width: 50px;
    height: 50px;
  }

  .ranking-tier-cell {
    width: 120px;
  }
}

/* PHASE 6 — RICH LEAGUE PAGES */
.league-page {
  padding-top: 55px;
}

.league-profile-hero {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  padding: 36px;
  border-radius: 34px;
  background-image:
    linear-gradient(
      110deg,
      rgba(255, 250, 253, 0.96),
      rgba(255, 250, 253, 0.7)
    ),
    var(--league-banner);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 32px 80px rgba(125, 95, 150, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.league-profile-shade,
.league-profile-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.league-profile-shade {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.18), transparent 42%);
}

.league-profile-glow {
  width: 460px;
  height: 460px;
  inset: auto -140px -190px auto;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.28;
  filter: blur(4px);
  animation: profileGlow 9s ease-in-out infinite alternate;
}

@keyframes profileGlow {
  to {
    transform: translate(-45px, -35px) scale(1.13);
  }
}

.league-profile-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 390px;
}

.league-profile-copy {
  max-width: 760px;
}

.league-profile-copy h1 {
  margin: 13px 0 18px;
  font-size: clamp(3.8rem, 8vw, 7rem);
}

.league-profile-copy p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.league-profile-labels {
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-pill {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(156, 125, 221, 0.18);
  border-radius: 999px;
  color: #7756ae;
  background: rgba(216, 198, 255, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.league-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.league-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.league-social-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.75rem;
  font-weight: 750;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.league-social-links a:hover {
  transform: translateY(-2px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.league-social-links a span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #fff;
  background: var(--gradient);
  font:
    800 0.58rem Outfit,
    sans-serif;
}

.league-page-logo {
  width: 160px;
  height: 160px;
  border-radius: 32px;
}

.league-summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.league-summary-grid article {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
}

.league-summary-grid span,
.league-summary-grid strong {
  display: block;
}

.league-summary-grid span {
  color: var(--muted);
  font-size: 0.72rem;
}

.league-summary-grid strong {
  margin-top: 4px;
  font:
    800 1.45rem Outfit,
    sans-serif;
}

.summary-tier {
  display: inline-flex !important;
  width: fit-content;
  min-width: 47px;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
}

.league-live-section,
.league-events-section,
.league-overview-grid {
  margin-top: 85px;
}

.league-live-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px;
}

.league-live-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(238, 93, 137, 0.22);
  border-radius: 23px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.76),
    rgba(255, 240, 247, 0.7)
  );
  box-shadow: 0 22px 55px rgba(202, 97, 139, 0.11);
}

.league-live-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  bottom: -100px;
  border-radius: 50%;
  background: #f29bc3;
  opacity: 0.18;
}

.live-card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 0.74rem;
}

.league-live-card h3,
.league-live-card p,
.live-card-actions {
  position: relative;
  z-index: 1;
}

.league-live-card h3 {
  margin: 26px 0 7px;
  font-size: 1.55rem;
}

.league-live-card p {
  color: var(--muted);
}

.live-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 21px;
}

.league-overview-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.league-info-panel,
.next-event-panel {
  min-height: 390px;
  padding: 27px;
  border-radius: 24px;
}

.league-info-panel h2,
.next-event-panel h2 {
  margin-top: 12px;
}

.league-tier-showcase {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: fit-content;
  margin: 24px 0;
  padding: 15px 20px;
  border-radius: 18px;
}

.league-tier-showcase span {
  font:
    800 3rem Outfit,
    sans-serif;
}

.league-tier-showcase strong {
  font:
    800 1rem Outfit,
    sans-serif;
}

.league-information-list {
  display: grid;
  gap: 8px;
  margin-top: 23px;
}

.league-information-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.league-information-list div:last-child {
  border-bottom: 0;
}

.league-information-list span {
  color: var(--muted);
  font-size: 0.78rem;
}

.league-information-list strong {
  font-size: 0.82rem;
}

.next-event-date {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 22px 0;
  border-radius: 20px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 14px 32px rgba(156, 125, 221, 0.2);
}

.next-event-date strong,
.next-event-date span {
  display: block;
}

.next-event-date strong {
  font:
    800 2rem Outfit,
    sans-serif;
  line-height: 0.9;
}

.next-event-date span {
  margin-top: 3px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.next-event-panel > p {
  color: var(--muted);
}

.event-countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 23px 0;
}

.event-countdown div {
  padding: 13px 8px;
  border-radius: 14px;
  background: rgba(216, 198, 255, 0.25);
  text-align: center;
}

.event-countdown strong,
.event-countdown span {
  display: block;
}

.event-countdown strong {
  font:
    800 1.25rem Outfit,
    sans-serif;
}

.event-countdown span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.viewer-timezone-chip {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 750;
}

.league-event-timeline {
  position: relative;
  display: grid;
}

.league-event-timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 22px;
  width: 2px;
  background: linear-gradient(var(--pink), var(--purple), var(--blue));
  opacity: 0.6;
}

.league-event-row {
  position: relative;
  display: grid;
  grid-template-columns: 45px 78px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 130px;
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line);
  transition-delay: var(--timeline-delay, 0ms);
}

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

.timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.timeline-marker span {
  width: 14px;
  height: 14px;
  border: 4px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(203, 186, 255, 0.22);
}

.timeline-date {
  text-align: center;
}

.timeline-date strong,
.timeline-date span {
  display: block;
}

.timeline-date strong {
  font:
    800 1.75rem Outfit,
    sans-serif;
}

.timeline-date span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-content h3 {
  margin: 7px 0 5px;
}

.timeline-content p {
  margin-bottom: 4px;
  color: var(--muted);
}

.timeline-content small {
  color: var(--muted);
  font-size: 0.7rem;
}

.compact-empty {
  padding: 23px;
}

.league-page .scroll-scene {
  transform: translateY(calc((1 - var(--scene-progress, 0.8)) * 16px))
    scale(calc(0.985 + var(--scene-progress, 0.8) * 0.015));
}

@media (max-width: 950px) {
  .league-profile-main {
    grid-template-columns: 1fr;
  }

  .league-page-logo {
    width: 125px;
    height: 125px;
  }

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

  .league-live-grid,
  .league-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .league-profile-hero {
    min-height: 620px;
    padding: 23px;
  }

  .league-profile-copy h1 {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

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

  .league-event-row {
    grid-template-columns: 34px 60px 1fr;
    gap: 10px;
    padding-right: 0;
  }

  .league-event-row > .button {
    grid-column: 3;
    width: fit-content;
  }

  .league-event-timeline::before {
    left: 16px;
  }

  .timeline-date strong {
    font-size: 1.4rem;
  }

  .viewer-timezone-chip {
    width: fit-content;
  }
}

/* PHASE 7 — SESSION HISTORY + COUNTDOWN FOR EVERY RACE */
.league-history-section {
  margin-top: 95px;
}

.history-count {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 750;
}

.inline-race-countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.inline-race-countdown span {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 49px;
  padding: 7px 9px;
  border: 1px solid rgba(156, 125, 221, 0.13);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(216, 198, 255, 0.2);
  font-size: 0.67rem;
}

.inline-race-countdown strong {
  color: var(--text);
  font:
    800 0.83rem Outfit,
    sans-serif;
}

.countdown-complete {
  opacity: 0.65;
}

.league-history-list {
  display: grid;
  gap: 12px;
}

.history-race-card {
  display: grid;
  grid-template-columns: 105px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(18px);
  box-shadow: 0 15px 38px rgba(125, 95, 150, 0.08);
  transition-delay: var(--history-delay, 0ms);
}

.history-race-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 23px 52px rgba(125, 95, 150, 0.14);
}

.history-race-date {
  padding-right: 18px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.history-race-date strong,
.history-race-date span {
  display: block;
}

.history-race-date strong {
  font:
    800 2rem Outfit,
    sans-serif;
}

.history-race-date span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
}

.history-race-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.session-complete-pill {
  padding: 5px 8px;
  border: 1px solid rgba(112, 150, 126, 0.18);
  border-radius: 999px;
  color: #557761;
  background: rgba(202, 231, 211, 0.35);
  font-size: 0.62rem;
  font-weight: 800;
}

.history-race-main h3 {
  margin: 9px 0 5px;
}

.history-race-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.history-race-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

@media (max-width: 820px) {
  .history-race-card {
    grid-template-columns: 82px 1fr;
  }

  .history-race-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .history-race-card {
    grid-template-columns: 1fr;
  }

  .history-race-date {
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .history-race-date strong,
  .history-race-date span {
    display: inline-block;
  }

  .history-race-date span {
    margin: 0 0 0 6px;
  }

  .history-race-actions {
    grid-column: 1;
  }

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

/* PHASE 8 — ADMIN DASHBOARD 2.0 */
.admin-sidebar-actions {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

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

.admin-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
}

.admin-toolbar input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
}

.admin-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-filter-button {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.admin-filter-button:hover {
  transform: translateY(-1px);
}

.admin-filter-button.active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.race-status-label {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 6px !important;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.62rem !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-upcoming {
  color: #6b54a0 !important;
  background: rgba(216, 198, 255, 0.34);
}

.status-live {
  color: #b34168 !important;
  background: rgba(247, 181, 211, 0.34);
}

.status-completed {
  color: #557761 !important;
  background: rgba(202, 231, 211, 0.38);
}

.status-archived {
  color: #6d6873 !important;
  background: rgba(211, 206, 216, 0.45);
}

.archived-race-row {
  opacity: 0.76;
  background: rgba(238, 235, 242, 0.35);
}

.race-row-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  transform: translateY(90px);
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #efacd3, #aa8be7);
  box-shadow: 0 16px 38px rgba(125, 95, 150, 0.24);
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1050px) {
  .phase-eight-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .phase-eight-stats {
    grid-template-columns: 1fr;
  }

  .race-row-actions {
    justify-content: flex-start;
  }
}

/* PHASE 9 — HOMEPAGE REDESIGN */
.homepage-body {
  background:
    radial-gradient(
      circle at 80% 3%,
      rgba(246, 190, 222, 0.22),
      transparent 28%
    ),
    radial-gradient(
      circle at 12% 28%,
      rgba(203, 186, 255, 0.2),
      transparent 32%
    ),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.homepage-hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 60px;
  padding-top: 70px;
}

.homepage-hero-copy {
  animation: heroCopyIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.homepage-hero-copy h1 {
  font-size: clamp(4rem, 8vw, 7.6rem);
}

.homepage-hero-copy > p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.04rem;
}

.homepage-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  max-width: 650px;
  margin-top: 29px;
}

.homepage-stat-strip article {
  padding: 15px 12px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.homepage-stat-strip article:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(125, 95, 150, 0.11);
}

.homepage-stat-strip strong,
.homepage-stat-strip span {
  display: block;
}

.homepage-stat-strip strong {
  font:
    800 1.55rem Outfit,
    sans-serif;
}

.homepage-stat-strip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.hero-spotlight {
  min-height: 545px;
  overflow: hidden;
  border-radius: 30px;
  animation: heroPanelIn 0.9s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.spotlight-card {
  position: relative;
  min-height: 545px;
  overflow: hidden;
  padding: 27px;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22),
      rgba(255, 250, 253, 0.93)
    ),
    var(--spotlight-banner);
  background-size: cover;
  background-position: center;
}

.spotlight-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      120deg,
      rgba(247, 194, 226, 0.12),
      rgba(196, 220, 255, 0.14)
    ),
    linear-gradient(0deg, rgba(255, 255, 255, 0.2), transparent 50%);
}

.spotlight-topline,
.spotlight-content,
.spotlight-actions {
  position: relative;
  z-index: 1;
}

.spotlight-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.spotlight-label {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #6e558e;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.spotlight-content {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 185px;
}

.spotlight-logo {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 17px 40px rgba(125, 95, 150, 0.14);
  font:
    800 0.9rem Outfit,
    sans-serif;
}

.spotlight-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.spotlight-content h2 {
  margin: 7px 0 9px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.spotlight-content p {
  color: var(--muted);
  line-height: 1.6;
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.compact-home-section {
  padding-top: 25px;
  padding-bottom: 30px;
}

.next-race-feature {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr auto;
  align-items: center;
  gap: 25px;
  padding: 25px;
  border-radius: 24px;
}

.next-race-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.next-race-logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  font:
    800 0.7rem Outfit,
    sans-serif;
}

.next-race-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.next-race-identity h2 {
  margin: 0 0 4px;
  font-size: 1.55rem;
}

.next-race-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.next-race-time {
  margin-top: 14px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
}

.next-race-time span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.homepage-countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.homepage-countdown div {
  min-width: 68px;
  padding: 13px 8px;
  border-radius: 14px;
  background: rgba(216, 198, 255, 0.25);
  text-align: center;
}

.homepage-countdown strong,
.homepage-countdown span {
  display: block;
}

.homepage-countdown strong {
  font:
    800 1.25rem Outfit,
    sans-serif;
}

.homepage-countdown span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.next-race-actions {
  display: grid;
  gap: 8px;
}

.section-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.homepage-live-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.homepage-live-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 20px 50px rgba(125, 95, 150, 0.11);
  transition-delay: var(--live-delay, 0ms);
}

.homepage-live-visual {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--gradient);
}

.homepage-live-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.homepage-live-card:hover .homepage-live-visual img {
  transform: scale(1.06);
}

.homepage-live-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(45, 38, 56, 0.48), transparent 65%);
}

.homepage-live-visual .live-pill {
  position: absolute;
  left: 18px;
  bottom: 16px;
}

.homepage-live-content {
  padding: 20px;
}

.homepage-live-league {
  display: flex;
  align-items: center;
  gap: 12px;
}

.homepage-live-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font:
    800 0.65rem Outfit,
    sans-serif;
}

.homepage-live-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.homepage-live-league small {
  color: var(--muted);
  font-size: 0.68rem;
}

.homepage-live-league h3 {
  margin: 4px 0 0;
}

.homepage-live-content > p {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 0.8rem;
}

.carousel-controls {
  display: flex;
  gap: 7px;
}

.carousel-controls button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font-size: 1rem;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.carousel-controls button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
}

.featured-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(330px, 410px);
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.featured-slide {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 250, 253, 0.93)
    ),
    var(--featured-banner);
  background-size: cover;
  background-position: center;
  scroll-snap-align: start;
  box-shadow: 0 18px 45px rgba(125, 95, 150, 0.1);
  transition-delay: var(--featured-delay, 0ms);
}

.featured-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(247, 194, 226, 0.1),
    rgba(196, 220, 255, 0.12)
  );
}

.featured-slide-top,
.featured-slide-content {
  position: relative;
  z-index: 1;
}

.featured-slide-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.featured-slide-logo {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  font:
    800 0.75rem Outfit,
    sans-serif;
}

.featured-slide-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.featured-slide-content {
  margin-top: 130px;
}

.featured-slide-content h3 {
  margin: 8px 0;
  font-size: 1.5rem;
}

.featured-slide-content p {
  min-height: 72px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.82rem;
}

.schedule-toolbar {
  display: flex;
  gap: 8px;
  width: min(520px, 100%);
}

.schedule-toolbar input,
.schedule-toolbar select {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  outline: 0;
}

.homepage-schedule-list {
  display: grid;
  gap: 11px;
}

.homepage-schedule-card {
  display: grid;
  grid-template-columns: 72px 58px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(17px);
  box-shadow: 0 14px 36px rgba(125, 95, 150, 0.08);
  transition-delay: var(--schedule-delay, 0ms);
}

.homepage-schedule-date {
  text-align: center;
}

.homepage-schedule-date strong,
.homepage-schedule-date span {
  display: block;
}

.homepage-schedule-date strong {
  font:
    800 1.65rem Outfit,
    sans-serif;
}

.homepage-schedule-date span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.homepage-schedule-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  font:
    800 0.62rem Outfit,
    sans-serif;
}

.homepage-schedule-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.homepage-schedule-main h3 {
  margin: 6px 0 4px;
}

.homepage-schedule-main p,
.homepage-schedule-main small {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.homepage-schedule-main small {
  display: block;
  margin-top: 4px;
}

.schedule-mini-countdown {
  display: flex;
  gap: 5px;
}

.schedule-mini-countdown span {
  min-width: 41px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(216, 198, 255, 0.22);
  font-size: 0.62rem;
  text-align: center;
}

.schedule-mini-countdown strong {
  color: var(--text);
  font:
    800 0.77rem Outfit,
    sans-serif;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

footer div strong,
footer div span {
  display: block;
}

footer div span {
  margin-top: 4px;
}

@media (max-width: 1000px) {
  .homepage-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .homepage-hero-copy {
    padding-top: 40px;
  }

  .next-race-feature {
    grid-template-columns: 1fr;
  }

  .next-race-actions {
    grid-template-columns: repeat(2, minmax(0, 160px));
  }

  .homepage-live-grid {
    grid-template-columns: 1fr;
  }

  .homepage-schedule-card {
    grid-template-columns: 65px 52px 1fr auto;
  }

  .homepage-schedule-card > .button {
    grid-column: 3;
    width: fit-content;
  }
}

@media (max-width: 760px) {
  .menu-button {
    display: block;
  }

  #mainNavigation {
    display: none;
    position: absolute;
    top: 76px;
    right: 14px;
    left: 14px;
    flex-direction: column;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 250, 253, 0.96);
    box-shadow: 0 20px 50px rgba(125, 95, 150, 0.14);
  }

  #mainNavigation.open {
    display: flex;
  }

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

  .spotlight-content {
    grid-template-columns: 1fr;
    margin-top: 140px;
  }

  .spotlight-logo {
    width: 88px;
    height: 88px;
  }

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

  .schedule-toolbar {
    flex-direction: column;
  }

  .homepage-schedule-card {
    grid-template-columns: 58px 1fr;
    align-items: start;
  }

  .homepage-schedule-logo {
    grid-column: 1;
    grid-row: 2;
  }

  .homepage-schedule-main {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .schedule-mini-countdown,
  .homepage-schedule-card > .button {
    grid-column: 2;
  }

  .featured-carousel {
    grid-auto-columns: minmax(285px, 88vw);
  }

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

@media (max-width: 480px) {
  .homepage-hero-copy h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

  .homepage-stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hero-spotlight,
  .spotlight-card {
    min-height: 590px;
  }

  .spotlight-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-race-actions {
    grid-template-columns: 1fr;
  }
}

/* PHASE 10 — INTERACTION & FULL RANKINGS */
.featured-slide,
.league-card,
.content-card {
  position: relative;
  will-change: transform;
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.42s ease,
    border-color 0.42s ease,
    filter 0.42s ease;
}

.featured-slide:hover {
  transform: perspective(1000px) translateY(-14px) rotateX(2.5deg)
    rotateY(-1.5deg) scale(1.018);
  box-shadow:
    0 36px 80px rgba(125, 95, 150, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  border-color: rgba(205, 186, 255, 0.9);
  filter: saturate(1.08);
}

.league-card:hover,
.content-card:hover {
  transform: perspective(900px) translateY(-12px) rotateX(2deg) rotateY(1deg)
    scale(1.012);
  box-shadow:
    0 32px 72px rgba(125, 95, 150, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.82);
  border-color: rgba(205, 186, 255, 0.88);
}

.featured-slide::before,
.league-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0;
  background:
    radial-gradient(
      circle at 25% 15%,
      rgba(255, 255, 255, 0.42),
      transparent 34%
    ),
    linear-gradient(135deg, rgba(247, 194, 226, 0.1), rgba(196, 220, 255, 0.1));
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.featured-slide:hover::before,
.league-card:hover::before {
  opacity: 1;
}

.featured-slide > *,
.league-card > * {
  position: relative;
  z-index: 1;
}

.featured-slide:hover .featured-slide-logo,
.league-card:hover .logo-frame {
  animation: hoverFloatLogo 1.8s ease-in-out infinite;
}

@keyframes hoverFloatLogo {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-7px) rotate(-1.5deg);
  }
}

.rankings-page {
  padding-top: 70px;
}

.rankings-page-hero {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 42px;
  align-items: center;
  min-height: 460px;
  padding: 35px;
  border-radius: 30px;
  overflow: hidden;
}

.rankings-page-hero h1 {
  margin: 15px 0 18px;
  font-size: clamp(3.8rem, 8vw, 6.8rem);
}

.rankings-page-hero p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.75;
}

.rankings-page-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.rankings-page-stats article {
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
}

.rankings-page-stats strong,
.rankings-page-stats span {
  display: block;
}

.rankings-page-stats strong {
  font:
    800 1.8rem Outfit,
    sans-serif;
}

.rankings-page-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.73rem;
}

.rankings-browser {
  margin-top: 85px;
}

.rankings-toolbar {
  display: flex;
  gap: 8px;
  width: min(470px, 100%);
}

.rankings-toolbar input,
.rankings-toolbar select {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  outline: 0;
}

.ranking-league-content {
  text-decoration: none;
}

.ranking-league-content:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-zone {
  position: relative;
  display: grid !important;
  gap: 5px;
  align-content: center;
  min-height: 135px;
  padding: 18px;
  border: 1.5px dashed rgba(156, 125, 221, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  transform: translateY(-2px);
  border-color: rgba(156, 125, 221, 0.65);
  background: rgba(216, 198, 255, 0.22);
}

.upload-zone span {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-zone strong {
  font-size: 0.82rem;
}

.upload-zone small {
  color: var(--muted);
  font-size: 0.67rem;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 900px) {
  .rankings-page-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .rankings-page-stats {
    grid-template-columns: 1fr 1fr;
  }

  .rankings-toolbar {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-slide:hover,
  .league-card:hover,
  .content-card:hover {
    transform: none;
  }

  .featured-slide:hover .featured-slide-logo,
  .league-card:hover .logo-frame {
    animation: none;
  }
}

/* PHASE 11 — COMMUNITY HUB & SMART RANKINGS */
.community-announcement {
  position: relative;
  z-index: 15;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  animation: announcementIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.announcement-info {
  background: linear-gradient(
    90deg,
    rgba(215, 198, 255, 0.92),
    rgba(197, 221, 255, 0.92)
  );
}

.announcement-success {
  background: linear-gradient(
    90deg,
    rgba(205, 235, 215, 0.94),
    rgba(215, 238, 229, 0.94)
  );
}

.announcement-warning {
  background: linear-gradient(
    90deg,
    rgba(255, 222, 190, 0.94),
    rgba(247, 197, 218, 0.94)
  );
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 40px));
  margin: auto;
  padding: 13px 0;
}

.announcement-inner strong,
.announcement-inner span {
  display: block;
}

.announcement-inner strong {
  font-family: Outfit, sans-serif;
}

.announcement-inner span {
  margin-top: 3px;
  color: rgba(45, 38, 56, 0.76);
  font-size: 0.78rem;
}

.announcement-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-close {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-size: 1.15rem;
}

@keyframes announcementIn {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.community-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.community-feature-card {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  padding: 25px;
  border-radius: 26px;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 250, 253, 0.94)
    ),
    var(--community-banner);
  background-size: cover;
  background-position: center;
  transition:
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.38s ease;
}

.community-feature-card:hover {
  transform: translateY(-11px) scale(1.012);
  box-shadow: 0 34px 78px rgba(125, 95, 150, 0.2);
}

.community-feature-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      120deg,
      rgba(247, 194, 226, 0.1),
      rgba(196, 220, 255, 0.14)
    ),
    radial-gradient(
      circle at 85% 10%,
      rgba(255, 255, 255, 0.4),
      transparent 30%
    );
}

.community-feature-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: flex-end;
}

.community-feature-label {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.community-feature-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.community-feature-logo {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding: 9px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.78);
  font:
    800 0.7rem Outfit,
    sans-serif;
}

.community-feature-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.community-feature-content h3 {
  margin: 7px 0;
  font-size: 1.65rem;
}

.community-feature-content p {
  color: var(--muted);
  line-height: 1.6;
}

.community-feature-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 0.72rem;
}

.community-race-countdown {
  display: flex;
  gap: 6px;
  margin: 13px 0 19px;
}

.community-race-countdown span {
  min-width: 50px;
  padding: 8px;
  border-radius: 11px;
  background: rgba(216, 198, 255, 0.25);
  text-align: center;
  font-size: 0.65rem;
}

.community-race-countdown strong {
  font:
    800 0.85rem Outfit,
    sans-serif;
}

.featured-stream-card {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 23px;
  padding: 22px;
  border-radius: 25px;
}

.stream-player {
  min-height: 360px;
  overflow: hidden;
  border-radius: 19px;
  background: linear-gradient(135deg, #e9d9ff, #d7e9ff);
}

.stream-player iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.stream-placeholder {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}

.stream-placeholder h3 {
  margin: 20px 0 8px;
  font-size: 2rem;
}

.stream-placeholder p,
.stream-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.stream-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px;
}

.stream-copy h3 {
  margin: 10px 0;
  font-size: 1.65rem;
}

.community-league-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.recent-league-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 13px;
  overflow-x: auto;
  padding: 4px 4px 15px;
  scroll-snap-type: x mandatory;
}

.community-mini-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 100px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(17px);
  box-shadow: 0 14px 35px rgba(125, 95, 150, 0.08);
  scroll-snap-align: start;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease;
  transition-delay: var(--community-delay, 0ms);
}

.community-mini-card:hover {
  transform: translateY(-7px) scale(1.012);
  box-shadow: 0 23px 52px rgba(125, 95, 150, 0.15);
}

.community-mini-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  font:
    800 0.65rem Outfit,
    sans-serif;
}

.community-mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.community-mini-card span,
.community-mini-card strong,
.community-mini-card small {
  display: block;
}

.community-mini-card span {
  color: var(--accent);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.community-mini-card strong {
  margin-top: 5px;
}

.community-mini-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.community-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.community-editor {
  max-width: none;
}

.community-admin-section {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.community-admin-section:last-of-type {
  border-bottom: 0;
}

.community-admin-section h4 {
  margin: 0 0 15px;
  font-family: Outfit, sans-serif;
  font-size: 1.05rem;
}

.draft-state {
  color: var(--muted);
  font-size: 0.7rem;
}

.trending-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.trending-option {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
}

.trending-option input {
  width: auto !important;
  margin: 0 !important;
}

.trending-option-logo {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.58rem;
}

.trending-option-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.trending-option strong {
  font-size: 0.75rem;
}

.community-publish-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
}

.community-preview-panel {
  position: sticky;
  top: 95px;
  padding: 23px;
  border-radius: 22px;
}

.community-preview-panel h3 {
  margin: 9px 0 17px;
}

.draft-preview-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.draft-preview-item:last-child {
  border-bottom: 0;
}

.draft-preview-item span {
  color: var(--muted);
  font-size: 0.72rem;
}

.draft-preview-item strong {
  text-align: right;
  font-size: 0.75rem;
}

.admin-section-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 400;
}

.smart-ranking-row {
  grid-template-columns: 30px 58px 1fr auto auto;
  cursor: grab;
}

.smart-ranking-row.dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.smart-ranking-row.drag-over {
  border-radius: 14px;
  background: rgba(216, 198, 255, 0.25);
  box-shadow: inset 0 0 0 2px rgba(156, 125, 221, 0.24);
}

.ranking-drag-handle {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: -4px;
  user-select: none;
}

.ranking-move-actions {
  display: flex;
  gap: 5px;
}

.ranking-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.ranking-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 950px) {
  .community-spotlight-grid,
  .featured-stream-card,
  .community-admin-layout {
    grid-template-columns: 1fr;
  }

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

  .community-preview-panel {
    position: static;
  }

  .smart-ranking-row {
    grid-template-columns: 25px 52px 1fr;
  }

  .ranking-move-actions,
  .smart-ranking-row .admin-row-actions {
    grid-column: 3;
  }
}

@media (max-width: 650px) {
  .announcement-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-league-grid,
  .trending-selector {
    grid-template-columns: 1fr;
  }

  .community-publish-actions {
    flex-direction: column;
  }
}

/* PHASE 12A — LEAGUE IDENTITY */
:root {
  --league-accent: #9c7ddd;
  --league-gradient: linear-gradient(135deg, #f2a8d0, #a78be8, #8fc6ff);
}

.league-showcase-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background-image:
    linear-gradient(
      110deg,
      rgba(255, 250, 253, 0.92),
      rgba(255, 250, 253, 0.62)
    ),
    var(--league-banner);
  background-size: cover;
  background-position: center;
  box-shadow: 0 38px 90px rgba(125, 95, 150, 0.18);
}

.league-theme-wash,
.league-hero-particles,
.league-hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.league-theme-wash {
  background:
    radial-gradient(
      circle at 82% 16%,
      color-mix(in srgb, var(--league-accent) 28%, transparent),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--league-accent) 12%, transparent),
      transparent 58%
    );
}

.league-hero-grid {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.league-hero-particles {
  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(255, 255, 255, 0.7) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 78% 30%,
      rgba(255, 255, 255, 0.55) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 55% 80%,
      rgba(255, 255, 255, 0.5) 0 1.5px,
      transparent 2.5px
    );
  background-size:
    180px 180px,
    230px 230px,
    160px 160px;
  animation: leagueParticles 15s linear infinite;
}

@keyframes leagueParticles {
  to {
    background-position:
      180px 180px,
      -230px 230px,
      160px -160px;
  }
}

.league-showcase-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  min-height: 470px;
}

.league-showcase-logo {
  display: grid;
  place-items: center;
  width: 175px;
  height: 175px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 24px 60px rgba(125, 95, 150, 0.18),
    0 0 0 10px color-mix(in srgb, var(--league-accent) 10%, transparent);
  font:
    800 1.15rem Outfit,
    sans-serif;
}

.league-showcase-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.league-showcase-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(4.2rem, 9vw, 7.4rem);
}

.league-showcase-copy p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.league-showcase-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.league-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.badge-verified {
  color: #2f6f9e;
  background: rgba(190, 225, 255, 0.68);
  border: 1px solid rgba(88, 150, 201, 0.18);
}

.badge-featured {
  color: #7e5a00;
  background: rgba(255, 231, 164, 0.7);
  border: 1px solid rgba(202, 160, 54, 0.18);
}

.badge-partner {
  color: #fff;
  background: var(--league-gradient);
  border: 1px solid transparent;
}

.league-showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.league-showcase-meta {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.league-showcase-meta article {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(16px);
}

.league-showcase-meta span,
.league-showcase-meta strong {
  display: block;
}

.league-showcase-meta span {
  color: var(--muted);
  font-size: 0.7rem;
}

.league-showcase-meta strong {
  margin-top: 4px;
  font:
    800 1.15rem Outfit,
    sans-serif;
}

.league-identity-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 85px;
}

.league-about-card,
.league-staff-card {
  padding: 28px;
  border-radius: 24px;
}

.league-about-card h2,
.league-staff-card h2 {
  margin-top: 10px;
}

.league-about-card > p {
  color: var(--muted);
  line-height: 1.75;
}

.league-about-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 22px;
}

.league-about-details div {
  padding: 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.league-about-details span,
.league-about-details strong {
  display: block;
}

.league-about-details span {
  color: var(--muted);
  font-size: 0.68rem;
}

.league-about-details strong {
  margin-top: 4px;
  font-size: 0.8rem;
}

.league-staff-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.league-staff-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
}

.league-staff-member span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: white;
  background: var(--league-gradient);
  font-size: 0.68rem;
  font-weight: 800;
}

.league-next-race-section {
  margin-top: 85px;
}

.league-premium-race-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 26px;
}

.league-premium-race-visual {
  position: relative;
  min-height: 390px;
  background: var(--league-gradient);
}

.league-premium-race-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.league-premium-race-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 55%, rgba(255, 255, 255, 0.48)),
    linear-gradient(0deg, rgba(45, 38, 56, 0.22), transparent 55%);
}

.league-premium-race-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.league-premium-race-content h3 {
  margin: 10px 0;
  font-size: 2rem;
}

.league-premium-race-content > p {
  color: var(--muted);
}

.league-theme-velocity .league-showcase-hero {
  background-blend-mode: screen, normal;
}

.league-theme-inferno .league-hero-grid {
  transform: skewY(-6deg) scale(1.15);
}

.league-theme-nebula .league-hero-particles {
  opacity: 0.85;
  filter: hue-rotate(25deg);
}

.league-theme-monochrome .league-showcase-hero {
  filter: saturate(0.35);
}

.league-theme-neon .league-showcase-logo {
  box-shadow:
    0 24px 60px rgba(0, 212, 255, 0.2),
    0 0 0 10px rgba(22, 212, 181, 0.12);
}

@media (max-width: 950px) {
  .league-showcase-content,
  .league-identity-grid,
  .league-premium-race-card {
    grid-template-columns: 1fr;
  }

  .league-showcase-logo {
    width: 135px;
    height: 135px;
  }

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

@media (max-width: 620px) {
  .league-showcase-hero {
    padding: 24px;
  }

  .league-showcase-copy h1 {
    font-size: clamp(3.4rem, 17vw, 5rem);
  }

  .league-showcase-meta,
  .league-about-details {
    grid-template-columns: 1fr;
  }
}

/* PHASE 12B — GALLERY & MEDIA */
.league-gallery-section {
  margin-top: 85px;
}

.league-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}

.league-gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(125, 95, 150, 0.1);
  transition:
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.34s ease;
}

.league-gallery-item.gallery-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.league-gallery-item:hover {
  transform: translateY(-8px) scale(1.012);
  box-shadow: 0 30px 70px rgba(125, 95, 150, 0.18);
}

.league-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.league-gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-item-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-height: 90px;
  padding: 18px;
  color: white;
  background: linear-gradient(transparent, rgba(28, 23, 35, 0.78));
  text-align: left;
}

.gallery-item-overlay strong {
  font-size: 0.82rem;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(20, 16, 27, 0.9);
  backdrop-filter: blur(18px);
  animation: lightboxFade 0.25s ease both;
}

.gallery-lightbox figure {
  display: grid;
  place-items: center;
  max-width: min(1100px, 86vw);
  max-height: 86vh;
  margin: 0;
}

.gallery-lightbox img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 18px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.38);
}

.gallery-lightbox figcaption {
  min-height: 24px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 0.86rem;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.lightbox-close {
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.45rem;
}

.lightbox-nav {
  top: 50%;
  width: 48px;
  height: 58px;
  border-radius: 14px;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.lightbox-previous {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-open {
  overflow: hidden;
}

@keyframes lightboxFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.admin-gallery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.admin-gallery-image {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: rgba(216, 198, 255, 0.18);
}

.admin-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-gallery-image .featured-pill {
  position: absolute;
  top: 10px;
  left: 10px;
}

.admin-gallery-copy {
  padding: 13px;
}

.admin-gallery-copy strong,
.admin-gallery-copy span {
  display: block;
}

.admin-gallery-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.admin-gallery-card .admin-row-actions {
  padding: 0 13px 13px;
}

.featured-gallery-item {
  box-shadow: 0 0 0 2px rgba(156, 125, 221, 0.16);
}

@media (max-width: 900px) {
  .league-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 620px) {
  .league-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 230px;
  }

  .league-gallery-item.gallery-featured {
    grid-column: auto;
    grid-row: span 2;
  }

  .lightbox-nav {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .lightbox-previous {
    left: calc(50% - 62px);
  }

  .lightbox-next {
    right: calc(50% - 62px);
  }
}

/* ============================================================
   FDH GLOBAL REBRAND — BLACK & RED
   ============================================================ */
:root {
  --bg: #070707;
  --bg-2: #0c0c0d;
  --surface: rgba(18, 18, 20, 0.86);
  --surface-strong: rgba(24, 24, 27, 0.96);
  --text: #f8f8f8;
  --muted: #a4a4aa;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #e31c25;
  --pink: #e31c25;
  --purple: #a30e16;
  --blue: #ff4148;
  --gradient: linear-gradient(135deg, #ff3038, #c70f18, #71070b);
  --league-accent: #e31c25;
  --league-gradient: linear-gradient(135deg, #ff3038, #c70f18, #71070b);
}

html {
  color-scheme: dark;
}

body,
.homepage-body,
.rankings-page-body {
  color: var(--text);
  background:
    radial-gradient(circle at 86% 8%, rgba(227, 28, 37, 0.16), transparent 29%),
    radial-gradient(circle at 12% 38%, rgba(128, 7, 13, 0.13), transparent 31%),
    linear-gradient(180deg, #060606, #0b0b0c 50%, #070707);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  pointer-events: none;
}

.site-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(7, 7, 8, 0.88);
  backdrop-filter: blur(22px);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 13px;
  background: #090909;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(227, 28, 37, 0.14);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.site-header nav a,
h1,
h2,
h3,
h4,
strong {
  color: var(--text);
}

.site-header nav a {
  color: #b5b5ba;
}

.site-header nav a:hover,
.site-header nav a.active-section {
  color: #fff;
}

.site-header nav a::before {
  background: linear-gradient(90deg, #e31c25, #ff4a50);
}

.nav-admin,
.button.primary {
  color: #fff !important;
  border-color: rgba(255, 70, 75, 0.35);
  background: linear-gradient(135deg, #ef252d, #bd0e16);
  box-shadow: 0 12px 30px rgba(227, 28, 37, 0.2);
}

.button.secondary,
input,
select,
textarea,
.admin-filter-button,
.carousel-controls button,
.ranking-arrow {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(20, 20, 22, 0.82);
}

input::placeholder,
textarea::placeholder {
  color: #6f6f76;
}

.glass,
.content-card,
.schedule-card,
.homepage-schedule-card,
.homepage-live-card,
.featured-slide,
.community-feature-card,
.community-mini-card,
.management-form,
.management-list,
.admin-list-row,
.ranking-wrap,
.next-race-feature {
  border-color: rgba(255, 255, 255, 0.09);
  background-color: rgba(15, 15, 17, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.eyebrow,
.section-note,
.viewer-zone-note,
.connection-status {
  color: #ff343c;
}

.orb-one,
.orb-two,
.orb-three {
  background: rgba(227, 28, 37, 0.16);
  filter: blur(8px);
}

.scroll-progress {
  background: linear-gradient(90deg, #ff343c, #d01018, #75070c);
  box-shadow: 0 2px 15px rgba(227, 28, 37, 0.55);
}

.logo-frame,
.ranking-league-logo,
.homepage-live-logo,
.homepage-schedule-logo,
.next-race-logo,
.spotlight-logo,
.featured-slide-logo,
.community-mini-logo,
.league-page-logo,
.league-showcase-logo {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(9, 9, 10, 0.92);
}

.logo-frame img,
.ranking-league-logo img,
.homepage-live-logo img,
.homepage-schedule-logo img,
.next-race-logo img,
.spotlight-logo img,
.featured-slide-logo img,
.community-mini-logo img,
.league-showcase-logo img {
  filter: drop-shadow(0 8px 18px rgba(227, 28, 37, 0.18));
}

.tier-s {
  color: #fff;
  background: linear-gradient(135deg, #ff333b, #ae0911);
}

.tier-a {
  color: #ffd8da;
  background: linear-gradient(135deg, #691015, #38080b);
  border-color: rgba(255, 61, 68, 0.3);
}

.tier-b {
  color: #dedee3;
  background: linear-gradient(135deg, #35353a, #1a1a1d);
}

.tier-c {
  color: #b6b6bc;
  background: linear-gradient(135deg, #242426, #121214);
}

.ranking-row td {
  border-color: rgba(255, 255, 255, 0.08);
  background-color: rgba(17, 17, 19, 0.84);
}

.ranking-league-cell {
  background-image:
    linear-gradient(90deg, rgba(9, 9, 10, 0.96), rgba(9, 9, 10, 0.76)),
    var(--ranking-banner);
}

.admin-sidebar,
.admin-topbar {
  background: rgba(9, 9, 10, 0.95);
  border-color: rgba(255, 255, 255, 0.08);
}

.admin-sidebar button.active,
.admin-filter-button.active {
  color: #fff;
  background: linear-gradient(135deg, #e31c25, #970a10);
}

footer {
  color: var(--muted);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.homepage-hero-copy h1 span,
.rankings-page-hero h1 span {
  color: #e31c25;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.spotlight-card,
.featured-slide,
.community-feature-card,
.league-showcase-hero {
  background-color: #101011;
  background-blend-mode: multiply, normal;
}

.spotlight-card {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 7, 0.16), rgba(7, 7, 8, 0.96)),
    var(--spotlight-banner);
}

.featured-slide {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 7, 0.14), rgba(7, 7, 8, 0.95)),
    var(--featured-banner);
}

.community-feature-card {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 7, 0.14), rgba(7, 7, 8, 0.96)),
    var(--community-banner);
}

.league-showcase-hero {
  background-image:
    linear-gradient(110deg, rgba(5, 5, 6, 0.96), rgba(7, 7, 8, 0.7)),
    var(--league-banner);
}

.league-theme-wash {
  background:
    radial-gradient(
      circle at 82% 16%,
      rgba(227, 28, 37, 0.23),
      transparent 34%
    ),
    linear-gradient(135deg, rgba(227, 28, 37, 0.1), transparent 58%);
}

.league-showcase-copy p,
.league-about-card > p,
.timeline-content p,
.homepage-live-content > p,
.spotlight-content p,
.featured-slide-content p,
.community-feature-content p {
  color: #a8a8ae;
}

.league-badge.badge-verified {
  color: #fff;
  border-color: rgba(255, 55, 62, 0.34);
  background: rgba(177, 9, 16, 0.75);
}

.league-badge.badge-featured {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  background: #242426;
}

.league-badge.badge-partner {
  background: linear-gradient(135deg, #f12a32, #a4080f);
}

/* ============================================================
   PHASE 12C — NEXT RACE EXPERIENCE
   ============================================================ */
.fdh-next-race-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background: #0d0d0f;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.48);
}

.fdh-next-race-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0.62;
  background: linear-gradient(
    135deg,
    rgba(255, 53, 61, 0.65),
    transparent 30%,
    transparent 70%,
    rgba(151, 5, 12, 0.48)
  );
  filter: blur(1px);
}

.fdh-next-race-visual {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border-radius: 27px 0 0 27px;
  background:
    radial-gradient(circle at center, rgba(227, 28, 37, 0.24), transparent 55%),
    #080809;
}

.fdh-next-race-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fdh-next-race-card:hover .fdh-next-race-visual > img {
  transform: scale(1.045);
}

.fdh-race-art-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 510px;
  background:
    linear-gradient(
      135deg,
      transparent 0 42%,
      rgba(227, 28, 37, 0.18) 42% 43%,
      transparent 43% 100%
    ),
    radial-gradient(circle, rgba(227, 28, 37, 0.18), transparent 50%), #080809;
}

.fdh-race-art-fallback img {
  width: min(260px, 45%);
  opacity: 0.62;
  filter: drop-shadow(0 25px 60px rgba(227, 28, 37, 0.25));
}

.fdh-next-race-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(4, 4, 5, 0.94), transparent 58%),
    linear-gradient(90deg, transparent 70%, rgba(8, 8, 9, 0.32));
}

.fdh-race-status {
  position: absolute;
  top: 20px;
  left: 20px;
}

.upcoming-race-pill {
  display: inline-flex;
  padding: 8px 11px;
  border: 1px solid rgba(255, 75, 81, 0.35);
  border-radius: 8px;
  color: #fff;
  background: rgba(210, 13, 22, 0.92);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.fdh-race-visual-copy {
  position: absolute;
  right: 28px;
  bottom: 27px;
  left: 28px;
  z-index: 1;
}

.fdh-race-visual-copy span {
  color: #ff3c43;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fdh-race-visual-copy h3 {
  margin: 8px 0 7px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.fdh-race-visual-copy p {
  color: #c3c3c7;
}

.fdh-next-race-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 34px;
}

.fdh-next-race-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.fdh-next-race-heading h3 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.fdh-next-race-heading > img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  object-fit: cover;
  opacity: 0.82;
}

.fdh-event-countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 27px 0;
}

.fdh-event-countdown div {
  position: relative;
  overflow: hidden;
  padding: 17px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, #18181b, #0e0e10);
  text-align: center;
}

.fdh-event-countdown div::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: -34px;
  left: 15%;
  height: 45px;
  border-radius: 50%;
  background: #e31c25;
  filter: blur(22px);
  opacity: 0.28;
}

.fdh-event-countdown strong,
.fdh-event-countdown span {
  position: relative;
  z-index: 1;
  display: block;
}

.fdh-event-countdown strong {
  color: #ff343c;
  font:
    800 1.55rem Outfit,
    sans-serif;
}

.fdh-event-countdown span {
  margin-top: 4px;
  color: #85858c;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fdh-race-times {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 25px;
}

.fdh-race-times div {
  padding: 14px;
  border-left: 2px solid #d7161f;
  background: rgba(255, 255, 255, 0.025);
}

.fdh-race-times span,
.fdh-race-times strong,
.fdh-race-times small {
  display: block;
}

.fdh-race-times span {
  color: #ff343c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fdh-race-times strong {
  margin-top: 7px;
  font-size: 0.79rem;
}

.fdh-race-times small {
  margin-top: 4px;
  color: #77777e;
  font-size: 0.65rem;
}

.fdh-race-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fdh-race-primary-actions .button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.fdh-calendar-menu {
  position: relative;
  margin-top: 9px;
}

.fdh-calendar-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  background: #111113;
  cursor: pointer;
  font-weight: 750;
}

.fdh-calendar-options {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #151517;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.44);
}

.fdh-calendar-options a,
.fdh-calendar-options button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #d7d7dc;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 0.77rem;
}

.fdh-calendar-options a:last-child,
.fdh-calendar-options button:last-child {
  border-bottom: 0;
}

.fdh-calendar-options a:hover,
.fdh-calendar-options button:hover {
  color: #fff;
  background: rgba(227, 28, 37, 0.18);
}

.fdh-live-message {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid rgba(255, 48, 56, 0.28);
  border-radius: 14px;
  color: #fff;
  background: rgba(208, 12, 21, 0.18);
  font-weight: 800;
}

.fdh-next-race-card.race-is-live {
  animation: fdhLiveGlow 2.2s ease-in-out infinite alternate;
}

@keyframes fdhLiveGlow {
  from {
    box-shadow:
      0 36px 100px rgba(0, 0, 0, 0.48),
      0 0 0 rgba(227, 28, 37, 0);
  }
  to {
    box-shadow:
      0 36px 100px rgba(0, 0, 0, 0.48),
      0 0 45px rgba(227, 28, 37, 0.22);
  }
}

.asset-preview img {
  max-height: 220px;
  object-fit: cover;
}

@media (max-width: 980px) {
  .fdh-next-race-card {
    grid-template-columns: 1fr;
  }

  .fdh-next-race-visual {
    min-height: 420px;
    border-radius: 27px 27px 0 0;
  }
}

@media (max-width: 620px) {
  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .fdh-next-race-content {
    padding: 23px;
  }

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

  .fdh-race-times,
  .fdh-race-primary-actions {
    grid-template-columns: 1fr;
  }

  .fdh-race-primary-actions .button:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .fdh-next-race-heading > img {
    width: 52px;
    height: 52px;
  }
}
/* =========================================================
   FDH v13.1A — PREMIUM NAVIGATION
   ========================================================= */

.site-header {
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(12, 12, 13, 0.96),
    rgba(8, 8, 9, 0.88)
  );
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(227, 28, 37, 0.05);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  transition:
    min-height 0.3s ease,
    padding 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
  background: rgba(7, 7, 8, 0.96);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.34),
    inset 0 -1px 0 rgba(227, 28, 37, 0.12);
}

.brand {
  gap: 13px;
  transition: transform 0.25s ease;
}

.brand:hover {
  transform: translateY(-2px);
}

.brand-logo {
  width: 48px;
  height: 48px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #080809;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(227, 28, 37, 0.12);
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-3deg) scale(1.05);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(227, 28, 37, 0.22);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong {
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: #8e8e95;
}

.site-header nav {
  align-items: center;
  gap: 4px;
}

.site-header nav a {
  position: relative;
  padding: 10px 13px;
  border-radius: 10px;
  color: #a6a6ad;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease;
}

.site-header nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.site-header nav a::before {
  right: 13px;
  bottom: 4px;
  left: 13px;
  height: 2px;
  background: linear-gradient(90deg, #ff3b42, #b70c14);
  box-shadow: 0 0 12px rgba(227, 28, 37, 0.45);
}

.site-header nav a:hover::before,
.site-header nav a.active-section::before {
  transform: scaleX(1);
}

.site-header .nav-admin {
  margin-left: 5px;
  color: #ffffff;
  border: 1px solid rgba(255, 65, 72, 0.3);
  background: linear-gradient(135deg, #e31c25, #9e0910);
  box-shadow: 0 10px 25px rgba(227, 28, 37, 0.16);
}

.site-header .nav-admin:hover {
  background: linear-gradient(135deg, #f12a32, #b20c14);
  box-shadow: 0 14px 32px rgba(227, 28, 37, 0.26);
}

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand small {
    display: none;
  }
}
/* =========================================================
   FDH v13.1.1 — PREMIUM HERO
   ========================================================= */

.homepage-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 88vh;
}

.homepage-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 620px;
  height: 620px;
  top: -160px;
  right: -170px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(227, 28, 37, 0.24),
    rgba(137, 5, 12, 0.08) 45%,
    transparent 70%
  );
  filter: blur(10px);
  animation: heroGlowDrift 10s ease-in-out infinite alternate;
}

.homepage-hero::after {
  content: "";
  position: absolute;
  inset: 8% -10% auto;
  z-index: -3;
  height: 74%;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
  transform: perspective(800px) rotateX(62deg) translateY(-90px);
  transform-origin: top;
}

@keyframes heroGlowDrift {
  from {
    transform: translate3d(0, 0, 0) scale(0.95);
  }

  to {
    transform: translate3d(-55px, 45px, 0) scale(1.08);
  }
}

.homepage-hero-copy {
  position: relative;
}

.homepage-hero-copy::before {
  content: "";
  position: absolute;
  top: -32px;
  left: -26px;
  width: 110px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff353d, transparent);
  box-shadow: 0 0 22px rgba(227, 28, 37, 0.4);
}

.homepage-hero-copy h1 {
  max-width: 850px;
  text-wrap: balance;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

.homepage-hero-copy h1 span {
  color: #ef252d;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 0 40px rgba(227, 28, 37, 0.2);
}

.homepage-hero-copy > p {
  max-width: 660px;
  color: #a7a7ad;
  font-size: 1.02rem;
  line-height: 1.8;
}

.hero-actions .button {
  min-height: 50px;
  padding-right: 22px;
  padding-left: 22px;
}

.hero-actions .button.primary {
  box-shadow:
    0 16px 38px rgba(227, 28, 37, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-actions .button.primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 22px 48px rgba(227, 28, 37, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-actions .button.secondary:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 71, 78, 0.28);
  background: rgba(227, 28, 37, 0.08);
}

.homepage-stat-strip article {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    145deg,
    rgba(25, 25, 28, 0.94),
    rgba(12, 12, 14, 0.82)
  );
}

.homepage-stat-strip article::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -48px;
  width: 85px;
  height: 85px;
  border-radius: 50%;
  background: #e31c25;
  opacity: 0.12;
  filter: blur(20px);
}

.homepage-stat-strip article:hover {
  transform: translateY(-7px);
  border-color: rgba(255, 59, 66, 0.18);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(227, 28, 37, 0.08);
}

.hero-spotlight {
  position: relative;
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.08),
    transparent 28%,
    transparent 70%,
    rgba(227, 28, 37, 0.08)
  );
  pointer-events: none;
}

@media (max-width: 760px) {
  .homepage-hero {
    min-height: auto;
  }

  .homepage-hero::before {
    width: 420px;
    height: 420px;
    top: 40px;
    right: -230px;
  }

  .homepage-hero::after {
    display: none;
  }

  .homepage-hero-copy::before {
    left: 0;
  }
}
/* =========================================================
   FDH v13.1.2 — PREMIUM LEAGUE CARDS
   ========================================================= */

.featured-slide,
.community-feature-card,
.community-mini-card,
.content-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.28),
    0 0 0 rgba(227, 28, 37, 0);
  transition:
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.38s ease,
    border-color 0.38s ease,
    filter 0.38s ease;
  will-change: transform;
}

.featured-slide::after,
.community-feature-card::after,
.community-mini-card::after,
.content-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 22%,
    rgba(255, 255, 255, 0.11) 42%,
    transparent 61%
  );
  transform: translateX(-120%);
  transition:
    transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.35s ease;
  pointer-events: none;
}

.featured-slide:hover,
.community-feature-card:hover,
.community-mini-card:hover,
.content-card:hover {
  transform: perspective(1100px) translateY(-11px) rotateX(1.5deg)
    rotateY(-1.5deg) scale(1.012);
  border-color: rgba(255, 62, 69, 0.22);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.42),
    0 0 35px rgba(227, 28, 37, 0.12);
  filter: brightness(1.04);
}

.featured-slide:hover::after,
.community-feature-card:hover::after,
.community-mini-card:hover::after,
.content-card:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

/* Banner/background movement */

.featured-slide {
  background-size: 105%;
  transition:
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.38s ease,
    border-color 0.38s ease,
    filter 0.38s ease,
    background-size 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featured-slide:hover {
  background-size: 112%;
}

.community-feature-card {
  background-size: 105%;
  transition:
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.38s ease,
    border-color 0.38s ease,
    filter 0.38s ease,
    background-size 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.community-feature-card:hover {
  background-size: 112%;
}

/* Logo motion */

.featured-slide-logo,
.community-feature-logo,
.community-mini-logo,
.content-card .logo-frame {
  transition:
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.38s ease,
    filter 0.38s ease;
}

.featured-slide:hover .featured-slide-logo,
.community-feature-card:hover .community-feature-logo,
.community-mini-card:hover .community-mini-logo,
.content-card:hover .logo-frame {
  transform: translateY(-6px) rotate(-2deg) scale(1.07);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 25px rgba(227, 28, 37, 0.15);
}

.featured-slide-logo img,
.community-feature-logo img,
.community-mini-logo img,
.content-card .logo-frame img {
  transition:
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.35s ease;
}

.featured-slide:hover .featured-slide-logo img,
.community-feature-card:hover .community-feature-logo img,
.community-mini-card:hover .community-mini-logo img,
.content-card:hover .logo-frame img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.03);
}

/* Text polish */

.featured-slide h3,
.community-feature-card h3,
.community-mini-card strong,
.content-card h3 {
  transition:
    color 0.25s ease,
    transform 0.3s ease;
}

.featured-slide:hover h3,
.community-feature-card:hover h3,
.community-mini-card:hover strong,
.content-card:hover h3 {
  color: #ffffff;
  transform: translateY(-2px);
}

/* Red edge glow */

.featured-slide::before,
.community-feature-card::before,
.community-mini-card::before,
.content-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 61, 68, 0.75),
    transparent 28%,
    transparent 70%,
    rgba(151, 6, 12, 0.52)
  );
  filter: blur(6px);
  transition: opacity 0.35s ease;
}

.featured-slide:hover::before,
.community-feature-card:hover::before,
.community-mini-card:hover::before,
.content-card:hover::before {
  opacity: 0.55;
}

/* Mobile: remove tilt but keep lift */

@media (max-width: 760px) {
  .featured-slide:hover,
  .community-feature-card:hover,
  .community-mini-card:hover,
  .content-card:hover {
    transform: translateY(-6px);
  }

  .featured-slide,
  .community-feature-card {
    background-size: cover;
  }

  .featured-slide:hover,
  .community-feature-card:hover {
    background-size: cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-slide,
  .community-feature-card,
  .community-mini-card,
  .content-card,
  .featured-slide::after,
  .community-feature-card::after,
  .community-mini-card::after,
  .content-card::after {
    transition: none !important;
    transform: none !important;
  }
}
.button,
.carousel-controls button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.button-ripple {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transform: scale(0);
  animation: buttonRipple 0.55s ease-out forwards;
}
/* =========================================================
   FDH v13.2 — RANKING MOVEMENT
   ========================================================= */

.ranking-movement-cell,
.ranking-movement-heading {
  width: 120px;
  text-align: center;
}

.ranking-movement {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ranking-movement.movement-up {
  color: #72e39a;
  border-color: rgba(56, 196, 108, 0.28);
  background: rgba(34, 151, 79, 0.14);
}

.ranking-movement.movement-down {
  color: #ff7379;
  border-color: rgba(235, 48, 57, 0.3);
  background: rgba(191, 25, 33, 0.15);
}

.ranking-movement.movement-same {
  color: #aaaab2;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.ranking-movement.movement-new {
  color: #ffffff;
  border-color: rgba(255, 48, 57, 0.36);
  background: linear-gradient(135deg, #e31c25, #8f080e);
  box-shadow: 0 0 18px rgba(227, 28, 37, 0.14);
}

@media (max-width: 700px) {
  .ranking-movement-heading {
    font-size: 0;
  }

  .ranking-movement-heading::after {
    content: "Move";
    font-size: 0.7rem;
  }

  .ranking-movement-cell,
  .ranking-movement-heading {
    width: 76px;
  }

  .ranking-movement {
    min-width: 54px;
    padding: 6px 8px;
  }
}
/* =========================================================
   FDH — DARK RANKINGS SUMMARY CARDS
   ========================================================= */

.rankings-page-stats article {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(227, 28, 37, 0.13),
      transparent 38%
    ),
    linear-gradient(145deg, rgba(28, 28, 31, 0.96), rgba(11, 11, 13, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.rankings-page-stats article:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 54, 62, 0.24);
  box-shadow:
    0 26px 58px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(227, 28, 37, 0.1);
}

.rankings-page-stats strong {
  color: #ffffff;
}

.rankings-page-stats span {
  color: #898991;
}
.rankings-controls input,
.rankings-controls select,
#rankingSearch,
#tierFilter {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(145deg, #1a1a1d, #0d0d0f) !important;
}

.rankings-controls input::placeholder,
#rankingSearch::placeholder {
  color: #74747c !important;
}

.rankings-controls input:focus,
.rankings-controls select:focus,
#rankingSearch:focus,
#tierFilter:focus {
  outline: none;
  border-color: rgba(255, 48, 57, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(227, 28, 37, 0.1);
}

.rankings-controls select option,
#tierFilter option {
  color: #ffffff;
  background: #151517;
}
/* =========================================================
   FDH — GLOBAL DARK UI CONSISTENCY PATCH
   ========================================================= */

html {
  color-scheme: dark;
}

/* Inputs, selects and textareas */

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  color: #f4f4f6 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(
    145deg,
    rgba(26, 26, 29, 0.98),
    rgba(11, 11, 13, 0.98)
  ) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.16);
  caret-color: #ff3038;
}

input::placeholder,
textarea::placeholder {
  color: #77777f !important;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: rgba(255, 49, 58, 0.45) !important;
  box-shadow:
    0 0 0 3px rgba(227, 28, 37, 0.1),
    0 12px 30px rgba(0, 0, 0, 0.24) !important;
}

select option {
  color: #ffffff;
  background: #151517;
}

/* Safari autofill */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #151517 inset !important;
}

/* Search and filter containers */

.search-box,
.search-panel,
.filter-panel,
.admin-search,
.admin-filter-panel,
.rankings-controls,
.schedule-controls {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: linear-gradient(
    145deg,
    rgba(24, 24, 27, 0.96),
    rgba(11, 11, 13, 0.98)
  ) !important;
}

/* Empty states and placeholders */

.empty-state,
.empty-card,
.loading-card,
.no-results,
.no-races,
.no-leagues,
.schedule-empty,
.schedule-empty-state,
.homepage-empty-state,
.homepage-schedule-empty,
.placeholder-card,
.admin-empty,
.admin-empty-state,
.gallery-empty,
.race-empty {
  color: #8c8c94 !important;
  border: 1px solid rgba(255, 255, 255, 0.075) !important;
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(227, 28, 37, 0.07),
      transparent 35%
    ),
    linear-gradient(145deg, rgba(21, 21, 24, 0.96), rgba(9, 9, 11, 0.98)) !important;
}

/* Upload/drop areas */

.upload-zone,
.drop-zone,
.file-drop,
.asset-drop,
.gallery-upload-zone,
.race-artwork-drop,
.logo-upload,
.banner-upload,
.image-upload {
  color: #d9d9dd !important;
  border: 1px dashed rgba(255, 68, 76, 0.28) !important;
  background:
    radial-gradient(circle at 80% 20%, rgba(227, 28, 37, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(25, 25, 28, 0.96), rgba(12, 12, 14, 0.98)) !important;
}

.upload-zone:hover,
.drop-zone:hover,
.file-drop:hover,
.asset-drop:hover,
.gallery-upload-zone:hover,
.race-artwork-drop:hover {
  border-color: rgba(255, 66, 74, 0.5) !important;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(227, 28, 37, 0.16),
      transparent 40%
    ),
    linear-gradient(145deg, rgba(31, 24, 27, 0.98), rgba(14, 12, 14, 0.98)) !important;
}

/* Native file controls */

input[type="file"] {
  color: #a9a9b0 !important;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 13px;
  color: #ffffff;
  border: 1px solid rgba(255, 55, 63, 0.26);
  border-radius: 9px;
  background: linear-gradient(135deg, #d91821, #8e080e);
  cursor: pointer;
}

/* Admin cards that are still pale */

.admin-panel,
.admin-card,
.admin-form-card,
.admin-list-card,
.admin-preview-card,
.admin-content-card {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 23, 0.97),
    rgba(9, 9, 11, 0.98)
  ) !important;
}

/* Secondary buttons */

.button.secondary,
button.secondary,
.admin-filter-button,
.carousel-controls button,
.ranking-arrow {
  color: #eeeef1 !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  background: linear-gradient(
    145deg,
    rgba(28, 28, 31, 0.98),
    rgba(12, 12, 14, 0.98)
  ) !important;
}

.button.secondary:hover,
button.secondary:hover,
.admin-filter-button:hover,
.carousel-controls button:hover,
.ranking-arrow:hover {
  border-color: rgba(255, 52, 60, 0.32) !important;
  background: linear-gradient(
    145deg,
    rgba(65, 17, 21, 0.98),
    rgba(22, 10, 12, 0.98)
  ) !important;
}
/* League page cards */

.league-stat-card,
.league-info-item,
.league-detail,
.staff-member,
.staff-card,
.owner-card,
.meta-card,
.stat-card {
  background: linear-gradient(
    145deg,
    rgba(24, 24, 27, 0.96),
    rgba(11, 11, 13, 0.98)
  ) !important;

  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
/* FDH — DARK LEAGUE PROFILE INFO CARDS */

.league-showcase-meta article,
.league-identity-grid article,
.league-identity-grid > div,
.league-staff-list li,
.league-staff-list article {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  background:
    radial-gradient(circle at 85% 15%, rgba(227, 28, 37, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(25, 25, 28, 0.96), rgba(10, 10, 12, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.league-showcase-meta article span,
.league-identity-grid article span,
.league-identity-grid > div span,
.league-staff-list li span,
.league-staff-list article span {
  color: #888891 !important;
}

.league-showcase-meta article strong,
.league-identity-grid article strong,
.league-identity-grid > div strong,
.league-staff-list li strong,
.league-staff-list article strong {
  color: #ffffff !important;
}
/* =========================================================
   FDH — FINAL DARK CARD OVERRIDES
   ========================================================= */

/* Homepage + rankings table rows */

.ranking-row .ranking-league-cell,
.ranking-row .ranking-position-cell,
.ranking-row .ranking-tier-cell,
#fullRankingBody .ranking-league-cell,
#fullRankingBody .ranking-position-cell,
#fullRankingBody .ranking-tier-cell,
#homepageRankingBody .ranking-league-cell,
#homepageRankingBody .ranking-position-cell,
#homepageRankingBody .ranking-tier-cell {
  background: linear-gradient(
    145deg,
    rgba(25, 25, 28, 0.98),
    rgba(10, 10, 12, 0.99)
  ) !important;
}

.ranking-row .ranking-league-cell {
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.025),
    inset -1px 0 0 rgba(255, 255, 255, 0.025);
}

.ranking-row {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
}

.ranking-row:hover .ranking-league-cell,
.ranking-row:hover .ranking-position-cell,
.ranking-row:hover .ranking-tier-cell {
  background: linear-gradient(
    145deg,
    rgba(38, 20, 23, 0.98),
    rgba(14, 11, 13, 0.99)
  ) !important;
}

/* Preserve subtle position accents */

.ranking-row:nth-child(1) .ranking-position-cell {
  color: #d7b23f !important;
}

.ranking-row:nth-child(2) .ranking-position-cell {
  color: #aeb7c4 !important;
}

.ranking-row:nth-child(3) .ranking-position-cell {
  color: #c87b52 !important;
}

/* League profile detail blocks */

.league-identity-grid article,
.league-identity-grid > div,
.league-showcase-meta article,
.league-staff-list > *,
.league-staff-list li,
.league-staff-list article {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: linear-gradient(
    145deg,
    rgba(25, 25, 28, 0.98),
    rgba(10, 10, 12, 0.99)
  ) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 26px rgba(0, 0, 0, 0.2) !important;
}

/* Some staff rows may be generated as plain divs */

.league-staff-list > div,
.league-staff-list .staff-member,
.league-staff-list .league-staff-member {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: linear-gradient(
    145deg,
    rgba(25, 25, 28, 0.98),
    rgba(10, 10, 12, 0.99)
  ) !important;
}

/* Secondary text inside profile cards */

.league-identity-grid span,
.league-showcase-meta span,
.league-staff-list span {
  color: #8f8f97 !important;
}

.league-identity-grid strong,
.league-showcase-meta strong,
.league-staff-list strong {
  color: #ffffff !important;
}
/* =========================================================
   FDH — HARD DARK OVERRIDES FOR PROFILE + RANKINGS
   ========================================================= */

/* League profile information boxes */

.league-identity-grid article,
.league-identity-grid > div,
.league-showcase-meta article {
  position: relative;
  overflow: hidden;
  background: #111113 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.league-identity-grid article::before,
.league-identity-grid article::after,
.league-identity-grid > div::before,
.league-identity-grid > div::after,
.league-showcase-meta article::before,
.league-showcase-meta article::after {
  opacity: 0 !important;
  background: transparent !important;
}

/* Homepage and full-ranking centre cells */

.ranking-league-cell {
  background: #111113 !important;
  background-image: none !important;
}

.ranking-league-cell::before,
.ranking-league-cell::after,
.ranking-league-overlay {
  opacity: 0 !important;
  background: transparent !important;
}

.ranking-row .ranking-position-cell,
.ranking-row .ranking-tier-cell,
.ranking-row .ranking-movement-cell {
  background: #0d0d0f !important;
  background-image: none !important;
}

/* Keep all row text readable */

.ranking-league-content,
.ranking-league-content strong {
  color: #ffffff !important;
}

.ranking-league-content small {
  color: #85858d !important;
}
/* Final fix — league profile info tiles */

.league-identity-grid > article,
.league-identity-grid > div,
.league-identity-grid .identity-item,
.league-identity-grid .league-meta-item {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #111113 !important;
  background-image: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.2) !important;
}

.league-identity-grid > article::before,
.league-identity-grid > article::after,
.league-identity-grid > div::before,
.league-identity-grid > div::after {
  opacity: 0 !important;
  background: transparent !important;
}

.league-identity-grid span,
.league-identity-grid small {
  color: #8d8d95 !important;
}

.league-identity-grid strong {
  color: #ffffff !important;
}
/* Final exact fix — league About tiles */

.league-about-details > div {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #111113 !important;
  background-image: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.2) !important;
}

.league-about-details > div::before,
.league-about-details > div::after {
  content: none !important;
  display: none !important;
}

.league-about-details > div span {
  color: #888891 !important;
}

.league-about-details > div strong {
  color: #ffffff !important;
}
.next-race-status {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.next-race-status.upcoming {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d6d6d6;
}

.next-race-status.soon {
  background: rgba(255, 170, 0, 0.14);
  border: 1px solid rgba(255, 170, 0, 0.28);
  color: #ffbf47;
}

.next-race-status.live {
  background: rgba(255, 35, 35, 0.18);
  border: 1px solid rgba(255, 35, 35, 0.35);
  color: #ff4d4d;
}

.next-race-status.passed {
  background: rgba(255, 255, 255, 0.05);
  color: #888;
}
.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.live-watch-button,
.card-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  padding: 0.8rem 1.35rem;

  border-radius: 999px;

  background: linear-gradient(
    135deg,
    rgba(255, 38, 38, 0.95),
    rgba(185, 15, 15, 0.95)
  );

  border: 1px solid rgba(255, 255, 255, 0.08);

  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;

  box-shadow:
    0 10px 28px rgba(255, 40, 40, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.08);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease,
    background 0.22s ease;
}

.live-watch-button::before,
.card-actions .button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  animation: livePulse 1.4s infinite;
}

.live-watch-button:hover,
.card-actions .button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);

  box-shadow:
    0 16px 38px rgba(255, 40, 40, 0.35),
    inset 0 1px rgba(255, 255, 255, 0.12);
}

.live-watch-button:active,
.card-actions .button:active {
  transform: translateY(0);
}

@keyframes livePulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.35;
  }
  100% {
    transform: scale(0.85);
    opacity: 0.9;
  }
}
.homepage-live-card {
  position: relative;
  overflow: hidden;
}

.homepage-live-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  box-shadow:
    inset 0 0 0 1px rgba(255, 50, 50, 0.18),
    0 0 40px rgba(255, 50, 50, 0.12);
}
/* =========================================================
   FDH v13.4 — DYNAMIC HOMEPAGE HERO
   ========================================================= */

.spotlight-card-live,
.spotlight-card-upcoming {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.spotlight-card-live::before,
.spotlight-card-upcoming::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(7, 7, 9, 0.96) 0%,
      rgba(7, 7, 9, 0.72) 52%,
      rgba(7, 7, 9, 0.24) 100%
    ),
    var(--spotlight-banner);
  background-position: center;
  background-size: cover;
}

.spotlight-card-live::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(255, 45, 54, 0.2);
  border-radius: inherit;
  box-shadow:
    inset 0 0 70px rgba(218, 18, 28, 0.08),
    0 0 36px rgba(218, 18, 28, 0.08);
}

.spotlight-race-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.spotlight-race-logo {
  display: grid;
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(5, 5, 7, 0.76);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.3);
}

.spotlight-race-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.spotlight-race-content h2 {
  margin: 0.25rem 0 0.45rem;
}

.spotlight-race-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.live-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ff4b53;
}

.live-hero-label .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 13px currentColor;
  animation: dynamicHeroLivePulse 1.4s ease-in-out infinite;
}

@keyframes dynamicHeroLivePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.72);
  }
}

@media (max-width: 700px) {
  .spotlight-race-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .spotlight-race-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }
}
/* =========================================================
   FDH — FINAL DARK CONTROL / BUTTON PATCH
   ========================================================= */

:root {
  --fdh-control-bg: #111114;
  --fdh-control-hover: #18181d;
  --fdh-control-border: rgba(255, 255, 255, 0.1);
  --fdh-control-text: #f5f5f7;
  --fdh-control-muted: #8d8d97;
}

/* ---------------------------------------------------------
   ADMIN FORM CONTROLS
   --------------------------------------------------------- */

body[class*="admin"] input:not([type="checkbox"]):not([type="radio"]),
body[class*="admin"] select,
body[class*="admin"] textarea,
.admin-shell input:not([type="checkbox"]):not([type="radio"]),
.admin-shell select,
.admin-shell textarea,
.admin-panel input:not([type="checkbox"]):not([type="radio"]),
.admin-panel select,
.admin-panel textarea {
  color: var(--fdh-control-text) !important;
  background: var(--fdh-control-bg) !important;
  background-image: none !important;
  border: 1px solid var(--fdh-control-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 8px 24px rgba(0, 0, 0, 0.18) !important;
}

body[class*="admin"] input::placeholder,
body[class*="admin"] textarea::placeholder,
.admin-shell input::placeholder,
.admin-shell textarea::placeholder {
  color: var(--fdh-control-muted) !important;
  opacity: 1;
}

body[class*="admin"] input:focus,
body[class*="admin"] select:focus,
body[class*="admin"] textarea:focus,
.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
  outline: none !important;
  border-color: rgba(255, 41, 51, 0.55) !important;
  box-shadow:
    0 0 0 3px rgba(255, 41, 51, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.22) !important;
}

/* Search/filter containers that currently appear grey */

body[class*="admin"] .search-panel,
body[class*="admin"] .search-controls,
body[class*="admin"] .filter-controls,
body[class*="admin"] .admin-search-wrap,
body[class*="admin"] .admin-filter-wrap,
.admin-shell .search-panel,
.admin-shell .search-controls,
.admin-shell .filter-controls,
.admin-shell .admin-search-wrap,
.admin-shell .admin-filter-wrap {
  color: var(--fdh-control-text) !important;
  background: rgba(15, 15, 18, 0.98) !important;
  background-image: none !important;
  border: 1px solid var(--fdh-control-border) !important;
  box-shadow: none !important;
}

/* ---------------------------------------------------------
   ADMIN SECONDARY BUTTONS
   --------------------------------------------------------- */

body[class*="admin"] button:not(.primary):not(.danger):not(.active),
body[class*="admin"] .button.secondary,
.admin-shell button:not(.primary):not(.danger):not(.active),
.admin-shell .button.secondary {
  color: var(--fdh-control-text) !important;
  background: var(--fdh-control-bg) !important;
  background-image: none !important;
  border: 1px solid var(--fdh-control-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 7px 18px rgba(0, 0, 0, 0.16) !important;
}

body[class*="admin"] button:not(.primary):not(.danger):hover,
body[class*="admin"] .button.secondary:hover,
.admin-shell button:not(.primary):not(.danger):hover,
.admin-shell .button.secondary:hover {
  color: #fff !important;
  background: var(--fdh-control-hover) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px);
}

/* Keep destructive buttons dark red */

body[class*="admin"] .danger,
body[class*="admin"] .delete-button,
body[class*="admin"] [class*="delete"],
.admin-shell .danger,
.admin-shell .delete-button,
.admin-shell [class*="delete"] {
  color: #e0617c !important;
  background: rgba(103, 20, 42, 0.18) !important;
  border-color: rgba(224, 64, 103, 0.34) !important;
}

/* ---------------------------------------------------------
   TRENDING LEAGUE SELECTION CARDS
   --------------------------------------------------------- */

body[class*="admin"] .trending-option,
body[class*="admin"] .trending-league-option,
body[class*="admin"] .league-check-option,
body[class*="admin"] .community-league-option,
.admin-shell .trending-option,
.admin-shell .trending-league-option,
.admin-shell .league-check-option,
.admin-shell .community-league-option {
  color: var(--fdh-control-text) !important;
  background: var(--fdh-control-bg) !important;
  background-image: none !important;
  border: 1px solid var(--fdh-control-border) !important;
  box-shadow: none !important;
}

body[class*="admin"] .trending-option:hover,
body[class*="admin"] .trending-league-option:hover,
body[class*="admin"] .league-check-option:hover,
body[class*="admin"] .community-league-option:hover,
.admin-shell .trending-option:hover,
.admin-shell .trending-league-option:hover,
.admin-shell .league-check-option:hover,
.admin-shell .community-league-option:hover {
  background: var(--fdh-control-hover) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

/* Checkboxes */

body[class*="admin"] input[type="checkbox"],
.admin-shell input[type="checkbox"] {
  accent-color: #f52332;
}

/* ---------------------------------------------------------
   DYNAMIC HERO PILLS
   --------------------------------------------------------- */

.spotlight-card .spotlight-label,
.spotlight-card .next-race-status {
  color: #f1f1f4 !important;
  background: rgba(14, 14, 18, 0.82) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 25px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.spotlight-card .next-race-status.soon {
  color: #ffc15a !important;
  background: rgba(95, 58, 7, 0.32) !important;
  border-color: rgba(255, 184, 61, 0.28) !important;
}

.spotlight-card-live .spotlight-label,
.spotlight-card .next-race-status.live {
  color: #ff505a !important;
  background: rgba(99, 11, 20, 0.34) !important;
  border-color: rgba(255, 58, 70, 0.32) !important;
}

/* ---------------------------------------------------------
   LEAGUE SOCIAL BUTTONS — YouTube, Twitch, etc.
   --------------------------------------------------------- */

.league-socials a,
.league-social-links a,
.league-showcase-socials a,
.league-showcase-actions .button.secondary,
.social-button,
.platform-link {
  color: #f5f5f7 !important;
  background: var(--fdh-control-bg) !important;
  background-image: none !important;
  border: 1px solid var(--fdh-control-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 8px 22px rgba(0, 0, 0, 0.18) !important;
}

.league-socials a:hover,
.league-social-links a:hover,
.league-showcase-socials a:hover,
.league-showcase-actions .button.secondary:hover,
.social-button:hover,
.platform-link:hover {
  color: #fff !important;
  background: var(--fdh-control-hover) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px);
}
/* =========================================================
   FDH v13.6 — FULL RANKINGS VISUAL REDESIGN
   ========================================================= */

.rankings-page-body .ranking-wrap,
.ranking-wrap {
  background: linear-gradient(
    180deg,
    rgba(18, 18, 22, 0.98),
    rgba(10, 10, 13, 0.98)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

/* Brighter, more separated rows */

.ranking-row {
  --rank-accent: rgba(255, 41, 51, 0.62);

  position: relative;
  filter: brightness(1.08);
  transition:
    transform 0.22s ease,
    filter 0.22s ease,
    box-shadow 0.22s ease;
}

.ranking-row td {
  background-color: rgba(27, 27, 33, 0.98) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11) !important;
}

.ranking-row td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.ranking-row td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.ranking-row:hover {
  z-index: 2;
  filter: brightness(1.18);
  transform: translateY(-3px) scale(1.004);
}

.ranking-row:hover td {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.32);
}

/* League banner area */

.ranking-league-cell {
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(41, 41, 49, 0.98),
    rgba(32, 32, 40, 0.9)
  ) !important;
}

.ranking-league-overlay {
  background: linear-gradient(
    90deg,
    rgba(20, 20, 25, 0.3),
    rgba(20, 20, 25, 0.58)
  ) !important;
}

.ranking-league-content {
  position: relative;
  z-index: 2;
  gap: 1rem !important;
  min-height: 82px;
}

/* Larger, brighter logos */

.ranking-league-logo {
  width: 58px !important;
  height: 58px !important;
  flex: 0 0 58px !important;
  border-radius: 15px !important;
  background: rgba(5, 5, 8, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.ranking-league-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ranking-row:hover .ranking-league-logo {
  transform: scale(1.07);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.4),
    0 0 22px color-mix(in srgb, var(--rank-accent) 28%, transparent);
}

/* Stronger typography */

.ranking-league-content strong {
  color: #ffffff !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.015em;
}

.ranking-league-content small {
  color: rgba(255, 255, 255, 0.58) !important;
  font-weight: 600;
  margin-top: 0.18rem;
}

/* Rank number badge */

.ranking-position-cell {
  width: 88px;
  min-width: 88px;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(31, 31, 37, 0.98),
    rgba(21, 21, 26, 0.98)
  ) !important;
}

.ranking-position-cell strong {
  display: inline-grid;
  min-width: 52px;
  min-height: 52px;
  place-items: center;
  border-radius: 15px;
  color: #ffffff !important;
  font-size: 1.15rem !important;
  font-weight: 900;
  background: linear-gradient(
    145deg,
    rgba(255, 42, 52, 0.95),
    rgba(167, 10, 19, 0.95)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 10px 24px rgba(219, 22, 32, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.ranking-row:hover .ranking-position-cell strong {
  transform: scale(1.07);
}

/* Top three */

.ranking-row:nth-child(1) {
  --rank-accent: #f5c451;
}

.ranking-row:nth-child(1) .ranking-position-cell strong {
  color: #1e1602 !important;
  background: linear-gradient(145deg, #ffe28a, #c89014);
  box-shadow:
    0 12px 30px rgba(240, 186, 54, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ranking-row:nth-child(2) {
  --rank-accent: #c9d1dd;
}

.ranking-row:nth-child(2) .ranking-position-cell strong {
  color: #15171b !important;
  background: linear-gradient(145deg, #edf1f6, #8f99a8);
  box-shadow:
    0 12px 28px rgba(183, 193, 207, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.ranking-row:nth-child(3) {
  --rank-accent: #c9804b;
}

.ranking-row:nth-child(3) .ranking-position-cell strong {
  color: #1e0d04 !important;
  background: linear-gradient(145deg, #e7a06c, #8f4824);
  box-shadow:
    0 12px 28px rgba(181, 95, 45, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Movement */

.ranking-movement-cell {
  width: 115px;
  min-width: 115px;
  text-align: center;
  background: rgba(20, 20, 25, 0.98) !important;
}

.ranking-movement {
  min-width: 62px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.movement-up {
  color: #79e2a6 !important;
  background: rgba(20, 106, 61, 0.23) !important;
  border-color: rgba(76, 210, 132, 0.28) !important;
}

.movement-down {
  color: #ff7a82 !important;
  background: rgba(130, 23, 34, 0.24) !important;
  border-color: rgba(255, 74, 86, 0.28) !important;
}

.movement-same,
.movement-new {
  color: rgba(255, 255, 255, 0.68) !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

/* Tier area */

.ranking-tier-cell {
  width: 128px;
  min-width: 128px;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(28, 16, 19, 0.98),
    rgba(21, 12, 15, 0.98)
  ) !important;
}

.ranking-tier-cell .tier-badge {
  min-width: 82px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  letter-spacing: 0.015em;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

/* Tier-based row highlights */

.ranking-row.tier-s td {
  border-color: rgba(255, 45, 56, 0.22) !important;
}

.ranking-row.tier-a td {
  border-color: rgba(166, 92, 255, 0.19) !important;
}

.ranking-row.tier-b td {
  border-color: rgba(58, 142, 255, 0.17) !important;
}

.ranking-row.tier-c td {
  border-color: rgba(64, 200, 127, 0.16) !important;
}

/* Mobile */

@media (max-width: 760px) {
  .ranking-position-cell {
    width: 68px;
    min-width: 68px;
  }

  .ranking-position-cell strong {
    min-width: 44px;
    min-height: 44px;
    font-size: 1rem !important;
    border-radius: 13px;
  }

  .ranking-league-logo {
    width: 48px !important;
    height: 48px !important;
    flex-basis: 48px !important;
  }

  .ranking-movement-cell {
    width: 88px;
    min-width: 88px;
  }

  .ranking-tier-cell {
    width: 100px;
    min-width: 100px;
  }
}
/* =========================================================
   FDH — BRIGHTER FULL RANKINGS + NEW TIER GRADIENTS
   Keep this at the very bottom of styles.css
   ========================================================= */

/* Brighter overall ranking container */

.rankings-page-body .ranking-wrap,
.rankings-page .ranking-wrap,
.ranking-wrap {
  background: linear-gradient(
    180deg,
    rgba(25, 25, 31, 0.98),
    rgba(16, 16, 21, 0.98)
  ) !important;

  border: 1px solid rgba(255, 255, 255, 0.13) !important;

  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Force the rows to be visibly lighter */

.ranking-row td {
  background: linear-gradient(
    180deg,
    rgba(42, 42, 50, 0.98),
    rgba(31, 31, 38, 0.98)
  ) !important;

  border-top-color: rgba(255, 255, 255, 0.13) !important;
  border-bottom-color: rgba(255, 255, 255, 0.13) !important;
}

/* League area */

.ranking-row .ranking-league-cell {
  background: linear-gradient(
    90deg,
    rgba(59, 59, 69, 0.98),
    rgba(43, 43, 53, 0.96)
  ) !important;
}

/* Reduce the dark banner overlay */

.ranking-row .ranking-league-overlay {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(0, 0, 0, 0.04) 40%,
    rgba(0, 0, 0, 0.08) 100%
  ) !important;
}

/* Position, movement and tier columns */

.ranking-row .ranking-position-cell {
  background: linear-gradient(
    180deg,
    rgba(46, 46, 55, 0.99),
    rgba(33, 33, 41, 0.99)
  ) !important;
}

.ranking-row .ranking-movement-cell {
  background: linear-gradient(
    180deg,
    rgba(38, 38, 46, 0.99),
    rgba(28, 28, 35, 0.99)
  ) !important;
}

.ranking-row .ranking-tier-cell {
  background: linear-gradient(
    180deg,
    rgba(41, 41, 49, 0.99),
    rgba(29, 29, 36, 0.99)
  ) !important;
}

/* Stronger text contrast */

.ranking-league-content strong {
  color: #ffffff !important;
}

.ranking-league-content small {
  color: rgba(255, 255, 255, 0.67) !important;
}

/* Brighter hover */

.ranking-row:hover td {
  filter: brightness(1.14);
}

.ranking-row:hover .ranking-league-cell {
  background: linear-gradient(
    90deg,
    rgba(72, 72, 84, 0.99),
    rgba(51, 51, 63, 0.98)
  ) !important;
}

/* =========================================================
   NEW TIER BADGE COLORS
   ========================================================= */

.tier-badge {
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

/* S Tier — Gold / Yellow */

.tier-badge.tier-s,
.tier-s .tier-badge {
  color: #241900 !important;

  background: linear-gradient(
    135deg,
    #fff19a 0%,
    #f5c542 48%,
    #c99210 100%
  ) !important;

  border-color: rgba(255, 220, 91, 0.6) !important;

  box-shadow:
    0 10px 24px rgba(230, 177, 34, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

/* A Tier — Purple / Pink */

.tier-badge.tier-a,
.tier-a .tier-badge {
  color: #fff !important;

  background: linear-gradient(
    135deg,
    #8d5cff 0%,
    #c44cff 48%,
    #ff5ca8 100%
  ) !important;

  border-color: rgba(221, 102, 255, 0.5) !important;

  box-shadow:
    0 10px 24px rgba(177, 66, 234, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* B Tier — Blue / Teal */

.tier-badge.tier-b,
.tier-b .tier-badge {
  color: #fff !important;

  background: linear-gradient(
    135deg,
    #3478ff 0%,
    #1aa7e8 48%,
    #18d0bd 100%
  ) !important;

  border-color: rgba(59, 190, 225, 0.5) !important;

  box-shadow:
    0 10px 24px rgba(31, 142, 212, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* C Tier — Green / Yellow */

.tier-badge.tier-c,
.tier-c .tier-badge {
  color: #132000 !important;

  background: linear-gradient(
    135deg,
    #38c96b 0%,
    #8fdb4d 48%,
    #e5dc42 100%
  ) !important;

  border-color: rgba(172, 218, 74, 0.5) !important;

  box-shadow:
    0 10px 24px rgba(104, 183, 73, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}
/* Final brightness fix for full rankings league cells */

.ranking-row .ranking-league-cell {
  background: linear-gradient(
    90deg,
    rgba(70, 70, 82, 0.98),
    rgba(50, 50, 62, 0.98)
  ) !important;
}

.ranking-row .ranking-league-overlay {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03)
  ) !important;
  opacity: 1 !important;
}

.ranking-row .ranking-league-content {
  position: relative;
  z-index: 2;
}

.ranking-row:hover .ranking-league-cell {
  background: linear-gradient(
    90deg,
    rgba(82, 82, 96, 0.99),
    rgba(59, 59, 72, 0.99)
  ) !important;
}
/* =========================================================
   FINAL FULL-RANKINGS BRIGHTNESS FIX
   ========================================================= */

#fullRankingBody .ranking-row .ranking-league-cell {
  position: relative !important;
  isolation: isolate !important;

  background-color: #454550 !important;
  background-image:
    linear-gradient(90deg, rgba(82, 82, 94, 0.88), rgba(57, 57, 69, 0.92)),
    var(--ranking-banner) !important;

  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Disable older dark image layers */

#fullRankingBody .ranking-row .ranking-league-cell::before,
#fullRankingBody .ranking-row .ranking-league-cell::after {
  content: none !important;
  display: none !important;
}

/* Keep only a very light overlay */

#fullRankingBody .ranking-row .ranking-league-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;

  opacity: 1 !important;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.025)
  ) !important;
}

/* Keep the logo and text above the overlay */

#fullRankingBody .ranking-row .ranking-league-content {
  position: relative !important;
  z-index: 2 !important;
}

/* Brighter hover */

#fullRankingBody .ranking-row:hover .ranking-league-cell {
  background-color: #555563 !important;
  background-image:
    linear-gradient(90deg, rgba(98, 98, 112, 0.83), rgba(67, 67, 81, 0.88)),
    var(--ranking-banner) !important;
}
/* FINAL full rankings brightness override */

body.rankings-page-body #fullRankingBody .ranking-row .ranking-league-cell {
  background: linear-gradient(90deg, #686874 0%, #50505d 100%) !important;
  background-image: none !important;
}

body.rankings-page-body #fullRankingBody .ranking-row .ranking-league-overlay {
  display: none !important;
}

body.rankings-page-body
  #fullRankingBody
  .ranking-row
  .ranking-league-cell::before,
body.rankings-page-body
  #fullRankingBody
  .ranking-row
  .ranking-league-cell::after {
  display: none !important;
  content: none !important;
}

body.rankings-page-body
  #fullRankingBody
  .ranking-row:hover
  .ranking-league-cell {
  background: #6a6a78 !important;
}
/* Compact full schedule */

.homepage-schedule-list.compact-schedule {
  display: grid;
  gap: 1rem;
}

.schedule-day-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(14, 14, 18, 0.92);
}

.schedule-day-heading {
  padding: 0.9rem 1rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.schedule-day-races {
  display: grid;
}

.compact-schedule-row {
  display: grid;
  grid-template-columns: 90px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 72px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

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

.compact-schedule-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.compact-schedule-time {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.compact-schedule-logo {
  width: 44px;
  height: 44px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-schedule-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compact-schedule-logo span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 850;
}

.compact-schedule-main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.compact-schedule-main strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-schedule-main span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-schedule-button {
  min-width: 76px;
  padding: 0.65rem 0.9rem;
}

@media (max-width: 700px) {
  .compact-schedule-row {
    grid-template-columns: 72px 40px minmax(0, 1fr);
  }

  .compact-schedule-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
