/* ============================================================
   Warrior Vault — Mobile-first dark theme
   ============================================================ */

:root {
  --bg:      #0a0a0a;
  --surface: #111108;
  --border:  #2a2510;
  --accent:  #c9a84c;
  --text:    #f0f0f0;
  --muted:   #7a7060;
  --radius:  6px;
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.logout-link {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.15s;
}
.logout-link:hover { color: var(--text); }

/* ── Main ────────────────────────────────────────────────── */
.site-main { padding-bottom: 3rem; }

/* ── Browse header ───────────────────────────────────────── */
.browse-header {
  padding: 1.5rem 1.25rem 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.browse-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.browse-count {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Tile grid ───────────────────────────────────────────── */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  max-width: 720px;
  margin: 0 auto;
}

/* ── Tile ────────────────────────────────────────────────── */
.tile {
  display: block;
  background: var(--surface);
  transition: background 0.15s;
}
.tile:hover { background: #1c1c1c; }
.tile:active { background: #222; }

.tile-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}

.tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.tile:hover .tile-thumb img { transform: scale(1.03); }

.tile-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111108 0%, #2a2208 100%);
}
.tile-thumb-placeholder span {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
}

.tile-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.8);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.tile-meta {
  padding: 0.875rem 1rem;
}

.tile-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}

.tile-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.tile-desc {
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  padding: 4rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Watch page ──────────────────────────────────────────── */
.watch-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.back-link {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

.player-container {
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
}

.watch-meta {
  padding: 1.25rem 1.25rem 0;
}

.watch-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

@media (min-width: 640px) {
  .watch-title { font-size: 1.875rem; }
}

.watch-details {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.875rem;
}

.watch-date,
.watch-duration {
  font-size: 0.8rem;
  color: var(--muted);
}

.watch-duration::before { content: '⏱ '; }

.watch-desc {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.6;
  max-width: 65ch;
}

/* ── Auth pages (login, register, forgot, reset) ─────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.login-brand-logo {
  width: auto;
  max-width: 180px;
  max-height: 120px;
  margin: 1rem auto 0.5rem;
  object-fit: contain;
}

.auth-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.auth-error {
  font-size: 0.82rem;
  color: #e63946;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.auth-success {
  font-size: 0.82rem;
  color: #4caf7d;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.auth-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.25rem;
}
.auth-btn:hover { opacity: 0.88; }
.auth-btn:active { opacity: 0.75; }

.auth-btn--secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.auth-btn--secondary:hover { background: rgba(201, 168, 76, 0.08); opacity: 1; }

.auth-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.auth-link {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.15s;
}
.auth-link:hover { color: var(--accent); }

.auth-link-sep {
  font-size: 0.8rem;
  color: var(--border);
}

/* ── Form elements ───────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }

.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Account page ────────────────────────────────────────── */
.account-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.account-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.account-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.account-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.account-section-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ── Admin panel ─────────────────────────────────────────── */
.admin-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.admin-table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.admin-row--inactive td { opacity: 0.5; }

.admin-email { color: var(--muted); font-size: 0.8rem; }
.admin-date  { color: var(--muted); font-size: 0.8rem; }
.admin-self  { font-size: 0.75rem; color: var(--muted); }

.admin-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(201, 168, 76, 0.15);
  color: var(--accent);
  border-radius: 3px;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 3px;
}
.status-badge--active   { background: rgba(76, 175, 80, 0.15); color: #4caf7d; }
.status-badge--inactive { background: rgba(120,120,120,0.15);  color: var(--muted); }

.toggle-btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s;
}
.toggle-btn:hover { opacity: 0.8; }
.toggle-btn--deactivate {
  background: rgba(230, 57, 70, 0.1);
  border-color: rgba(230, 57, 70, 0.3);
  color: #e63946;
}
.toggle-btn--activate {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: #4caf7d;
}

/* ── Header nav ──────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-screen-name {
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-link {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* ── Hub ─────────────────────────────────────────────────── */
.hub-wrap {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  gap: 2.5rem;
}

.hub-greeting {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.hub-name {
  color: var(--accent);
  font-weight: 600;
}

/* ── Admin guide ─────────────────────────────────────────── */
.guide-layout {
  display: flex;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  align-items: flex-start;
}

.guide-sidebar {
  flex: 0 0 180px;
  position: sticky;
  top: 1.5rem;
}

.guide-sidebar-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.guide-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.guide-sidebar a {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  padding: 0.25rem 0;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  transition: color 0.15s, border-color 0.15s;
}

.guide-sidebar a:hover {
  color: var(--text);
  border-left-color: var(--accent);
}

.guide-body {
  flex: 1;
  min-width: 0;
}

.guide-section {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.guide-section:last-child {
  border-bottom: none;
}

.guide-h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.guide-h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.guide-body p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.guide-list {
  margin: 0.5rem 0 1rem 1.25rem;
}

.guide-list li {
  font-size: 0.87rem;
  line-height: 1.6;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.guide-table th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.guide-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.guide-table tbody tr:last-child td { border-bottom: none; }
.guide-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.guide-warning {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

.guide-warning strong { color: var(--accent); }

.guide-code {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
  margin: 0.6rem 0;
}

.guide-code--inline {
  margin-top: 0.5rem;
}

.guide-checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.guide-checklist li label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.87rem;
  line-height: 1.6;
  cursor: pointer;
}

.guide-checklist input[type="checkbox"] {
  margin-top: 0.3rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

@media (max-width: 680px) {
  .guide-layout { flex-direction: column; gap: 1.5rem; }
  .guide-sidebar { position: static; flex: none; width: 100%; }
  .guide-sidebar ul { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
  .guide-sidebar a { border-left: none; padding-left: 0; border-bottom: 2px solid var(--border); padding-bottom: 0.2rem; }
}

.hub-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
}

.hub-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
}

.hub-btn:hover {
  border-color: var(--accent);
  background: rgba(201, 168, 76, 0.06);
}

.hub-btn--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.hub-btn-icon {
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}

.hub-btn-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.hub-btn-soon {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.1rem;
}

