/* ============================================================
   tribes1.css — Starsiege: Tribes UI theme
   Inspired by the in-game server browser, inventory, and
   options screens. All classes prefixed t1- to avoid collisions.
   ============================================================ */

/* ----- 1. Custom Properties -------------------------------- */
:root {
  /* Greens */
  --t1-green:        #33FF33;
  --t1-green-dim:    #22aa22;
  --t1-green-faint:  #1a7a1a;
  --t1-green-ghost:  #0d3d0d;
  --t1-green-bg:     rgba(10, 40, 10, 0.85);

  /* Gold / orange text hierarchy */
  --t1-gold:         #FEC669;
  --t1-orange:       #f59517;
  --t1-amber:        #CA7708;
  --t1-amber-faint:  #7a5a1a;
  --t1-amber-ghost:  #3d2d0d;

  /* Status dot colors */
  --t1-dot-green:    #33FF33;
  --t1-dot-yellow:   #CCCC00;
  --t1-dot-orange:   #FF8800;
  --t1-dot-red:      #FF3333;

  /* Backgrounds */
  --t1-bg:           #060e06;
  --t1-panel-bg:     rgba(8, 28, 12, 0.92);
  --t1-row-hover:    rgba(30, 80, 30, 0.35);
  --t1-row-selected: rgba(40, 100, 40, 0.45);
  --t1-header-bg:    rgba(15, 50, 15, 0.7);

  /* Borders */
  --t1-border:       #33FF33;
  --t1-border-dim:   #1a7a1a;
  --t1-border-col:   rgba(51, 255, 51, 0.15);

  /* Font */
  --t1-font:         'Noto Sans Mono', 'Courier New', monospace;
  --t1-fs-xs:        12px;
  --t1-fs-sm:        14px;
  --t1-fs-md:        15px;
  --t1-fs-lg:        18px;
  --t1-fs-xl:        22px;

  /* Spacing */
  --t1-gap:          8px;
  --t1-pad:          12px;
  --t1-radius:       2px;

  /* Chrome (gray/steel for panels & controls) */
  --t1-chrome:       #6a6a6a;
  --t1-chrome-dim:   #3a3a3a;
  --t1-chrome-ghost: #1a1a1a;
  --t1-chrome-bg:    rgba(18, 18, 18, 0.95);

  /* Slate (sidebar / muted UI text) */
  --t1-slate:        #8090a8;
  --t1-slate-light:  #c0ccdd;

  /* Glow */
  --t1-glow:         0 0 6px rgba(51, 255, 51, 0.5);
  --t1-glow-strong:  0 0 12px rgba(51, 255, 51, 0.7);
  --t1-glow-gold:    0 0 6px rgba(254, 198, 105, 0.4);
}


/* ----- 2. Base styles -------------------------------------- */
.t1-body {
  margin: 0;
  padding: 0;
  font-family: var(--t1-font);
  font-size: var(--t1-fs-md);
  color: var(--t1-gold);
  background: var(--t1-bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.t1-body a {
  color: var(--t1-green);
  text-decoration: none;
}
.t1-body a:hover {
  color: var(--t1-green);
}
.t1-body a.t1-amber-link { color: var(--t1-amber); }
.t1-body a.t1-amber-link:hover { color: #fff; }


/* ----- 3. Server Browser ----------------------------------- */

/* Outer panel */
.t1-browser {
  display: flex;
  flex-direction: column;
  border-radius: var(--t1-radius);
  background: var(--t1-panel-bg);
  box-shadow: var(--t1-glow), inset 0 0 60px rgba(0, 20, 0, 0.6);
  overflow: visible;
}

/* Tab bar */
.t1-browser__tabs {
  display: flex;
  gap: 0;
  background: var(--t1-header-bg);
  border-bottom: 1px solid var(--t1-border-dim);
}

/* Filter row */
.t1-browser__filters {
  display: flex;
  align-items: center;
  gap: var(--t1-gap);
  padding: 6px var(--t1-pad);
  border-bottom: 1px solid var(--t1-border-dim);
  font-size: var(--t1-fs-sm);
  color: var(--t1-green-dim);
}

.t1-browser__filters label {
  color: var(--t1-green-dim);
  text-transform: uppercase;
  font-size: var(--t1-fs-xs);
  letter-spacing: 0.05em;
}

/* Title area */
.t1-browser__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px var(--t1-pad);
  border-bottom: 1px solid var(--t1-border-dim);
  font-size: var(--t1-fs-lg);
  color: var(--t1-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Scrollable body */
.t1-browser__body {
  flex: 1;
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--t1-green-faint) var(--t1-bg);
}
.t1-browser__body::-webkit-scrollbar {
  width: 10px;
}
.t1-browser__body::-webkit-scrollbar-track {
  background: var(--t1-bg);
}
.t1-browser__body::-webkit-scrollbar-thumb {
  background: var(--t1-green-faint);
  border: 1px solid var(--t1-green-ghost);
  border-radius: 1px;
}
.t1-browser__body::-webkit-scrollbar-thumb:hover {
  background: var(--t1-green-dim);
}

/* Server table */
.t1-srv {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t1-fs-sm);
  table-layout: fixed;
}

.t1-srv th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--t1-header-bg);
  color: var(--t1-gold);
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--t1-fs-xs);
  letter-spacing: 0.04em;
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid var(--t1-border);
  border-right: 1px solid var(--t1-border-col);
  white-space: nowrap;
  user-select: none;
}
.t1-srv th:last-child { border-right: none; }

.t1-srv td {
  padding: 3px 6px;
  border-right: 1px solid var(--t1-border-col);
  border-bottom: 1px solid rgba(51, 255, 51, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--t1-amber);
}
.t1-srv td:last-child { border-right: none; }

.t1-srv tbody tr:hover {
  background: var(--t1-row-hover);
}
.t1-srv tbody tr.t1-srv--selected {
  background: var(--t1-row-selected);
  outline: 1px solid var(--t1-green-faint);
}

/* Column-type helpers */
.t1-col-icon   { width: 28px; text-align: center; }
.t1-col-num    { width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.t1-col-ping   { width: 50px; text-align: right; font-variant-numeric: tabular-nums; }
.t1-col-name   { width: auto; min-width: 160px; }
.t1-col-map    { width: 120px; }
.t1-col-type   { width: 90px; }
.t1-col-addr   { width: 140px; font-size: var(--t1-fs-xs); color: var(--t1-amber); }
.t1-col-ver    { width: 60px; font-size: var(--t1-fs-xs); color: var(--t1-green-dim); }
.t1-col-status { width: 24px; text-align: center; }

/* Bottom button bar */
.t1-browser__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px var(--t1-pad);
  border-top: 1px solid var(--t1-border-dim);
  background: var(--t1-header-bg);
  gap: var(--t1-gap);
}
.t1-browser__actions-left,
.t1-browser__actions-right {
  display: flex;
  gap: var(--t1-gap);
}


/* ----- 4. General Table ------------------------------------ */
.t1-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--t1-fs-sm);
}
.t1-table th {
  text-align: left;
  color: var(--t1-gold);
  font-weight: 700;
  font-size: var(--t1-fs-sm);
  padding: 4px 6px;
  background: var(--t1-header-bg);
  border-bottom: 1px solid var(--t1-border);
  border-right: 1px solid var(--t1-border-col);
  white-space: nowrap;
  user-select: none;
}
.t1-table th:last-child { border-right: none; }
.t1-table td {
  padding: 3px 6px;
  border-bottom: 1px solid rgba(51, 255, 51, 0.12);
  border-right: 1px solid rgba(51, 255, 51, 0.2);
  color: var(--t1-amber);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t1-table td:last-child { border-right: none; }
.t1-table td a {
  color: var(--t1-orange);
  text-decoration: none;
}
.t1-table td a:hover {
  color: #fff;
}
.t1-table tbody tr:hover {
  background: var(--t1-row-hover);
}

/* Detail variant: key-value pairs — no double border, no column seps */
.t1-table--detail {
  border: none;
}
.t1-table--detail::before,
.t1-table--detail::after {
  display: none;
}
.t1-table--detail th,
.t1-table--detail td {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(51, 255, 51, 0.12);
}
.t1-table--detail th {
  width: 100px;
  font-weight: 700;
  color: var(--t1-gold);
  vertical-align: top;
}
.t1-table--detail td {
  color: var(--t1-amber);
}
.t1-table--detail tbody tr:hover {
  background: none;
}

/* Dense variant */
.t1-table--dense th,
.t1-table--dense td {
  padding: 4px 8px;
  font-size: var(--t1-fs-sm);
}


/* ----- 5. Tabs --------------------------------------------- */
.t1-tabs {
  display: flex;
  gap: 0;
}

.t1-tab {
  padding: 6px 16px;
  font-family: var(--t1-font);
  font-size: var(--t1-fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t1-green-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.t1-tab:hover {
  color: var(--t1-green);
}
.t1-tab--active {
  color: var(--t1-green);
  border-bottom-color: var(--t1-green);
  text-shadow: var(--t1-glow);
}


/* ----- 6. Sidebar Nav -------------------------------------- */
.t1-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--t1-green-ghost);
  border: 1px solid var(--t1-border-dim);
  border-radius: var(--t1-radius);
  padding: 4px 0;
  min-width: 150px;
}

a.t1-sidebar__item,
a.t1-sidebar__item:link,
a.t1-sidebar__item:visited {
  display: block;
  padding: 8px 14px;
  font-family: var(--t1-font);
  font-size: var(--t1-fs-md);
  color: var(--t1-slate);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  transition: color 0.12s, background 0.12s;
}
a.t1-sidebar__item:hover {
  color: var(--t1-slate-light);
  background: rgba(255, 255, 255, 0.04);
  text-shadow: 0 0 6px rgba(192, 204, 221, 0.3);
}
a.t1-sidebar__item.t1-sidebar__item--active,
a.t1-sidebar__item.t1-sidebar__item--active:link,
a.t1-sidebar__item.t1-sidebar__item--active:visited {
  color: var(--t1-slate-light);
  background: linear-gradient(180deg, #0e1118 0%, #161b28 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  text-shadow: 0 0 6px rgba(192, 204, 221, 0.4);
  border-left: 2px solid var(--t1-slate-light);
  padding-left: 12px;
}


/* ----- 7. Inventory / Split Panels ------------------------- */
.t1-split {
  display: flex;
  gap: var(--t1-pad);
}
.t1-split__pane {
  flex: 1;
  border: 1px solid var(--t1-border-dim);
  border-radius: var(--t1-radius);
  background: var(--t1-panel-bg);
  padding: var(--t1-pad);
  overflow: auto;
}
.t1-split__pane--header {
  padding-top: 6px;
}

.t1-inv-category {
  font-weight: 700;
  color: var(--t1-green);
  font-size: var(--t1-fs-sm);
  text-transform: uppercase;
  padding: 6px 0 2px;
  border-bottom: 1px solid var(--t1-border-col);
  margin-bottom: 2px;
}
.t1-inv-category:first-child { padding-top: 0; }

.t1-inv-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 8px;
  font-size: var(--t1-fs-sm);
  color: var(--t1-gold);
}
.t1-inv-row:hover {
  background: var(--t1-row-hover);
}
.t1-inv-row__name  { flex: 1; }
.t1-inv-row__value {
  text-align: right;
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}


/* ----- 8. Buttons ------------------------------------------ */
.t1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 16px;
  font-family: var(--t1-font);
  font-size: var(--t1-fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t1-green);
  background: linear-gradient(180deg, var(--t1-green-ghost) 0%, rgba(10, 30, 10, 0.9) 100%);
  border: 1px solid var(--t1-green-faint);
  border-radius: var(--t1-radius);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
}
.t1-btn:hover {
  border-color: var(--t1-green);
  box-shadow: var(--t1-glow);
  color: #55ff55;
}
.t1-btn:active {
  background: linear-gradient(180deg, rgba(10, 30, 10, 0.9) 0%, var(--t1-green-ghost) 100%);
}
.t1-btn--primary {
  background: linear-gradient(180deg, var(--t1-green-faint) 0%, var(--t1-green-ghost) 100%);
  border-color: var(--t1-green-dim);
  box-shadow: var(--t1-glow);
}
.t1-btn--primary:hover {
  box-shadow: var(--t1-glow-strong);
}
.t1-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}


/* ----- 9. Form Controls ------------------------------------ */

/* Text input */
.t1-input {
  font-family: var(--t1-font);
  font-size: var(--t1-fs-sm);
  color: var(--t1-gold);
  background: rgba(5, 15, 5, 0.9);
  border: 1px solid var(--t1-green-faint);
  border-radius: var(--t1-radius);
  padding: 4px 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t1-input:focus {
  border-color: var(--t1-green);
  box-shadow: var(--t1-glow);
}
.t1-input::placeholder {
  color: var(--t1-green-ghost);
}

/* Slider */
.t1-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--t1-green-ghost);
  border: 1px solid var(--t1-green-faint);
  border-radius: 3px;
  outline: none;
}
.t1-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--t1-green-dim), var(--t1-green-faint));
  border: 1px solid var(--t1-green);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: var(--t1-glow);
}
.t1-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--t1-green-dim), var(--t1-green-faint));
  border: 1px solid var(--t1-green);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: var(--t1-glow);
}
.t1-slider:hover::-webkit-slider-thumb {
  box-shadow: var(--t1-glow-strong);
}

/* Checkbox */
.t1-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: var(--t1-fs-sm);
  color: var(--t1-green-dim);
}
.t1-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--t1-green-faint);
  border-radius: 1px;
  background: rgba(5, 15, 5, 0.9);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.t1-check input[type="checkbox"]:checked {
  background: var(--t1-green-ghost);
  border-color: var(--t1-green);
}
.t1-check input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 1px;
  font-size: 12px;
  color: var(--t1-green);
  text-shadow: var(--t1-glow);
}
.t1-check input[type="checkbox"]:focus {
  box-shadow: var(--t1-glow);
}


/* ----- 10. Status Dots ------------------------------------- */
.t1-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}
.t1-dot--green  { background: var(--t1-dot-green);  box-shadow: 0 0 4px var(--t1-dot-green); }
.t1-dot--yellow { background: var(--t1-dot-yellow); box-shadow: 0 0 4px var(--t1-dot-yellow); }
.t1-dot--orange { background: var(--t1-dot-orange); box-shadow: 0 0 4px var(--t1-dot-orange); }
.t1-dot--red    { background: var(--t1-dot-red);    box-shadow: 0 0 4px var(--t1-dot-red); }


/* ----- 11. Utility Classes --------------------------------- */

/* Text colors */
.t1-text-green  { color: var(--t1-green); }
.t1-text-dim    { color: var(--t1-green-dim); }
.t1-text-faint  { color: var(--t1-green-faint); }
.t1-text-gold   { color: var(--t1-gold); }
.t1-text-orange { color: var(--t1-orange); }
.t1-text-amber  { color: var(--t1-amber); }

/* Border colors */
.t1-border-green { border-color: var(--t1-green); }
.t1-border-dim   { border-color: var(--t1-border-dim); }

/* Glow */
.t1-glow       { text-shadow: var(--t1-glow); }
.t1-glow-box   { box-shadow: var(--t1-glow); }

/* Truncate */
.t1-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Uppercase */
.t1-upper { text-transform: uppercase; letter-spacing: 0.04em; }

/* Panel (generic bordered box) */
.t1-panel {
  border: 1px solid var(--t1-border-dim);
  border-radius: var(--t1-radius);
  background: var(--t1-panel-bg);
  padding: var(--t1-pad);
}

/* Tribes double-border: inner solid + outer lines with corner gaps */
.t1-dborder {
  position: relative;
  border: 1px solid var(--t1-border-dim);
  display: table;
  border-collapse: separate;
  border-spacing: 0;
}
.t1-dborder::before,
.t1-dborder::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
/* Outer horizontal lines (top & bottom), inset from corners */
.t1-dborder::before {
  top: -3px;
  bottom: -3px;
  left: 2px;
  right: 2px;
  border-top: 1px solid var(--t1-border-dim);
  border-bottom: 1px solid var(--t1-border-dim);
}
/* Outer vertical lines (left & right), inset from corners */
.t1-dborder::after {
  left: -3px;
  right: -3px;
  top: 2px;
  bottom: 2px;
  border-left: 1px solid var(--t1-border-dim);
  border-right: 1px solid var(--t1-border-dim);
}

/* Bright variant */
.t1-dborder--bright {
  border-color: var(--t1-green);
}
.t1-dborder--bright::before,
.t1-dborder--bright::after {
  border-color: var(--t1-green);
}

/* Section heading */
.t1-heading {
  color: var(--t1-green);
  font-size: var(--t1-fs-lg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--t1-gap);
}


/* ----- 12. App Shell --------------------------------------- */

.t1-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.t1-shell__topbar {
  background: linear-gradient(180deg, #1e2230 0%, #171b28 100%);
  border-bottom: 1px solid #2a3040;
  padding: 8px 24px 8px 2px;
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 16px;
}
a.t1-topbar__logo,
a.t1-topbar__logo:link,
a.t1-topbar__logo:visited {
  display: block;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}
.t1-topbar__logo-svg {
  height: 38px;
  width: auto;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 3px rgba(180, 140, 40, 0.3));
}
.t1-topbar__breadcrumb {
  font-size: var(--t1-fs-sm);
  color: #4a5568;
  margin-left: 8px;
}
.t1-topbar__breadcrumb a,
.t1-topbar__breadcrumb a:link,
.t1-topbar__breadcrumb a:visited {
  color: var(--t1-slate);
  text-decoration: none;
}
.t1-topbar__breadcrumb a:hover {
  color: var(--t1-slate-light);
  text-shadow: 0 0 6px rgba(192, 204, 221, 0.3);
}
.t1-topbar__breadcrumb .t1-breadcrumb__sep {
  color: #3a4050;
  margin: 0 6px;
}
.t1-topbar__breadcrumb .t1-breadcrumb__current {
  color: var(--t1-slate-light);
  font-weight: 600;
}
.t1-shell__body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.t1-shell__sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1a1e2a 0%, #141822 50%, #101420 100%);
  border-right: 1px solid #2a3040;
}
.t1-shell__sidebar .t1-sidebar {
  flex: 1;
  border: none;
  border-radius: 0;
  background: none;
  padding: 8px 0;
}
.t1-shell__sidebar .t1-sidebar__item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.t1-shell__main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 32px 60px;
}
.t1-shell__footer {
  border-top: 1px solid #2a3040;
  background: linear-gradient(180deg, #141822, #101420);
  padding: 8px 24px;
  font-size: var(--t1-fs-xs);
  color: #4a5568;
  text-align: center;
}
.t1-shell__footer a {
  color: var(--t1-slate);
}
.t1-shell__footer a:hover {
  color: var(--t1-gold);
}

/* (Site header moved to topbar) */

/* Sidebar section label & badge */
.t1-sidebar__label {
  display: block;
  padding: 12px 14px 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4a5568;
  cursor: default;
}
.t1-sidebar__label ~ .t1-sidebar__label {
  margin-top: 1rem;
}
.t1-sidebar__badge {
  margin-left: auto;
  font-size: 10px;
  color: #4a5568;
  font-variant-numeric: tabular-nums;
}

/* Mobile sidebar toggle */
.t1-sidebar-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #2a3040;
  background: none;
  color: var(--t1-slate);
  font-family: var(--t1-font);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

/* ----- 13. Page Components --------------------------------- */

/* Page heading */
.t1-page-title {
  font-size: 30px;
  font-weight: 700;
  color: #d0d8e4;
  letter-spacing: 0.02em;
  margin: 0 0 32px;
  text-align: center;
}

/* Page subtitle (below h1) */
.t1-page-subtitle {
  font-size: var(--t1-fs-md);
  font-weight: 400;
  color: var(--t1-slate);
  text-align: center;
  margin: -34px 0 32px;
}

/* Section heading */
.t1-section-title,
a.t1-section-title,
.t1-section-title a,
.t1-section-title a:link,
.t1-section-title a:visited {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  text-decoration: none;
}
.t1-section-title a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Breadcrumb */
.t1-breadcrumb {
  font-size: var(--t1-fs-md);
  margin-bottom: 20px;
}
.t1-breadcrumb a {
  color: var(--t1-green-dim);
}
.t1-breadcrumb a:hover {
  color: var(--t1-green);
  text-shadow: var(--t1-glow);
}
.t1-breadcrumb__sep {
  margin: 0 8px;
  color: var(--t1-green-faint);
}
.t1-breadcrumb__current {
  color: var(--t1-gold);
  font-weight: 600;
}

/* Stat cards */
.t1-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
}
.t1-stat {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  background: var(--t1-panel-bg);
  text-decoration: none;
  transition: background 0.15s;
}
.t1-stat:hover {
  background: var(--t1-row-hover);
}
.t1-stat__num {
  font-size: 24px;
  font-weight: 700;
  color: var(--t1-gold);
  font-variant-numeric: tabular-nums;
}
.t1-stat__label {
  font-size: var(--t1-fs-xs);
  color: var(--t1-green-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Section panel (bordered box with header bar) */
.t1-section {
  border-radius: var(--t1-radius);
  background: var(--t1-panel-bg);
  overflow: visible;
}
.t1-section__header {
  padding: 8px 12px;
  background: var(--t1-header-bg);
  border-bottom: 1px solid var(--t1-border-dim);
  font-size: var(--t1-fs-sm);
  font-weight: 600;
  color: var(--t1-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Dashboard grid */
.t1-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* Content panel (replaces .tribes-container) */
.t1-content {
  background: var(--t1-panel-bg);
  border: 1px solid var(--t1-border-dim);
  border-radius: var(--t1-radius);
  padding: 24px;
}

/* Two-column layout (main + sidebar) */
.t1-layout-2col {
  display: flex;
  gap: 40px;
}
.t1-layout-2col + .t1-vstack {
  margin-top: 28px;
}
.t1-layout-2col__main {
  flex: 1;
  min-width: 0;
}
.t1-layout-2col__side {
  width: 480px;
  flex-shrink: 0;
}
.t1-layout-2col__side-sticky {
  position: sticky;
  top: 16px;
}

/* Word cloud (players, maps) */
.t1-word-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
}
.t1-word-cloud a {
  padding: 4px 8px;
  white-space: nowrap;
}
.t1-word-cloud a:nth-child(3n+1) { color: var(--t1-gold); }
.t1-word-cloud a:nth-child(3n+2) { color: var(--t1-orange); }
.t1-word-cloud a:nth-child(3n+3) { color: var(--t1-amber); }
.t1-word-cloud a:hover { font-weight: bold; }
.t1-word-cloud span {
  padding: 4px 8px;
  white-space: nowrap;
}

/* Media indicator triangles */
a.t1-indicator,
a.t1-indicator:link,
a.t1-indicator:visited,
.t1-indicator {
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  color: var(--t1-green);
  text-shadow: 0 0 5px var(--t1-green);
}
a.t1-indicator:hover {
  color: var(--t1-green);
  text-shadow: var(--t1-glow-strong);
}

/* Media column in tables */
.t1-table th.t1-col-media,
.t1-table td.t1-col-media {
  width: 28px;
  text-align: center;
  white-space: nowrap;
}
.t1-col-media .t1-dot {
  margin: 0 2px;
}

/* Video embed */
.t1-video-embed { width: 100%; }
.t1-video-embed iframe { width: 100%; aspect-ratio: 16 / 9; border: none; display: block; }
.t1-video-embed video { width: 100%; aspect-ratio: 4 / 3; display: block; }

/* ----- Video Player ---------------------------------------- */
.t1-video-player {
  width: 100%;
  margin: 24px 0;
  border: 1px solid var(--t1-border-dim);
  background: #000;
}
.t1-video-player__screen {
  position: relative;
  background: #000;
  cursor: pointer;
}
.t1-video-player__screen video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}
.t1-video-player__big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(8, 28, 12, 0.8);
  border: 2px solid var(--t1-green-dim);
  color: var(--t1-green);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t1-video-player__big-play:hover {
  border-color: var(--t1-green);
  box-shadow: var(--t1-glow);
}
.t1-video-player__seek {
  position: relative;
  height: 24px;
  background: var(--t1-chrome-ghost);
  border-top: 1px solid var(--t1-border-dim);
  cursor: pointer;
  box-sizing: border-box;
}
.t1-video-player__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--t1-green-faint);
  transition: width 0.25s linear;
  z-index: 2;
}
.t1-video-player__buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--t1-green-ghost);
  z-index: 1;
}
.t1-video-player__chapter-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--t1-green);
  pointer-events: none;
  z-index: 3;
  display: none;
}
.t1-video-player__tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  margin-bottom: 6px;
  padding: 3px 8px;
  background: #222;
  border: 1px solid var(--t1-border-dim);
  color: #ccc;
  font-size: var(--t1-fs-xs);
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 4;
}
.t1-video-player .mp-controls-row {
  padding: 6px 8px;
  background: var(--t1-panel-bg);
  border-top: 1px solid var(--t1-border-dim);
}
/* Fullscreen */
.t1-video-player--fullscreen {
  max-width: none;
  border: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.t1-video-player--fullscreen .t1-video-player__screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.t1-video-player--fullscreen .t1-video-player__screen video {
  aspect-ratio: auto;
  max-height: 100%;
  max-width: 100%;
}

/* Shoutcast play button */
.t1-sc-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--t1-green-faint);
  background: var(--t1-green-ghost);
  vertical-align: middle;
  cursor: pointer;
  text-decoration: none;
  color: var(--t1-green);
  font: var(--t1-fs-xs) var(--t1-font);
}
.t1-sc-play-btn:hover {
  filter: brightness(1.4);
}

/* Sync play button */
button.t1-sc-play-btn { color: var(--t1-green); }
.t1-sync-btn {
  margin-bottom: 0;
}
.t1-sync-btn .hidden { display: none; }

/* Category separator row (inventory-style) */
.t1-table .t1-cat-row td {
  color: #fff;
  font-weight: 700;
  font-size: var(--t1-fs-sm);
  border-bottom: 1px solid var(--t1-border-dim);
  padding-top: 8px;
  padding-bottom: 4px;
  background: none;
}
.t1-table .t1-cat-row:hover {
  background: none;
}
.t1-table .t1-cat-row:first-child td {
  padding-top: 4px;
}

/* Changelog */
.t1-changelog {
  color: var(--t1-amber);
  line-height: 1.6;
}
.t1-changelog p { margin: 0; }
.t1-changelog ul { list-style: disc; padding-left: 1.5rem; margin-top: 0; margin-bottom: 0; }
.t1-changelog ul ul { list-style: circle; }

/* Pagination */
.t1-pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.t1-pagination a,
.t1-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-family: var(--t1-font);
  font-size: var(--t1-fs-sm);
  font-weight: 600;
  color: var(--t1-green);
  background: linear-gradient(180deg, var(--t1-green-ghost) 0%, rgba(10, 30, 10, 0.9) 100%);
  border: 1px solid var(--t1-green-faint);
  border-left-width: 0;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t1-pagination a:first-child,
.t1-pagination span:first-child {
  border-left-width: 1px;
}
.t1-pagination a:hover {
  border-color: var(--t1-green);
  box-shadow: var(--t1-glow);
  z-index: 1;
}
.t1-pagination__current {
  color: #fff !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* Admin link */
.t1-admin-link {
  text-align: center;
  margin-top: 20px;
}
.t1-admin-link a {
  font-size: var(--t1-fs-xs);
  color: var(--t1-green-faint);
}
.t1-admin-link a:hover {
  color: var(--t1-gold);
}

/* Alert/notice */
.t1-alert {
  border: 1px solid var(--t1-gold);
  color: var(--t1-gold);
  padding: 12px 16px;
  margin-bottom: 20px;
  text-align: center;
}

/* Chat box – styled like in-game chat UI brackets */
.t1-chat-box {
  background: #1e1e1d;
  position: relative;
  padding: 4px 12px;
  margin-bottom: 48px;
  line-height: 1.5;
  color: var(--t1-gold);
}
.t1-chat-box::before,
.t1-chat-box::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  border-top: 1px solid var(--t1-border);
  border-bottom: 1px solid var(--t1-border);
}
.t1-chat-box::before {
  left: 0;
  border-left: 1px solid var(--t1-border);
}
.t1-chat-box::after {
  right: 0;
  border-right: 1px solid var(--t1-border);
}

/* Mark (search highlight) */
.t1-body mark {
  background-color: rgba(255, 228, 51, 0.2);
  color: var(--t1-gold);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

/* Muted text */
.t1-muted { color: #707070; }

/* Audio element */
.t1-audio { width: 100%; }

/* ----- 14. Media Player ------------------------------------ */
#music-player-wrap {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
}
#music-toggle {
  width: 40px; height: 40px; border-radius: 4px;
  border: 1px solid var(--t1-chrome-dim);
  background: var(--t1-chrome-ghost);
  color: var(--t1-slate); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  opacity: 1; visibility: visible;
  transition: opacity 0.2s, visibility 0.2s, border-color 0.2s;
}
#music-toggle:hover { border-color: var(--t1-chrome); }
#music-toggle.is-playing {
  color: var(--t1-green);
  border-color: var(--t1-green-faint);
  background: var(--t1-green-ghost);
  box-shadow: var(--t1-glow);
}
#music-toggle.is-playing:hover { border-color: var(--t1-green-dim); }
#music-player-wrap.open #music-toggle {
  opacity: 0; visibility: hidden; pointer-events: none;
}
#music-panel {
  width: 400px; position: absolute; bottom: 0; left: 0;
  display: block;
  background: #121212;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  padding: 14px 16px 14px; font-size: var(--t1-fs-sm);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  margin: 0 0 4px 4px;
}
#music-player-wrap.open #music-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
#music-panel .mp-header {
  background: var(--t1-header-bg);
  color: var(--t1-gold); font-weight: 700;
  font-size: var(--t1-fs-sm);
  margin: -14px -16px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--t1-border-dim);
  display: flex; align-items: center; justify-content: space-between;
}
#mp-close {
  background: none; border: none; cursor: pointer; color: var(--t1-gold);
  font-size: 14px; padding: 0; line-height: 1; opacity: 0.6;
  display: flex; align-items: center; justify-content: center;
}
#mp-close:hover { opacity: 1; color: var(--t1-green); }
/* Sub-player sections */
.mp-section { margin-bottom: 10px; }
.mp-section:last-child { margin-bottom: 0; }
.mp-track-name {
  color: var(--t1-amber); font-size: var(--t1-fs-sm); font-weight: 600;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 10px;
}
/* Controls row */
.mp-controls-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
}
.mp-progress-wrap {
  height: 14px;
  background: var(--t1-chrome-ghost);
  border: 1px solid var(--t1-green-dim);
  cursor: pointer;
  box-sizing: border-box;
}
.mp-progress {
  height: 100%; width: 0%;
  background: var(--t1-green-faint);
  transition: width 0.25s linear;
}
.mp-time {
  display: flex; align-items: center; gap: 4px;
  font-size: var(--t1-fs-xs); color: var(--t1-chrome);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mp-controls-row .t1-vol-wrap {
  margin-left: auto;
}
.mp-controls-row .t1-vol-slider {
  margin-right: 0;
}
.mp-controls-row .t1-vol-wrap:hover .t1-vol-slider {
  margin-right: 6px;
}


/* ----- 15. Layout & Utility Classes ------------------------ */

/* Vertical stack with standard section gap */
.t1-vstack { display: flex; flex-direction: column; gap: 28px; }

/* Table layout modifier */
.t1-table--fixed { table-layout: fixed; }

/* ----- 16. Loading Bar ------------------------------------- */
.t1-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.t1-loading__title {
  font-family: var(--t1-font);
  font-size: 28px;
  font-weight: 700;
  color: var(--t1-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: var(--t1-glow-gold);
}
.t1-loading__track {
  width: 260px;
  height: 16px;
  background: var(--t1-bg);
  border: 1px solid var(--t1-green-dim);
  box-sizing: border-box;
}
.t1-loading__fill {
  height: 100%;
  width: 0%;
  background: var(--t1-green-dim);
  transition: width 0.3s linear;
}
.t1-loading__status {
  font-family: var(--t1-font);
  font-size: var(--t1-fs-xs);
  color: var(--t1-green-dim);
  text-align: center;
}

/* Block link (for truncated table cells) */
.t1-block-link { display: block; }

/* Table record count footer */
.t1-table-footer { margin-top: 16px; text-align: center; }

/* White-space override for cells in nowrap tables */
.t1-wrap { white-space: normal; }

/* Date column width */
.t1-col-date { width: 120px; }

/* Teams grid (2-column) */
.t1-teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Large button variant */
.t1-btn--lg { font-size: var(--t1-fs-lg); padding: 10px 32px; }

/* Index page centered nav */
.t1-index-nav { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; padding: 40px 0; }

/* Capped table cells */
.t1-motd, .t1-cell-cap { max-width: 400px; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; }

/* Media item & header */
.t1-media-item {
  margin-bottom: 20px;
  position: relative;
  border: 1px solid var(--t1-border-dim);
  padding: 12px;
  background: var(--t1-panel-bg);
}
.t1-media-item::before,
.t1-media-item::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.t1-media-item::before {
  top: -3px; bottom: -3px; left: 2px; right: 2px;
  border-top: 1px solid var(--t1-border-dim);
  border-bottom: 1px solid var(--t1-border-dim);
}
.t1-media-item::after {
  left: -3px; right: -3px; top: 2px; bottom: 2px;
  border-left: 1px solid var(--t1-border-dim);
  border-right: 1px solid var(--t1-border-dim);
}
.t1-media-header { font-size: var(--t1-fs-sm); margin-bottom: 8px; }

.sc-video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sc-video-grid .t1-media-item { margin-bottom: 0; }
@media (max-width: 900px) {
  .sc-video-grid { grid-template-columns: 1fr; }
}


/* ----- 16. HTMX loading indicator -------------------------- */

#htmx-loader {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}
#htmx-loader.htmx-request {
  opacity: 1;
  transition: opacity 0s 300ms;
}
#htmx-loader img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

/* ----- 17. Responsive -------------------------------------- */

@media (max-width: 1100px) {
  .t1-layout-2col { flex-direction: column; }
  .t1-layout-2col__side { width: 100%; }
  .t1-layout-2col__side-sticky { position: static; }
}

@media (max-width: 900px) {
  .t1-grid-2 { grid-template-columns: 1fr; }
  .t1-teams-grid { grid-template-columns: 1fr; }
  .t1-stats { flex-wrap: wrap; gap: 28px; }
  .t1-stat { flex: 1 1 calc(33.3% - 28px); min-width: calc(33.3% - 28px); }
}

@media (max-width: 800px) {
  .t1-sidebar-toggle { display: flex; }
  .t1-shell__sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.6);
  }
  .t1-shell__sidebar.is-open { transform: translateX(0); }
  .t1-shell__topbar {
    padding: 8px 12px;
    justify-content: center;
    position: relative;
  }
  .t1-sidebar-toggle {
    position: absolute;
    left: 12px;
  }
  .t1-shell__main {
    padding: 16px 12px;
  }
  .t1-stats { gap: 12px; }
  .t1-stat__num { font-size: 18px; }
  .t1-page-title { font-size: 26px; }
  .t1-topbar__logo-svg { height: 38px; }
  .t1-content { padding: 12px; }

  /* Detail tables: wide-content rows stack on mobile */
  .t1-table--detail tr.t1-detail-wide th,
  .t1-table--detail tr.t1-detail-wide td {
    display: block; width: 100%;
  }
  .t1-table--detail tr.t1-detail-wide th {
    border-bottom: none; padding-bottom: 0;
  }
  .t1-table--detail tr.t1-detail-wide td { padding-left: 12px; }

  /* Media player mobile — fullscreen overlay */
  #music-player-wrap { bottom: 0; left: 0; }
  #music-panel {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%; margin: 0;
    border: none; padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
  }
  #music-panel .mp-header {
    margin: -16px -16px 16px; font-size: var(--t1-fs-md);
    padding: 12px 16px;
  }
  #music-panel::before,
  #music-panel::after { display: none; }
  #mp-close svg { width: 24px; height: 24px; }
  #music-toggle { width: 48px; height: 48px; margin: 0 0 12px 12px; }
  #music-toggle svg { width: 28px; height: 28px; }
  .mp-bar-row { gap: 0; }
  .mp-section { margin-bottom: 8px; }
  .mp-section:last-child { margin-bottom: 0; }
  .mp-sc-chapters { max-height: 120px; }

  /* Hide less important columns on mobile */
  .t1-hide-mobile,
  .t1-hide-mobile * {
    width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    overflow: hidden;
  }
}

/* ----- 18. Media Sync Page --------------------------------- */

/* Transport bar */
.t1-sync-transport {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--t1-header-bg);
  border: 1px solid var(--t1-border-dim);
  margin-bottom: 20px;
}
.t1-sync-transport__time {
  font-size: var(--t1-fs-md);
  color: var(--t1-gold);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 80px;
}

/* Video grid */
.t1-sync-media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 1000px) {
  .t1-sync-media-grid--multi {
    grid-template-columns: 1fr 1fr;
  }
}

/* Video wrapper with inactive overlay */
.t1-sync-video-wrap {
  position: relative;
}
.t1-sync-video--inactive {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t1-slate);
  font-size: var(--t1-fs-sm);
  z-index: 2;
  pointer-events: none;
}

/* Inline shoutcast player */
.t1-sync-audio {
  border: 1px solid var(--t1-border-dim);
  padding: 12px 14px;
  background: var(--t1-panel-bg);
  margin-bottom: 20px;
}
.t1-sync-audio__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.t1-sync-audio__title {
  color: var(--t1-amber);
  font-size: var(--t1-fs-sm);
  font-weight: 600;
  flex: 1;
}
.t1-sync-audio__bar-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.t1-sync-audio__seek {
  flex: 1;
  position: relative;
  height: 24px;
  background: var(--t1-chrome-ghost);
  border: 1px solid var(--t1-green-dim);
  cursor: pointer;
  box-sizing: border-box;
}
.t1-sync-audio__fill {
  height: 100%;
  width: 0%;
  background: var(--t1-green-faint);
  transition: width 0.25s linear;
}
.t1-sync-audio__chapter-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--t1-green);
  pointer-events: none;
  z-index: 1;
  display: none;
}
.t1-sync-audio__time {
  display: flex;
  justify-content: space-between;
  font-size: var(--t1-fs-xs);
  color: var(--t1-chrome);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.t1-vol-wrap {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  flex-shrink: 0;
}
.t1-vol-slider {
  overflow: hidden;
  width: 0;
  opacity: 0;
  transition: width 0.2s, opacity 0.2s, margin 0.2s;
  display: flex;
  align-items: center;
  height: 24px;
  margin-right: 0;
}
.t1-vol-wrap:hover .t1-vol-slider {
  width: 80px;
  opacity: 1;
  margin-right: 4px;
}
.t1-vol-slider__track {
  width: 100%;
  height: 4px;
  background: var(--t1-green-dim);
  position: relative;
  cursor: pointer;
  border-radius: 2px;
}
.t1-vol-slider__fill {
  height: 100%;
  background: var(--t1-green);
  border-radius: 2px;
}
.t1-vol-slider__thumb {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--t1-green);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Chapter list */
.t1-sync-chapters {
  border: 1px solid var(--t1-border-dim);
  padding: 8px 12px;
  background: var(--t1-panel-bg);
  margin-bottom: 20px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--t1-chrome-dim) transparent;
}
.t1-sync-chapters__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 4px;
  cursor: pointer;
  font-size: var(--t1-fs-sm);
  color: #999;
  text-decoration: none;
}
.t1-sync-chapters__item:hover {
  color: #fff;
  background: var(--t1-row-hover);
}
.t1-sync-chapters__item--active {
  color: var(--t1-green);
}
.t1-sync-chapters__time {
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  color: var(--t1-chrome);
  font-size: var(--t1-fs-xs);
}
.t1-sync-chapters__source {
  font-size: 10px;
  color: var(--t1-chrome-dim);
  text-transform: uppercase;
}

/* Debug panel */
.t1-sync-debug {
  border: 1px solid var(--t1-border-dim);
  padding: 10px 12px;
  background: rgba(20, 0, 0, 0.3);
  font-size: var(--t1-fs-xs);
  color: var(--t1-chrome);
  margin-bottom: 20px;
}
.t1-sync-debug__title {
  color: var(--t1-dot-red);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.t1-sync-debug pre {
  margin: 0;
  white-space: pre-wrap;
  font-size: 11px;
}

@media (max-width: 800px) {
  .t1-vol-wrap { display: none; }
}

/* ----- 18b. CRT Mode --------------------------------------- */

/* Housing — transparent until activated */
.t1-crt-housing {
  margin-bottom: 20px;
  transition: all 0.4s ease;
}
.t1-crt-bezel {
  position: relative;
  transition: all 0.4s ease;
}
.t1-crt-screen {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

/* CRT overlay layers — hidden until active */
.t1-crt-scanlines,
.t1-crt-vignette {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* Badge / brand strip under screen */
.t1-crt-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
}
.t1-crt-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  transition: background 0.3s, box-shadow 0.3s;
}
.t1-crt-led--on {
  background: #33ff33;
  box-shadow: 0 0 6px #33ff33, 0 0 12px rgba(51, 255, 51, 0.4);
}
.t1-crt-brand {
  font-size: 11px;
  color: #555;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ---- Active state ---- */

.crt-active .t1-crt-bezel {
  background: #1a1a1a;
  border-radius: 18px;
  padding: 24px 24px 0 24px;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.6),
    0 8px 32px rgba(0,0,0,0.8),
    0 0 0 3px #222,
    0 0 0 5px #111;
}
.crt-active .t1-crt-screen {
  border-radius: 12px / 14px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.5),
    0 0 20px rgba(51, 255, 51, 0.05);
}

/* Scanlines */
.crt-active .t1-crt-scanlines {
  display: block;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  mix-blend-mode: multiply;
}

/* Vignette — dark edges, bright center */
.crt-active .t1-crt-vignette {
  display: block;
  background: radial-gradient(
    ellipse 85% 80% at 50% 50%,
    transparent 60%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* Phosphor glow on the whole screen area */
.crt-active .t1-crt-screen .t1-video-embed iframe,
.crt-active .t1-crt-screen .t1-video-embed video {
  filter: brightness(1.1) contrast(1.15) saturate(1.2);
}

/* Badge visible */
.crt-active .t1-crt-badge {
  display: flex;
  background: linear-gradient(to bottom, #1a1a1a, #141414);
  border-radius: 0 0 18px 18px;
  padding: 10px 28px 14px;
}

/* Active toggle button style */
.t1-btn--active {
  background: var(--t1-green-ghost) !important;
  border-color: var(--t1-green) !important;
  color: var(--t1-green) !important;
}

/* Responsive — thinner bezel on mobile */
@media (max-width: 800px) {
  .crt-active .t1-crt-bezel {
    padding: 12px 12px 0 12px;
    border-radius: 12px;
  }
  .crt-active .t1-crt-screen {
    border-radius: 8px / 10px;
  }
  .crt-active .t1-crt-badge {
    border-radius: 0 0 12px 12px;
    padding: 8px 16px 10px;
  }
}

/* About page */
.t1-about {
  line-height: 1.6;
  color: var(--t1-slate-light);
}
.t1-about a {
  color: var(--t1-slate);
}
.t1-about a:hover {
  color: var(--t1-slate-light);
}
.t1-about p {
  margin-bottom: 1rem;
}
.t1-about code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}
.t1-code {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.t1-code code {
  background: none;
  padding: 0;
  font-size: 0.85em;
  white-space: pre;
}
