/* =========================================================
   KINO — Cinematic Theme
   Dark, editorial, modern. Designed for short films.
   ========================================================= */

:root {
  /* Surfaces */
  --bg:           #0c0b0a;
  --bg-2:         #131210;
  --bg-3:         #1a1815;
  --bg-elev:      #1f1c18;

  /* Lines */
  --line:         rgba(240, 234, 214, 0.07);
  --line-strong:  rgba(240, 234, 214, 0.16);

  /* Text */
  --ink:          #f0ead6;   /* warm cream — 16mm film off-white */
  --ink-2:        #c8c1ad;
  --muted:        #8a8270;
  --muted-2:      #5a5346;

  /* Accent */
  --accent:       #e63946;   /* film red */
  --accent-2:     #ff5b6b;
  --accent-soft:  rgba(230, 57, 70, 0.14);

  /* Layout */
  --radius:       4px;
  --radius-lg:    12px;
  --container:    1320px;
  --gap:          18px;
  --header-h:     64px;

  /* Effects */
  --shadow-card:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-hover: 0 24px 60px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.4);

  /* Easing */
  --ease:         cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);

  /* Serif stack with CJK fallback */
  --serif: 'Instrument Serif', 'Songti SC', 'STSong', 'Source Han Serif SC', 'Noto Serif SC', '宋体', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 11, 10, 0.78);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
  line-height: 1;
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(230, 57, 70, 0.35);
  border-radius: 50%;
  pointer-events: none;
}
.brand-beta {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 3px 7px 2px;
  border-radius: 2px;
  margin-left: 4px;
  position: relative;
  top: -2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav a {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover { color: var(--ink); background: rgba(240, 234, 214, 0.05); }
.nav a.active { color: var(--ink); background: rgba(240, 234, 214, 0.08); }

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.icon-btn {
  background: transparent;
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: rgba(240, 234, 214, 0.06); }
.login-btn {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 8px 18px;
  border-radius: 999px;
  margin-left: 6px;
  transition: all .2s var(--ease);
}
.login-btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ============ HERO ============ */
.hero-wrap {
  padding: 28px 0 12px;
}
.hero {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 460px;
  max-height: 78vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #050505;
  cursor: pointer;
  isolation: isolate;
}
.hero-video,
.hero-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.8s var(--ease-out);
}
.hero:hover .hero-video,
.hero:hover .hero-media-img { transform: scale(1.04); }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 25%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.92) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.25) 50%, transparent 100%);
}
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
}
.hero-content {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  padding: 0 56px 56px;
  max-width: 820px;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 22px;
  width: fit-content;
}
.hero-tag::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--accent);
}
.hero-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  font-weight: 400;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.btn-primary {
  background: #fff;
  color: #0a0a0a;
  border: none;
  padding: 13px 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}
.hero-meta {
  position: absolute;
  z-index: 3;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
}
.hero-duration {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.hero-duration::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============ CATEGORY SECTIONS ============ */
.cat-section {
  padding: 64px 0 8px;
  position: relative;
}
.cat-section + .cat-section {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.cat-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 32px;
}
.cat-num {
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 76px);
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  line-height: 0.85;
  letter-spacing: -0.03em;
  position: relative;
  align-self: center;
}
.cat-num::after {
  content: '.';
  margin-left: 2px;
  color: var(--accent);
  font-style: normal;
}
.cat-desc {
  font-size: 13.5px;
  color: var(--ink-2);
  align-self: end;
  padding-bottom: 14px;
  max-width: 56ch;
  letter-spacing: 0.005em;
  line-height: 1.5;
}
.cat-more {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  align-self: end;
  padding-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.cat-more:hover { color: var(--ink); gap: 12px; }
.cat-refresh {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 10px 18px;
  border-radius: 999px;
  align-self: end;
  margin-bottom: 8px;
  white-space: nowrap;
  transition: all .2s var(--ease);
}
.cat-refresh:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ============ VIDEO GRID ============ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap);
  row-gap: 36px;
}
.card {
  background: transparent;
  overflow: visible;
  transition: transform .35s var(--ease-out);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.card:hover { transform: translateY(-4px); }
.card:hover .thumb { box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.card:hover .thumb video,
.card:hover .thumb .thumb-img { transform: scale(1.06); }
.card:hover .play-btn { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card:hover .card-title { color: var(--accent-2); }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  transition: box-shadow .35s var(--ease-out), border-color .25s var(--ease);
}
.thumb video,
.thumb .thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
  background: var(--bg-2);
  pointer-events: none;
  display: block;
}
.thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  transition: opacity .25s var(--ease);
}
.card:hover .thumb::after { opacity: 0.85; }
.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  width: 54px; height: 54px;
  background: rgba(255, 255, 255, 0.96);
  color: #0a0a0a;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity .25s var(--ease), transform .35s var(--ease-out);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 2;
}
.play-btn svg { margin-left: 2px; width: 18px; height: 18px; }
.duration {
  position: absolute;
  right: 10px; bottom: 10px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.thumb-like {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), background .2s var(--ease), color .2s var(--ease);
  z-index: 3;
  padding: 0;
}
.thumb-like svg { display: block; }
.card:hover .thumb-like,
.thumb-like:focus-visible,
.card.is-liked .thumb-like {
  opacity: 1;
  transform: translateY(0);
}
.thumb-like:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  transform: translateY(0) scale(1.08);
}
.card.is-liked .thumb-like,
.thumb-like[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}
.card.is-liked .thumb-like:hover,
.thumb-like[aria-pressed="true"]:hover {
  background: var(--accent-2);
}

.card-body {
  padding: 14px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.card-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  letter-spacing: 0.005em;
  transition: color .2s var(--ease);
}

/* ============ EMPTY STATE ============ */
.empty-state {
  padding: 80px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-top: 16px;
}
.empty-state h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.empty-state code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-2);
}
.cat-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0 0;
  font-style: italic;
}

/* ============ MODAL PLAYER ============ */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 32px;
}
.video-modal.open { display: flex; }
.video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--line-strong);
}
.video-modal-inner video {
  width: 100%;
  max-height: 80vh;
  display: block;
  background: #000;
}
.video-modal-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #0a0a0a;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}
.video-modal-title {
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  letter-spacing: -0.005em;
}
.video-modal-like {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
  flex: 0 0 auto;
}
.video-modal-like:hover {
  background: rgba(240, 234, 214, 0.06);
  border-color: var(--ink);
}
.video-modal-like .like-icon {
  transition: transform .2s, fill .15s;
  fill: none;
  stroke: currentColor;
}
.video-modal-like.is-liked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.video-modal-like.is-liked .like-icon {
  fill: #fff;
  stroke: #fff;
  transform: scale(1.05);
}
.video-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .15s, transform .25s var(--ease);
}
.video-modal-close:hover { background: rgba(0, 0, 0, 0.9); transform: rotate(90deg); }

/* ============ LIKES UI ============ */
.likes-link {
  position: relative;
}
.likes-link.active,
.likes-link.active:hover { color: var(--accent); }
.likes-count {
  position: absolute;
  top: 0; right: 0;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--bg);
}
.cat-num-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  position: relative;
  align-self: center;
}
.cat-num-icon::after { content: none; }
.cat-num-icon svg { width: 32px; height: 32px; }
.likes-empty {
  margin-top: 16px;
}
.likes-empty .btn-primary {
  margin-top: 18px;
  background: var(--ink);
  color: var(--bg);
}
.likes-empty .btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

/* ============ ACCOUNT ============ */
.account-area {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.account-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: none;
  z-index: 1100;
  padding: 80px 24px 40px;
  overflow-y: auto;
}
.search-overlay.open { display: block; }
.search-panel {
  max-width: 980px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}
.search-bar-icon { color: var(--muted); flex: 0 0 auto; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  padding: 6px 0;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: -0.005em;
}
.search-bar input::placeholder { color: var(--muted); font-style: italic; }
.search-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, transform .25s var(--ease);
}
.search-close:hover {
  background: rgba(240, 234, 214, 0.06);
  color: var(--ink);
  transform: rotate(90deg);
}
.search-results { padding: 22px; }
.search-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 4px 14px;
  font-style: italic;
}
.search-grid { gap: 14px; }

/* ============ AUTH MODAL ============ */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 24px;
}
.auth-modal.open { display: flex; }
.auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  padding: 36px 28px 26px;
}
.auth-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, transform .25s var(--ease);
}
.auth-close:hover {
  background: rgba(240, 234, 214, 0.06);
  color: var(--ink);
  transform: rotate(90deg);
}
.auth-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.auth-tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color .15s;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab.active { color: var(--ink); }
.auth-tab.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field span {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.auth-field input {
  font: inherit;
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.auth-field input:focus {
  border-color: var(--accent);
  background: var(--bg);
}
.auth-error {
  margin: 0;
  font-size: 12.5px;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid rgba(230, 57, 70, 0.3);
  padding: 10px 12px;
  border-radius: 6px;
}
.auth-submit {
  margin-top: 8px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 13px 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.auth-submit:hover:not(:disabled) { background: var(--accent); color: #fff; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ FOOTER ============ */
.footer {
  background: transparent;
  color: var(--muted);
  margin-top: 96px;
  padding: 32px 0 36px;
  border-top: 1px solid var(--line);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
  letter-spacing: 0.02em;
}
.footer-bottom .brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { transition: color .15s; }
.footer-legal a:hover { color: var(--ink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-content { padding: 0 32px 36px; max-width: 100%; }
  .cat-head {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num desc"
      "more more";
    row-gap: 14px;
  }
  .cat-num { grid-area: num; }
  .cat-desc { grid-area: desc; padding-bottom: 8px; }
  .cat-more, .cat-refresh { grid-area: more; justify-self: end; padding-bottom: 0; margin-bottom: 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .header-inner { gap: 12px; }
  .login-btn { display: none; }
  .brand { font-size: 24px; gap: 10px; }
  .brand-mark { width: 28px; height: 28px; font-size: 17px; }
  .brand-beta { display: none; }
  .hero { aspect-ratio: 4 / 5; min-height: 480px; max-height: none; border-radius: 8px; }
  .hero-content { padding: 0 22px 28px; }
  .hero-title { font-size: clamp(34px, 11vw, 56px); margin-bottom: 18px; }
  .hero-tag { margin-bottom: 14px; font-size: 9.5px; letter-spacing: 0.22em; }
  .hero-meta { top: 14px; right: 14px; }
  .hero-actions { gap: 8px; }
  .btn-primary, .btn-ghost { padding: 11px 18px; font-size: 12.5px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; row-gap: 24px; }
  .cat-section { padding: 40px 0 4px; }
  .cat-head { margin-bottom: 22px; gap: 18px; }
  .cat-num { font-size: 44px; }
  .card-title { font-size: 12.5px; }
  .video-modal { padding: 16px; }
  .video-modal-foot { padding: 14px 16px; }
  .video-modal-title { font-size: 16px; }
  .footer { margin-top: 56px; }
}
