/* === GLOBALNE === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #fefefe 0%, #f3f3f3 100%);
  color: #000;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

/* === NAVBAR === */
.navbar {
  padding: 1rem 2rem;
  background-color: #ffffff;
  border-bottom: 2px solid #000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-weight: 700;
  color: #000 !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.lang-flag {
  margin-right: 0.35rem;
  border: 1px solid #000;
  border-radius: 0.2rem;
  display: inline-flex;
  width: 1.5rem;
  height: 1rem;
  overflow: hidden;
}

.navbar-toggler {
  border: 1px solid #000;
  color: #000;
}

.nav-link {
  color: #000 !important;
  margin-left: 1rem;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #ff1a1a !important;
  transform: translateY(-1px);
}

.dropdown-menu {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
  color: #000;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
}

.dropdown-item.active {
  background: #ff1a1a;
  color: #fff;
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  background: #fff;
  border: 2px solid #000;
  border-radius: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  width: 100%;
  margin: 3rem auto 2rem;
  max-width: 1100px;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}

.gradient-text {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-gradient {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: white;
  border: 2px solid #111;
  padding: 0.75rem 2rem;
  font-weight: bold;
  margin-top: 1.5rem;
  border-radius: 0.5rem;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* === FEATURES === */
.features {
  padding: 3rem 1rem 4rem;
  background: #f7f7f7;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.08);
}

.feature-card {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  color: #111;
  transition: all 0.3s ease;
  border: 2px solid #000;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
  background: #fff8f5;
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(255, 26, 26, 0.2);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ff1a1a, #ffc107);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === ABOUT PAGE === */
.about-hero {
  padding: 4rem 1rem 2rem;
  position: relative;
  z-index: 1;
}

.about-hero .container {
  background: #ffffff;
  border: 1px solid #222;
  border-radius: 1rem;
  padding: 3rem 2rem;
  max-width: 900px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.about-hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.about-hero-lead {
  font-size: 1.1rem;
  color: #333;
  margin: 0;
}

.about-overview {
  padding: 2rem 0 1rem;
}

.about-card {
  height: 100%;
  background: #fff;
  border: 1px solid #222;
  border-radius: 0.85rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.about-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  padding-left: 1.4rem;
  position: relative;
}

.about-case-studies {
  padding: 3rem 0 4rem;
}

.about-case-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  background: #fff;
  border: 1px solid #222;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.case-study-card {
  height: 100%;
  border: 1px solid #222;
  border-radius: 1rem;
  background: #fff;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.case-study-card-header h3 {
  margin-bottom: 0.25rem;
  font-size: 1.3rem;
  padding-left: 1.5rem;
  position: relative;
}

.case-study-subtitle {
  color: #555;
  margin-bottom: 1rem;
  font-weight: 500;
}

.case-study-list {
  margin: 1.25rem 0 0;
  padding-left: 1.2rem;
  color: #111;
}

.case-study-list li {
  margin-bottom: 0.35rem;
}

.about-case-header h2 {
  position: relative;
  padding-left: 1.75rem;
}

.about-case-header h2::before,
.about-card h3::before,
.case-study-card-header h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5rem;
  height: 70%;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff1a1a, #ffc107);
  box-shadow: 0 0 8px rgba(255, 26, 26, 0.3);
}

/* === EVENTS PAGE === */
.events-wrapper {
  padding: 4rem 1rem 5rem;
  position: relative;
  z-index: 1;
}

.events-header {
  background: #fff;
  border: 2px solid #000;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  margin-bottom: 3rem;
}

.events-header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: #000;
}

.events-header p {
  margin-top: 0.75rem;
  color: #333;
}


.events-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.events-sort-buttons {
  display: inline-flex;
  gap: 0.5rem;
}

.events-sort-btn {
  border: 2px solid #000;
  background: #fff;
  color: #000;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.events-sort-btn:hover {
  background: #000;
  color: #fff;
}

.events-sort-btn.active,
.events-sort-btn.active:hover {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
  border-color: #ff1a1a;
}

.events-sort-btn .sort-indicator {
  font-size: 0.9rem;
}

.events-table-wrapper {
  background: #fff;
  border: 2px solid #000;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.events-table th {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.events-table td {
  font-weight: 500;
  color: #111;
}

.events-link {
  color: #000;
  font-weight: 700;
}

.events-link:hover {
  color: #ff1a1a;
}

.events-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.events-name::before {
  content: "";
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  display: inline-block;
}

.events-empty {
  background: #fff9f0;
  border: 2px dashed #000;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  font-weight: 600;
  color: #000;
}

/* === EVENT DETAILS PAGE === */
.event-details {
  max-width: 1500px;
  padding: 1rem 1rem 3rem;
  position: relative;
  z-index: 1;
}

.event-toolbar {
  margin-bottom: 0.75rem;
}

.event-info-box {
  background: #fff;
  border: 2px solid #000;
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.event-info-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.event-info-head i {
  font-size: 2rem;
  color: #ff1a1a;
}

.event-info-meta {
  margin: 0.35rem 0 0;
  color: #444;
}

.event-video-card,
.event-panel {
  background: #fff;
  border: 2px solid #000;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  height: 100%;
}

.event-viewer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-player-layout {
  display: grid;
  grid-template-columns: minmax(0, calc(var(--main-player-width, 66.666%) - 0.375rem)) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  position: relative;
}

.event-player-layout.side-count-0 {
  grid-template-columns: minmax(0, 1fr);
}

.event-player-layout.side-count-0 .event-side-players {
  display: none;
}

.event-main-player {
  min-width: 0;
}

.event-main-player .event-video-card {
  padding: 0;
  border-radius: 0.45rem;
  background: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  height: auto;
}

.event-main-player .ratio {
  background: #000;
}

.event-main-player #camera-video {
  display: block;
  background: #000;
  object-fit: contain;
}

.event-player-layout .event-side-players {
  display: grid;
  gap: 0.75rem;
  height: var(--event-main-player-height, auto);
  max-height: var(--event-main-player-height, none);
  min-height: 0;
  overflow: hidden;
  align-self: start;
}

.event-player-layout.side-count-1 .event-side-players {
  grid-template-rows: minmax(0, 1fr);
}

.event-player-layout.side-count-2 .event-side-players {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.event-player-layout.side-count-3 .event-side-players {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.event-player-layout.layout-2x2 .event-side-players {
  height: auto;
  max-height: none;
  overflow: visible;
}

.event-player-layout.layout-2x2 .athlete-side-player {
  aspect-ratio: 16 / 9;
}

.event-player-layout.layout-2x2 .event-main-player .event-video-card {
  height: 100%;
}

.event-player-layout.layout-2x2 .event-main-player .ratio {
  height: 100%;
}

.event-camera-strip {
  min-height: 58px;
}

.event-camera-choice {
  min-width: 86px;
  max-width: 140px;
}

.event-stream-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.92);
}

.event-stream-controls input[type="range"] {
  width: 100%;
  accent-color: #ff1a1a;
}

.event-stream-time {
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: right;
  color: #fff;
  white-space: nowrap;
}

.event-stream-time strong {
  font-size: 0.85rem;
  font-weight: 700;
}

.event-stream-time small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
}

@media (max-width: 576px) {
  .event-stream-controls {
    grid-template-columns: 1fr;
  }

  .event-stream-time {
    min-width: 0;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 991.98px) {
  .event-player-layout,
  .event-player-layout.side-count-0 {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-side-players {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
  }

  .event-player-layout.side-count-1 .event-side-players,
  .event-player-layout.side-count-2 .event-side-players,
  .event-player-layout.side-count-3 .event-side-players {
    grid-template-rows: none;
  }
}

.event-panel-title {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.event-panel-title::before {
  content: "";
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  display: inline-block;
}

.event-camera-list .list-group-item {
  border: 1px solid #000;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.event-camera-list .list-group-item:last-child {
  margin-bottom: 0;
}


.event-camera-list .list-group-item:hover {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
  border-color: #ff1a1a;
}

.event-camera-list .list-group-item.active,
.event-camera-list .list-group-item.active:hover {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
  border-color: #ff1a1a;
}

.athlete-group {
  margin: 3rem 0;
  padding-top: 0;
  position: relative;
}

.athlete-group::before {
  content: "";
  position: absolute;
  top: -2rem;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  border-radius: 999px;
}

.athlete-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.athlete-group-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
}

.category-next-link {
  color: #000;
  font-size: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.category-next-link:hover {
  color: #ff1a1a;
  transform: translateY(2px);
}


.athlete-table-wrapper {
  border: 2px solid #000;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
}

.athlete-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.athlete-card {
  background: #fff8f5;
  border: 2px solid #000;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}


.athlete-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(255, 26, 26, 0.25);
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
}

.athlete-card:hover .athlete-name,
.athlete-card:hover .athlete-meta,
.athlete-card:hover .athlete-icon {
  color: #fff;
}

.athlete-card:hover .athlete-icon {
  background: rgba(0, 0, 0, 0.25);
  border-color: #fff;
}

.athlete-card:hover .athlete-avatar {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.athlete-avatar,
.athlete-icon {
  width: 120px;
  height: 160px;
  border-radius: 0.75rem;
  margin: 0 auto 0.75rem;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #000;
}

.athlete-icon {
  font-size: 3rem;
  color: #111;
}

.athlete-name {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  margin: 0;
}

.athlete-meta {
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.35rem;
}

/* === ATHLETE PAGE === */
body.athlete-view {
  background: linear-gradient(180deg, #fefefe 0%, #f3f3f3 100%);
  color: #000;
  height: 100vh;
  overflow: hidden;
}

.athlete-page {
  max-width: 1500px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 0.5rem;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.athlete-toolbar {
  flex: 0 0 auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.athlete-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #000;
  font-size: 0.78rem;
  font-weight: 700;
}

.athlete-back-button i {
  color: #ff1a1a;
  font-size: 1.05rem;
}

.athlete-context {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  color: #555;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.athlete-context span,
.athlete-context strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.athlete-context strong {
  color: #000;
}

.athlete-run-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 360px;
  padding: 0.18rem 0.28rem 0.18rem 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #222;
}

.athlete-run-picker i {
  flex: 0 0 auto;
  color: #ff1a1a;
  font-size: 0.9rem;
}

.athlete-run-picker label {
  flex: 0 0 auto;
  margin: 0;
  color: #555;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.athlete-run-select {
  min-width: 9rem;
  max-width: 18rem;
  height: 1.85rem;
  padding: 0 1.7rem 0 0.45rem;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  outline: none;
}

.athlete-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex: 0 0 auto;
}

.athlete-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.athlete-lang-switch a {
  min-width: 2rem;
  padding: 0.28rem 0.42rem;
  border-radius: 4px;
  color: #222;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.athlete-lang-switch a.active {
  color: #fff;
  background: #111;
}

.athlete-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #ff1a1a;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.athlete-live-mark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 10px #ff3b30;
}

.athlete-info-box {
  margin-bottom: 2rem;
}

.athlete-info-box i {
  color: #ff1a1a;
}

.athlete-info-meta {
  margin: 0.25rem 0 0;
  color: #444;
}

.athlete-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #000;
}

.athlete-section-title i {
  color: #ff1a1a;
}

.athlete-video-card {
  padding: 0;
  border-radius: 0.45rem;
  border: 2px solid #000;
  background: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  position: relative;
}

.athlete-player-layout {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, calc(var(--main-player-width, 66.666%) - 0.375rem)) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  position: relative;
  height: auto;
  min-height: 0;
}

.athlete-main-player,
.athlete-side-players {
  min-width: 0;
  min-height: 0;
}

.athlete-main-player .athlete-video-card {
  height: 100%;
}

.athlete-main-player .athlete-video-wrapper,
.athlete-main-player .ratio {
  height: 100%;
}

.athlete-side-players {
  display: grid;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.side-count-0 {
  grid-template-columns: minmax(0, 1fr);
}

.side-count-0 .athlete-side-players,
.side-count-0 .player-resize-handle {
  display: none;
}

.side-count-1 .athlete-side-players {
  grid-template-rows: minmax(0, 1fr);
}

.side-count-2 .athlete-side-players {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.side-count-3 .athlete-side-players {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.layout-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.layout-2x2 .athlete-side-players {
  display: contents;
}

.layout-2x2 .athlete-side-player {
  min-height: 0;
}

.layout-2x2 .player-resize-handle {
  display: none;
}

.player-resize-handle {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: calc(var(--main-player-width, 66.666%) + 0.375rem);
  width: 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
}

.player-resize-handle::after {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 50%;
  width: 0.15rem;
  height: 4rem;
  border-radius: 999px;
  background: #ff1a1a;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-resize-handle:hover::after,
body.is-resizing-player .player-resize-handle::after {
  opacity: 1;
}

.athlete-side-player {
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  min-width: 0;
}

.athlete-side-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
}

.athlete-side-player-label {
  color: #ff1a1a;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.athlete-side-video-frame {
  position: relative;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #080808;
}

.athlete-side-source-badge {
  position: absolute;
  z-index: 3;
  top: 0.35rem;
  left: 0.35rem;
  max-width: calc(100% - 3rem);
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.side-player-close {
  position: absolute;
  z-index: 3;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  cursor: pointer;
}

.athlete-side-player.is-dragging {
  opacity: 0.45;
}

.athlete-side-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.athlete-side-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #999;
  font-size: 0.8rem;
  pointer-events: none;
}

@media (max-width: 991.98px) {
  body.athlete-view {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .athlete-page {
    height: auto;
    min-height: 100vh;
  }

  .athlete-player-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .athlete-main-player .athlete-video-card {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .athlete-main-player .athlete-video-wrapper,
  .athlete-main-player .ratio {
    height: 100%;
  }

  .athlete-side-players {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
  }

  .side-count-1 .athlete-side-players,
  .side-count-2 .athlete-side-players,
  .side-count-3 .athlete-side-players {
    grid-template-rows: none;
  }

  .player-resize-handle {
    display: none;
  }

  .layout-2x2 {
    grid-template-columns: 1fr !important;
    grid-template-rows: none;
  }

  .layout-2x2 .athlete-side-players {
    display: grid;
  }
}

@media (max-width: 575.98px) {
  .athlete-player-layout {
    min-height: 0;
  }
}

.athlete-video {
  width: 100%;
  height: 100%;
  border-radius: 0.45rem;
  background: #000;
}

.athlete-ad-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 70px;
  text-align: center;
  padding-bottom: 0.5rem;
  z-index: 15;
  background: transparent;
}

.athlete-ad-banner .ad-banner-img {
  max-height: 60px;
  object-fit: contain;
}

.athlete-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.6rem;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 0 0 0.45rem 0.45rem;
  z-index: 20;
}

.athlete-livetiming {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(185px, 15%, 205px);
  padding: 0.25rem;
  pointer-events: none;
  z-index: 10;
}

.athlete-livetiming-card {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.36) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.56rem;
  padding: 0.24rem !important;
  backdrop-filter: blur(2px);
}

.athlete-livetiming-card h6 {
  font-size: 0.64rem;
  line-height: 1.15;
  margin-bottom: 0.28rem !important;
}

.athlete-livetiming-card .badge {
  font-size: 0.52rem;
  padding: 0.18em 0.34em;
}

.athlete-livetiming table {
  --bs-table-bg: transparent;
  --bs-table-color: rgba(255, 255, 255, 0.88);
  --bs-table-border-color: rgba(255, 255, 255, 0.14);
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.14);
  font-size: 0.55rem;
  table-layout: fixed;
}

.athlete-livetiming th,
.athlete-livetiming td {
  background: transparent !important;
  padding: 0.1rem 0.13rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.athlete-livetiming th:first-child,
.athlete-livetiming td:first-child {
  width: 1.25rem;
}

.athlete-livetiming th:last-child,
.athlete-livetiming td:last-child {
  width: 4.55rem;
}

.athlete-livetiming tr[data-source] {
  cursor: pointer;
}

.athlete-livetiming tr[data-source]:hover td {
  background: rgba(255, 193, 7, 0.12) !important;
}

.athlete-livetiming tr.is-source-active td {
  background: rgba(255, 193, 7, 0.42) !important;
  color: #fff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16), inset 0 -1px rgba(0, 0, 0, 0.2);
}

.athlete-livetiming tr.is-source-active td:first-child {
  color: #ffc107;
  box-shadow: inset 3px 0 0 #ffc107, inset 0 1px rgba(255, 255, 255, 0.16), inset 0 -1px rgba(0, 0, 0, 0.2);
}

.athlete-livetiming tr.is-source-active .livetiming-kart-badge {
  background-color: #ffca2c !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 8px rgba(255, 193, 7, 0.65);
}

.livetiming-driver {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
  max-width: 100%;
}

.livetiming-kart-badge {
  flex: 0 0 auto;
  color: #1f1a00 !important;
  font-weight: 800;
}

.livetiming-driver-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.livetiming-change {
  display: inline-block;
  margin-left: 0.14rem;
  font-weight: 800;
}

.livetiming-change.is-up {
  color: #39d98a;
}

.livetiming-change.is-down {
  color: #ff5c5c;
}

.athlete-panel {
  height: 100%;
}

.athlete-run-list .list-group-item {
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #000;
  color: #000;
}

.athlete-run-list .list-group-item:last-child {
  margin-bottom: 0;
}

.athlete-run-list .list-group-item.active,
.athlete-run-list .list-group-item:hover {
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
  border-color: #ff1a1a;
}

.driver-strip {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 54px;
  padding: 0.45rem 0 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: #ff1a1a transparent;
}

.driver-strip-main {
  padding-top: 0;
}

.player-source-panel {
  flex: 0 0 auto;
  position: relative;
  z-index: 10;
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem 0.35rem;
  border-top: 2px solid #000;
  background: #fff;
}

.player-source-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-source-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-count {
  color: #666;
  font-size: 0.7rem;
}

.layout-toggle {
  margin-left: auto;
  padding: 0.3rem 0.55rem;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.layout-toggle:not(:disabled):hover,
.layout-toggle[aria-pressed="true"] {
  background: #000;
  color: #fff;
}

.layout-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.player-source-hint {
  margin: 0;
  color: #777;
  font-size: 0.65rem;
}

.driver-choice {
  flex: 0 0 auto;
  min-width: 66px;
  max-width: 110px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.35rem 0.25rem;
  border: 1px solid #000;
  border-radius: 0.35rem;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.driver-choice:hover,
.driver-choice.active {
  border-color: #ff1a1a;
  background: linear-gradient(90deg, #ff1a1a, #ffc107);
  color: #fff;
}

.driver-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff8f5;
  border: 1px solid #000;
  color: #000;
  font-size: 0.58rem;
  font-weight: 800;
}

.driver-label {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 991.98px) {
  .athlete-page {
    padding-top: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .athlete-context {
    display: none;
  }

  .athlete-toolbar {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .athlete-toolbar-actions {
    gap: 0.45rem;
  }

  .athlete-run-picker {
    max-width: 44vw;
    padding-left: 0.38rem;
  }

  .athlete-run-picker label {
    display: none;
  }

  .athlete-run-select {
    min-width: 6.5rem;
    max-width: 36vw;
    font-size: 0.7rem;
  }

  .athlete-lang-switch a {
    min-width: 1.8rem;
    padding-inline: 0.32rem;
  }
}

/* === REPORT PAGE === */
.report-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.68), #0a0a0a 42%, #121212 100%),
    url('/images/hero-poster.svg') center top / cover fixed;
  color: #fff;
  font-family: 'Sora', system-ui, sans-serif;
}

.report-shell .container {
  width: min(1200px, calc(100% - 2rem));
  max-width: none;
}

.report-top-nav {
  position: fixed;
  inset: 1rem 0 auto;
  z-index: 30;
}

.report-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1rem;
}

.report-logo {
  height: 36px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.report-nav-links,
.report-lang-switch {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.report-nav-links a,
.report-lang-switch a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.report-nav-links a:hover,
.report-nav-links a.active {
  color: #fff;
}

.report-lang-switch {
  gap: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.2rem;
}

.report-lang-switch a {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.report-lang-switch a.active {
  background: #ff2a2a;
  color: #fff;
}

.report-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9rem 1rem 5rem;
  position: relative;
  z-index: 1;
}

.report-card {
  width: min(760px, 100%);
  margin: 0 auto;
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.report-kicker {
  display: inline-block;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.14);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: #00d4ff;
  margin-bottom: 1rem;
}

.report-header h1 {
  margin: 0;
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 0.95;
  font-size: clamp(3rem, 8vw, 5.4rem);
  color: #fff;
}

.report-header p {
  margin: 1rem 0 0;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.report-form {
  margin-top: 2rem;
}

.report-shell .form-label {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.report-shell .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fff;
  padding: 0.9rem 1rem;
  box-shadow: none;
}

.report-shell .form-control::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.report-shell .form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.7);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.12);
}

.report-shell .btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #ff2a2a;
  color: #fff;
  padding: 0.9rem 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 34px rgba(255, 42, 42, 0.28);
}

.report-shell .btn-gradient:hover {
  background: #fff;
  color: #0a0a0a;
  transform: translateY(-2px);
}

.report-shell .alert {
  border-radius: 8px;
  border-width: 1px;
  margin-top: 1.5rem;
}

.report-contact {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.report-phone {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #00d4ff;
  text-decoration: none;
}

.report-phone:hover {
  color: #fff;
}

.report-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  padding: 2.2rem 0;
  position: relative;
  z-index: 1;
}

.report-footer-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.report-small {
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.7);
}

.report-shell .glow-bg {
  position: fixed;
  inset: auto -20% -30% auto;
  width: 80vw;
  height: 80vw;
  background:
    radial-gradient(circle at 65% 40%, rgba(255, 42, 42, 0.26), transparent 38%),
    radial-gradient(circle at 40% 60%, rgba(0, 212, 255, 0.18), transparent 42%);
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 992px) {
  .report-nav-wrap {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .report-nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 0.35rem;
  }
}

@media (max-width: 620px) {
  .report-top-nav {
    inset: 0.75rem 0 auto;
  }

  .report-nav-wrap {
    border-radius: 12px;
  }

  .report-nav-links {
    gap: 0.8rem;
    font-size: 0.68rem;
  }

  .report-page {
    padding-top: 11rem;
  }

  .report-footer-wrap {
    grid-template-columns: 1fr;
  }
}

/* === FOOTER === */
.footer-custom {
  background-color: #fdfdfd;
  border-top: 2px solid #000;
  color: #111;
  font-weight: 500;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding: 1.5rem 0;
}

.footer-brand {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-brand-name {
  color: #000;
}

.footer-brand-tv {
  color: #fff;
  background: #ff1a1a;
  border-radius: 0.3rem;
  padding: 0.1rem 0.45rem;
  font-weight: 700;
}

.footer-custom small {
  color: #333;
  display: block;
  margin-top: 0.25rem;
}

/* === GLOW BG === */
.glow-bg {
  position: absolute;
  top: 0;
  right: -20%;
  width: 80vw;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(255, 26, 26, 0.08), rgba(255, 193, 7, 0.04), transparent 70%);
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 767.98px) {
  .hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .glow-bg {
    right: -40%;
    top: -20%;
    width: 120vw;
    height: 120vw;
    filter: blur(90px);
  }

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

@media (min-width: 768px) and (max-width: 1199.98px) {
  .athlete-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4rem;
  }
}
