/* --- GLOBAL WEB OVERRIDES --- */
body {
  font-family: 'Inter', 'Roboto', sans-serif;
  background: #111;
  color: #eee;
  margin: 0;
  padding: 0;
  /* Allow normal scrolling for web users */
  overflow-x: hidden; 
  overflow-y: auto;
}

#app-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;

  /* REMOVED 16:9 TV MATH - Using Fluid Web Layout */
  width: 100%;
  min-height: 100vh;
  height: auto;
  max-width: none;
  max-height: none;
  
  margin: 0;
  background: #111;
  color: #fff;
  box-sizing: border-box;
  padding: 1.5rem;
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 2.2rem; /* Fixed size for readability */
  color: #fff;
}

/* --- TABLE CONTROLS --- */
.timing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem; /* Standard web font size */
  table-layout: auto; 
}

.timing-table th, .timing-table td {
  border: 1px solid #333;
  padding: 10px 12px; /* Larger hit area for web */
  white-space: nowrap;
  text-align: center;
}

/* Fix "Jumping" columns during JSON updates */
.timing-table td:nth-child(2),
.timing-table th:nth-child(2) {
  text-align: left;
  min-width: 180px; /* Locks Driver column width */
}
.timing-table td:nth-child(3),
.timing-table th:nth-child(3) {
  text-align: left;
  min-width: 220px; /* Locks Vehicle column width */
  white-space: normal; /* Allows long vehicle names to wrap */
}

/* --- BARS & LEADERBOARDS --- */
#leaderboard-bar {
  display: flex;
  flex-wrap: wrap; /* Wraps on mobile/small screens */
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #1e1e1e;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: #fff;
  font-size: 1rem;
}

/* THE HIDDEN RECORDS BAR - Updated for today's event */
#records-bar {
  display: none; /* Hidden as requested */
  justify-content: space-between;
  align-items: center;
  background: #111;
  color: #fff;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
}

/* --- DECORATION --- */
tr.class-header-row td.class-header {
  background: #222 !important;
  color: #ffd700 !important;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: left;
  padding: 12px;
}

.lb-chip {
  padding: 8px 16px; /* Slightly larger for web interaction */
  font-size: 0.95rem;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
  .timing-table {
    font-size: 0.85rem;
  }
  #app-container {
    padding: 0.5rem;
  }
}