/* SLSC Race Course Setup App Styling */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #121824;
  --card-bg: rgba(20, 28, 45, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --accent-cyan: #22d3ee;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
}

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

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

header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #fff 40%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
  border: 1px solid var(--accent-yellow);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid var(--accent-rose);
}

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

/* Glassmorphism Panel Cards */
.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 rgba(0, 0, 0, 0.4);
}

.card h2 {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form Fields styling */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  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.92rem;
  outline: none;
}

select option {
  background-color: #121824; /* Force dark background for dropdown items */
  color: #f9fafb;            /* Force light text for dropdown items */
}

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

/* Button UI */
.btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
  color: white;
}

.btn:active {
  opacity: 0.85;
}

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

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

/* Compass Navigation Widget */
.compass-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.compass-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.compass-arrow {
  width: 8px;
  height: 80px;
  background: linear-gradient(to top, transparent 50%, var(--accent-cyan) 50%);
  position: absolute;
  transform: rotate(0deg);
  transition: transform 0.4s ease-out;
}

/* Alert Warnings card */
.safety-alert {
  background: rgba(244, 63, 94, 0.08);
  border-left: 4px solid var(--accent-rose);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}
.safety-alert b {
  color: var(--accent-rose);
}

.map-layout-optimized {
  width: 37.5%;
  height: 750px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .map-layout-optimized {
    width: 95%;
    height: 550px;
  }
}

/* Coordinates Table Styling */
.coords-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
  font-size: 0.85rem;
}

.coords-table th {
  text-align: left;
  padding: 8px 4px;
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--border-color);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coords-table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-color);
}

.coords-table tr:last-child td {
  border-bottom: none;
}

.coords-table tr:hover td {
  background: rgba(34, 211, 238, 0.04);
}

@media (max-width: 480px) {
  .coords-table {
    font-size: 0.75rem;
  }
  .coords-table th, .coords-table td {
    padding: 6px 2px;
  }
}

@media (max-width: 360px) {
  .coords-table {
    font-size: 0.70rem;
  }
  .coords-table th, .coords-table td {
    padding: 5px 1px;
  }
}
