:root {
  --fp-primary: #10b981;
  --fp-primary-dark: #059669;
  --fp-accent: #06b6d4;
  --fp-warning: #f59e0b;
  --fp-danger: #ef4444;
  --fp-bg: #f4f7f8;
  --fp-surface: #ffffff;
  --fp-text: #1f2937;
  --fp-muted: #64748b;
  --fp-border: #e2e8f0;
  --fp-sidebar: #0f172a;
  --fp-sidebar-text: #cbd5e1;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body.dark-mode {
  --fp-bg: #0b1220;
  --fp-surface: #111a2b;
  --fp-text: #e2e8f0;
  --fp-muted: #94a3b8;
  --fp-border: #26344a;
}

body.dark-mode .content-wrapper,
body.dark-mode .main-footer {
  background-color: #0b1220;
}

.main-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

body.dark-mode .card,
body.dark-mode .small-box,
body.dark-mode .info-box,
body.dark-mode .direct-chat,
body.dark-mode .timeline > li > .timeline-item {
  background-color: #111a2b;
  color: #e2e8f0;
}

body.dark-mode .card-header,
body.dark-mode .card-footer,
body.dark-mode .modal-content {
  background-color: #111a2b;
  border-color: #26344a;
}

body.dark-mode .form-control,
body.dark-mode .custom-select,
body.dark-mode .input-group-text {
  background-color: #0b1220;
  border-color: #26344a;
  color: #e2e8f0;
}

.fp-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.fp-brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  object-fit: cover;
  background: #0f172a;
}

.fp-brand-name {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.15rem;
  color: #ffffff;
  line-height: 1;
  text-transform: uppercase;
}

.fp-brand-sub {
  display: block;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  color: #10b981;
  margin-top: 3px;
  letter-spacing: 0;
}

.main-sidebar .nav-sidebar .nav-item > .nav-link,
.main-sidebar .nav-sidebar .nav-header {
  letter-spacing: 0;
}

.main-sidebar .nav-sidebar .nav-link.active {
  background-color: rgba(16, 185, 129, 0.16);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #10b981;
}

.main-sidebar .nav-sidebar .nav-link:hover {
  color: #ffffff;
}

.main-sidebar .nav-sidebar .nav-link .nav-icon {
  color: #10b981;
}

.main-sidebar .nav-sidebar .nav-link.active .nav-icon {
  color: #34d399;
}

.main-sidebar {
  background-color: var(--fp-sidebar);
}

.main-sidebar .sidebar {
  background-color: var(--fp-sidebar);
}

.main-sidebar .user-panel .info a {
  color: #e2e8f0;
}

body:not(.dark-mode) .main-sidebar,
body:not(.dark-mode) .main-sidebar .sidebar,
body:not(.dark-mode) .main-sidebar .brand-link {
  background-color: #f8fafc;
}

body:not(.dark-mode) .main-sidebar {
  border-right: 1px solid var(--fp-border);
}

body:not(.dark-mode) .fp-brand-name {
  color: #0f172a;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link,
body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-header,
body:not(.dark-mode) .main-sidebar .user-panel .info a {
  color: #334155;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link:hover,
body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link.active {
  color: #0f172a;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link.active {
  background-color: rgba(16, 185, 129, 0.14);
  box-shadow: inset 3px 0 0 #059669;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link .nav-icon,
body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link.active .nav-icon {
  color: #059669;
}

.main-header.navbar {
  background-color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--fp-border);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  margin-left: 250px;
  height: 56px;
  min-height: 56px;
  z-index: 1034;
}

body.dark-mode .main-header.navbar {
  background-color: rgba(15, 23, 42, 0.95);
  border-bottom-color: #26344a;
}

.main-sidebar .brand-link {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
}

.content-wrapper {
  margin-top: 56px;
}

.main-header.navbar .navbar-nav .nav-link {
  color: #475569;
}

body.dark-mode .main-header.navbar .navbar-nav .nav-link {
  color: #cbd5e1;
}

.main-header.navbar .navbar-nav .nav-link:hover,
.main-header.navbar .navbar-nav .nav-link:focus {
  color: #10b981;
}

.main-header.navbar .navbar-nav .nav-link .navbar-badge {
  color: #ffffff;
}

.fp-hero {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 18%, rgba(16, 185, 129, 0.28), transparent 32%),
    radial-gradient(circle at 72% 82%, rgba(6, 182, 212, 0.22), transparent 38%),
    linear-gradient(118deg, #0f172a 0%, #12203a 48%, #0b1220 100%);
}

.fp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  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: 26px 26px;
  pointer-events: none;
}

.fp-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  background: conic-gradient(
    from 90deg at 50% 50%,
    #ffffff 0deg 90deg,
    rgba(255, 255, 255, 0.08) 90deg 180deg,
    #ffffff 180deg 270deg,
    rgba(255, 255, 255, 0.08) 270deg 360deg
  );
  opacity: 0.16;
  transform: rotate(18deg);
  pointer-events: none;
}

.fp-hero-content {
  position: relative;
  z-index: 1;
  padding: 1.75rem;
}

.fp-hero .fp-kicker {
  color: #34d399;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.fp-hero h1,
.fp-hero h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

.fp-hero p {
  color: #cbd5e1;
  max-width: 760px;
}

.fp-race-stripes {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #10b981 0 18px,
    #0f172a 18px 36px,
    #06b6d4 36px 54px,
    #0f172a 54px 72px
  );
  border-radius: 0 0 8px 8px;
}

.fp-skew-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: #10b981;
  color: #ffffff;
  border: 0;
  font-weight: 700;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.fp-skew-btn:hover,
.fp-skew-btn:focus {
  color: #ffffff;
  background: #059669;
}

.fp-skew-btn.fp-btn-outline {
  background: transparent;
  color: #10b981;
  border: 1px solid #10b981;
}

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

.fp-stat {
  position: relative;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  padding: 1rem;
  overflow: hidden;
}

.fp-stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--fp-primary);
}

.fp-stat .fp-stat-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--fp-primary);
  font-size: 1.15rem;
}

.fp-stat .fp-stat-label {
  color: var(--fp-muted);
  font-size: 0.82rem;
}

.fp-stat .fp-stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--fp-text);
  line-height: 1.2;
}

.fp-card {
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
}

.fp-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--fp-border);
}

.fp-card .card-title {
  font-weight: 700;
  color: var(--fp-text);
}

.fp-muted {
  color: var(--fp-muted);
}

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

.fp-spec-item {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid var(--fp-border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  min-height: 58px;
}

.fp-spec-item .fp-spec-label {
  font-size: 0.72rem;
  color: var(--fp-muted);
  margin-bottom: 2px;
}

.fp-spec-item .fp-spec-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fp-text);
  line-height: 1.2;
}

.fp-spec-item .fp-spec-meta {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--fp-border);
  font-size: 0.7rem;
  color: var(--fp-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.5rem;
  white-space: nowrap;
}

.fp-session-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.fp-session-tile {
  border: 1px solid var(--fp-border);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
}

.fp-session-tile .fp-spec-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fp-text);
  line-height: 1.3;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.fp-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.fp-badge-emerald {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.fp-badge-cyan {
  background: rgba(6, 182, 212, 0.14);
  color: #0891b2;
}

.fp-badge-amber {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.fp-badge-slate {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.fp-badge-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

body.dark-mode .fp-badge-emerald {
  color: #34d399;
}

body.dark-mode .fp-badge-cyan {
  color: #22d3ee;
}

body.dark-mode .fp-badge-amber {
  color: #fbbf24;
}

body.dark-mode .fp-badge-slate {
  color: #94a3b8;
}

body.dark-mode .fp-badge-danger {
  color: #f87171;
}

.fp-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.fp-event-card {
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fp-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.fp-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
}

.fp-event-title {
  font-weight: 800;
  color: var(--fp-text);
  line-height: 1.35;
}

.fp-event-body {
  padding: 0 1rem 1rem;
  color: var(--fp-muted);
  font-size: 0.88rem;
}

.fp-event-body dl {
  margin: 0;
}

.fp-event-body dt {
  color: var(--fp-text);
  font-weight: 700;
  margin-top: 0.55rem;
}

.fp-event-body dd {
  margin: 0.1rem 0 0;
}

.fp-countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #059669;
}

body.dark-mode .fp-countdown {
  color: #34d399;
}

.fp-server-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  padding: 1rem;
}

.fp-server-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.fp-server-name {
  font-weight: 800;
  color: var(--fp-text);
}

.fp-server-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  color: var(--fp-muted);
  font-size: 0.85rem;
}

.fp-progress {
  height: 8px;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.18);
  overflow: hidden;
}

.fp-progress .progress-bar {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.fp-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.fp-calendar-head {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fp-muted);
  padding: 0.4rem 0;
}

.fp-calendar-day {
  min-height: 92px;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 6px;
  padding: 0.4rem;
  font-size: 0.8rem;
  color: var(--fp-text);
  overflow: hidden;
}

.fp-calendar-day.fp-day-today {
  border: 2px solid #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}

.fp-calendar-day.fp-day-off {
  background: transparent;
  border-style: dashed;
  color: var(--fp-muted);
}

.fp-calendar-day .fp-day-num {
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.fp-calendar-event {
  background: rgba(16, 185, 129, 0.12);
  border-left: 3px solid #10b981;
  border-radius: 3px;
  padding: 0.25rem 0.35rem;
  margin-bottom: 0.25rem;
  color: var(--fp-text);
  line-height: 1.25;
}

.fp-cal-event-track {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fp-text);
  line-height: 1.2;
}

.fp-cal-track-cell {
  gap: 4px;
}

.fp-cal-track-cell img {
  margin: 0 !important;
}

.fp-cal-track-cell > div {
  line-height: 1.15;
}

a.fp-calendar-event {
  display: block;
  color: inherit;
}

a.fp-calendar-event:hover {
  text-decoration: none;
  filter: brightness(1.2);
}

.fp-calendar-event.fp-status-finished {
  border-left-color: #64748b;
  background: rgba(100, 116, 139, 0.12);
}

.fp-calendar-event.fp-status-open {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.fp-calendar-event.fp-status-upcoming {
  border-left-color: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
}

.fp-calendar-event.fp-status-live {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.16);
}

.fp-cal-event-pro {
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.fp-cal-event-team {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.fp-cal-event-rookie {
  box-shadow: inset 3px 0 0 #10b981;
}

.fp-event-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.3rem;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}

.fp-kind-label-pro {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.14);
}

.fp-kind-label-team {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.16);
}

.fp-kind-label-rookie {
  color: #10b981;
  background: rgba(16, 185, 129, 0.14);
}

.fp-status-badge {
  display: inline-block;
  padding: 1px 4px;
  margin-right: 3px;
  border-radius: 3px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #ffffff;
}

.fp-status-finished .fp-status-badge {
  background: #64748b;
}

.fp-status-open .fp-status-badge {
  background: #10b981;
}

.fp-status-upcoming .fp-status-badge {
  background: #06b6d4;
}

.fp-status-live .fp-status-badge {
  background: #f59e0b;
}

.fp-calendar-mobile {
  display: none;
}

.fp-mobile-event {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--fp-border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--fp-surface);
}

.fp-mobile-date {
  flex: 0 0 46px;
  font-weight: 800;
  color: var(--fp-primary);
}

.fp-mobile-info {
  flex: 1;
  min-width: 0;
}

.fp-mobile-name {
  font-weight: 700;
  color: var(--fp-text);
  line-height: 1.3;
}

.fp-mobile-name a {
  color: inherit;
}

.fp-mobile-name a:hover {
  color: #10b981;
}

.fp-mobile-meta {
  font-size: 0.75rem;
  color: var(--fp-muted);
  margin-top: 2px;
}

.fp-race-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fp-race-list li {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--fp-border);
}

.fp-race-list li:last-child {
  border-bottom: 0;
}

.fp-race-time {
  color: var(--fp-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.fp-flag-img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.fp-car-logo {
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}

.fp-car-card,
.fp-track-card {
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  overflow: hidden;
}

.fp-car-card .fp-car-visual {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 120%, rgba(16, 185, 129, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
}

.fp-track-card .fp-track-visual {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.25), transparent 62%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.1));
}

.fp-track-map {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 6px solid rgba(6, 182, 212, 0.35);
  box-shadow: inset 0 0 0 3px rgba(6, 182, 212, 0.18);
  background: conic-gradient(
    from 90deg,
    #0ea5e9 0 32deg,
    transparent 32deg 88deg,
    #10b981 88deg 138deg,
    transparent 138deg 220deg,
    #0ea5e9 220deg 285deg,
    transparent 285deg 360deg
  );
  opacity: 0.85;
}

.fp-timeline {
  position: relative;
  padding-left: 1.4rem;
}

.fp-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #10b981, #06b6d4);
  border-radius: 2px;
}

.fp-timeline li {
  position: relative;
  list-style: none;
  margin-bottom: 1rem;
}

.fp-timeline li::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 3px solid var(--fp-surface);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
}

.fp-changelog {
  border-left: 4px solid #10b981;
  background: var(--fp-surface);
  border-radius: 6px;
  padding: 1rem 1.1rem;
}

.fp-changelog .fp-version-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.fp-tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  padding: 1.1rem;
  height: 100%;
}

.fp-tool-card .fp-tool-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--fp-primary);
  font-size: 1.2rem;
}

.fp-wheel {
  position: relative;
  width: min(78vw, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 8px solid #0f172a;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4), 0 18px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.fp-wheel::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0f172a;
  border: 4px solid #10b981;
  z-index: 2;
}

.fp-wheel canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.fp-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #f59e0b;
  z-index: 3;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}

.fp-light-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}

.fp-light {
  aspect-ratio: 1;
  border-radius: 12px;
  background: rgba(100, 116, 139, 0.22);
  border: 2px solid rgba(100, 116, 139, 0.35);
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fp-light.on {
  background: #ef4444;
  border-color: #f87171;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.9);
}

.fp-reaction-result {
  font-size: 2.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--fp-text);
}

.fp-reaction-grade {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

body.dark-mode .fp-reaction-grade {
  color: #34d399;
}

.fp-fab {
  position: fixed;
  right: 14px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fp-fab .btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28);
}

.fp-fab .btn:hover {
  background: #10b981;
  color: #ffffff;
}

.fp-fab-top {
  top: 118px;
}

.fp-float-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--fp-border);
  color: var(--fp-muted);
  font-size: 0.85rem;
}

.fp-doc p {
  color: var(--fp-text);
  line-height: 1.8;
}

.fp-doc h5 {
  font-weight: 800;
  color: var(--fp-text);
  margin-top: 1.5rem;
}

.fp-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--fp-muted);
  border-bottom-width: 1px;
}

.fp-table td,
.fp-table th {
  vertical-align: middle;
  white-space: nowrap;
}

.fp-sticky-table th,
.fp-sticky-table td {
  padding: 0.9rem 0.85rem;
}

.fp-sticky-table thead th {
  padding-top: 1rem;
  padding-bottom: 1rem;
  letter-spacing: 0.04em;
  position: sticky;
  top: 56px;
  z-index: 5;
  background-color: var(--fp-surface);
  box-shadow: 0 1px 0 var(--fp-border);
}

body.dark-mode .fp-sticky-table thead th {
  background-color: #111a2b;
}

.fp-select-field {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 280px;
}

.fp-select-field select {
  height: 42px;
  padding: 0 0.9rem 0 2.35rem;
  border-radius: 6px;
}

.fp-select-field .fp-select-field-icon {
  position: absolute;
  left: 0.85rem;
  top: 2.05rem;
  color: #06b6d4;
  pointer-events: none;
}

.fp-bop-track-btn {
  width: 340px;
  height: 50px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
}

.fp-bop-car-btn {
  width: 340px;
  height: 50px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
}

.fp-bop-track-menu {
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
}

.fp-record-car-btn {
  width: 500px;
}

.fp-record-car-menu {
  width: 500px;
}

.fp-bop-track-option {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
}

.fp-lap-num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-weight: 800;
  font-size: 0.8rem;
}

body.dark-mode .fp-lap-num {
  color: #34d399;
}

.fp-chart-wrap {
  position: relative;
  height: 240px;
}

.fp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #10b981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.fp-error-card {
  border-top: 3px solid #f59e0b;
}

.fp-error-icon {
  width: 72px;
  height: 72px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  font-size: 1.9rem;
}

.fp-context-switch {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 0;
  margin: 0 0.35rem;
}

.main-header.navbar .navbar-nav .nav-link {
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.main-header.navbar .navbar-nav .nav-link.py-0 {
  padding-left: 0;
  padding-right: 0;
}

.fp-switch-group {
  position: relative;
  display: flex;
  align-items: center;
}

.fp-switch-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 34px;
  padding: 0 26px 0 32px;
  border: 1px solid var(--fp-border);
  border-radius: 6px;
  background-color: var(--fp-surface);
  color: var(--fp-text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fp-switch-group select:hover {
  border-color: #10b981;
}

.fp-switch-group select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.fp-switch-game select {
  width: 120px;
  border-color: rgba(16, 185, 129, 0.34);
}

.fp-switch-season select {
  width: 310px;
  border-color: rgba(6, 182, 212, 0.3);
}

.fp-switch-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  pointer-events: none;
  z-index: 1;
}

.fp-switch-game .fp-switch-icon {
  color: #10b981;
}

.fp-switch-season .fp-switch-icon {
  color: #06b6d4;
}

.fp-switch-arrow {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  color: var(--fp-muted);
  pointer-events: none;
}

.fp-switch-separator {
  width: 1px;
  height: 20px;
  margin: 0 10px;
  background: var(--fp-border);
}

body.dark-mode .fp-switch-group select {
  background-color: #0f1a2e;
  color: #e2e8f0;
}

body.dark-mode .fp-switch-group select option {
  background-color: #0b1220;
  color: #e2e8f0;
}

.fp-club-logo {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 5px;
  box-sizing: border-box;
  border: 1px solid var(--fp-border);
  flex-shrink: 0;
}

.fp-qr-thumb {
  cursor: zoom-in;
}

.fp-qr-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  cursor: zoom-out;
}

.fp-qr-lightbox.show {
  display: flex;
}

.fp-qr-lightbox img {
  max-width: min(80vw, 480px);
  max-height: 80vh;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.fp-steam-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.fp-steam-icon {
  font-size: 1.35rem;
  color: #66c0f4;
}

.fp-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: help;
}

.fp-tip-label {
  width: auto;
  height: auto;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
}

.fp-tip-text {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 230px;
  padding: 0.55rem 0.65rem;
  background: #1f2d3d;
  color: #ffffff;
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 30;
}

.fp-tip:hover .fp-tip-text,
.fp-tip:focus .fp-tip-text {
  opacity: 1;
  visibility: visible;
}

.fp-hero-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.fp-award {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 150px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
}

.fp-award > i {
  font-size: 1.3rem;
}

.fp-award-main {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.fp-award-value {
  font-size: 1.35rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.fp-award-label {
  font-size: 0.68rem;
  color: var(--fp-muted);
}

.fp-award-pole > i {
  color: #10b981;
}

.fp-award-win > i {
  color: #f59e0b;
}

.fp-award-podium > i {
  color: #94a3b8;
}

.fp-member-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  height: 100%;
}

.fp-member-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  font-size: 0.72rem;
  color: var(--fp-muted);
}

.fp-member-stats span {
  white-space: nowrap;
}

.fp-driver-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.fp-highlight-driver-panel,
.fp-target-driver-panel,
.fp-target-team-panel {
  max-height: none;
  overflow: visible;
}

.fp-driver-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
}

.fp-driver-option img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.fp-driver-option .fp-brand-icon {
  width: 18px;
  height: auto;
  border-radius: 0;
}

.fp-driver-option.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.fp-driver-option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fp-target-team-option {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

.fp-target-team-name {
  font-weight: 700;
  margin-right: 0.5rem;
}

.fp-target-team-driver {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.fp-target-team-driver img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.fp-vote-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
}

.fp-vote-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  width: 100%;
  margin-top: 0.35rem;
}

.fp-vote-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 180px;
  font-size: 0.72rem;
  color: var(--fp-muted);
}

.fp-vote-bar .fp-progress {
  flex: 1;
  margin: 0;
}

.fp-driver-link {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fp-driver-link:hover {
  color: #10b981;
  text-decoration: underline;
}

.fp-enter-card {
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--fp-surface);
}

.fp-enter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.fp-driver-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--fp-border);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  background: rgba(16, 185, 129, 0.05);
  flex: 1 1 190px;
  min-width: 0;
}

.fp-driver-chip img,
.fp-driver-card img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 36px;
}

.fp-avatar-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.fp-driver-chip a.fp-avatar-link {
  flex: 0 0 36px;
}

.fp-driver-card a.fp-avatar-link img {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.fp-driver-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.fp-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 0.5rem 0.25rem;
}

.fp-podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 96px;
}

.fp-podium-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--fp-border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.fp-podium-drivers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fp-podium-driver-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fp-border);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.fp-podium-item-team {
  width: 180px;
}

.fp-podium-driver {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 84px;
}

.fp-podium-driver-name {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  max-width: 84px;
  overflow-wrap: break-word;
  white-space: normal;
  color: inherit;
}

.fp-podium-driver-safety {
  font-size: 0.62rem;
  color: var(--fp-muted);
}

.fp-podium-item-team .fp-podium-name {
  max-width: 180px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.25;
}

.fp-podium-item-team .fp-podium-car {
  max-width: 180px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.fp-podium-item > .fp-avatar-link {
  display: inline-flex;
}

@media (max-width: 767.98px) {
  .fp-podium {
    flex-wrap: wrap;
  }

  .fp-podium-item-team {
    width: 148px;
  }

  .fp-podium-driver {
    width: 70px;
  }

  .fp-podium-driver-name {
    max-width: 70px;
  }

  .fp-podium-item-team .fp-podium-name,
  .fp-podium-item-team .fp-podium-car {
    max-width: 148px;
  }
}

.fp-podium-name {
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-podium-score {
  font-size: 0.75rem;
  color: var(--fp-muted);
}

.fp-podium-safety {
  font-size: 0.72rem;
  color: var(--fp-muted);
}

.fp-podium-time {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--fp-warning);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.fp-podium-car {
  font-size: 0.68rem;
  color: var(--fp-muted);
  max-width: 96px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-podium-lg {
  gap: 1rem;
}

.fp-podium-lg .fp-podium-item {
  width: 128px;
}

.fp-podium-lg .fp-podium-avatar {
  width: 60px;
  height: 60px;
}

.fp-podium-lg .fp-podium-name,
.fp-podium-lg .fp-podium-club,
.fp-podium-lg .fp-podium-region,
.fp-podium-lg .fp-podium-store,
.fp-podium-lg .fp-podium-date,
.fp-podium-lg .fp-podium-car {
  max-width: 128px;
}

.fp-podium-lg .fp-podium-region,
.fp-podium-lg .fp-podium-club,
.fp-podium-lg .fp-podium-store {
  font-size: 0.7rem;
  color: var(--fp-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-podium-lg .fp-podium-date {
  font-size: 0.68rem;
  color: var(--fp-muted);
  text-align: center;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.fp-section-divider {
  border-top: 1px dashed var(--fp-border);
}

@media (max-width: 575.98px) {
  .fp-podium-lg {
    gap: 0.4rem;
  }

  .fp-podium-lg .fp-podium-item,
  .fp-podium-lg .fp-podium-name,
  .fp-podium-lg .fp-podium-club,
  .fp-podium-lg .fp-podium-region,
  .fp-podium-lg .fp-podium-store,
  .fp-podium-lg .fp-podium-date,
  .fp-podium-lg .fp-podium-car {
    width: 104px;
    max-width: 104px;
  }

  .fp-podium-lg .fp-podium-avatar {
    width: 52px;
    height: 52px;
  }
}

.fp-podium-block {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #ffffff;
}

.fp-podium-1 {
  height: 92px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.fp-podium-2 {
  height: 70px;
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.fp-podium-3 {
  height: 55px;
  background: linear-gradient(180deg, #b45309, #92400e);
}

.fp-driver-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  padding: 0.7rem;
  text-align: center;
  background: var(--fp-surface);
}

.fp-driver-card img {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.fp-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.fp-video-card {
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fp-video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.fp-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.22), transparent 38%),
    linear-gradient(135deg, #0f172a, #12203a);
  overflow: hidden;
}

.fp-video-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.fp-video-thumb .fp-track-map {
  width: 74px;
  height: 74px;
  border-width: 5px;
}

.fp-video-thumb .fp-car-logo {
  height: 66px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.fp-video-track-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  filter: brightness(0) invert(1);
  z-index: 0;
}

.fp-video-car-box {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.fp-video-car-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.fp-video-car-name {
  background: rgba(0, 0, 0, 0.74);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.fp-video-platform,
.fp-video-track-name {
  position: absolute;
  top: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
}

.fp-video-platform {
  right: 8px;
}

.fp-video-platform .fab {
  color: #f87171;
}

.fp-video-track-name {
  left: 8px;
}

.fp-video-lap {
  position: absolute;
  left: 8px;
  bottom: 8px;
  color: #facc15;
  font-weight: 900;
  font-size: 1.3rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.fp-video-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 1;
}

.fp-video-body {
  padding: 0.55rem 0.7rem 0.6rem;
}

.fp-video-title {
  font-weight: 800;
  color: var(--fp-text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-video-author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--fp-muted);
  font-size: 0.82rem;
  margin-bottom: 0;
}

.fp-video-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.fp-video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-top: 1px solid var(--fp-border);
  padding-top: 0.6rem;
}

.fp-ranking-row td:first-child {
  font-weight: 900;
  color: var(--fp-primary);
}

.fp-login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.24), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.2), transparent 36%),
    linear-gradient(135deg, #0f172a, #0b1220);
}

.fp-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.fp-login-captcha {
  min-width: 64px;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  letter-spacing: 0.2em;
}

.fp-mobile-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.fp-mobile-scroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 991.98px) {
  .main-header.navbar {
    margin-left: 0;
  }

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

  .fp-event-grid {
    grid-template-columns: 1fr;
  }

  .fp-fab {
    right: 8px;
  }

  .fp-fab .btn {
    width: 38px;
    height: 38px;
  }

  .fp-fab-top {
    top: 104px;
  }
}

@media (max-width: 767.98px) {
  .fp-sticky-table thead th {
    position: static;
    top: auto;
    z-index: auto;
    box-shadow: none;
  }

  .fp-mobile-sticky-wrap {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1020;
    display: none;
    overflow: hidden;
    background: var(--fp-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  }

  .fp-mobile-sticky-wrap.is-visible {
    display: block;
  }

  .fp-mobile-sticky-scroll {
    overflow: hidden;
  }

  .fp-sticky-clone {
    margin: 0;
    min-width: 0;
  }

  .fp-sticky-clone thead th {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }

  .fp-header-floating thead {
    visibility: hidden;
  }

  .fp-bop-track-btn,
  .fp-bop-car-btn,
  .fp-record-car-btn,
  .fp-bop-track-menu,
  .fp-record-car-menu {
    width: min(340px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }

  .fp-calendar-grid {
    display: none !important;
  }

  #fp-list-toggle {
    display: none !important;
  }

  #fp-calendar-list {
    display: block !important;
  }
}

@media (max-width: 575.98px) {
  .fp-calendar-grid {
    display: none;
  }

  .fp-calendar-mobile {
    display: block;
  }

  #fp-list-toggle {
    display: none;
  }

  #fp-calendar-list {
    display: block !important;
  }

  .fp-hero h1,
  .fp-hero h2 {
    font-size: 1.35rem;
  }

  .fp-hero-content {
    padding: 1rem;
  }

  .users-list li {
    width: 50% !important;
  }

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

  .fp-driver-chip {
    flex: 1 1 100%;
  }

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

  .fp-session-tiles {
    grid-template-columns: 1fr;
  }

  .fp-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .fp-stat {
    padding: 0.75rem;
  }

  .fp-stat .fp-stat-value {
    font-size: 1.2rem;
  }

  .fp-hero-content {
    padding: 1.2rem;
  }

  .fp-race-list li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .fp-calendar-day {
    min-height: 58px;
    font-size: 0.68rem;
    padding: 0.25rem;
  }

  .fp-calendar-event {
    display: none;
  }

  .fp-calendar-day.has-event::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    margin-top: 4px;
  }

  .fp-brand-name {
    font-size: 0.95rem;
  }
}

/* Mobile optimization */
@media (max-width: 991.98px) {
  .fp-mobile-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .fp-mobile-scroll .table {
    min-width: 100%;
  }

  .main-header.navbar .navbar-nav .nav-link {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
}

@media (max-width: 575.98px) {
  .card-body {
    padding: 0.9rem;
  }

  .card-header,
  .card-footer {
    padding: 0.7rem 0.9rem;
  }

  .btn,
  .fp-skew-btn {
    min-height: 40px;
  }

  .form-control,
  .custom-select,
  .input-group-text {
    font-size: 16px;
  }

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

  .fp-hero p {
    overflow-wrap: anywhere;
  }

  .fp-event-head,
  .fp-server-head {
    flex-wrap: wrap;
  }

  .fp-video-car-name {
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fp-login-bg {
    padding: 0.75rem;
  }

  .fp-login-card {
    padding: 1.25rem 1rem;
  }

  .fp-login-card h1 {
    font-size: 1.3rem;
    overflow-wrap: anywhere;
  }

  .fp-driver-options {
    gap: 0.4rem;
  }

  .fp-driver-option {
    flex: 1 1 100%;
    min-width: 0;
  }

  .fp-driver-option > span,
  .fp-target-team-driver span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fp-target-team-option {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .fp-target-team-name {
    flex: 1 1 100%;
    margin-right: 0;
  }

  .fp-target-team-driver {
    min-width: 0;
  }

  .fp-podium[data-render="车队"] {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .fp-podium[data-render="车队"] .fp-podium-item,
  .fp-podium[data-render="车队"] .fp-podium-item-team {
    width: min(100%, 220px);
    max-width: min(100%, 220px);
  }

  .fp-podium[data-render="车队"] .fp-podium-item:nth-child(1) {
    order: 2;
  }

  .fp-podium[data-render="车队"] .fp-podium-item:nth-child(2) {
    order: 1;
  }

  .fp-podium[data-render="车队"] .fp-podium-item:nth-child(3) {
    order: 3;
  }

  .fp-mobile-scroll {
    position: relative;
  }

  .fp-mobile-scroll.fp-scrollable::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--fp-surface));
    pointer-events: none;
  }

  .fp-mobile-scroll .table {
    font-size: 0.78rem;
  }

  .fp-mobile-scroll .table td,
  .fp-mobile-scroll .table th {
    padding: 0.5rem 0.55rem;
  }

  .fp-ranking-table th:nth-child(n+4):nth-child(-n+7),
  .fp-ranking-table td:nth-child(n+4):nth-child(-n+7),
  .fp-ranking-table th:nth-child(3),
  .fp-ranking-table td:nth-child(3),
  .fp-ranking-table th:nth-child(n+9),
  .fp-ranking-table td:nth-child(n+9) {
    display: none;
  }

  .fp-game-personal-table th:nth-child(n+3):nth-child(-n+5),
  .fp-game-personal-table td:nth-child(n+3):nth-child(-n+5),
  .fp-game-team-table th:nth-child(n+3):nth-child(-n+5),
  .fp-game-team-table td:nth-child(n+3):nth-child(-n+5) {
    display: none;
  }

  .fp-laps-table th:nth-child(3),
  .fp-laps-table td:nth-child(3),
  .fp-laps-table th:nth-child(5),
  .fp-laps-table td:nth-child(5) {
    display: none;
  }

  .fp-laps-table,
  .fp-game-personal-table,
  .fp-game-team-table {
    width: 100%;
  }

  .fp-laps-table td,
  .fp-laps-table th {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}

@media (max-width: 399.98px) {
  .fp-driver-grid {
    grid-template-columns: 1fr;
  }

  .fp-video-grid {
    grid-template-columns: 1fr;
  }

  .fp-podium-lg {
    gap: 0.25rem;
  }

  .fp-podium-lg .fp-podium-item,
  .fp-podium-lg .fp-podium-name,
  .fp-podium-lg .fp-podium-club,
  .fp-podium-lg .fp-podium-region,
  .fp-podium-lg .fp-podium-store,
  .fp-podium-lg .fp-podium-date,
  .fp-podium-lg .fp-podium-car {
    width: 96px;
    max-width: 96px;
  }
}

@media (max-width: 389.98px) {
  .fp-ranking-table td:nth-child(2) {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fp-podium-lg {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .fp-podium-lg .fp-podium-item,
  .fp-podium-lg .fp-podium-name,
  .fp-podium-lg .fp-podium-club,
  .fp-podium-lg .fp-podium-region,
  .fp-podium-lg .fp-podium-store,
  .fp-podium-lg .fp-podium-date,
  .fp-podium-lg .fp-podium-car {
    width: min(100%, 190px);
    max-width: min(100%, 190px);
  }

  .fp-podium-lg .fp-podium-item:nth-child(1) {
    order: 2;
  }

  .fp-podium-lg .fp-podium-item:nth-child(2) {
    order: 1;
  }

  .fp-podium-lg .fp-podium-item:nth-child(3) {
    order: 3;
  }
}
