@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: #101520;
  --panel-2: #141b28;
  --line: #242d3c;
  --text: #f2f5fb;
  --muted: #8c98ab;
  --accent: #a3ff6f;
  --accent-2: #c4ff9f;
  --danger: #ff6e79;
  --radius: 20px;
  font-family: Manrope, system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(83, 123, 91, 0.1), transparent 34%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.tiny {
  font-size: 11px;
}
.accent {
  color: var(--accent);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.04em;
}
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0a1007;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 0 24px #a3ff6f18;
}
.brand-muted {
  color: #8994a5;
}
.eyebrow,
.stat-label,
.share-label {
  font:
    500 10px "DM Mono",
    monospace;
  letter-spacing: 0.14em;
  color: #a6b2c3;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px #a3ff6f80;
  margin-right: 7px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 15px;
  color: var(--text);
  background: #151c28;
  font-weight: 700;
  font-size: 12px;
  transition:
    transform 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.button:hover {
  transform: translateY(-1px);
  border-color: #47566c;
}
.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a1007;
}
.button-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.button-wide {
  width: 100%;
  margin-top: 7px;
  padding: 14px;
}
.button-quiet {
  background: transparent;
  color: #b7c1d0;
}
.button-small {
  padding: 8px 11px;
  font-size: 11px;
}
.notice {
  padding: 12px 14px;
  border: 1px solid #63444a;
  border-radius: 10px;
  color: #ffb7be;
  background: #30191e;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.fine-print {
  color: #667184;
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  text-align: center;
}
.fine-print span {
  color: var(--accent);
  padding: 0 5px;
}
/* Login page */
.auth-page {
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  padding: 28px;
}
.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}
.ambient-one {
  background: #9dff69;
  top: -240px;
  left: -120px;
}
.ambient-two {
  background: #4266a5;
  bottom: -260px;
  right: -100px;
}
.auth-shell {
  width: min(100%, 420px);
  position: relative;
  z-index: 1;
}
.brand-large {
  margin: 0 0 32px 5px;
  font-size: 17px;
}
.brand-large .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}
.auth-card {
  padding: 35px;
  border: 1px solid #273142;
  background: linear-gradient(145deg, #121925f5, #0d121bf5);
  border-radius: 24px;
  box-shadow: 0 30px 100px #0006;
}
.auth-card h1 {
  font-size: 31px;
  letter-spacing: -0.06em;
  line-height: 1.2;
  margin: 15px 0 10px;
}
.auth-card > p.muted {
  font-size: 12px;
  margin: 0 0 27px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stack label {
  font-size: 11px;
  color: #c4ccda;
  font-weight: 700;
  margin-top: 4px;
}
.stack input,
.stack textarea,
.share-controls input {
  width: 100%;
  border: 1px solid #2a3445;
  border-radius: 10px;
  background: #0b1018;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  resize: vertical;
}
.stack input:focus,
.stack textarea:focus,
.share-controls input:focus {
  border-color: #9be86f;
  box-shadow: 0 0 0 3px #a3ff6f13;
}
.auth-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 19px;
  color: #7f8b9d;
  font-size: 10px;
}
.lock-icon {
  color: var(--accent);
  font-size: 16px;
}
.auth-shell > .fine-print {
  margin-top: 24px;
}
/* Admin dashboard */
.app-header,
.watch-header {
  height: 76px;
  padding: 0 max(26px, calc((100% - 1240px) / 2));
  border-bottom: 1px solid #202735;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #080b12d9;
  backdrop-filter: blur(18px);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.admin-pill,
.watch-label {
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.09em;
  color: #a4afc0;
}
.dashboard-wrap {
  max-width: 1240px;
  padding: 48px 26px 25px;
  margin: auto;
}
.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 31px;
}
.dashboard-intro .eyebrow {
  margin: 0 0 10px;
}
.dashboard-intro h1 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.065em;
  line-height: 1.1;
  margin: 0;
}
.dashboard-intro .muted {
  font-size: 12px;
  margin: 13px 0 0;
}
.intro-stat {
  min-width: 145px;
  border-left: 1px solid var(--line);
  padding: 4px 0 4px 22px;
  display: flex;
  flex-direction: column;
}
.intro-stat strong {
  font-size: 31px;
  letter-spacing: -0.06em;
  line-height: 1.35;
}
.intro-stat .small {
  margin-top: 1px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.83fr) minmax(0, 1.17fr);
  gap: 18px;
  align-items: start;
}
.panel {
  background: linear-gradient(145deg, #111722, #0e131d);
  border: 1px solid #252e3d;
  border-radius: var(--radius);
  padding: 25px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.panel-heading h2 {
  font-size: 16px;
  letter-spacing: -0.03em;
  margin: 0;
}
.panel-heading p {
  margin: 3px 0 0;
}
.panel-icon {
  width: 39px;
  height: 39px;
  border: 1px solid #35452f;
  background: #17241a;
  border-radius: 12px;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 21px;
}
.optional {
  font:
    9px "DM Mono",
    monospace;
  color: #778397;
  margin-left: 5px;
}
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #394456;
  border-radius: 13px;
  min-height: 143px;
  background: #0c1119;
  cursor: pointer;
  text-align: center;
  padding: 18px;
}
.dropzone:hover {
  border-color: #a3ff6f80;
  background: #111a15;
}
.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1b2a1a;
  color: var(--accent);
  font-size: 21px;
}
.dropzone strong {
  font-size: 12px;
}
.panel-note {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
  color: #8b98aa;
  font-size: 10px;
  line-height: 1.6;
}
.panel-note span {
  color: var(--accent);
}
.panel-note p {
  margin: 0;
}
.progress-track {
  height: 4px;
  background: #283141;
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
}
.library-heading {
  justify-content: space-between;
}
.video-list {
  display: flex;
  flex-direction: column;
}
.video-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid #252e3a;
  min-width: 0;
}
.video-file-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid #2a3546;
  background: #151e2b;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 13px;
}
.video-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.video-meta strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-meta span {
  font-size: 10px;
  color: #7f8b9e;
}
.video-meta a {
  color: var(--accent);
  font-size: 10px;
  width: max-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.video-actions {
  display: flex;
  gap: 5px;
}
.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #303a4b;
  border-radius: 9px;
  background: #141b27;
  color: #cbd3df;
  font-size: 16px;
}
.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.danger-icon:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.empty-state {
  text-align: center;
  padding: 55px 10px;
  color: #b8c2d0;
}
.empty-state strong {
  font-size: 12px;
}
.empty-state p {
  margin: 5px;
}
.empty-icon {
  font-size: 32px;
  color: #566277;
  margin-bottom: 10px;
}
.loading-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid #3b4656;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.dashboard-footer,
.watch-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #667184;
  font:
    9px "DM Mono",
    monospace;
  letter-spacing: 0.06em;
  padding-top: 25px;
  margin-top: 7px;
}
/* Public video page: the only public content page */
.watch-page {
  display: flex;
  flex-direction: column;
}
.watch-header {
  padding-left: max(24px, calc((100% - 1100px) / 2));
  padding-right: max(24px, calc((100% - 1100px) / 2));
}
.watch-wrap {
  width: min(100% - 40px, 1000px);
  margin: 50px auto 70px;
  flex: 1;
}
.watch-content {
  border: 1px solid #252e3d;
  background: #0e131d;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 90px #0003;
}
.player-frame {
  background: #030508;
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
}
.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #030508;
}
.watch-details {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 35px;
  padding: 30px;
}
.watch-main-copy .eyebrow {
  margin: 0 0 12px;
}
.watch-main-copy h1 {
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.055em;
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}
.watch-date {
  font-size: 11px;
  color: #7f8b9d;
  margin: 0;
}
.watch-description {
  font-size: 13px;
  color: #c3ccda;
  line-height: 1.8;
  margin-top: 20px;
  overflow-wrap: anywhere;
}
.share-panel {
  align-self: start;
  padding: 17px;
  background: #111925;
  border: 1px solid #283345;
  border-radius: 13px;
}
.share-label {
  display: block;
  margin-bottom: 12px;
}
.share-controls {
  display: flex;
  gap: 8px;
}
.share-controls input {
  min-width: 0;
  padding: 10px;
  font-size: 10px;
}
.share-controls .button {
  padding: 10px 12px;
  white-space: nowrap;
}
.share-panel p {
  margin: 10px 0 0;
  line-height: 1.6;
}
.watch-footer {
  padding: 20px 26px;
  border-top: 1px solid #202735;
  margin: 0;
}
.watch-loading {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
}
.watch-loading p {
  font-size: 12px;
}
.not-found {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.not-found h1 {
  font-size: clamp(25px, 4vw, 38px);
  letter-spacing: -0.06em;
  margin: 7px 0;
}
.not-found p {
  max-width: 480px;
}
.not-found-icon {
  font-size: 44px;
  color: var(--accent);
  margin-bottom: 10px;
}
@media (max-width: 850px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-wrap {
    padding-top: 35px;
  }
  .upload-panel {
    order: 1;
  }
  .library-panel {
    order: 2;
  }
  .watch-details {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .watch-wrap {
    margin-top: 30px;
  }
  .watch-details {
    padding: 23px;
  }
  .intro-stat {
    min-width: 110px;
  }
}
@media (max-width: 540px) {
  .auth-page {
    padding: 18px;
  }
  .auth-card {
    padding: 25px 21px;
  }
  .auth-card h1 {
    font-size: 28px;
  }
  .app-header,
  .watch-header {
    height: 65px;
    padding-left: 17px;
    padding-right: 17px;
  }
  .admin-pill {
    display: none;
  }
  .dashboard-wrap {
    padding: 30px 15px 20px;
  }
  .dashboard-intro {
    align-items: flex-start;
  }
  .dashboard-intro h1 {
    font-size: 32px;
  }
  .dashboard-intro .muted {
    max-width: 250px;
    line-height: 1.7;
  }
  .intro-stat {
    min-width: 78px;
    padding-left: 13px;
  }
  .intro-stat strong {
    font-size: 25px;
  }
  .stat-label {
    font-size: 8px;
  }
  .panel {
    padding: 18px;
    border-radius: 16px;
  }
  .video-item {
    gap: 9px;
  }
  .video-file-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .video-actions {
    gap: 4px;
  }
  .icon-button {
    width: 29px;
    height: 29px;
  }
  .dashboard-footer {
    font-size: 8px;
  }
  .watch-wrap {
    width: calc(100% - 24px);
    margin: 18px auto 35px;
  }
  .watch-details {
    padding: 19px;
    gap: 20px;
  }
  .watch-label {
    font-size: 8px;
  }
  .watch-footer {
    padding: 16px;
    font-size: 8px;
  }
  .share-controls {
    flex-direction: column;
  }
  .share-controls .button {
    width: 100%;
  }
}
