/* The Clips — dark bento style matching localskatemag.com */
:root {
  --bg: #09090b;
  --card: #141416;
  --border: #26262a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --red: #ff3b30;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; }

/* ---------- chrome ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(9,9,11,.92), rgba(9,9,11,0));
}
.brand { font-weight: 900; letter-spacing: .04em; font-size: 15px; text-decoration: none; }
.brand span { color: var(--red); }
.tabs { display: flex; gap: 8px; }
.tab {
  border: 1px solid var(--border); background: rgba(20,20,22,.85); color: var(--text);
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.tab.active { background: var(--text); color: var(--bg); }
.filterbar {
  position: fixed; top: 58px; left: 0; right: 0; z-index: 49;
  display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px; scrollbar-width: none;
}
.filterbar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: rgba(20,20,22,.85);
  color: var(--muted); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.chip.active { color: var(--text); border-color: var(--red); }

/* ---------- feed ---------- */
.feed { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; }
.clip {
  position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; background: #000;
}
.clip mux-player, .clip video { width: 100%; height: 100%; --media-object-fit: cover; }
.clip .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.caption {
  position: absolute; left: 16px; right: 84px; bottom: 28px; z-index: 5;
  text-shadow: 0 1px 8px rgba(0,0,0,.8); pointer-events: none;
}
.caption .kicker { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.caption h2 { font-size: 26px; font-weight: 900; line-height: 1.1; margin: 4px 0; }
.caption p { color: #e4e4e7; font-size: 15px; line-height: 1.45; }
.caption .credits { color: var(--muted); font-size: 13px; }
.actions {
  position: absolute; right: 14px; bottom: 28px; z-index: 5;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.action {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(20,20,22,.85); color: var(--text); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.action.liked { color: var(--red); border-color: var(--red); }
.action small { display: block; font-size: 11px; }
.action-wrap { text-align: center; }
.action-wrap .count { font-size: 12px; color: #e4e4e7; margin-top: 3px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.user-caption { margin-top: 8px; font-size: 15px; line-height: 1.45; color: #fafafa; text-shadow: 0 1px 8px rgba(0,0,0,.85); white-space: pre-wrap; word-break: break-word; }
textarea { width: 100%; box-sizing: border-box; }
.feed-empty { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 90px 20px 40px; }

/* ---------- cards / forms ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 96px 18px 60px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  padding: 28px; margin-bottom: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.kicker { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }
h1 { font-size: clamp(34px, 7vw, 52px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.03; margin-bottom: 12px; }
h2.title { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.sub { color: var(--muted); font-size: 16px; line-height: 1.55; }
label { display: block; font-weight: 700; font-size: 14px; margin: 16px 0 6px; }
label .req { color: var(--red); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; background: #0c0c0e; border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 16px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; line-height: 1.5; color: #e4e4e7; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--red); }
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  padding: 14px 28px; border-radius: 999px; font-weight: 800; font-size: 16px;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-red { background: var(--red); color: #fff; }
.btn-dark { background: transparent; color: var(--text); border: 1px solid #3f3f46; }
.btn[disabled] { opacity: .5; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.progress { height: 10px; background: #0c0c0e; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin-top: 14px; display: none; }
.progress > div { height: 100%; width: 0%; background: var(--red); transition: width .2s; }
.notice { border-radius: 14px; padding: 14px 16px; margin-top: 16px; font-size: 15px; line-height: 1.5; display: none; }
.notice.ok { background: #12251a; border: 1px solid #1f5136; }
.notice.err { background: #2a1214; border: 1px solid #5b1f24; }
.notice ul { margin-left: 18px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
.footer a { color: #d4d4d8; }
.hidden { display: none !important; }

/* ---------- admin ---------- */
.admin-wrap { max-width: 980px; margin: 0 auto; padding: 28px 18px 60px; }
.queue-item { display: grid; grid-template-columns: 200px 1fr; gap: 18px; }
@media (max-width: 640px) { .queue-item { grid-template-columns: 1fr; } }
.queue-item mux-player, .queue-item video, .queue-item img.thumb {
  width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); background: #000;
}
.meta { font-size: 14px; line-height: 1.6; color: #e4e4e7; }
.meta b { color: var(--text); }
.meta .warn { color: #fbbf24; font-weight: 700; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
table.picks { width: 100%; border-collapse: collapse; font-size: 14px; }
table.picks th, table.picks td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.picks th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.map { display: grid; grid-template-columns: repeat(11, 1fr); gap: 5px; max-width: 640px; }
.tile {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border);
  background: #0c0c0e; color: var(--muted); font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.tile.lit { background: #2a1214; border-color: var(--red); color: var(--text); }
.tile.picked { background: var(--red); border-color: var(--red); color: #fff; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; }
.stat b { font-size: 24px; display: block; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
