/* YouClip web player (youclip.ca): a dark "theater" page with just the clip. */

:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --text: #f1f1f1;
  --text-muted: #b5b5b5;
  --chip: rgba(255, 255, 255, 0.1);
  --chip-hover: rgba(255, 255, 255, 0.18);
  --accent: #3ea6ff;
}

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

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

[hidden] {
  display: none !important;
}

.stage {
  flex: 1;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 32px 16px 16px;
}

.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.7);
}

#player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.card-detail {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.btn {
  display: inline-block;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font: 500 14px/36px "Roboto", system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn.primary,
.btn.primary:hover {
  background: #fff;
  color: #0f0f0f;
}

.btn:focus-visible,
.yt-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Progress bar under the video: red progress and playhead, grey dots at the clip's start and end. */
.timeline {
  position: relative;
  height: 24px;
  margin-top: 6px;
  cursor: pointer;
  touch-action: manipulation;
}

.timeline-track {
  position: absolute;
  top: 50%;
  right: 7px;
  left: 7px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%);
  transition: height 0.1s;
}

.timeline:hover .timeline-track {
  height: 6px;
}

/* The clip's part of the video, slightly lighter. */
.timeline-clip {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.28);
}

.timeline-played {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  background: #ff0033;
}

.timeline-marker,
.timeline-head {
  position: absolute;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.timeline-marker {
  width: 11px;
  height: 11px;
  background: #b5b5b5;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.timeline-head {
  width: 13px;
  height: 13px;
  background: #ff0033;
}

.details {
  margin-top: 10px;
}

.clip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--chip);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.clip-sep,
#clip-length {
  color: var(--text-muted);
}

/* The sharer's title for the clip, when the link has one. */
.clip-title {
  margin: 12px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* The video's own name: the main heading, or a smaller line under the clip title. */
.title {
  margin: 10px 0 6px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.has-clip-title .title {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
}

.title:empty {
  display: none;
}

.yt-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.yt-link:hover {
  text-decoration: underline;
}

/* Home page (youclip.ca/). */
.home {
  flex: 1;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 18vh 20px 32px;
  text-align: center;
}

.home-logo {
  margin: 0;
  line-height: 0;
}

.home-logo img {
  width: 112px;
  height: 112px;
}

.home-lead {
  margin: 24px 0 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.home-intro {
  margin: 36px 0 12px;
  color: var(--text-muted);
}

.home-links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: start;
}

.home-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-label {
  color: var(--text-muted);
}

.home-links a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.home-links a:hover {
  text-decoration: underline;
}

.home-footer {
  padding: 24px 16px 36px;
  text-align: center;
}

.pizza {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 21px;
  /* The app icon's gradient (TOP and BOTTOM in tools/make-icons.mjs). */
  background: linear-gradient(#6366f1, #4338ca);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.pizza:hover {
  filter: brightness(1.06);
}

/* The smaller one at the bottom of clip pages. */
.pizza-small {
  gap: 6px;
  height: 28px;
  margin-inline-start: 8px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 13px;
}

.footer .pizza-small:hover {
  text-decoration: none;
}

.home-links a:focus-visible,
.pizza:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Text pages, like the privacy policy (youclip.ca/privacy). */
.doc {
  flex: 1;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 40px 20px 24px;
  color: var(--text);
  line-height: 1.6;
}

.doc h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.25;
}

.doc h2 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.doc p,
.doc ul {
  margin: 10px 0;
  color: var(--text-muted);
}

.doc li {
  margin: 6px 0;
}

.doc strong {
  color: var(--text);
}

.doc a {
  color: var(--accent);
}

.message {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 25vh 16px 0;
  color: var(--text-muted);
  font-size: 16px;
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.footer-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

/* The link to the extension in the Chrome Web Store, on clip pages. */
.footer-get {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 640px) {
  .stage {
    padding: 0 0 16px;
  }

  .frame {
    border-radius: 0;
  }

  .details {
    padding: 0 16px;
  }

  /* The video goes edge to edge on phones; keep the bar's dots off the screen edge. */
  .timeline {
    margin: 6px 9px 0;
  }

  /* On phones the store link gets its own line, under "YouClip". */
  .footer {
    flex-direction: column;
  }

  .footer-sep {
    display: none;
  }

  .footer .pizza-small {
    margin: 6px 0 0;
  }
}
