@font-face {
  font-family: 'Khmer OS Battambang';
  src: url('/fonts/KhmerOSBattambang.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b2027;
  --bg-raised: #123138;
  --bg-card: #163b43;
  --gold: #5eead4;
  --gold-soft: #99f6e4;
  --red: #e2725b;
  --cream: #eef7f5;
  --muted: #9fc2bf;
  --border: rgba(94, 234, 212, 0.18);
  --radius: 14px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] {
  --bg: #f4faf9;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --gold: #0d9488;
  --gold-soft: #0f766e;
  --red: #c0392b;
  --cream: #10302c;
  --muted: #5b7d79;
  --border: rgba(13, 148, 136, 0.22);
  --shadow: 0 12px 32px rgba(16, 48, 44, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Battambang', sans-serif;
  line-height: 1.7;
}

h1, h2, h3, .brand-name {
  font-family: 'Moul', 'Battambang', serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 21, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; flex-shrink: 0; }

/* YouTube-style search bar in the header */
.header-search {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 560px;
  min-width: 160px;
}
.header-search input {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 9px 18px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.92rem;
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; border-color: var(--gold); }
.header-search button {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 999px 999px 0;
  padding: 9px 20px;
  color: var(--cream);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.header-search button:hover { background: var(--bg-card); border-color: var(--gold); }
.brand-name { font-family: 'Khmer OS Battambang', 'Battambang', serif; font-size: 1.5rem; letter-spacing: 0.02em; color: var(--gold-soft); }
/* logo.png គឺជា Canvas ការ៉េ 3000x3000 តែគំនូរពិតស្ថិតត្រឹមតែផ្នែកខាងលើកណ្តាល (កំណត់ដោយវិភាគ Alpha channel ពិតប្រាកដ៖
   x 604-2307, y 624-1992) — ប្រើ background crop ដើម្បីលុបចន្លោះទទេជុំវិញ */
.brand-logo {
  display: block;
  width: 55px;
  height: 44px;
  background-image: url('/img/logo.png');
  background-size: 96px 96px;
  background-position: -19px -20px;
  background-repeat: no-repeat;
}
.brand-logo-sm {
  width: 37px;
  height: 30px;
  background-size: 66px 66px;
  background-position: -13px -14px;
}
.brand-name-sm { font-size: 1.15rem; }
.header-actions { display: flex; align-items: center; gap: 12px; }
#user-greeting { color: var(--muted); font-size: 0.9rem; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
}
.link-btn:hover { color: var(--gold-soft); }

.member-badge {
  background: rgba(94, 234, 212, 0.15);
  border: 1px solid var(--border);
  color: var(--gold-soft);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.theme-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--cream);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle-btn:hover { border-color: var(--gold); transform: rotate(15deg); }

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: 'Battambang', sans-serif;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); color: #072024; font-weight: 700; }
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-lg { padding: 13px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.hidden { display: none !important; }

/* ---------- Video grid ---------- */
.section-title {
  font-size: 1.6rem;
  color: var(--gold-soft);
  margin: 20px 0 28px;
  text-align: center;
}
main.wrap { padding-top: 48px; padding-bottom: 80px; }

.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 28px;
}
.chip {
  background: var(--bg-card);
  border: none;
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.chip:hover { background: var(--border); }
.chip.active { background: var(--gold); color: #072024; font-weight: 700; }

.video-category {
  align-self: flex-start;
  background: rgba(94, 234, 212, 0.12);
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.loading { text-align: center; color: var(--muted); grid-column: 1 / -1; }

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.video-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.video-thumb {
  position: relative;
  aspect-ratio: 5 / 3;
  background: #0a1f22;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.badge.locked { background: rgba(226, 114, 91, 0.85); color: #fff; }
.badge.unlocked { background: rgba(94, 234, 212, 0.9); color: #072024; }

.video-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.video-body h3 { margin: 0; font-size: 1.15rem; color: var(--cream); }
.video-body p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }
.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.video-price { color: var(--gold-soft); font-weight: 700; }
.video-duration { color: var(--muted); font-size: 0.82rem; }

/* ---------- Pricing ---------- */
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: -18px 0 32px;
  font-size: 0.95rem;
}
#pricing { padding-bottom: 90px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.plan-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 24px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.plan-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.plan-card.popular { border-color: var(--gold); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #072024;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-card h3 { margin: 6px 0 4px; color: var(--cream); font-size: 1.1rem; }
.plan-price { font-size: 1.8rem; font-weight: 700; color: var(--gold-soft); margin: 4px 0; }
.plan-price-old { font-size: 1.05rem; font-weight: 400; color: var(--muted); text-decoration: line-through; margin-right: 6px; }
.plan-tagline { color: var(--muted); font-size: 0.85rem; margin: 0 0 16px; }
.plan-card .btn { margin-top: auto; }

.coupon-row {
  max-width: 420px;
  margin: 0 auto 8px;
  display: flex;
  gap: 10px;
}
.coupon-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.9rem;
}
.coupon-row input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.coupon-msg {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gold-soft);
  min-height: 1.2em;
  margin: 0 0 24px;
}
.coupon-msg.coupon-error { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 16, 18, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.modal-account { max-width: 640px; }

.account-status {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.account-status.active { color: var(--gold-soft); border-color: var(--gold); }

.account-table-wrap { overflow-x: auto; }
.account-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.account-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.account-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--cream);
  white-space: nowrap;
}
.row-coupon { color: var(--gold-soft); font-size: 0.78rem; }

.status-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.status-tag.status-completed { background: rgba(94, 234, 212, 0.18); color: var(--gold-soft); }
.status-tag.status-pending { background: rgba(217, 164, 65, 0.2); color: #d9a441; }
.status-tag.status-failed { background: rgba(226, 114, 91, 0.18); color: var(--red); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal h3 { margin: 0 0 20px; color: var(--gold-soft); }
.modal form { display: flex; flex-direction: column; gap: 14px; }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.modal input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
}
.modal input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-error { color: var(--red); font-size: 0.85rem; min-height: 1em; margin: 0; }
.modal-switch { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 0.88rem; }
.modal-switch button { background: none; border: none; color: var(--gold-soft); cursor: pointer; font-family: inherit; text-decoration: underline; }

/* ---------- Video watch overlay (YouTube-like: full player on PC, stacked on mobile) ---------- */
#modal-video.modal-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background: var(--bg);
}
#modal-video .modal.modal-video {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
  background: var(--bg);
}
/* Top bar — persistent brand/logo + close, stays visible while watching (like YouTube's header) */
.vm-topbar {
  position: sticky;
  top: 0;
  z-index: 105;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(11, 32, 39, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.vm-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
#modal-video .modal-close {
  position: static;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.1);
  color: var(--cream);
  font-size: 0.95rem;
}

.vm-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}
.vm-main { flex: 1 1 0; min-width: 0; }

.vm-player-wrap { width: 100%; background: #000; border-radius: 8px; overflow: hidden; }
.vm-player-inner { width: 100%; position: relative; }
.vm-info { padding-top: 16px; }

.vm-title { color: var(--gold-soft); margin: 0 0 8px; }
.vm-desc { color: var(--muted); margin: 0 0 18px; }
.vm-free-note { color: var(--gold-soft); font-size: 0.88rem; margin: 0 0 12px; }
.vm-price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.vm-price { font-size: 1.3rem; color: var(--gold-soft); font-weight: 700; }

.vm-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
video.vm-player, iframe.vm-player { width: 100%; aspect-ratio: 16/9; display: block; border: none; }

/* YouTube-style gear settings menu overlaid on the player (Speed / Quality) */
.vm-settings {
  position: absolute;
  bottom: 68px;
  right: 12px;
  z-index: 6;
}
.vm-settings-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.vm-settings-btn:hover { background: rgba(0, 0, 0, 0.75); transform: rotate(20deg); }

.vm-settings-menu {
  position: absolute;
  bottom: 42px;
  right: 0;
  min-width: 190px;
  background: rgba(20, 24, 34, 0.97);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px 0;
  backdrop-filter: blur(6px);
}
.vm-settings-section + .vm-settings-section {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 4px;
}
.vm-settings-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 14px 4px;
}
.vm-settings-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  padding: 7px 14px;
  cursor: pointer;
}
.vm-settings-option:hover { background: rgba(94, 234, 212, 0.1); }
.vm-settings-option.active { color: var(--gold-soft); font-weight: 700; }
.vm-settings-check { width: 14px; color: var(--gold-soft); font-size: 0.8rem; }
.vm-settings-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  padding: 7px 14px;
  cursor: pointer;
}
.vm-settings-action:hover { background: rgba(94, 234, 212, 0.1); }
.vm-settings-action .vm-settings-check { color: var(--muted); }

/* Like / Share / Views row */
.vm-engage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.vm-views { color: var(--muted); font-size: 0.88rem; }
.vm-engage-actions { display: flex; gap: 10px; }
.vm-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.vm-action-btn:hover { border-color: var(--gold); }
.vm-action-btn[data-liked="true"] { color: var(--red); border-color: var(--red); }

/* Comments */
.vm-comments { margin-top: 8px; }
.vm-comments h4 { color: var(--cream); font-size: 1rem; margin: 0 0 16px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 22px; }
.comment-form input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
}
.comment-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.comment-form .btn { border-radius: 999px; padding: 9px 20px; white-space: nowrap; }
.comment-login-note { color: var(--muted); font-size: 0.88rem; margin: 0 0 22px; }
.link-inline {
  background: none;
  border: none;
  color: var(--gold-soft);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  font-size: inherit;
}

.comment-list { display: flex; flex-direction: column; gap: 18px; }
.comment-item { display: flex; gap: 12px; }
.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gold);
  color: #072024;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.comment-body { min-width: 0; }
.comment-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.comment-name { color: var(--cream); font-weight: 700; font-size: 0.86rem; }
.comment-date { color: var(--muted); font-size: 0.76rem; }
.comment-text { color: var(--cream); font-size: 0.9rem; margin: 0; word-break: break-word; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-raised);
  border: 1px solid var(--gold);
  color: var(--cream);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}
.cookie-banner p { margin: 0; color: var(--muted); font-size: 0.85rem; max-width: 640px; line-height: 1.6; }
.cookie-banner a { color: var(--gold-soft); }
.cookie-banner .btn { flex-shrink: 0; white-space: nowrap; }

/* Sidebar — "up next" list, YouTube desktop-style: sticky + scrolls independently on hover */
.vm-sidebar { width: 360px; flex-shrink: 0; }
@media (min-width: 768px) {
  .vm-sidebar {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .vm-sidebar::-webkit-scrollbar { width: 8px; }
  .vm-sidebar::-webkit-scrollbar-track { background: transparent; }
  .vm-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
  .vm-sidebar::-webkit-scrollbar-thumb:hover { background: var(--gold); }
}
.vm-sidebar h4 {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 12px;
}
.vm-sidebar-list { display: flex; flex-direction: column; gap: 8px; }
.vm-sidebar-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px;
  transition: background 0.15s ease;
}
.vm-sidebar-item:hover { background: var(--bg-card); }
.vm-sidebar-thumb {
  position: relative;
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #0a1f22;
}
.vm-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-sidebar-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
}
.vm-sidebar-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.vm-sidebar-meta .t {
  color: var(--cream);
  font-size: 0.86rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vm-sidebar-meta .m { color: var(--muted); font-size: 0.76rem; }

/* Mobile — YouTube app-ish: player pinned to top edge-to-edge, info + up-next scroll beneath */
@media (max-width: 767px) {
  .vm-layout { flex-direction: column; gap: 0; padding: 0; }
  .vm-main { width: 100%; }
  .vm-player-wrap { position: sticky; top: 56px; z-index: 5; border-radius: 0; }
  .vm-info { padding: 16px 16px 8px; }
  .vm-sidebar { width: 100%; padding: 12px 16px 50px; }
}

/* ---------- Legal / info pages ---------- */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-back {
  display: inline-block;
  color: var(--gold-soft);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.legal-back:hover { text-decoration: underline; }
.legal-content h1 { color: var(--gold-soft); font-size: 1.8rem; margin: 0 0 6px; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 32px; }
.legal-content h2 { color: var(--cream); font-size: 1.15rem; margin: 32px 0 10px; }
.legal-content p { color: var(--muted); margin: 0 0 14px; }
.legal-content ul { color: var(--muted); margin: 0 0 14px; padding-left: 22px; }
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--gold-soft); }
.legal-content strong { color: var(--cream); }
.contact-list { list-style: none; padding: 0; margin: 0 0 14px; }
.contact-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--cream);
  margin-bottom: 10px;
}
.contact-list .label { color: var(--muted); min-width: 130px; }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.legal-nav a { color: var(--muted); text-decoration: none; }
.legal-nav a:hover { color: var(--gold-soft); }

/* ---------- Status pages ---------- */
.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}
.status-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 36px;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow);
}
.status-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
}
.status-icon.success { background: rgba(94,234,212,0.2); color: var(--gold-soft); }
.status-icon.cancel { background: rgba(226,114,91,0.2); color: var(--red); }
.status-card h1 { font-size: 1.4rem; color: var(--cream); margin: 0 0 12px; }
.status-card p { color: var(--muted); }
.status-card .note { font-size: 0.8rem; margin-top: 18px; }
.status-card .btn { margin-top: 10px; display: inline-block; text-decoration: none; }

@media (max-width: 560px) {
  .header-actions { gap: 8px; }
  .header-actions .btn { padding: 7px 14px; font-size: 0.85rem; }
  #user-greeting { display: none !important; }
  .member-badge { display: none !important; }
  .header-actions a.link-btn { display: none; }
}

@media (max-width: 720px) {
  .site-header { position: static; }
  .header-inner { height: auto; padding: 10px 0; }
  .header-search { order: 3; flex-basis: 100%; max-width: 100%; margin-top: 4px; }
}
