/* ===== Base / Theme ===== */
:root {
  --bg: #09090b;
  --panel: rgba(255,255,255,0.03);
  --panel2: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.18);
  --text: #fafafa;
  --muted: rgba(255,255,255,0.65);
  --muted2: rgba(255,255,255,0.45);
  --accent: #6366f1; /* indigo */
  --btn: #f4f4f5;
  --btnText: #09090b;
  --shadow: 0 0 0 1px rgba(255,255,255,0.02);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --panel: rgba(0,0,0,0.03);
  --panel2: rgba(0,0,0,0.05);
  --border: rgba(0,0,0,0.12);
  --border2: rgba(0,0,0,0.18);
  --text: #0a0a0a;
  --muted: rgba(0,0,0,0.62);
  --muted2: rgba(0,0,0,0.45);
  --btn: #0a0a0a;
  --btnText: #ffffff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.app {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@font-face {
  font-family: "YeTrackerFont";
  src: url("/fonts/AwesomeBi_polar-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.main { padding: 0 0 64px; }

/* ===== Topbar / Footer ===== */
.topbar { padding: 16px 0; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.nav { display: flex; gap: 14px; }
.nav__link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.nav__link:hover { color: var(--text); }

.topbar__actions { display: flex; align-items: center; gap: 10px; }

.footer { padding: 28px 0; color: var(--muted2); font-size: 12px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.footer__links { display: flex; align-items: center; gap: 8px; }
.footer__link { color: var(--muted2); text-decoration: none; }
.footer__link:hover { color: var(--muted); }
.dot { opacity: 0.6; }

/* ===== Typography ===== */
.h1 { font-size: 44px; letter-spacing: -0.02em; margin: 0; font-weight: 650; }
.h2 { font-size: 26px; letter-spacing: -0.01em; margin: 0; font-weight: 650; }
.sub { margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.yetrackerTitle {
  font-family: "YeTrackerFont", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 3.25rem;
}


/* ===== Layout helpers ===== */
.hero { padding: 44px 0 0; }
.center { text-align: center; max-width: 720px; margin: 0 auto; }
.stack { margin-top: 24px; display: grid; gap: 14px; justify-items: center; }
.hint { margin: 0; font-size: 12px; color: var(--muted2); }

.content { padding-top: 24px; max-width: 760px; margin: 0 auto; }
.content__head { display: grid; gap: 6px; }

/* ===== Panels / Cards ===== */
.panel {
  max-width: 720px;
  margin: 28px auto 0;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.card {
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}

/* ===== Buttons ===== */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { border-color: var(--border2); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn--primary {
  background: var(--btn);
  color: var(--btnText);
  border-color: transparent;
  font-weight: 650;
}
.btn--primary:hover { filter: brightness(1.05); }

.btn--ghost { background: transparent; }

.btn--discord {
  background: var(--accent);
  color: white;
  border-color: transparent;
  font-weight: 650;
  padding: 12px 16px;
  border-radius: 14px;
}
.btn--discord:hover { filter: brightness(1.05); }

.btn--view { padding: 12px 16px; border-radius: 14px; }

/* ===== Dropzone ===== */
.hidden { display: none; }

.dropzone {
  display: block;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 34px 18px;
  box-shadow: var(--shadow);
  transition: border-color 140ms ease, transform 140ms ease;
}
.dropzone:hover { border-color: var(--border2); }
.dropzone__inner { display: grid; gap: 10px; justify-items: center; }

.pill {
  border: 1px solid var(--border);
  background: var(--panel2);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
}

.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--mt { margin-top: 14px; }

/* ===== File list ===== */
.list { margin-top: 18px; display: grid; gap: 10px; }
.fileRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 12px 12px;
}
.fileRow__meta { min-width: 0; }
.fileRow__name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Actions / links ===== */
.actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.shareOwn { margin-top: 22px; }
.link { color: var(--muted); text-decoration: none; }
.link:hover { color: var(--text); }

/* ===== Image frame ===== */
.imageFrame { margin-top: 16px; }
.image {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
}

/* ===== Video frame ===== */
.videoFrame {
  margin-top: 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

/* ===== Media players ===== */
.mpMono { font-variant-numeric: tabular-nums; }

.mpRow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mpMid { flex: 1; }

.mpTimes {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted2);
}

.mpHelp {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted2);
}

/* Buttons inside player */
.mpBtn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.mpBtn:hover { border-color: var(--border2); }

.mpSeek { width: 100%; }
.mpVol { width: 90px; }

/* Video specifics */
.mpShell { outline: none; }
.mpShell:focus { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35); border-radius: 16px; }

.mpVideoShell { position: relative; }
.mpVideo { width: 100%; display: block; background: black; }

.mpOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.mpBig {
  pointer-events: auto;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: white;
  font-size: 26px;
  cursor: pointer;
}
.mpBig:hover { background: rgba(0,0,0,0.5); }

.mpControls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.22), rgba(0,0,0,0.62));
  border: 1px solid rgba(255,255,255,0.12);
  transition: opacity 140ms ease;
}

.mpHint {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  opacity: 0;
  transition: opacity 140ms ease;
}

.mpVideoShell.is-playing .mpControls { opacity: 0; pointer-events: none; }
.mpVideoShell.is-playing:hover .mpControls,
.mpVideoShell.is-playing:focus-within .mpControls { opacity: 1; pointer-events: auto; }

.mpVideoShell.is-playing .mpOverlay { opacity: 0; }
.mpVideoShell:not(.is-playing) .mpOverlay { opacity: 1; }

.mpVideoShell:hover .mpHint,
.mpVideoShell:focus-within .mpHint { opacity: 1; }

@media (hover: none) {
  .mpVideoShell.is-playing .mpControls { opacity: 1; pointer-events: auto; }
  .mpHint { display: none; }
}
/* Missing padding utilities used by login button */
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

/* Discord login button polish */
a[href="/auth/discord"] {
  background: #5865f2;
  color: #ffffff;
  border-radius: 0.75rem;
  font-weight: 600;
}
a[href="/auth/discord"]:hover {
  filter: brightness(1.05);
}
/* Discord login button: remove underline in all states */
a[href="/auth/discord"],
a[href="/auth/discord"]:hover,
a[href="/auth/discord"]:focus,
a[href="/auth/discord"]:active {
  text-decoration: none;
}

/* Login page centering */
.loginWrap {
  min-height: calc(100vh - 160px); /* header + footer space */
  display: flex;
  align-items: center;
  justify-content: center;
}

.loginBox {
  max-width: 42rem; /* same as max-w-2xl */
}


.loginActions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.loginHint {
  margin-top: 24px;
  font-size: 12px;
  color: var(--z500);
}

/* Login error banner */
.loginBanner {
  margin: 18px auto 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 13px;
  color: var(--z200);
}

/* Header logo */
.logoLink {
  display: inline-flex;
  align-items: center;
}

.logoImg {
  height: 30px;           /* matches text size visually */
  width: auto;
  display: block;
}

.logoLink:hover {
  opacity: 0.85;
}

.logoLink { display: inline-flex; align-items: center; }
.logoImg { height: 30px; width: auto; display: block; }

.logoLight { display: none; }
html[data-theme="light"] .logoDark { display: none; }
html[data-theme="light"] .logoLight { display: block; }

/* ===== Admin ===== */
.adminStats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 840px) {
  .adminStats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.adminStat { font-size: 18px; font-weight: 650; margin: 6px 0 4px; }

.adminSearch { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adminInput {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}
.adminInput:focus { border-color: var(--border2); }

.adminList { margin-top: 16px; display: grid; gap: 10px; }
.adminRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 12px 12px;
  box-shadow: var(--shadow);
}
.adminRow__left { min-width: 0; }
.adminRow__name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adminRow__meta { margin-top: 6px; color: var(--muted2); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.adminTag { border: 1px solid var(--border); background: var(--panel2); padding: 3px 8px; border-radius: 999px; }
.adminDot { opacity: 0.6; padding: 0 2px; }
.adminRow__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adminRow__right form { margin: 0; }

.adminMini { margin-top: 8px; display: grid; gap: 6px; }
.adminMiniRow { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 10px; font-size: 12px; color: var(--muted); }
.adminMiniRow__day { color: var(--text); }

.card {
  display: flex;
  flex-direction: column;
}


.footer__sep {
  margin: 0 8px;
  opacity: 0.6;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer__links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Admin: force metric cards to stack vertically */
.adminStats .card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* Ensure the header label takes a full line */
.adminStats .card .muted.small {
  display: block !important;
  width: 100% !important;
  margin-bottom: 8px;
}

/* Ensure the last-7-days list is on its own line */
.adminMini {
  display: block !important;
  width: 100% !important;
}
/* Admin: Last 7 days — stack metrics vertically */
.adminMiniRow {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px;
}

.adminMiniRow__day {
  font-weight: 500;
  margin-bottom: 2px;
}

.adminMiniRow__cell {
  padding-left: 10px;
}

