/* ============================================================
   Timing Team Results — Public Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;600&display=swap');

.ttr-app {
  --bg:      #0a0f1a;
  --surface: #111827;
  --surf2:   #1a2235;
  --border:  #1e2d45;
  --accent:  #f97316;
  --acc2:    #fb923c;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --radius:  10px;

  background: var(--bg);
  border-radius: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
  padding-bottom: 48px;
}

/* HERO */
.ttr-hero {
  background: linear-gradient(135deg, #0a0f1a 0%, #0d1a2e 50%, #0a1520 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 48px 24px 36px;
  position: relative;
  text-align: center;
}
.ttr-hero::before {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,.12) 0%, transparent 70%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.ttr-hero-label {
  color: var(--accent);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  margin-bottom: 10px;
  position: relative;
  text-transform: uppercase;
}
.ttr-hero-title {
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 7vw, 72px);
  letter-spacing: 2px;
  line-height: 1;
  margin: 0 0 8px;
  position: relative;
}
.ttr-hero-title span { color: var(--accent); }
.ttr-hero-sub { color: var(--muted); font-size: 15px; position: relative; margin: 0; }

/* CONTROLS */
.ttr-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 20px 10px;
}
.ttr-search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.ttr-search-wrap svg {
  color: var(--muted);
  left: 13px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
#ttr-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  padding: 10px 13px 10px 40px;
  transition: border-color .2s;
  width: 100%;
}
#ttr-search:focus { border-color: var(--accent); }
#ttr-search::placeholder { color: var(--muted); }

#ttr-year {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  padding: 10px 34px 10px 13px;
  transition: border-color .2s;
}
#ttr-year:focus { border-color: var(--accent); }

.ttr-count-badge {
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 14px;
  white-space: nowrap;
}
.ttr-count-badge strong { color: var(--accent); }

/* SORT BAR */
.ttr-sort-bar {
  align-items: center;
  display: flex;
  gap: 7px;
  padding: 0 20px 14px;
}
.ttr-sort-label { color: var(--muted); font-size: 12px; }
.ttr-sort-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 5px 12px;
  transition: all .15s;
}
.ttr-sort-btn:hover, .ttr-sort-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* TABLE */
.ttr-table-outer { padding: 0 20px; }
.ttr-loading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  gap: 12px;
  justify-content: center;
  padding: 60px;
}
.ttr-spinner {
  animation: ttr-spin .7s linear infinite;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  height: 22px;
  width: 22px;
}
@keyframes ttr-spin { to { transform: rotate(360deg); } }

.ttr-table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}
.ttr-table thead th {
  background: var(--surf2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 11px 14px;
  text-align: left;
  text-transform: uppercase;
}
.ttr-table thead th:first-child { border-radius: 8px 0 0 0; }
.ttr-table thead th:last-child  { border-radius: 0 8px 0 0; }
.ttr-table tbody tr {
  border-bottom: 1px solid rgba(30,45,69,.5);
  transition: background .15s;
}
.ttr-table tbody tr:hover { background: rgba(249,115,22,.04); }
.ttr-table td { padding: 12px 14px; vertical-align: middle; }

.col-id  { width: 56px; }
.col-loc {}
.ttr-td-id   { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ttr-td-name { color: #f1f5f9; font-weight: 600; }
.ttr-td-loc  { color: #94a3b8; }
.ttr-td-date { color: #64748b; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ttr-td-btn  { width: 110px; }

.ttr-results-btn {
  align-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--acc2) 100%);
  border: none;
  border-radius: 7px;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  gap: 5px;
  padding: 7px 13px;
  text-decoration: none !important;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.ttr-results-btn:hover {
  box-shadow: 0 4px 16px rgba(249,115,22,.35);
  transform: translateY(-1px);
}

/* EMPTY */
.ttr-empty {
  color: var(--muted);
  padding: 72px 24px;
  text-align: center;
}
.ttr-empty-icon { font-size: 44px; margin-bottom: 14px; opacity: .4; }
.ttr-empty h3   { color: var(--text); font-size: 20px; margin: 0 0 6px; }

/* PAGINATION */
.ttr-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 20px;
}
.ttr-pg-info { color: var(--muted); font-size: 13px; }
.ttr-pg-btns { display: flex; gap: 5px; }
.ttr-pg-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 6px 13px;
  transition: all .15s;
}
.ttr-pg-btn:hover, .ttr-pg-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ttr-pg-btn:disabled { cursor: not-allowed; opacity: .3; }
.ttr-pg-btn:disabled:hover { background: var(--surface); border-color: var(--border); color: var(--text); }

/* RESPONSIVE */
@media (max-width: 600px) {
  .col-id, .col-loc { display: none; }
  .ttr-controls { flex-direction: column; align-items: stretch; }
}
