/* === F1 Game Styles === */
#f1-game {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 800px;
  margin: 20px auto;
  padding: 24px;
  background: linear-gradient(145deg, #fefefe, #e6f0ff);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

#f1-game h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  color: #1a1a1a;
}

#f1-game h3 {
  margin-top: 20px;
  margin-bottom: 12px;
  font-size: 20px;
  color: #333;
}

.race-select {
  width: 100%;
  max-width: 400px;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 20px;
  background-color: #fff;
}

.driver-row {
  display: grid;
  grid-template-columns: 48px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.driver-label {
  font-weight: 600;
  color: #333;
}

.driver-slot {
  width: 100%;
  max-width: 400px;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f0f4f8;
  transition: background 0.2s, transform 0.2s;
}

/* Highlight empty select driver */
.driver-slot.empty-driver {
  background-color: #d0e7ff;
  font-weight: 600;
}

.driver-points {
  font-size: 14px;
  color: #007acc;
  font-weight: 500;
  text-align: right;
  min-width: 60px;
}

.save-container {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.save-note {
  color: #666;
  font-style: italic;
  font-size: 14px;
}

#submit-btn {
  padding: 8px 16px;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  background-color: #007acc;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

#submit-btn:hover:not(:disabled) {
  background-color: #005fa3;
  transform: translateY(-1px);
}

#submit-btn:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* Status bar with different states */
.status-bar {
  margin-top: 16px;
  font-weight: 500;
  font-size: 15px;
  text-align: center;
  color: #333;
  transition: color 0.3s ease;
}

.status-bar.loading { color: #ff9800; }
.status-bar.success { color: #4caf50; }
.status-bar.error { color: #f44336; }

/* === Tabs Styling === */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f0f4f8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background-color: #007acc;
  color: #fff;
  border-color: #005fa3;
}

.tab {
  display: none; /* hide all tabs by default */
}

.tab.active {
  display: block; /* show only active tab */
}

@media (max-width: 768px) {
  .driver-row {
    grid-template-columns: 48px 1fr 80px;
    gap: 6px;
  }
  .driver-slot { max-width: 100%; }
  .driver-points { text-align: right; }
}

@media (max-width: 480px) {
  .driver-row {
    grid-template-columns: 48px 1fr 80px;
    gap: 4px;
    grid-template-rows: auto;
  }
  #submit-btn { width: 100%; }
}
