:root {
  --bg: #0a0e14;
  --bg-2: #0f141c;
  --card: rgba(15, 20, 28, 0.95);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #2f7eff;
  --accent-glow: rgba(47, 126, 255, 0.5);
  --green: #00ff88;
  --red: #f44336;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* ========== DEMO BANNER ========== */
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 170, 0, 0.10);
  border-bottom: 1px solid rgba(255, 170, 0, 0.35);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-align: center;
  color: #ffcc55;
}

.demo-banner-tag {
  padding: 2px 10px;
  border-radius: 4px;
  background: rgba(255, 170, 0, 0.18);
  border: 1px solid rgba(255, 170, 0, 0.45);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .demo-banner { flex-direction: column; gap: 4px; font-size: 12px; }
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(15, 15, 15, 0.90);
  backdrop-filter: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  height: 42px;
  width: auto;
}

.nav-brand-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-brand-text {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-brand-sub {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: none;
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid;
  transition: all 0.2s;
}

.nav-btn img {
  width: 18px;
  height: 18px;
}

.nav-btn.discord {
  border-color: rgba(88, 101, 242, 0.5);
  background: rgba(88, 101, 242, 0.1);
  color: #a5b1ff;
}

.nav-btn.discord:hover {
  background: rgba(88, 101, 242, 0.25);
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.4);
}

.nav-btn.ts {
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(46, 204, 113, 0.1);
  color: #6fe09a;
}

.nav-btn.ts:hover {
  background: rgba(46, 204, 113, 0.25);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
}

.nav-btn.steam-login {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(23, 26, 33, 0.8);
  color: #c6d4df;
}
.nav-btn.steam-login:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  box-shadow: none;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-light);
  position: relative;
}
.nav-user:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.04); }
.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}
.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #131c2d;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  min-width: 180px;
  z-index: 999;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.nav-user.open .nav-user-dropdown { display: block; }
.nav-user-dropdown a, .nav-user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 13px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.nav-user-dropdown a:hover, .nav-user-dropdown button:hover {
  background: rgba(255,255,255,0.06);
  color: var(--accent);
}
.nav-user-dropdown .divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 4px 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card);
  min-height: 380px;
  display: flex;
  align-items: stretch;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
      rgba(6,8,12,.97) 0%,
      rgba(8,12,18,.88) 35%,
      rgba(10,15,22,.55) 65%,
      rgba(6,8,12,.70) 100%
  );
}

#heroTrackLayout {
  filter: drop-shadow(0 0 8px rgba(0,170,255,0.3));
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.4);
  width: fit-content;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.hero-status-badge.offline {
  background: rgba(244, 67, 54, 0.12);
  border-color: rgba(244, 67, 54, 0.4);
  color: var(--red);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
  box-shadow: 0 0 8px var(--green);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0.5;
  animation: pulseDot 1.6s infinite;
}

.hero-status-badge.offline .status-dot {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
.hero-status-badge.offline .status-dot::after {
  border-color: var(--red);
}

@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.7; }
  70% { transform: scale(2); opacity: 0; }
  100% { opacity: 0; }
}

.hero-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0;
}

.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 84px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 0.9;
  margin: 4px 0 24px;
  text-shadow: none;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.hero-stats.hero-stats-row2 {
  margin-bottom: 24px;
  opacity: 0.85;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-stat-icon {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.hero-stat-text { display: flex; flex-direction: column; }

.hero-stat-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero-stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.hero-stat-value.online {
  color: var(--green);
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 36px;
  width: fit-content;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: none;
  transition: all 0.2s;
}

.join-btn:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.join-btn img {
  width: 28px;
  height: 28px;
}

.hero-right {
  position: relative;
  z-index: 1;
  width: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hero-track-layout {
  width: 100%;
  max-width: 420px;
  filter: none;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.section-title-icon {
  width: 28px;
  height: 28px;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.section-title-svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 22px;
  backdrop-filter: none;
  box-shadow: none;
}

.main-grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: 20px;
}

.left-col,
.right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.track-info-img {
  width: 100%;
  height: 160px;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: block;
}

.track-info-horizontal {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.track-info-img-h {
  width: 100%;
  height: 160px;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.track-info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.track-info-row.full-width {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2px;
}

.track-info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.track-info-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  opacity: 0.8;
}

.track-info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.track-info-value.record {
  font-family: 'Courier New', monospace;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
  letter-spacing: 1px;
}

.track-record-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.wr-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wr-driver-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wr-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 215, 0, 0.3);
  flex-shrink: 0;
}

.wr-driver-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wr-driver-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.wr-country {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 2px;
}

.wr-car-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wr-car-img {
  height: 22px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(255,215,0,0.15));
}

.wr-car-name {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.feed-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--green);
}

.feed-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: blink 1.5s infinite;
}

@keyframes feedSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.first-load .feed-row {
  animation: feedSlideIn 0.25s ease forwards;
}

.first-load .feed-row:nth-child(1)  { animation-delay: 0ms; }
.first-load .feed-row:nth-child(2)  { animation-delay: 30ms; }
.first-load .feed-row:nth-child(3)  { animation-delay: 60ms; }
.first-load .feed-row:nth-child(4)  { animation-delay: 90ms; }
.first-load .feed-row:nth-child(5)  { animation-delay: 120ms; }
.first-load .feed-row:nth-child(6)  { animation-delay: 150ms; }
.first-load .feed-row:nth-child(7)  { animation-delay: 180ms; }
.first-load .feed-row:nth-child(8)  { animation-delay: 210ms; }
.first-load .feed-row:nth-child(9)  { animation-delay: 240ms; }
.first-load .feed-row:nth-child(10) { animation-delay: 270ms; }

@keyframes lbRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.first-load .lb-row {
  animation: lbRowIn 0.3s ease forwards;
}

.first-load .lb-row:nth-child(1)  { animation-delay: 0ms; }
.first-load .lb-row:nth-child(2)  { animation-delay: 50ms; }
.first-load .lb-row:nth-child(3)  { animation-delay: 100ms; }
.first-load .lb-row:nth-child(4)  { animation-delay: 150ms; }
.first-load .lb-row:nth-child(5)  { animation-delay: 200ms; }
.first-load .lb-row:nth-child(6)  { animation-delay: 250ms; }
.first-load .lb-row:nth-child(7)  { animation-delay: 300ms; }
.first-load .lb-row:nth-child(8)  { animation-delay: 350ms; }
.first-load .lb-row:nth-child(9)  { animation-delay: 400ms; }
.first-load .lb-row:nth-child(10) { animation-delay: 450ms; }

@keyframes podiumIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.first-load .podium-card:nth-child(1) { animation: podiumIn 0.4s ease 0ms forwards; opacity: 0; }
.first-load .podium-card:nth-child(2) { animation: podiumIn 0.4s ease 100ms forwards; opacity: 0; }
.first-load .podium-card:nth-child(3) { animation: podiumIn 0.4s ease 200ms forwards; opacity: 0; }

@keyframes livePulse {
  0%   { box-shadow: 0 0 4px var(--green), 0 0 8px var(--green); opacity: 1; }
  50%  { box-shadow: 0 0 10px var(--green), 0 0 20px rgba(0,255,136,0.4); opacity: 0.5; }
  100% { box-shadow: 0 0 4px var(--green), 0 0 8px var(--green); opacity: 1; }
}

.feed-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 1.8s ease-in-out infinite;
}

.roast-badge.roast-pb:hover     { box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);    transform: scale(1.05); }
.roast-badge.roast-rookie:hover { box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);   transform: scale(1.05); }
.roast-badge.roast-wall:hover,
.roast-badge.roast-barrier:hover { box-shadow: 0 0 10px rgba(255, 107, 53, 0.4); transform: scale(1.05); }
.roast-badge.roast-ragequit:hover { box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); transform: scale(1.05); }

@keyframes pbShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.lap-time-pb {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold) 0%, #fff7aa 40%, var(--gold) 60%, #ffb800 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pbShimmer 2.5s linear infinite;
}

  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.first-load .card { animation: cardIn 0.4s ease forwards; }
.first-load .left-col .card:nth-child(1) { animation-delay: 0ms; }
.first-load .left-col .card:nth-child(2) { animation-delay: 80ms; }
.first-load .right-col .card:nth-child(1) { animation-delay: 120ms; }
.first-load .right-col .card:nth-child(2) { animation-delay: 200ms; }

.feed-driver-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.feed-driver-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.session-feed {
  display: flex;
  flex-direction: column;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.session-feed::-webkit-scrollbar { width: 4px; }
.session-feed::-webkit-scrollbar-track { background: transparent; }
.session-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}

.feed-row {
  display: grid;
  grid-template-columns: 30px 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.feed-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.feed-row:last-child { border-bottom: none; }

.feed-time {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-dim);
}

.feed-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-icon svg {
  width: 18px;
  height: 18px;
}

.feed-text {
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-text b {
  font-weight: 600;
}

.feed-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.feed-badge.visit {
  background: rgba(0, 255, 136, 0.12);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.feed-badge.duration {
  background: rgba(244, 67, 54, 0.1);
  color: #ff7a72;
  border: 1px solid rgba(244, 67, 54, 0.25);
  font-family: 'Courier New', monospace;
}

.roast-badge {
  cursor: default;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: opacity 0.15s, transform 0.15s;
}

.roast-badge:hover {
  opacity: 0.85;
  transform: scale(1.04);
}

.roast-badge.roast-rookie {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.roast-badge.roast-wall {
  background: rgba(255, 107, 53, 0.12);
  color: #ff6b35;
  border: 1px solid rgba(255, 107, 53, 0.35);
}

.roast-badge.roast-barrier {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.roast-badge.roast-ragequit {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.roast-badge.roast-consistent {
  background: rgba(0, 255, 136, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, 0.25);
}

.roast-badge.roast-nolap {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.feed-row.roast-row {
  background: rgba(255, 255, 255, 0.015);
}

.feed-row.pb-row {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.06) 0%, transparent 100%);
  border-left: 2px solid rgba(255, 215, 0, 0.4);
}

.feed-row.pb-row:hover {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(255,255,255,0.02) 100%);
}

.lap-time-pb {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.lap-time-normal {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text);
}

.lap-delta {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  opacity: 0.85;
}

.roast-badge.roast-pb {
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.roast-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  padding: 7px 12px;
  background: rgba(10, 14, 22, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  color: #d4b8ff;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(168, 85, 247, 0.15);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
}

.roast-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.feed-view-all {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}

.feed-view-all:hover { text-shadow: 0 0 6px var(--accent-glow); }

.race-control-card {
  flex: 1;
}

.race-control-card .session-feed {
  max-height: 560px;
}

.leaderboard-card {
  display: flex;
  flex-direction: column;
}

.lb-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.lb-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.lb-search-wrap {
  position: relative;
  width: 100%;
}

.lb-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--text-dim);
  pointer-events: none;
}

.lb-search-input {
  width: 100%;
  height: 38px;
  padding: 0 36px;
  border-radius: 4px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: 0.2s;
}

.lb-search-input:focus {
  border-color: var(--accent);
  box-shadow: none;
}

.lb-search-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.lb-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: none;
}

.lb-search-clear svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-dim);
}

.lb-search-clear:hover svg { stroke: #fff; }

.lb-search-wrap:has(.lb-search-input:not(:placeholder-shown)) .lb-search-clear {
  display: block;
}

.lb-filter-selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-filter-selects .lb-select {
  flex: 1;
  min-width: 100px;
}

.lb-clear-btn {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.lb-clear-btn.visible { display: flex; }

.lb-clear-btn:hover {
  color: #fff;
  border-color: var(--accent);
  box-shadow: none;
}

.lb-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  transition: 0.2s;
}

.lb-select:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.lb-fullbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 10px 22px;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.lb-fullbtn svg {
  flex-shrink: 0;
}

.lb-fullbtn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.podium {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.podium-card {
  position: relative;
  border-radius: 4px;
  padding: 12px 16px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 20, 28, 0.90);
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
}

.podium-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}

.podium-card.gold {
  border: 1.5px solid rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.05);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.12);
}

.podium-card.silver {
  border-color: rgba(192, 192, 192, 0.35);
  background: rgba(192, 192, 192, 0.03);
}

.podium-card.bronze {
  border-color: rgba(205, 127, 50, 0.35);
  background: rgba(205, 127, 50, 0.04);
}

.podium-medal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.podium-medal.gold { background: var(--gold); color: #4a3800; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.podium-medal.silver { background: var(--silver); color: #333; }
.podium-medal.bronze { background: var(--bronze); color: #2a1a08; }

.podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: block;
  flex-shrink: 0;
}

.podium-card.gold .podium-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

.podium-info {
  flex: 1;
  min-width: 0;
}

.podium-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.podium-country {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-dim);
}

.podium-car {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.podium-right {
  text-align: right;
  flex-shrink: 0;
}

.podium-time {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 17px;
}

.podium-card.gold .podium-time { color: var(--gold); text-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }
.podium-card.silver .podium-time { color: var(--silver); }
.podium-card.bronze .podium-time { color: var(--bronze); }

.lb-table {
  display: flex;
  flex-direction: column;
}

.lb-thead {
  display: grid;
  grid-template-columns: 40px 1fr 160px 110px 70px;
  padding: 10px 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-thead .th-right { text-align: right; }

.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 160px 110px 70px;
  padding: 12px 14px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
}

.lb-row:hover { background: rgba(255, 255, 255, 0.04); }

.lb-rank {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-dim);
}

.lb-driver {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lb-driver img.flag {
  width: 18px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  flex-shrink: 0;
}

.lb-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lb-driver-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-car-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.lb-car-cell img.flag {
  width: 18px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  flex-shrink: 0;
}

.lb-best {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 14px;
  text-align: right;
}

.lb-gap {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  text-align: right;
}

.lb-load-more {
  text-align: center;
  margin-top: 16px;
  padding: 14px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lb-load-more:hover {
  text-shadow: 0 0 8px var(--accent-glow);
  color: #fff;
}

.lb-subline {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 3px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-subline .lb-sub-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
  opacity: 0.5;
  flex-shrink: 0;
}

.lb-subline .lb-sub-live { display: none; }

.legal-body {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  line-height: 1.6;
}

.legal-body h1 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #fff;
}

.legal-body h2 {
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 8px;
  color: #fff;
}

.legal-body p em {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.legal-body p {
  margin-bottom: 10px;
  color: rgba(255,255,255,0.75);
}

.legal-body strong {
  color: #fff;
}

.legal-body a {
  color: var(--text);
  text-decoration: none;
}

.legal-body a:hover {
  text-decoration: underline;
}

.legal-body ul {
  padding-left: 18px;
  margin: 10px 0;
}

.legal-body li {
  margin-bottom: 6px;
}

.players-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.players-card-header .section-title {
  font-size: 18px;
  gap: 8px;
}

.players-separator {
  color: var(--text-dim);
  font-weight: 400;
  margin: 0 2px;
}

.players-server-name {
  color: var(--accent);
  font-weight: 700;
}

.players-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 6px;
}

.players-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px;
  width: 100%;
}

.players-empty-helmet {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.players-empty-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.players-empty-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
}

.players-empty-sub {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.players-join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 9px 20px;
  width: fit-content;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.players-join-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.player-tile {
  background: rgba(15, 20, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}

.player-tile:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.player-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: block;
}

.player-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-name img.flag {
  width: 16px;
  height: 11px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  flex-shrink: 0;
}

.player-car {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-best {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--green);
  margin-bottom: 2px;
}

.player-laps {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.compact .player-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 8px 14px;
  gap: 12px;
  border-radius: 4px;
  transform: none !important;
}

.compact .player-avatar {
  width: 36px;
  height: 36px;
  margin: 0;
}

.compact .player-name {
  justify-content: flex-start;
  margin-bottom: 1px;
  font-size: 13px;
}

.compact .player-car {
  margin-bottom: 0;
}

.compact .player-middle {
  flex: 1;
  min-width: 0;
}

.compact .player-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.compact .player-best {
  font-size: 14px;
  margin-bottom: 0;
}

.compact .player-laps {
  text-align: right;
}

.player-middle { display: contents; }
.player-right  { display: contents; }

.players-grid.compact {
  grid-template-columns: 1fr;
  gap: 6px;
}

.player-tile.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text-dim);
}

.player-tile.placeholder:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.placeholder-plus {
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 6px;
  opacity: 0.5;
}

.placeholder-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.server-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stat-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(15, 20, 28, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.players { background: rgba(255, 255, 255, 0.04); }
.stat-icon-wrap.sessions { background: rgba(186, 85, 211, 0.12); }
.stat-icon-wrap.laps { background: rgba(255, 193, 7, 0.12); }
.stat-icon-wrap.avglap { background: rgba(0, 255, 136, 0.12); }
.stat-icon-wrap.record { background: rgba(255, 215, 0, 0.12); }

.stat-icon-wrap svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 2;
}

.stat-icon-wrap.players svg { stroke: var(--accent); }
.stat-icon-wrap.sessions svg { stroke: #ba55d3; }
.stat-icon-wrap.laps svg { stroke: #ffc107; }
.stat-icon-wrap.avglap svg { stroke: var(--green); }
.stat-icon-wrap.record svg { stroke: var(--gold); }

.stat-text { display: flex; flex-direction: column; gap: 2px; }

.stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.5px;
}

.stat-value.mono {
  font-family: 'Courier New', monospace;
  font-size: 22px;
}

.stat-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer {
  margin-top: 30px;
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  transition: 0.2s;
}

.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.footer-socials img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.footer-right {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-right .heart { color: #ff4d6d; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: none;
}

.modal-content {
  position: relative;
  margin: 6% auto;
  width: 90%;
  max-width: 1100px;
  padding: 0;
  background: #0b1220;
  border-radius: 4px;
  border: 1px solid var(--card-border);
  box-shadow: none;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.join-modal .modal-content {
  max-width: 460px;
}

.modal-header {
  padding: 18px 24px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 18px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.6;
  z-index: 10;
}

.close:hover { opacity: 1; }

.modal-body {
  padding: 22px;
  overflow-y: auto;
}

.join-box { margin-bottom: 20px; }

.join-title {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.join-ip {
  font-family: 'Courier New', monospace;
  padding: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  cursor: pointer;
  font-size: 14px;
}

.join-ip:hover { background: rgba(255, 255, 255, 0.04); }

.join-steps {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
}

.driver-profile-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 28, 0.85);
}

.dp-left { display: flex; min-height: 110px; align-items: center; gap: 14px; }
.dp-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; text-align: left; }
.dp-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; transition: 0.3s; }
.dp-name { font-size: 22px; font-weight: 700; }
.dp-country { opacity: 0.7; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.dp-flag { width: 18px; }
.dp-meta { margin-top: 4px; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.time-icon { width: 18px; height: 18px; stroke: #aaa; stroke-width: 2; fill: none; }
.dp-meta span { display: flex; align-items: center; gap: 6px; }
.online { color: var(--green); position: relative; padding-left: 14px; }
.online::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green);
}
.offline { color: #888; opacity: 0.7; }
.dp-divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.15); }
.dp-rank-box {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 8px 14px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.dp-rank-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dp-trophy { width: 22px; height: 22px; }
.dp-rank-value { font-size: 20px; font-weight: 700; }
.dp-rank-value.gold { color: var(--gold); }
.dp-rank-value.silver { color: var(--silver); }
.dp-rank-value.bronze { color: var(--bronze); }
.dp-rank-label { font-size: 11px; opacity: 0.5; letter-spacing: 1px; }
.dp-rank-sub { font-size: 11px; opacity: 0.5; margin-top: 2px; }

.dp-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.45);
  cursor: pointer; flex-shrink: 0; transition: all 0.2s;
  font-style: normal; line-height: 1; user-select: none;
}
.dp-info-btn:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--accent); color: var(--accent); }

.dp-rank-tooltip {
  position: absolute; z-index: 9999;
  width: 260px; padding: 12px 14px;
  background: #0d1420; border: 1px solid rgba(47,126,255,0.35);
  border-radius: 4px; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  font-size: 12px; line-height: 1.55; color: var(--text);
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s;
}
.dp-rank-tooltip.show { opacity: 1; pointer-events: auto; }
.dp-rank-tooltip-title {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.dp-rank-tooltip-tiers {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin: 8px 0;
}
.dp-tt-tier {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 4px; border-radius: 4px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.dp-tt-tier-letter { font-family: 'Rajdhani',sans-serif; font-weight: 700; font-size: 14px; line-height: 1; }
.dp-tt-tier-range { font-size: 9px; opacity: 0.5; }
.dp-rank-tooltip hr { border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 8px 0; }
.dp-rank-tooltip p { margin: 0 0 5px; opacity: 0.75; }
.dp-rank-tooltip p:last-child { margin: 0; }
.dp-rank-tooltip strong { color: var(--text); opacity: 1; }

.dp-rank-card {
  display: flex; flex-direction: column; gap: 0;
  border-radius: 4px; border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(15, 20, 28, 0.95), rgba(47, 126, 255, 0.06));
  overflow: hidden;
}
.dp-rank-card-main {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px;
}
.dp-rank-tier {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 4px; flex-shrink: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tier-color) 20%, transparent), color-mix(in srgb, var(--tier-color) 8%, transparent));
  border: 1.5px solid color-mix(in srgb, var(--tier-color) 50%, transparent);
}
.dp-tier-letter {
  font-family: 'Rajdhani', sans-serif; font-size: 26px; font-weight: 700;
  color: var(--tier-color); line-height: 1;
}
.dp-tier-sub {
  font-size: 8px; letter-spacing: 2px; opacity: 0.6; text-transform: uppercase;
}
.dp-rank-details { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dp-rank-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dp-rank-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.dp-rank-pill.cat {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.dp-rank-num { font-size: 16px; font-weight: 700; }
.dp-rank-lbl { font-size: 10px; opacity: 0.5; letter-spacing: 1px; text-transform: uppercase; }
.dp-rank-meta-row { display: flex; gap: 12px; align-items: center; }
.dp-score-badge {
  font-size: 12px; opacity: 0.7;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.dp-trend-badge { font-size: 12px; font-weight: 600; }
.dp-rank-card-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.dp-rcs {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.dp-rcs:last-child { border-right: none; }
.dp-rcs-val { font-size: 18px; font-weight: 700; font-family: 'Rajdhani', sans-serif; }
.dp-rcs-lbl { font-size: 9px; letter-spacing: 1.5px; opacity: 0.4; text-transform: uppercase; }

.dp-unranked-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  gap: 16px;
}
.dp-unranked-info { display: flex; flex-direction: column; gap: 2px; }
.dp-unranked-label {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: 1.5px; color: var(--text-dim);
}
.dp-unranked-hint { font-size: 11px; opacity: 0.4; }
.dp-unranked-stats { display: flex; gap: 20px; flex-shrink: 0; }

.dp-safety-section { gap: 10px; }

.dp-safety-body {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 4px;
}

.dp-safety-score-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex-shrink: 0; min-width: 80px;
}
.dp-safety-score {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 42px;
  line-height: 1; letter-spacing: -1px;
}
.dp-safety-label {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
}
.dp-safety-max { font-size: 11px; opacity: 0.35; margin-top: 1px; }
.dp-safety-bar-wrap {
  width: 80px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.08); margin-top: 6px; overflow: hidden;
}
.dp-safety-bar { height: 100%; border-radius: 2px; transition: width 0.6s ease; }

.dp-safety-stats {
  display: flex; gap: 0; flex: 1;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
.dp-safety-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; flex: 1;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.dp-safety-stat:last-child { border-right: none; }
.dp-safety-stat-val {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 20px;
}
.dp-safety-stat-lbl { font-size: 9px; opacity: 0.4; letter-spacing: 1.5px; text-transform: uppercase; }

.dp-safety-formula {
  font-size: 10px; opacity: 0.35; padding: 4px 2px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.dp-safety-provisional {
  display: flex; flex-direction: column; gap: 8px; padding: 6px 2px;
}
.dp-safety-prov-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 2px; color: var(--text-dim); width: fit-content;
}
.dp-safety-prov-hint { font-size: 11px; opacity: 0.45; }
.dp-safety-prov-bar-wrap {
  width: 100%; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.dp-safety-prov-bar {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #00ff88);
  transition: width 0.5s ease;
}

@media (max-width: 600px) {
  .dp-safety-body { flex-direction: column; align-items: flex-start; }
  .dp-safety-score-wrap { flex-direction: row; align-items: center; gap: 12px; }
  .dp-safety-bar-wrap { display: none; }
  .dp-safety-stats { width: 100%; }
}

.dp-stats-grid.expanded {
  grid-template-columns: repeat(4, 1fr);
}
.dp-stat-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px 8px; text-align: center;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s;
}
.dp-stat-card:hover { border-color: rgba(255, 255, 255, 0.12); }
.dp-stat-card.accent {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.dp-stat-icon { font-size: 18px; margin-bottom: 2px; }

.dp-ach-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 4px; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.04); color: var(--accent);
  margin-left: 6px;
}
.dp-achievements-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.dp-ach-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s;
  cursor: default;
}
.dp-ach-card:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.04);
  transform: translateY(-1px);
}
.dp-ach-icon { font-size: 24px; flex-shrink: 0; }
.dp-ach-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dp-ach-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-ach-desc { font-size: 10px; opacity: 0.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dp-ach-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px;
}
.dp-ach-tab {
  padding: 4px 10px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03); color: var(--text-dim);
  font-size: 11px; cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.dp-ach-tab:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.dp-ach-tab.active {
  background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12);
  color: var(--accent); font-weight: 600;
}

.dp-ach-card.locked {
  opacity: 0.35; filter: grayscale(1);
  border-style: dashed;
}
.dp-ach-card.locked:hover {
  opacity: 0.5; border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02); transform: none;
}

.dp-ach-card.secret.locked .dp-ach-icon { filter: blur(2px); }

.dp-ach-check {
  font-size: 10px; color: var(--green); font-weight: 700;
  margin-left: auto; flex-shrink: 0; opacity: 0.6;
}

@media (max-width: 700px) {
  .dp-stats-grid.expanded { grid-template-columns: repeat(2, 1fr); }
  .dp-achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .dp-rank-card-main { flex-wrap: wrap; }
  .dp-rank-card-stats { grid-template-columns: repeat(2, 1fr); }
  .dp-rank-row { flex-direction: column; }
}
.dp-time-block { display: flex; flex-direction: column; }
.dp-time-label { font-size: 10px; opacity: 0.5; letter-spacing: 1px; }
.dp-time-value { font-family: 'Courier New', monospace; font-size: 16px; }
.dp-section {
  display: flex; flex-direction: column; gap: 6px; padding: 12px;
  border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 28, 0.85); text-align: left;
}
.dp-section::-webkit-scrollbar { width: 4px; }
.dp-section::-webkit-scrollbar-track { background: transparent; }
.dp-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}
.dp-section-title {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 15px;
  text-transform: uppercase; letter-spacing: 1.5px; color: #cfd8dc;
  display: flex; align-items: center; gap: 8px;
}
.dp-section-title .trophy-img { width: 22px; height: 22px; }
.dp-best-card {
  display: grid; grid-template-columns: 240px 100px 1fr 130px;
  align-items: center; gap: 14px;
  padding: 8px; border-radius: 4px; margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dp-best-card.gold {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}
.dp-time { font-family: 'Courier New', monospace; font-size: 18px; font-weight: 700; }
.dp-time-box { display: flex; flex-direction: column; align-items: center; gap: 0; }
.dp-time-box span { font-size: 11px; opacity: 0.5; letter-spacing: 1px; }
.dp-laps { max-height: 280px; overflow-y: auto; }
.dp-laps-header {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 2fr 50px 2fr 1fr 1fr;
  padding: 8px; gap: 10px; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; background: rgba(15, 15, 15, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dp-laps-header span { display: block; white-space: nowrap; }
.dp-laps-header span:nth-child(2) { text-align: center; }
.dp-laps-header span:nth-child(4),
.dp-laps-header span:nth-child(5) { text-align: right; }
.dp-lap-row {
  display: grid; grid-template-columns: 2fr 50px 2fr 1fr 1fr;
  align-items: center; gap: 10px;
  padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.dp-lap-row > div:nth-child(4),
.dp-lap-row > div:nth-child(5) { text-align: right; }
.lap-track { display: flex; flex-direction: column; }
.lap-flag-col { display: flex; align-items: center; justify-content: center; }
.lap-flag-col img { width: 18px; height: 12px; border-radius: 2px; border: 1px solid #000; }
.lap-car { display: flex; align-items: center; gap: 8px; }
.lap-car img { width: 50px; }
.lap-time { font-family: 'Courier New', monospace; font-weight: 600; }
.dp-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dp-track-layout { width: 80px; height: auto; }
.dp-track-text { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.dp-track-name {
  font-size: 13px; font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dp-track-country { font-size: 11px; opacity: 0.6; }
.dp-car-img { width: 100px; height: auto; }
.dp-car { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dp-best-card.gold .dp-time { color: var(--gold); }
.dp-best-card.gold span { color: rgba(255, 215, 0, 0.8); }

#driverModal .modal-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#driverModal .modal-content {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.dp-v3-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
  overflow: hidden;
}

.dp-v3-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(10,14,20,0.6);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.dp-v3-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.dp-v3-avatar-wrap {
  position: relative;
  display: inline-block;
}

.dp-v3-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(47,126,255,0.35);
  transition: 0.2s;
}
.dp-v3-avatar:hover { transform: scale(1.04); }

.dp-v3-online-dot {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #0b1220;
}

.dp-v3-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.dp-v3-name:hover { color: #00d4ff; }

.dp-v3-country {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  opacity: 0.65;
  flex-wrap: wrap;
}

.dp-v3-team-badge {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(47,126,255,0.2);
  color: #7aaaff;
}

.dp-v3-socials {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.dp-v3-soc-btn {
  width: 30px; height: 30px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: all 0.15s;
  text-decoration: none;
}
.dp-v3-soc-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  border-color: var(--accent);
}

.dp-v3-online-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.5px;
}
.dp-v3-offline-label {
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.6;
}

.dp-v3-bio {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  font-style: italic;
  text-align: center;
  opacity: 0.7;
  padding-top: 2px;
}

.dp-v3-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
}

.dp-v3-sidebar-label {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.7;
}

.dp-v3-safety-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9px;
  padding: 10px 12px;
}

.dp-v3-safety-score {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.dp-v3-safety-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.dp-v3-prog-bg {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.dp-v3-prog {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 0.5s ease;
}

.dp-v3-qs { display: flex; flex-direction: column; gap: 0; }
.dp-v3-qs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.dp-v3-qs-row:last-child { border-bottom: none; }
.dp-v3-qs-lbl { font-size: 11px; color: var(--text-dim); }
.dp-v3-qs-val { font-size: 11px; font-weight: 600; }

.dp-v3-fav-combo {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9px;
  padding: 10px 12px;
}
.dp-v3-fav-row { display: flex; align-items: center; gap: 6px; }
.dp-v3-fav-track { font-size: 12px; font-weight: 600; }
.dp-v3-fav-car { font-size: 11px; color: var(--text-dim); }

.dp-v3-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.dp-v3-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,14,20,0.4);
  padding: 0 16px;
  flex-shrink: 0;
}

.dp-v3-tab {
  padding: 11px 16px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dp-v3-tab:hover { color: var(--text); }
.dp-v3-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.dp-v3-tab-badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #7aaaff;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: inherit;
}

.dp-v3-tab-pane {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}
.dp-v3-tab-pane::-webkit-scrollbar { width: 4px; }
.dp-v3-tab-pane::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.04); border-radius: 2px; }

.dp-v3-hero-pb {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(47,126,255,0.04));
  border: 1px solid rgba(255,215,0,0.18);
}

.dp-v3-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 700px) {
  .dp-v3-layout { flex-direction: column; }
  .dp-v3-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .dp-v3-two-col { grid-template-columns: 1fr; }
}
.dp-tm-card {
  display: grid; grid-template-columns: 70px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 4px; margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s;
  cursor: default;
}
.dp-tm-card:last-child { margin-bottom: 0; }
.dp-tm-card:hover { border-color: rgba(255, 255, 255, 0.12); }
.dp-tm-layout { width: 70px; height: 46px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dp-tm-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dp-tm-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-tm-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-tm-car-pill {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
  color: #7aaaff;
}
.dp-tm-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.dp-tm-pb { font-family: 'Courier New', monospace; font-size: 17px; font-weight: 700; }
.dp-tm-pb.gold { color: var(--gold); }
.dp-steam-link { color: inherit; }
.dp-steam-link:hover .dp-avatar { transform: scale(1.05); }
.dp-steam-link:hover .dp-name { color: #00d4ff; }
.dot {
  width: 8px; height: 8px; background: var(--green);
  border-radius: 50%; display: inline-block; margin-right: 6px;
  box-shadow: 0 0 6px var(--green);
}

.sa-wrap { padding: 4px 0; }
.sa-context-bar { display:flex;align-items:center;gap:10px;padding:10px 14px;background: rgba(255, 255, 255, 0.04);border:1px solid rgba(47,126,255,0.15);border-radius:10px;margin-bottom:14px;flex-wrap:wrap; }
.sa-context-chip { display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--text);opacity:0.85; }
.sa-context-chip span { opacity:0.5;font-weight:400; }
.sa-context-sep { opacity:0.2;font-size:14px; }
.sa-context-src { margin-left:auto;font-size:10px;letter-spacing:0.8px;text-transform:uppercase;opacity:0.4; }
.sa-tire-grid { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px; }
.sa-tire-card { background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:10px;padding:12px;transition:border-color 0.2s; }
.sa-tire-card:focus-within { border-color:rgba(47,126,255,0.35); }
.sa-tire-label { font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;opacity:0.5;margin-bottom:9px;display:flex;align-items:center;gap:5px; }
.sa-tire-fl .sa-tire-label,.sa-tire-fr .sa-tire-label { color:#7ec8ff; }
.sa-tire-rl .sa-tire-label,.sa-tire-rr .sa-tire-label { color:#ffb347; }
.sa-input-row { display:flex;flex-direction:column;gap:6px; }
.sa-input-group { display:flex;align-items:center;gap:6px; }
.sa-input-lbl { font-size:10px;opacity:0.45;width:34px;flex-shrink:0;text-align:right; }
.sa-input { flex:1;background:rgba(0,0,0,0.3);border:1px solid rgba(255,255,255,0.08);border-radius:6px;color:var(--text);font-size:12px;font-family:'Courier New',monospace;padding:4px 8px;width:100%;transition:border-color 0.15s;-moz-appearance:textfield; }
.sa-input::-webkit-outer-spin-button,.sa-input::-webkit-inner-spin-button { -webkit-appearance:none; }
.sa-input:focus { outline:none;border-color:rgba(47,126,255,0.4); }
.sa-input::placeholder { opacity:0.3; }
.sa-input-unit { font-size:10px;opacity:0.35;width:22px;flex-shrink:0; }
.sa-temp-row { display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;margin-top:2px; }
.sa-temp-item { display:flex;flex-direction:column;gap:2px; }
.sa-temp-sublbl { font-size:9px;opacity:0.35;text-align:center;letter-spacing:0.5px; }
.sa-temp-input { background:rgba(0,0,0,0.25);border:1px solid rgba(255,255,255,0.07);border-radius:5px;color:var(--text);font-size:11px;font-family:'Courier New',monospace;padding:3px 5px;text-align:center;-moz-appearance:textfield; }
.sa-temp-input::-webkit-outer-spin-button,.sa-temp-input::-webkit-inner-spin-button { -webkit-appearance:none; }
.sa-temp-input:focus { outline:none;border-color:rgba(47,126,255,0.35); }
.sa-readout-hint { font-size:10px;opacity:0.4;margin-bottom:10px;padding:7px 10px;background:rgba(255,255,255,0.02);border-left:2px solid rgba(47,126,255,0.3);border-radius:0 6px 6px 0;line-height:1.5; }
.sa-analyze-btn { width:100%;padding:11px;background:linear-gradient(135deg,rgba(47,126,255,0.2),rgba(47,126,255,0.1));border:1px solid rgba(47,126,255,0.35);border-radius:9px;color:var(--accent);font-size:13px;font-weight:700;letter-spacing:1px;cursor:pointer;transition:all 0.2s;text-transform:uppercase;display:flex;align-items:center;justify-content:center;gap:8px; }
.sa-analyze-btn:hover:not(:disabled) { background:linear-gradient(135deg,rgba(47,126,255,0.3),rgba(47,126,255,0.15));border-color:rgba(47,126,255,0.55);transform:translateY(-1px); }
.sa-analyze-btn:disabled { opacity:0.4;cursor:not-allowed;transform:none; }
.sa-health-bar { display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;background:rgba(255,255,255,0.025);border:1px solid rgba(255,255,255,0.06);margin:14px 0 12px; }
.sa-health-score { font-size:28px;font-weight:700;font-family:'Courier New',monospace;line-height:1; }
.sa-health-label { font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;opacity:0.7; }
.sa-health-prog-bg { flex:1;height:4px;background:rgba(255,255,255,0.07);border-radius:2px;overflow:hidden; }
.sa-health-prog { height:100%;border-radius:2px;transition:width 0.6s ease; }
.sa-recs { display:flex;flex-direction:column;gap:8px; }
.sa-rec-card { display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:9px;border:1px solid transparent;background:rgba(255,255,255,0.025); }
.sa-rec-card.severity-high { border-color:rgba(244,67,54,0.2);background:rgba(244,67,54,0.04); }
.sa-rec-card.severity-medium { border-color:rgba(255,215,0,0.15);background:rgba(255,215,0,0.02); }
.sa-rec-card.severity-ok { border-color:rgba(0,255,136,0.1);background:rgba(0,255,136,0.015); }
.sa-rec-card.severity-low { border-color:rgba(47,126,255,0.12); }
.sa-rec-icon { font-size:16px;flex-shrink:0;margin-top:1px; }
.sa-rec-body { flex:1;min-width:0; }
.sa-rec-title { font-size:12px;font-weight:700;margin-bottom:2px;font-family:'Courier New',monospace; }
.sa-rec-detail { font-size:11px;opacity:0.5;line-height:1.45; }
.sa-summary-chips { display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,0.05); }
.sa-chip { font-size:11px;font-family:'Courier New',monospace;padding:4px 10px;border-radius:20px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);color:var(--text-dim); }
.sa-chip.highlight { background: rgba(255, 255, 255, 0.04);border-color:rgba(47,126,255,0.2);color:var(--accent); }
.sa-section-title { font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;opacity:0.4;margin-bottom:8px; }
.sa-error { padding:12px;border-radius:9px;background:rgba(244,67,54,0.07);border:1px solid rgba(244,67,54,0.2);font-size:12px;color:#ff6b6b; }

.legal-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.85);
  backdrop-filter: none;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.legal-content {
  width: 900px;
  max-width: 95%;
  max-height: 85vh;
  background: #131c2d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 25px;
  overflow-y: auto;
  box-shadow: none;
}

.legal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
}

.legal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.legal-tabs button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccc;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.legal-tabs button:hover {
  color: var(--text);
}

.legal-body {
  color: #ccc;
  line-height: 1.6;
}

.legal-tabs button.active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: none;
}

.search-box {
  position: relative; width: 100%; margin-bottom: 14px;
}
#searchInput {
  width: 100%; height: 36px; padding: 0 38px;
  border-radius: 4px; border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04); color: #fff; font-size: 14px;
  outline: none; line-height: 36px;
}
#searchInput:focus { border-color: var(--accent); box-shadow: none; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.clear-search { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; }
.search-icon svg, .clear-search svg {
  width: 14px; height: 14px; stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2; fill: none; display: block;
}
.lb-filters {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.lb-filters select {
  flex: 1; max-width: 180px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
  color: var(--text); padding: 6px 10px; border-radius: 4px;
  font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 12px;
  cursor: pointer; outline: none;
}
#clearFilters {
  width: 32px; height: 32px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
  color: #aaa; cursor: pointer;
}
#clearFilters:hover { color: #fff; border-color: var(--accent); }

.lb-active-badges {
  display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-bottom: 4px;
}
.lb-active-badges:empty { display: none; }

.lb-filter-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 4px;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; transition: opacity 0.15s;
}
.lb-filter-badge:hover { opacity: 0.7; }
.lb-filter-badge.track { background: rgba(255, 255, 255, 0.04); border: 0.5px solid rgba(47,126,255,0.4); color: #6faaff; }
.lb-filter-badge.class { background: rgba(255,170,0,0.13); border: 0.5px solid rgba(255,170,0,0.4); color: #ffcc55; }
.lb-filter-badge .badge-x { font-size: 10px; opacity: 0.6; margin-left: 2px; }

.lb-modal-subline {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 24px; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: 'Rajdhani', sans-serif; font-size: 11px;
  letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,0.35);
}
.lb-modal-subline .sub-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.2); flex-shrink: 0; }
.lb-modal-subline .sub-live { display: none; }

#fullLbModal .lb-thead,
#fullLbModal .lb-row {
  grid-template-columns: 50px 1fr 220px 130px 90px;
}
#fullLbModal .lb-thead .col-car,
#fullLbModal .lb-row .lb-car-cell {
  display: flex;
}

.modal-header-left {
  display: flex; align-items: center; gap: 8px;
}

.lb-filter-hint {
  padding: 7px 12px; margin-bottom: 10px;
  background: rgba(255,170,0,0.07);
  border-left: 2px solid rgba(255,170,0,0.45);
  border-radius: 0 6px 6px 0;
  font-family: 'Rajdhani', sans-serif; font-size: 11px;
  letter-spacing: 0.5px; color: rgba(255,200,80,0.7);
  display: flex; align-items: center; gap: 6px;
}

.lb-row.dimmed { opacity: 0.32; }
.lb-row.dimmed:hover { opacity: 0.5; }

.car-class-badge {
  display: inline-flex; align-items: center;
  padding: 1px 5px; border-radius: 4px;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 10px; letter-spacing: 0.8px; flex-shrink: 0;
}
.car-class-badge.gt3 { background: rgba(255, 255, 255, 0.04); border: 0.5px solid rgba(47,126,255,0.4); color: #6faaff; }
.car-class-badge.gt2 { background: rgba(255,170,0,0.15); border: 0.5px solid rgba(255,170,0,0.4); color: #ffcc55; }
.car-class-badge.road { background: rgba(0,255,136,0.12); border: 0.5px solid rgba(0,255,136,0.35); color: #44e8a0; }
.car-class-badge.other { background: rgba(255,255,255,0.08); border: 0.5px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.5); }

.no-results { text-align: center; padding: 30px; opacity: 0.6; }

.info-tooltip {
  display: inline-block; margin-left: 4px; font-size: 11px;
  cursor: help; opacity: 0.5;
}
.info-tooltip:hover { opacity: 1; }
.custom-tooltip {
  position: fixed; background: #0a0f19; color: #fff;
  padding: 10px 14px; border-radius: 4px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  font-size: 12px; font-weight: 400; width: 260px;
  text-align: left; line-height: 1.5; pointer-events: none;
  z-index: 99999; opacity: 0; transition: opacity 0.2s;
}
.custom-tooltip.show { opacity: 1; }

.server-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.server-bar::-webkit-scrollbar { display: none; }

.server-bar-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(255,255,255,0.08);
  margin-right: 4px;
}

.server-bar-info .sbi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
}

.server-bar-info .sbi-val {
  color: var(--green);
  font-weight: 700;
}

.srv-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(15, 20, 28, 0.85);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
    flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
.srv-tab > div {
  min-width: 0;
  flex: 1;
}

.srv-tab:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.srv-tab.active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.srv-tab-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.srv-tab-dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.srv-tab-dot.off { background: #555; }

.srv-tab.offline-server {
  opacity: 0.45;
  cursor: default;
}
.srv-tab.offline-server:hover {
  border-color: rgba(255,255,255,0.06);
  background: rgba(15, 20, 28, 0.85);
}
.srv-tab.offline-server .srv-tab-players { color: #555; }

.srv-tab-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
    display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srv-tab-track {
  font-size: 11px;
  color: var(--text-dim);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
    display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srv-tab-players {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--green);
  margin-left: auto;
    flex-shrink: 0;
  margin-left: 8px;
}

.srv-tab.active .srv-tab-players { color: var(--green); }

.all-servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.server-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(15, 20, 28, 0.85);
  cursor: pointer;
  transition: all 0.25s;
}

.server-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: none;
}

.server-card.active-card {
  border-color: var(--accent);
  box-shadow: none;
}

.sc-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  opacity: 0.6;
}

.sc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sc-badge.online {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--green);
}

.sc-badge.offline {
  background: rgba(120, 120, 120, 0.2);
  border: 1px solid rgba(120, 120, 120, 0.3);
  color: #888;
}

.sc-badge.empty {
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.25);
  color: #aa8833;
}

.server-card.offline-card {
  opacity: 0.55;
  cursor: default;
}
.server-card.offline-card:hover {
  border-color: rgba(255,255,255,0.06);
  transform: none;
  box-shadow: none;
}
.server-card.offline-card .sc-thumb {
  filter: grayscale(0.8) brightness(0.5);
  opacity: 0.5;
}

.sc-body {
  padding: 14px 16px;
}

.sc-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.sc-track {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.sc-players {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: var(--green);
}

.sc-players.empty { color: var(--text-dim); }

.sc-session {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.feed-server-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  border: 1px solid var(--card-border);
  margin-right: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

html { scroll-behavior: smooth; }

@media (max-width: 1200px) {
  .main-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
  .hero-right { width: 100%; padding: 20px; }
  .hero-title { font-size: 60px; }
  .nav-links { display: none; }
}

@media (max-width: 700px) {

  .topnav { padding: 10px 16px; }
  .container { padding: 12px; }
  .hero-content { padding: 22px 24px; }
  .hero-title { font-size: 42px; }
  .hero-subtitle { font-size: 11px; letter-spacing: 3px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .nav-actions .nav-btn span { display: none; }
  .nav-actions .nav-btn { padding: 8px 10px; }
  .nav-brand-text { display: none; }
  .nav-brand-sub { display: none; }
  .footer { flex-direction: column; text-align: center; }

  .card {
    border-radius: 4px;
    padding: 16px;
  }

  .srv-tabs {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .srv-tabs::-webkit-scrollbar { display: none; }

  .srv-tab {
    flex-shrink: 0;
    border-radius: 20px;
    padding: 8px 14px;
    min-width: auto;
    white-space: nowrap;
  }

  .srv-tab-thumb { display: none; }

  .race-control-card {
    position: sticky;
    top: 60px;
    z-index: 10;
    max-height: 50vh;
  }

  .race-control-card .session-feed {
    max-height: calc(50vh - 60px);
  }

  .feed-row {
    grid-template-columns: 26px 20px 1fr auto;
    gap: 7px;
    padding: 11px 4px;
    font-size: 12px;
  }

  .feed-time {
    font-size: 10px;
  }

  .feed-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .server-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-tile:last-child {
    grid-column: 1 / -1;
  }

  .stat-tile {
    padding: 14px 16px;
    gap: 12px;
  }

  .stat-icon-wrap {
    width: 38px;
    height: 38px;
  }

  .stat-icon-wrap svg {
    width: 18px;
    height: 18px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-value.mono {
    font-size: 18px;
  }
  .podium { grid-template-columns: 1fr; }
  .lb-thead, .lb-row { grid-template-columns: 36px 1fr 90px; }
  .lb-thead .col-car, .lb-thead .col-gap,
  .lb-row .lb-car-cell, .lb-row .lb-gap { display: none; }

  .lb-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .lb-fullbtn {
    width: 100%;
    justify-content: center;
  }

  .track-info-list {
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
  }

  .track-info-value.record {
    font-size: 22px;
  }

  .players-empty {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }

  .players-empty-text {
    align-items: center;
  }

  .roast-tooltip { display: none; }
}

.dp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.dp-stat-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 12px;
}

.dp-stat-label {
  font-size: 10px;
  opacity: .55;
  letter-spacing: 1px;
}

.dp-stat-value {
  font-family: Rajdhani, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}

.dp-stat-value.small {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-activity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-activity-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}

.dp-activity-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.dp-activity-title {
  font-weight: 600;
  font-size: 13px;
}

.dp-activity-sub,
.dp-activity-time {
  font-size: 11px;
  opacity: .55;
}

.dp-social-btn.steam {
  color: #c6d4df;
}

.dp-social-btn.steam:hover {
  border-color: #66c0f4;
  background: rgba(102,192,244,.12);
  color: #66c0f4;
  box-shadow: 0 0 10px rgba(102,192,244,.25);
}

.dp-social-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dp-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}
.dp-social-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: none;
}
.dp-social-btn svg { width: 16px; height: 16px; }
.dp-social-btn.youtube:hover { background: rgba(255,0,0,0.15); border-color: #f44; }
.dp-social-btn.twitch:hover { background: rgba(145,70,255,0.15); border-color: #9146ff; }
.dp-social-btn.discord:hover { background: rgba(88,101,242,0.15); border-color: #5865f2; }
.dp-social-btn.twitter:hover { background: rgba(29,161,242,0.15); border-color: #1da1f2; }
.dp-social-btn.instagram:hover { background: rgba(225,48,108,0.15); border-color: #e1306c; }
.dp-social-btn.website:hover { background: rgba(0,255,136,0.12); border-color: var(--green); }

.dp-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.85;
  padding: 10px 12px;
  background: rgba(255,255,255,0.025);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}
.dp-team-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(47,126,255,0.25);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}

.dp-rig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dp-rig-item {
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
}
.dp-rig-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
}
.dp-rig-value {
  font-size: 13px;
  font-weight: 500;
}
.dp-rig-photo {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  margin-top: 10px;
}

.dp-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.dp-edit-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  box-shadow: none;
}
.dp-edit-btn svg { width: 14px; height: 14px; }

.dp-edit-form { display: flex; flex-direction: column; gap: 14px; }
.dp-edit-group { display: flex; flex-direction: column; gap: 4px; }
.dp-edit-group label {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}
.dp-edit-input {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.dp-edit-input:focus { border-color: var(--accent); box-shadow: none; }
.dp-edit-textarea {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  outline: none;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.dp-edit-textarea:focus { border-color: var(--accent); box-shadow: none; }
.dp-edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dp-edit-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.dp-edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}
.dp-save-btn {
  padding: 8px 22px;
  border-radius: 4px;
  border: none;
  background: linear-gradient(180deg, #2f7eff 0%, #1856d8 100%);
  color: white;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}
.dp-save-btn:hover { transform: translateY(-1px); box-shadow: none; }
.dp-save-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.dp-cancel-btn {
  padding: 8px 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--text-dim);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.dp-cancel-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.dp-edit-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

#driverModal,
#driverContent {
  scrollbar-width: thin;
  scrollbar-color: rgba(47,126,255,.65) rgba(255,255,255,.05);
}

#driverModal::-webkit-scrollbar,
#driverContent::-webkit-scrollbar {
  width: 8px;
}

#driverModal::-webkit-scrollbar-track,
#driverContent::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
  border-radius: 999px;
}

#driverModal::-webkit-scrollbar-thumb,
#driverContent::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(47,126,255,.9),
    rgba(0,255,136,.55)
  );
  border-radius: 999px;
  border: 2px solid rgba(10,14,20,.95);
}

#driverModal::-webkit-scrollbar-thumb:hover,
#driverContent::-webkit-scrollbar-thumb:hover {
  background: rgba(47,126,255,1);
}

.dp-rig-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}

.dp-rig-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-rig-list-item {
  padding: 5px 16px;
  border-radius: 4px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}

.dp-rig-photo-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(47,126,255,.35);
  background: rgba(0,0,0,.25);
  cursor: zoom-in;
}

.dp-rig-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #05080d;
}

.dp-rig-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,.65);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  opacity: .8;
}

@media (max-width: 900px) {
  .dp-rig-layout {
    grid-template-columns: 1fr;
  }

  .dp-rig-photo-wrap,
  .dp-rig-photo {
    min-height: 240px;
  }
}

.rig-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.88);
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.rig-lightbox img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(47,126,255,.35);
  box-shadow: 0 0 40px rgba(0,0,0,.6);
}

.rig-lightbox-close {
  position: fixed;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.dp-rig-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.dp-rig-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: zoom-in;
  background: rgba(0,0,0,0.25);
  transition: border-color 0.2s, transform 0.15s;
}
.dp-rig-thumb:hover {
  border-color: rgba(47,126,255,0.45);
  transform: translateY(-1px);
}
.dp-rig-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dp-rig-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.15s;
}
.dp-rig-thumb:hover .dp-rig-thumb-overlay { opacity: 1; }

.leagues-modal .modal-content { max-width: 900px; max-height: 90vh; overflow-y: auto; }

.league-status-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.league-status-tab {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-family: 'Rajdhani', sans-serif;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.5);
  transition: 0.15s;
}
.league-status-tab:hover { border-color: rgba(47,126,255,0.3); color: rgba(255,255,255,0.8); }
.league-status-tab.active { background: rgba(255, 255, 255, 0.04); border-color: rgba(47,126,255,0.4); color: var(--accent); }

.league-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px; padding: 16px; cursor: pointer; transition: 0.2s; margin-bottom: 10px;
}
.league-card:hover { border-color: rgba(47,126,255,0.3); background: rgba(255, 255, 255, 0.04); }
.league-card.official { border-color: rgba(255,215,0,0.2); background: rgba(255,215,0,0.02); }
.league-card.official:hover { border-color: rgba(255,215,0,0.4); }

.league-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.league-card-name { font-size: 16px; font-weight: 700; }
.league-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.league-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 1px; font-weight: 700;
}
.league-badge.official { background: rgba(255,215,0,0.1); color: #ffd700; border: 1px solid rgba(255,215,0,0.25); }
.league-badge.active { background: rgba(0,255,136,0.1); color: var(--green); border: 1px solid rgba(0,255,136,0.25); }
.league-badge.upcoming { background: rgba(255, 255, 255, 0.04); color: #7aaaff; border: 1px solid rgba(47,126,255,0.25); }
.league-badge.past { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.1); }
.league-badge.team { background: rgba(156,39,176,0.1); color: #ce93d8; border: 1px solid rgba(156,39,176,0.25); }

.league-card-meta { display: flex; gap: 16px; font-size: 12px; opacity: 0.55; flex-wrap: wrap; }
.league-card-meta span { display: flex; align-items: center; gap: 5px; }

.league-timer { font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; }
.league-timer.active { color: var(--green); }
.league-timer.upcoming { color: #7aaaff; }
.league-timer.past { color: rgba(255,255,255,0.3); }

.league-detail-header { margin-bottom: 20px; }
.league-detail-name { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.league-detail-desc { font-size: 14px; opacity: 0.55; margin-bottom: 12px; line-height: 1.5; }
.league-detail-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; opacity: 0.6; margin-bottom: 16px; }
.league-detail-meta span { display: flex; align-items: center; gap: 6px; }

.league-lb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.league-lb-table th { padding: 8px 12px; color: rgba(255,255,255,0.4); font-weight: 600; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
.league-lb-table td { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.league-lb-table tr:hover td { background: rgba(255,255,255,0.02); }
.league-lb-rank { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 15px; opacity: 0.6; }
.league-lb-rank.p1 { color: var(--gold); opacity: 1; }
.league-lb-rank.p2 { color: var(--silver); opacity: 1; }
.league-lb-rank.p3 { color: var(--bronze); opacity: 1; }
.league-lb-gap { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.35); }
.league-lb-laptime { font-family: var(--mono); font-size: 13px; font-weight: 700; }

.league-section-title {
  font-family: 'Rajdhani', sans-serif; font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; opacity: 0.4; margin: 20px 0 10px;
}

.teams-modal .modal-content {
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
}
.teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.teams-header-left { display: flex; align-items: center; gap: 12px; }
.teams-title { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.teams-create-btn {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.2s;
}
.teams-create-btn:hover { background: #1a60e8; }
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.team-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 16px;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.team-card:hover { border-color: rgba(47,126,255,0.35); background: rgba(255, 255, 255, 0.04); }
.team-card-top { display: flex; align-items: center; gap: 12px; }
.team-card-logo {
  width: 44px; height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--accent);
  flex-shrink: 0;
}
.team-card-logo img { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; }
.team-card-info { flex: 1; min-width: 0; }
.team-card-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-card-tag {
  font-size: 10px; font-family: 'Rajdhani', sans-serif; letter-spacing: 1.5px;
  padding: 1px 7px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(47,126,255,0.2);
  color: #7aaaff; display: inline-block; margin-top: 2px;
}
.team-card-desc { font-size: 12px; opacity: 0.5; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.team-card-footer { display: flex; align-items: center; justify-content: space-between; font-size: 11px; opacity: 0.5; }
.team-card-open-badge {
  font-size: 10px; padding: 1px 7px; border-radius: 4px;
  background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.2); color: var(--green);
}

.team-detail-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.team-detail-logo {
  width: 64px; height: 64px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: var(--accent); flex-shrink: 0;
}
.team-detail-logo img { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; }
.team-detail-name { font-size: 24px; font-weight: 700; }
.team-detail-desc { font-size: 13px; opacity: 0.55; margin-top: 4px; }
.team-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.team-members-title {
  font-family: 'Rajdhani', sans-serif; font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; opacity: 0.45; margin-bottom: 10px; margin-top: 18px;
}
.team-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 6px; cursor: pointer; transition: 0.15s;
}
.team-member-row:hover { border-color: rgba(47,126,255,0.2); background: rgba(255, 255, 255, 0.04); }
.team-member-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.team-member-name { flex: 1; font-weight: 600; font-size: 14px; }
.team-member-role {
  font-size: 10px; font-family: 'Rajdhani', sans-serif; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
}
.team-member-role.owner { background: rgba(255,215,0,0.1); color: var(--gold); border: 1px solid rgba(255,215,0,0.2); }
.team-member-role.admin { background: rgba(255, 255, 255, 0.04); color: #7aaaff; border: 1px solid rgba(47,126,255,0.2); }
.team-member-role.member { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.08); }
.team-member-kick {
  padding: 3px 10px; font-size: 11px; border-radius: 4px;
  background: rgba(255,59,48,0.08); color: #ff6b6b;
  border: 1px solid rgba(255,59,48,0.2); cursor: pointer; transition: 0.15s;
}
.team-member-kick:hover { background: rgba(255,59,48,0.18); }

.team-request-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 4px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 6px;
}
.team-request-actions { display: flex; gap: 6px; margin-left: auto; }
.btn-accept { padding: 4px 12px; border-radius: 4px; font-size: 11px; background: rgba(0,255,136,0.1); color: var(--green); border: 1px solid rgba(0,255,136,0.2); cursor: pointer; }
.btn-accept:hover { background: rgba(0,255,136,0.2); }
.btn-reject { padding: 4px 12px; border-radius: 4px; font-size: 11px; background: rgba(255,59,48,0.08); color: #ff6b6b; border: 1px solid rgba(255,59,48,0.2); cursor: pointer; }
.btn-reject:hover { background: rgba(255,59,48,0.18); }

.team-form { display: flex; flex-direction: column; gap: 14px; }
.team-form-row { display: flex; gap: 12px; }
.team-form label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.5; display: block; margin-bottom: 5px; }
.team-form input, .team-form textarea, .team-form select {
  width: 100%; padding: 9px 12px; border-radius: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); font-family: inherit; font-size: 14px; box-sizing: border-box;
}
.team-form input:focus, .team-form textarea:focus { outline: none; border-color: var(--accent); }
.team-form textarea { resize: vertical; min-height: 70px; }
.team-form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.team-form-check input[type=checkbox] { width: auto; }
.team-form-submit {
  padding: 10px; border-radius: 4px; background: var(--accent); color: #fff;
  border: none; font-family: 'Rajdhani', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: 1px; cursor: pointer; transition: 0.2s;
}
.team-form-submit:hover { background: #1a60e8; }

.team-invite-box {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px; padding: 12px 14px; margin-top: 6px;
}
.team-invite-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.4; margin-bottom: 6px; }
.team-invite-row { display: flex; gap: 8px; align-items: center; }
.team-invite-code {
  flex: 1; font-family: monospace; font-size: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px; padding: 7px 10px; color: #7aaaff; word-break: break-all;
}
.team-invite-copy {
  padding: 6px 12px; border-radius: 4px; font-size: 11px; white-space: nowrap;
  background: rgba(255, 255, 255, 0.04); color: var(--accent); border: 1px solid rgba(47,126,255,0.2); cursor: pointer;
}
.team-invite-copy:hover { background: rgba(255, 255, 255, 0.04); }
.team-btn-secondary {
  padding: 8px 14px; border-radius: 4px; font-size: 12px;
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: 0.15s;
}
.team-btn-secondary:hover { background: rgba(255,255,255,0.09); }
.team-btn-danger {
  padding: 8px 14px; border-radius: 4px; font-size: 12px;
  background: rgba(255,59,48,0.08); color: #ff6b6b;
  border: 1px solid rgba(255,59,48,0.2); cursor: pointer; transition: 0.15s;
}
.team-btn-danger:hover { background: rgba(255,59,48,0.18); }
.teams-empty { text-align: center; padding: 40px 20px; opacity: 0.4; font-size: 14px; }
.team-join-request-form { margin-top: 12px; }
.team-join-request-form textarea { width: 100%; box-sizing: border-box; }

.dp-claim-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(15,23,42,0.6) 100%);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 4px; position: relative; overflow: hidden;
}
.dp-claim-banner::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.01) 20px, rgba(255,255,255,0.01) 40px);
  pointer-events: none;
}
.dp-claim-lock {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: rgba(88,101,242,0.2); border: 1.5px solid rgba(88,101,242,0.45);
  display: flex; align-items: center; justify-content: center;
  color: #8b9eff;
}
.dp-claim-text { flex: 1; min-width: 160px; }
.dp-claim-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 18px; color: #f1f5f9; margin-bottom: 3px; }
.dp-claim-sub { font-size: 12px; color: #94a3b8; line-height: 1.5; }
.dp-claim-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.dp-claim-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 4px; font-size: 13px; font-weight: 600;
  background: #5865F2; color: #fff; text-decoration: none;
  border: none; cursor: pointer; white-space: nowrap; transition: 0.15s;
}
.dp-claim-btn:hover { background: #4752c4; }
.dp-claim-features { display: flex; gap: 6px; flex-wrap: wrap; }
.dp-claim-features span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #94a3b8;
  background: rgba(255,255,255,0.05); border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 4px; padding: 2px 8px; line-height: 1.6;
}
.dp-claim-features .ti { color: #a5b4fc; font-size: 12px; line-height: 1; vertical-align: middle; }

@keyframes cookieSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 600px;
  background: rgba(15, 15, 15, 0.99);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 18px 22px;
  z-index: 99999;
  backdrop-filter: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  animation: cookieSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cookie-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.cookie-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

.cookie-text strong {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.cookie-text p {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.cookie-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn.accept {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #6faaff;
}
.cookie-btn.accept:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.cookie-btn.decline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}
.cookie-btn.decline:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

@media (max-width: 500px) {
  .cookie-banner { bottom: 10px; width: calc(100% - 20px); padding: 14px 16px; }
  .cookie-inner { flex-direction: column; gap: 12px; }
  .cookie-btns { width: 100%; justify-content: flex-end; }
}

select option {
  background: #1e1e1e;
  color: var(--text);
}

select option:checked,
select option:hover {
  background: #2a2a2a;
  color: #fff;
}

select,
.lb-select,
.lb-filters select {
  color-scheme: dark;
}

.vote-card { margin-bottom: 24px; }

.vote-poll {
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  margin-top: 12px;
}
.vote-poll + .vote-poll { margin-top: 12px; }

.vote-poll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.vote-poll-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}
.vote-poll-server {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-dim);
  padding: 2px 8px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  text-transform: uppercase;
}

.vote-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vote-track-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(0, 0, 0, 0.25);
}
.vote-track-row[onclick]:hover {
  border-color: var(--accent);
  background: rgba(47, 126, 255, 0.08);
}
.vote-track-row.mine {
  border-color: var(--accent);
  background: rgba(47, 126, 255, 0.12);
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.vote-track-row:not([onclick]) { cursor: default; opacity: 0.95; }

.vote-track-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.vote-check {
  color: var(--accent);
  font-weight: 700;
}

.vote-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}
.vote-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #5fa0ff);
  transition: width 0.4s ease;
}
.vote-track-row.mine .vote-bar-fill {
  box-shadow: 0 0 6px var(--accent-glow);
}

.vote-bar-count {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text-dim);
  min-width: 64px;
  text-align: right;
}

.vote-footer-meta {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vote-login-hint {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vote-login-hint:hover {
  background: rgba(47, 126, 255, 0.1);
}

@media (max-width: 640px) {
  .vote-track-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .vote-bar-count { text-align: left; }
}

/* ─────────────────────────────────────────────
   SERVER ACTIVITY HEATMAP (GitHub-style year calendar)
   ───────────────────────────────────────────── */
#activity {
  --srv-1: #2f7eff;
  --srv-2: #00ff88;
  --srv-3: #ff8c42;
  --srv-4: #b46cff;
  --srv-5: #ffd700;
  --cal-cell: 13px;
  --cal-gap: 3px;
  --cal-day-w: 28px;
}
.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.activity-year {
  font-family: 'Courier New', monospace;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 15px;
  margin-left: 6px;
  letter-spacing: 0.04em;
}
.activity-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
.activity-yr-btn, .activity-toggle {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  transition: background .12s, border-color .12s, color .12s;
}
.activity-yr-btn:hover:not(:disabled),
.activity-toggle:hover {
  background: rgba(47,126,255,0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.activity-yr-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.activity-toggle {
  display: none; /* shown only on mobile */
  transition: transform .15s ease;
}
#activity.collapsed .activity-toggle { transform: rotate(-90deg); }
#activity.collapsed .activity-body { display: none; }

.activity-body { display: block; }

.cal-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.cal {
  display: inline-block;
  min-width: 100%;
}
.cal-months {
  display: flex;
  gap: var(--cal-gap);
  margin-left: calc(var(--cal-day-w) + 6px);
  position: relative;
  height: 14px;
  margin-bottom: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cal-months .m { position: absolute; top: 0; }
.cal-body {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.cal-days {
  display: flex;
  flex-direction: column;
  gap: var(--cal-gap);
  width: var(--cal-day-w);
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cal-days div {
  height: var(--cal-cell);
  line-height: var(--cal-cell);
  text-align: right;
  padding-right: 4px;
}
.cal-grid { display: flex; gap: var(--cal-gap); }
.cal-week { display: flex; flex-direction: column; gap: var(--cal-gap); }
.cal-cell {
  width: var(--cal-cell);
  height: var(--cal-cell);
  border-radius: 2px;
  background: rgba(255,255,255,0.04);
  position: relative;
  cursor: pointer;
  transition: transform .08s ease, outline-color .08s ease;
  outline: 1px solid transparent;
}
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell:hover:not(.empty) {
  transform: scale(1.5);
  z-index: 5;
  outline-color: rgba(255,255,255,0.4);
}

.activity-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}
.srv-keys { display: flex; gap: 14px; flex-wrap: wrap; }
.srv-key { display: flex; align-items: center; gap: 6px; }
.srv-dot { width: 10px; height: 10px; border-radius: 2px; }
.activity-scale {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.scale-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent);
}

.activity-tip {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s;
  background: rgba(8,11,16,0.96);
  border: 1px solid var(--card-border);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: var(--text);
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.activity-tip .tip-srv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.activity-tip .tip-srv b { color: var(--text); }

@media (max-width: 768px) {
  #activity { --cal-cell: 10px; --cal-gap: 2px; --cal-day-w: 22px; }
  .activity-toggle { display: inline-flex; }
  .activity-scale { margin-left: 0; }
  .activity-legend { gap: 12px; }
}
