/* Saratoga Race Tracker Design System */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131a2b;
  --card-bg: rgba(22, 30, 49, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --accent-rose: #fb7185;
  --accent-violet: #a78bfa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 16px;
  min-height: 100vh;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* Glassmorphism Card styles */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 12px;
}

.metric-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: 2px;
}

/* Control Panel Inputs */
.input-group {
  margin-bottom: 12px;
}

.input-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--accent-cyan);
}

/* Buttons styling */
.btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  color: #fff;
  margin-top: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary.active {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.15);
}

.btn-secondary.active {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent-cyan);
}

.unit-toggle-wrap {
  display: flex;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 4px;
  margin-top: 10px;
  border: 1px solid var(--border-color);
}

.unit-btn {
  flex: 1;
  padding: 6px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.unit-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

/* Live Map Container */
#map {
  width: 100%;
  height: 250px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-top: 16px;
}

/* Round Watch simulator screen styling */
.watch-simulator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.watch-bezel {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #000;
  border: 6px solid #222;
  box-shadow: 0 0 20px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.watch-screen {
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000;
  color: #fff;
}
