/* VidShare — mobile-first, dark only (she watches at night). */

:root {
  --bg: #0f0f14;
  --card: #1c1c26;
  --text: #e8e8f0;
  --muted: #8a8a9a;
  --accent: #7c5cff;
}

* { box-sizing: border-box; margin: 0; }

/* #gate's display:flex would otherwise beat the hidden attribute's UA style */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
}

h1 { font-size: 1.4rem; }

section { padding: 1rem; }

/* ---- PIN gate ---- */

#gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

.gate-box { text-align: center; width: min(20rem, 90vw); }
.gate-box h1 { margin-bottom: 1.5rem; }

#pin-form { display: flex; gap: 0.5rem; }

#pin-input {
  flex: 1;
  min-width: 0;
  font-size: 1.3rem;
  text-align: center;
  letter-spacing: 0.3em;
  padding: 0.6rem;
  border: 1px solid var(--card);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--text);
}

#pin-form button {
  font-size: 1rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fff;
}

.shake { animation: shake 0.3s; }
@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.error { color: #ff6b6b; margin-top: 0.8rem; min-height: 1.2em; }

/* ---- list view ---- */

#list header { padding: 0.5rem 0 1rem; }
#list-status { color: var(--muted); text-align: center; padding: 1rem 0; }

.card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  color: var(--text);
  border: none;
  border-radius: 0.8rem;
  padding: 1rem;
  margin-bottom: 0.8rem;
  font: inherit;
  cursor: pointer;
}
.card:active { background: #262636; }

.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; }
.card-meta { color: var(--muted); font-size: 0.85rem; }

/* ---- player view ---- */

.player-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.8rem;
}

#back {
  background: var(--card);
  color: var(--text);
  border: none;
  border-radius: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
}

#player-title { font-size: 1.05rem; font-weight: 600; }

#video {
  width: 100%;
  max-height: 80dvh;
  border-radius: 0.5rem;
  background: #000;
}
