﻿:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #6b7280;
  --line: #deded8;
  --accent: #e11d48;
  --accent-dark: #be123c;
  --focus: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 18px clamp(16px, 4vw, 40px) 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.site-footer a {
  color: #0b1f4d;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #12357f;
  text-decoration: underline;
}

.mobile-bottom-nav {
  display: none;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(240px, 560px) minmax(max-content, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 40px);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.no-header-page .topbar {
  min-height: 0;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.sidebar-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.sidebar-toggle:hover,
.sidebar-toggle[aria-pressed="true"] {
  background: #e5e5e5;
}

.sidebar-toggle img {
  width: 24px;
  height: 24px;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
}

.site-search:focus-within {
  border-color: #a1a1aa;
  background: #fff;
}

.site-search img {
  width: 18px;
  height: 18px;
  opacity: 0.55;
}

.site-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 108px;
  height: 82px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}

.upload-toggle,
.account-create-link,
.login-link,
.account-button,
.primary-action,
.delete-button,
.logout-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.upload-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.guest-actions,
.member-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.guest-actions[hidden],
.member-actions[hidden] {
  display: none;
}

.account-create-link,
.login-link {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
}

.account-create-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.login-link {
  justify-content: center;
  background: #111827;
  color: #fff;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: #f3f4f6;
  color: #3f3f46;
  text-decoration: none;
}

.logout-button:hover {
  color: var(--accent-dark);
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 0;
  background: #f3f4f6;
  color: #3f3f46;
  text-decoration: none;
}

.account-button:hover {
  background: #e9eaec;
  color: var(--accent-dark);
}

.account-button img {
  width: 19px;
  height: 19px;
}

.account-button.is-avatar-only {
  width: 40px;
  min-width: 40px;
  justify-content: center;
  padding: 0;
}

.account-button.is-avatar-only img.has-avatar {
  width: 32px;
  height: 32px;
}

.account-button .account-initial {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-color, #2563eb);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.account-button img.has-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.notification-menu {
  position: relative;
  display: inline-flex;
}

.notification-menu[hidden] {
  display: none;
}

.notification-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  cursor: pointer;
}

.notification-button:hover,
.notification-button[aria-expanded="true"] {
  background: #e9eaec;
}

.notification-button img {
  width: 19px;
  height: 19px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  display: grid;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.notification-panel[hidden] {
  display: none;
}

.notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-heading span {
  color: var(--muted);
  font-size: 13px;
}

.notification-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 42px 12px 14px;
  color: var(--ink);
  text-decoration: none;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.notification-item strong,
.notification-item em,
.notification-item small,
.notification-item p {
  display: block;
}

.notification-item em {
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-style: normal;
  font-weight: 800;
}

.notification-item small,
.notification-item p {
  color: var(--muted);
}

.notification-item p {
  margin: 5px 0 0;
  line-height: 1.35;
}

.notification-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.notification-dismiss:hover {
  background: var(--accent);
  color: #fff;
}

.notification-empty {
  padding: 18px 14px;
  color: var(--muted);
}

.notification-footer {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.account-menu {
  position: relative;
  display: inline-flex;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-menu-panel[hidden] {
  display: none;
}

.account-menu-panel a,
.account-menu-panel button,
.avatar-upload-action {
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: #27272a;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.account-menu-panel a:hover,
.account-menu-panel button:hover,
.avatar-upload-action:hover {
  background: #f3f4f6;
  color: var(--accent-dark);
}

.avatar-upload-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.avatar-upload-status {
  min-height: 18px;
  padding: 0 10px 4px;
  color: var(--muted);
  font-size: 12px;
}

.avatar-upload-status.error {
  color: var(--accent-dark);
}

.guest-auth-dropdown {
  display: grid;
  gap: 14px;
  min-width: min(360px, calc(100vw - 28px));
  padding: 18px;
}

.guest-auth-dropdown[hidden] {
  display: none;
}

.guest-auth-dropdown .panel-heading {
  margin: 0;
}

.guest-auth-dropdown .panel-heading h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.guest-auth-dropdown .panel-heading p {
  margin: 0;
  color: var(--muted);
}

.guest-auth-form {
  display: grid;
  gap: 12px;
}

.guest-auth-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

.guest-auth-form label[hidden] {
  display: none;
}

.guest-auth-form .password-manager-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.guest-auth-form input {
  min-height: 42px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.account-menu-panel .guest-auth-form button {
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
}

.account-menu-panel .guest-auth-form .primary-action {
  background: var(--accent);
  color: #fff;
}

.account-menu-panel .guest-auth-form .secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.dashboard-page {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 40px);
}

.dashboard-header,
.dashboard-section {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-avatar {
  width: 52px;
  height: 52px;
  padding: 12px;
  border-radius: 50%;
  background: #f3f4f6;
}

.dashboard-avatar.has-avatar {
  padding: 0;
  object-fit: cover;
}

.dashboard-header h1,
.dashboard-section h2 {
  margin: 0;
}

.dashboard-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.dashboard-video-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.avatar-settings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 36px);
  align-items: start;
}

.avatar-settings-heading h2 {
  margin: 0 0 8px;
}

.avatar-settings-heading p,
.avatar-settings-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.avatar-settings-control {
  display: grid;
  grid-template-columns: 210px minmax(0, 340px) minmax(220px, 340px);
  gap: 28px;
  align-items: start;
}

.avatar-preview-frame {
  display: grid;
  width: 210px;
  height: 170px;
  place-items: center;
  border-radius: 8px;
  background: #f1f1f1;
}

.avatar-preview-frame img,
.avatar-preview-frame span {
  grid-area: 1 / 1;
}

.avatar-preview-frame img {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-preview-frame img[hidden],
.avatar-preview-frame span[hidden] {
  display: none;
}

.avatar-preview-frame span {
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-color, #7c3aed);
  color: #fff;
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
}

.avatar-settings-copy {
  display: grid;
  gap: 14px;
}

.avatar-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  cursor: pointer;
}

.avatar-settings-copy #dashboardAvatarInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.avatar-settings-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.avatar-settings-status.error {
  color: var(--accent-dark);
}

.display-name-form {
  display: grid;
  gap: 12px;
  max-width: 340px;
  padding-top: 0;
}

.display-name-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.display-name-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 600;
}

.display-name-form input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: var(--accent);
}

.display-name-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-video-card {
  display: grid;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dashboard-video-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-video {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.dashboard-video img,
.dashboard-video-placeholder {
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #18181b;
}

.dashboard-audio-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}

.dashboard-video h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.dashboard-video p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-studio-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 5%);
}

.dashboard-studio-row {
  display: grid;
  grid-template-columns: 34px minmax(360px, 2fr) minmax(110px, 0.55fr) minmax(170px, 0.8fr) minmax(170px, 0.75fr) minmax(74px, 0.35fr) minmax(74px, 0.35fr);
  gap: 18px;
  align-items: center;
  min-height: 86px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 140ms ease;
}

.dashboard-studio-row:not(.dashboard-studio-head):hover {
  background: #fafafa;
}

.dashboard-studio-row:last-child {
  border-bottom: 0;
}

.dashboard-studio-head {
  min-height: 44px;
  padding-block: 0;
  background: #fbfbfc;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.studio-select-cell {
  display: grid;
  place-items: center;
}

.studio-select-cell input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.studio-video-cell {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.studio-video-cell img,
.studio-video-cell .dashboard-video-placeholder {
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #111827;
  box-shadow: 0 2px 8px rgb(15 23 42 / 10%);
}

.studio-video-cell strong {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-video-cell small,
.studio-date-cell small,
.studio-muted {
  color: var(--muted);
  font-size: 13px;
}

.studio-video-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-status-cell,
.studio-date-cell,
.studio-number-cell {
  min-width: 0;
}

.studio-visibility-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.studio-visibility-label {
  width: fit-content;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 9px;
}

.studio-visibility-cell select {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 0 8px;
}

.studio-visibility-cell .visibility-save {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
}

.studio-visibility-cell .visibility-save:disabled {
  display: none;
}

.studio-visibility-cell .visibility-status {
  align-self: center;
  font-size: 12px;
}

.studio-date-cell {
  display: grid;
  gap: 2px;
}

.studio-date-cell strong,
.studio-number-cell {
  font-size: 13px;
  font-weight: 800;
}

.studio-number-cell {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.visibility-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-self: start;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.visibility-control label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.visibility-control select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.visibility-save {
  min-height: 36px;
}

.visibility-status {
  color: var(--muted);
  font-size: 13px;
}

.moderation-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.moderation-pill.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.moderation-pill.approved {
  background: #dcfce7;
  color: #166534;
}

.rejected-delete-button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border: 0;
  border-radius: 999px;
  background: #991b1b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.rejected-delete-button:hover,
.rejected-delete-button:focus-visible {
  background: #7f1d1d;
}

.rejected-delete-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.moderation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
}

.moderation-card {
  justify-items: end;
  text-align: left;
}

.moderation-content {
  display: grid;
  grid-template-columns: minmax(220px, max-content) 150px;
  gap: 16px;
  align-items: start;
  justify-content: end;
  width: 100%;
}

.moderation-copy {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.moderation-copy h3,
.moderation-copy p {
  margin: 0;
}

.moderation-copy h3 {
  font-size: 18px;
}

.moderation-copy p {
  color: var(--muted);
}

.moderation-thumb {
  display: block;
  width: 150px;
  color: inherit;
  text-decoration: none;
}

.moderation-thumb img,
.moderation-thumb .dashboard-video-placeholder {
  display: block;
  width: 150px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #18181b;
}

.moderation-card .moderation-actions {
  justify-content: flex-end;
  width: 100%;
  padding-top: 12px;
}

.moderation-actions .primary-action,
.moderation-actions .delete-button {
  width: auto;
  min-width: 104px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.moderation-actions .primary-action {
  background: #16a34a;
  box-shadow: 0 8px 18px rgb(22 163 74 / 18%);
}

.moderation-actions .primary-action:hover,
.moderation-actions .primary-action:focus-visible {
  background: #15803d;
}

.moderation-actions .delete-button {
  background: #f4f4f5;
  color: #3f3f46;
}

.moderation-actions .delete-button:hover,
.moderation-actions .delete-button:focus-visible {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.moderation-section-title {
  justify-content: space-between;
}

.moderation-section-title h2 {
  margin-left: auto;
  text-align: right;
}

.admin-only-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.admin-user-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.admin-storage-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-storage-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-storage-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.admin-storage-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.storage-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.storage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.admin-user-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-main h3 {
  margin: 0;
  font-size: 22px;
}

.admin-user-main p,
.admin-user-meta {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-user-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-user-stats div {
  padding: 10px;
  border-radius: 8px;
  background: #f4f4f5;
}

.admin-user-stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-user-stats dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 900;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.profile-page .dashboard-header {
  border-bottom: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1120px) minmax(360px, 420px);
  gap: 16px;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: clamp(14px, 3vw, 30px) clamp(14px, 3vw, 30px) clamp(14px, 3vw, 30px) 256px;
}

.app-shell.is-booting {
  visibility: hidden;
}

.app-booting .topbar {
  visibility: hidden;
}

.app-loader {
  --loader-x: 0px;
  --loader-y: 0px;
  --loader-scale: 1;
  --loader-trail-x: 0px;
  --loader-trail-y: 0px;
  --loader-trail-x-soft: 0px;
  --loader-trail-y-soft: 0px;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #fff;
}

.app-loader::before,
.app-loader::after {
  content: "";
  position: absolute;
  width: min(170px, 42vw);
  aspect-ratio: 1.35;
  background: url("/logo.png?v=20260716-05") center / contain no-repeat;
  opacity: 0;
  filter:
    drop-shadow(var(--loader-trail-x) var(--loader-trail-y) 10px rgb(225 29 72 / 18%))
    drop-shadow(var(--loader-trail-x-soft) var(--loader-trail-y-soft) 18px rgb(15 23 42 / 10%));
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.app-loader img {
  width: min(170px, 42vw);
  height: auto;
  transform-origin: center;
  animation: appLoaderPulse 0.9s ease-in-out infinite;
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease,
    filter 520ms ease;
  will-change: transform, opacity, filter;
}

.app-loader.is-docking {
  pointer-events: none;
}

.app-loader.is-docking::before {
  opacity: 0.28;
  transform: translate(calc(var(--loader-x) * 0.34), calc(var(--loader-y) * 0.34)) scale(0.82);
}

.app-loader.is-docking::after {
  opacity: 0.16;
  transform: translate(calc(var(--loader-x) * 0.62), calc(var(--loader-y) * 0.62)) scale(0.66);
}

.app-loader.is-docking img {
  animation: none;
  filter:
    drop-shadow(var(--loader-trail-x) var(--loader-trail-y) 10px rgb(225 29 72 / 28%))
    drop-shadow(var(--loader-trail-x-soft) var(--loader-trail-y-soft) 18px rgb(15 23 42 / 16%));
  transform: translate(var(--loader-x), var(--loader-y)) scale(var(--loader-scale));
}

body:not(.app-booting) .app-loader {
  display: none;
}

@keyframes appLoaderPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-loader img {
    animation: none;
  }
}

.app-shell.guest-mode {
  grid-template-columns: minmax(0, 1120px);
}

.app-shell.home-mode {
  grid-template-columns: 256px minmax(0, 1fr);
  justify-content: stretch;
  padding-left: 0;
}

.app-shell.nav-collapsed {
  padding-left: 0;
}

.app-shell.home-mode.nav-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.no-header-page .app-shell {
  padding-top: clamp(8px, 1.6vw, 18px);
}

.watch-area {
  min-width: 0;
}

.app-shell:not(.home-mode) .watch-area {
  width: 100%;
  max-width: 1120px;
}

.primary-nav {
  position: sticky;
  top: 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: calc(100vh - 96px);
  padding: 0 8px 18px 0;
  background: var(--bg);
  transform: translateX(0);
  transition: transform 180ms ease;
}

.app-shell.home-mode .primary-nav {
  padding-right: 8px;
}

.app-shell:not(.home-mode) .primary-nav {
  position: fixed;
  top: 96px;
  left: 0;
  z-index: 20;
  width: 256px;
  max-height: calc(100vh - 108px);
  min-height: auto;
  overflow-y: auto;
  padding: 0 8px 18px 0;
}

.app-shell.nav-collapsed .primary-nav,
.app-shell:not(.home-mode).nav-collapsed .primary-nav {
  width: 256px;
  padding: 0 6px 18px;
  pointer-events: none;
  transform: translateX(-100%);
}

.primary-nav-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 10px;
  color: #18181b;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.app-shell.nav-collapsed .primary-nav-link,
.app-shell:not(.home-mode).nav-collapsed .primary-nav-link {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  min-height: 64px;
  padding: 0;
  font-size: 0;
}

.app-shell:not(.home-mode) .primary-nav-link img {
  width: 25px;
  height: 25px;
}

.primary-nav-link img {
  width: 25px;
  height: 25px;
}

.primary-nav-link:hover,
.primary-nav-link.active {
  color: var(--ink);
  background: #e8e8e3;
}

.you-nav-panel {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.you-nav-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0;
  padding: 0 16px;
  font-size: 17px;
  font-weight: 900;
}

.you-nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: transparent;
  color: #18181b;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
}

.you-nav-item svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.you-nav-item:hover,
.you-nav-item.active {
  background: #e8e8e3;
  color: var(--ink);
}

.app-shell.nav-collapsed .subscriptions-panel {
  display: none;
}

.app-shell.nav-collapsed .you-nav-panel {
  display: none;
}

.home-feed {
  display: grid;
  gap: 18px;
}

.home-feed[hidden] {
  display: none;
}

.home-feed-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.home-feed-heading h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.history-heading {
  align-items: center;
}

.history-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.history-clear-button {
  width: auto;
  min-width: 118px;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.text-button:hover {
  text-decoration: underline;
}

.home-category-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.home-category-menu button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.home-category-menu button:hover,
.home-category-menu button:focus-visible {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--ink);
}

.home-category-menu button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.home-feed-heading span {
  color: var(--muted);
  font-size: 14px;
}

.home-feed-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-feed-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.home-feed-tools select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 34px 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.home-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 28px 20px;
}

.home-video-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.home-video-card:hover h2 {
  color: var(--accent-dark);
}

.home-thumb {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
}

.home-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-audio-thumb-frame {
  background-color: #050505;
}

.home-audio-thumb-frame::before,
.home-audio-thumb-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb-url);
  background-position: center;
  background-repeat: no-repeat;
}

.home-audio-thumb-frame::before {
  background-size: cover;
  filter: blur(18px);
  opacity: 0.55;
  transform: scale(1.08);
}

.home-audio-thumb-frame::after {
  background-size: contain;
}

.home-audio-thumb-frame .home-type-badge,
.home-audio-thumb-frame .thumb-play {
  z-index: 2;
}

.home-audio-card .home-thumb img,
.home-audio-card .home-thumb > img.home-audio-thumb {
  object-fit: contain !important;
  background: #050505;
}

.home-audio-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #18181b;
  color: #fff;
  font-size: 52px;
  font-weight: 800;
}

.home-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgb(0 0 0 / 70%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.live-badge {
  background: var(--accent);
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  background: #e5e7eb;
  color: #3f3f46;
  font-size: 13px;
  font-weight: 900;
}

.live-status-pill.active {
  background: var(--accent);
  color: #fff;
}

.live-waiting {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: min(56vw, 620px);
  padding: 24px;
  background: #18181b;
  color: #fff;
  text-align: center;
}

.live-waiting strong {
  font-size: clamp(22px, 3vw, 34px);
}

.live-waiting span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
}

.live-webrtc-frame {
  width: 100%;
  min-height: min(56vw, 620px);
  aspect-ratio: 16 / 9;
  border: 0;
  background: #18181b;
  display: block;
}

.home-video-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-video-copy h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-video-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.player-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 8px;
  background: #0f0f0f;
  box-shadow: var(--shadow);
}

.player-frame.audio-mode {
  aspect-ratio: auto;
  min-height: clamp(420px, 58vh, 620px);
  background: #171719;
}

.player-frame.video-tool-mode {
  overflow: visible;
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
}

.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 42%),
    #000;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.player-frame.video-tool-mode .video-player-shell video {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.player-frame.video-tool-mode .video-player-shell iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.external-video-shell .player-title-overlay,
.external-video-shell .player-top-gradient {
  opacity: 0;
}

.external-video-shell:hover .player-title-overlay,
.external-video-shell:focus-within .player-title-overlay,
.external-video-shell:hover .player-top-gradient,
.external-video-shell:focus-within .player-top-gradient {
  opacity: 1;
}

.player-top-gradient {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 34%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.player-title-overlay {
  pointer-events: none;
  position: absolute;
  top: 14px;
  left: 16px;
  right: 92px;
  z-index: 3;
  display: grid;
  gap: 4px;
  color: #fff;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.player-title-overlay span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.player-title-overlay strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(15px, 2vw, 20px);
}

.video-player-shell:hover .player-top-gradient,
.video-player-shell:focus-within .player-top-gradient,
.video-player-shell:hover .player-title-overlay,
.video-player-shell:focus-within .player-title-overlay {
  opacity: 1;
  transform: translateY(0);
}

.video-skip-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-skip-wave {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(34%, 360px);
  opacity: 0;
  transform: scaleX(0.5);
}

.video-skip-wave.left {
  left: 0;
  transform-origin: left center;
  background:
    radial-gradient(ellipse at left center, rgba(255, 255, 255, 0.36), transparent 64%),
    repeating-radial-gradient(ellipse at left center, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 18px);
}

.video-skip-wave.right {
  right: 0;
  transform-origin: right center;
  background:
    radial-gradient(ellipse at right center, rgba(255, 255, 255, 0.36), transparent 64%),
    repeating-radial-gradient(ellipse at right center, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 18px);
}

.video-skip-wave.active {
  animation: skipWave 520ms ease-out;
}

.video-skip-label {
  position: absolute;
  top: 50%;
  display: inline-grid;
  place-items: center;
  min-width: 74px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.video-skip-label.left {
  left: clamp(28px, 7vw, 92px);
  transform: translate(-18px, -50%) scale(0.9);
}

.video-skip-label.right {
  right: clamp(28px, 7vw, 92px);
  transform: translate(18px, -50%) scale(0.9);
}

.video-skip-label.left.active {
  animation: skipLabelLeft 560ms ease-out;
}

.video-skip-label.right.active {
  animation: skipLabelRight 560ms ease-out;
}

@keyframes skipWave {
  0% {
    opacity: 0;
    transform: scaleX(0.32);
    filter: blur(0);
  }

  35% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: scaleX(1.15);
    filter: blur(10px);
  }
}

@keyframes skipLabelLeft {
  0% {
    opacity: 0;
    transform: translate(-22px, -50%) scale(0.88);
  }

  28% {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(28px, -50%) scale(1.04);
  }
}

@keyframes skipLabelRight {
  0% {
    opacity: 0;
    transform: translate(22px, -50%) scale(0.88);
  }

  28% {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-28px, -50%) scale(1.04);
  }
}

.custom-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 44px 14px 12px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-player-shell:hover .custom-video-controls,
.video-player-shell:focus-within .custom-video-controls {
  opacity: 1;
  transform: translateY(0);
}

.custom-video-control-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(96px, auto) auto minmax(74px, 118px) auto 1fr;
  align-items: center;
  gap: 10px;
  padding-right: 46px;
}

.custom-control-button[data-custom-fullscreen] {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.custom-control-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  transition: background 0.15s ease, transform 0.15s ease;
}

.custom-control-button.play {
  font-size: 18px;
}

.custom-control-button:hover,
.custom-control-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.custom-control-button[data-custom-fullscreen]:hover,
.custom-control-button[data-custom-fullscreen]:focus-visible {
  transform: translateY(-50%) scale(1.05);
}

.custom-control-button:active {
  transform: scale(0.96);
}

.custom-control-button[data-custom-fullscreen]:active {
  transform: translateY(-50%) scale(0.96);
}

.custom-video-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.custom-video-progress,
.custom-volume-slider {
  --progress: 0%;
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.custom-video-progress::-webkit-slider-runnable-track,
.custom-volume-slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff0033 0 var(--progress), rgba(255, 255, 255, 0.34) var(--progress) 100%);
}

.custom-video-progress::-moz-range-track,
.custom-volume-slider::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.custom-video-progress::-moz-range-progress,
.custom-volume-slider::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: #ff0033;
}

.custom-video-progress::-webkit-slider-thumb,
.custom-volume-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: #ff0033;
  box-shadow: 0 0 0 4px rgba(255, 0, 51, 0.18);
  appearance: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-video-progress:hover::-webkit-slider-thumb,
.custom-video-progress:focus-visible::-webkit-slider-thumb,
.custom-volume-slider:hover::-webkit-slider-thumb,
.custom-volume-slider:focus-visible::-webkit-slider-thumb {
  opacity: 1;
  transform: scale(1.08);
}

.custom-video-progress::-moz-range-thumb,
.custom-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #ff0033;
}

.player-overlay-controls {
  position: absolute;
  right: 12px;
  bottom: 62px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@media (max-width: 720px) {
  .custom-video-controls {
    padding-inline: 10px;
  }

  .custom-video-control-row {
    grid-template-columns: auto minmax(72px, auto) auto auto 1fr;
    gap: 6px;
    padding-right: 42px;
  }

  .custom-volume-slider {
    display: none;
  }

  .custom-video-time {
    font-size: 12px;
  }
}

@media (hover: none) {
  .custom-video-controls,
  .player-overlay-controls {
    opacity: 1;
    transform: none;
  }
}


.video-player-shell:hover .player-overlay-controls,
.video-player-shell:focus-within .player-overlay-controls {
  opacity: 1;
}

.player-overlay-controls:has(.subtitle-panel:not([hidden])),
.player-overlay-controls:has(.player-settings-panel:not([hidden])) {
  opacity: 1;
}

.subtitle-menu-button,
.player-settings-button {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.subtitle-menu-button[aria-expanded="true"],
.player-settings-button[aria-expanded="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.subtitle-panel,
.player-settings-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: min(300px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgb(0 0 0 / 74%);
  color: #fff;
  box-shadow: 0 14px 34px rgb(0 0 0 / 28%);
  backdrop-filter: blur(10px);
}

.subtitle-panel[hidden],
.player-settings-panel[hidden] {
  display: none;
}

.player-settings-panel {
  width: min(220px, calc(100vw - 28px));
}

.player-settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 12px;
}

.player-settings-option.active {
  background: var(--accent);
}

.player-settings-option strong {
  font-size: 12px;
}

.player-settings-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.player-settings-label {
  color: rgb(255 255 255 / 72%);
  font-size: 12px;
  font-weight: 900;
  padding: 2px 2px 0;
}

.player-context-menu {
  position: absolute;
  z-index: 6;
  width: 180px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgb(0 0 0 / 78%);
  color: #fff;
  box-shadow: 0 14px 34px rgb(0 0 0 / 32%);
  backdrop-filter: blur(10px);
}

.player-context-menu[hidden] {
  display: none;
}

.subtitle-layer {
  pointer-events: none;
  position: absolute;
  left: 5%;
  right: 5%;
  z-index: 3;
  display: grid;
  justify-items: center;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 4px rgb(0 0 0 / 75%);
}

.subtitle-layer[hidden] {
  display: none;
}

.subtitle-layer span {
  max-width: min(92%, 980px);
  padding: 0.24em 0.5em;
  border-radius: 6px;
  line-height: 1.35;
  font-weight: 800;
}

.subtitle-layer[data-subtitle-position="bottom"] {
  bottom: 9%;
}

.subtitle-layer[data-subtitle-position="middle"] {
  top: 50%;
  transform: translateY(-50%);
}

.subtitle-layer[data-subtitle-position="top"] {
  top: 12%;
}

.subtitle-layer[data-subtitle-size="small"] span {
  font-size: clamp(16px, 2vw, 24px);
}

.subtitle-layer[data-subtitle-size="medium"] span {
  font-size: clamp(20px, 2.8vw, 34px);
}

.subtitle-layer[data-subtitle-size="large"] span {
  font-size: clamp(26px, 3.8vw, 46px);
}

.subtitle-layer[data-subtitle-background="dark"] span {
  background: rgb(0 0 0 / 72%);
}

.subtitle-layer[data-subtitle-background="light"] span {
  background: rgb(255 255 255 / 84%);
  color: #111827;
  text-shadow: none;
}

.subtitle-layer[data-subtitle-background="none"] span {
  background: transparent;
}

.subtitle-file-button {
  display: inline-grid;
  place-items: center;
  min-width: 74px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.subtitle-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.subtitle-clear-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 16%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
}

.subtitle-clear-button[hidden] {
  display: none;
}

.subtitle-status {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.subtitle-select {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 16%);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
  padding: 0 8px;
}

.subtitle-select option {
  color: #111827;
}

.video-player-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
}

.skip-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skip-button {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
  color: #27272a;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.skip-button:hover {
  background: #e9eaec;
}

.skip-button:active {
  transform: translateY(1px);
}

.audio-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  height: 100%;
  min-height: inherit;
  background: #171719;
}

.audio-player {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-content: end;
  gap: 26px;
  height: 100%;
  min-height: inherit;
  padding: clamp(24px, 5vw, 46px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.14)),
  #171719;
}

.audio-side-playlist {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: inherit;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #111113;
  color: #fff;
}

.audio-side-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-side-heading h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.audio-side-heading span {
  color: #a1a1aa;
  font-size: 13px;
  white-space: nowrap;
}

.audio-controls-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.audio-controls-row audio {
  width: 100%;
  margin-top: 2px;
  accent-color: var(--accent);
}

.spotify-player {
  align-content: center;
}

.spotify-embed {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 380px;
  border: 0;
  border-radius: 8px;
  background: #121212;
}

.loop-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
  color: #27272a;
  cursor: pointer;
  font-weight: 800;
}

.loop-button.active {
  background: var(--accent);
  color: #fff;
}

.album-art {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #111113;
  color: #fff;
  font-size: 70px;
  box-shadow: 0 18px 45px rgba(225, 29, 72, 0.24);
}

.album-art.has-cover {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.album-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-copy {
  align-self: center;
  min-width: 0;
}

.audio-player h2 {
  margin: 4px 0 8px;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.audio-player p {
  margin: 0;
  color: #d4d4d8;
}

.audio-eyebrow {
  color: #fda4af;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.waveform {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(48, 1fr);
  align-items: center;
  gap: 3px;
  height: 96px;
  margin-top: clamp(18px, 5vw, 56px);
}

.waveform span {
  display: block;
  min-height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fb7185, #e11d48);
  opacity: 0.86;
  transition: height 80ms linear;
}

.empty-player {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #f4f4f5;
  text-align: center;
  padding: 24px;
}

.empty-player span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
}

.empty-player p {
  margin: 0;
  max-width: 32rem;
  color: #d4d4d8;
}

.video-info {
  padding: 18px 2px 0;
}

.video-info h2 {
  margin: 0;
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.22;
}

.video-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.video-title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.favorite-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #52525b;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.favorite-button img {
  width: 18px;
  height: 18px;
}

.favorite-button:hover,
.favorite-button.active {
  border-color: #fda4af;
  background: #fff1f2;
  color: var(--accent-dark);
}

.save-playlist-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(15 23 42 / 36%);
}

.save-playlist-modal[hidden] {
  display: none;
}

.save-playlist-panel {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}

.save-playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}

.save-playlist-header h2 {
  margin: 0;
  font-size: 21px;
}

.save-playlist-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
}

.save-playlist-list {
  display: grid;
  max-height: min(420px, 56vh);
  overflow: auto;
  padding: 6px 8px 12px;
}

.save-playlist-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.save-playlist-item:hover {
  background: #f8fafc;
}

.save-playlist-item strong,
.save-playlist-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-playlist-item strong {
  font-size: 15px;
}

.save-playlist-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.save-playlist-item input {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
}

.save-playlist-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: #fafafa;
}

.save-playlist-new input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  font: inherit;
}

.save-playlist-new button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.uploader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 12px;
}

.channel-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--channel-color, #e11d48);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploader-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.uploader-name {
  display: inline-flex;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.inline-follow-button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: #18181b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.inline-follow-button.active {
  background: #f3f4f6;
  color: #27272a;
}

.inline-follow-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.subscriber-count {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.uploader-name:hover,
.user-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.meta {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.description {
  max-width: 72ch;
  color: #3f3f46;
  line-height: 1.6;
  white-space: pre-wrap;
}

.description a {
  color: #065fd4;
  font-weight: 400;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.description a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.description-wrap {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fafc;
}

.description-wrap .description {
  display: -webkit-box;
  max-width: none;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.description-wrap.expanded .description {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.description-toggle {
  display: block;
  margin-top: 8px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.description-toggle:hover {
  color: var(--accent-dark);
}

.comments-panel {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.comments-panel[hidden] {
  display: none;
}

.comments-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.comments-heading h2 {
  margin: 0;
  font-size: 22px;
}

.comments-heading span {
  color: var(--muted);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}

.comment-form textarea {
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}

.comment-form textarea:focus {
  border-color: #a1a1aa;
  outline: 2px solid rgba(37, 99, 235, 0.12);
}

.comment-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
}

.comment-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #18181b;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.comment-meta .user-link {
  color: var(--ink);
  font-weight: 800;
}

.comment-meta span,
.comments-empty {
  color: var(--muted);
  font-size: 13px;
}

.comment-delete {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
}

.comment-delete:disabled {
  cursor: progress;
  opacity: 0.6;
}

.comment p {
  margin: 6px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.soundcloud-tracklist {
  display: grid;
  gap: 1px;
  width: min(760px, 100%);
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.soundcloud-track {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #27272a;
  text-align: left;
  cursor: pointer;
}

.soundcloud-track:hover,
.soundcloud-track.active {
  color: var(--accent-dark);
  background: #fff;
}

.soundcloud-track span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.soundcloud-track span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-side-playlist .soundcloud-tracklist {
  width: 100%;
  min-height: 0;
  margin-top: 0;
  overflow-y: auto;
  border-top: 0;
}

.audio-side-playlist .soundcloud-track {
  min-height: 54px;
  padding: 0 16px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
}

.audio-side-playlist .soundcloud-track:hover,
.audio-side-playlist .soundcloud-track.active {
  color: #fff;
  background: #27272a;
}

.audio-side-playlist .soundcloud-track span:first-child {
  color: #a1a1aa;
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  width: 100%;
  max-width: 420px;
}

.side-panel[hidden] {
  display: none;
}

.subscriptions-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 8px 10px 0;
  border-top: 1px solid var(--line);
}

.subscriptions-panel[hidden] {
  display: none;
}

.subscriptions-heading {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
}

.subscriptions-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.subscriptions-list {
  display: grid;
  gap: 2px;
}

.subscription-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 5px 10px 5px 12px;
  color: var(--ink);
  text-decoration: none;
}

.subscription-item:hover {
  background: #e8e8e3;
}

.subscription-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.subscription-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscriptions-empty {
  margin: 4px 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.follow-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #18181b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.follow-button.active {
  background: #f3f4f6;
  color: #27272a;
}

.follow-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.media-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-section-link {
  color: inherit;
  text-decoration: none;
}

.dashboard-section-link:hover {
  color: var(--accent-dark);
}

.media-tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.media-tab.active {
  background: #18181b;
  color: #fff;
}

.favorites-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.download-all-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #52525b;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.download-all-button[hidden] {
  display: none;
}

.download-all-button:hover {
  color: var(--accent-dark);
}

.download-all-button img {
  width: 15px;
  height: 15px;
}

.media-panel {
  display: none;
  gap: 12px;
}

.media-panel.active {
  display: grid;
}

.upload-panel,
.library {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.upload-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.panel-heading h1,
.library-heading h2 {
  margin: 0;
  font-size: 20px;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #27272a;
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

.paste-input-row {
  position: relative;
  display: block;
}

.paste-input-row input {
  min-width: 0;
  padding-right: 96px;
}

.paste-button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: calc(100% - 12px);
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.paste-button:hover {
  background: #343438;
}

.youtube-cookies-tools {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
}

.youtube-cookies-picker {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.youtube-cookies-picker input {
  display: none;
}

.youtube-cookies-picker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.file-drop {
  min-height: 66px;
  place-items: center;
  border: 1px dashed #a1a1aa;
  border-radius: 8px;
  color: #3f3f46;
  text-align: center;
  cursor: pointer;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.primary-action {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

.primary-action:hover {
  background: var(--accent-dark);
}

.secondary-action {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #18181b;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.secondary-action:disabled {
  cursor: progress;
  opacity: 0.7;
}

.primary-action:disabled {
  cursor: progress;
  opacity: 0.72;
}

.status {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--accent-dark);
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(15 23 42 / 48%);
}

.review-modal[hidden] {
  display: none;
}

.review-modal-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid rgb(226 232 240);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}

.review-modal-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.review-modal-icon img {
  width: 24px;
  height: 24px;
  filter: invert(38%) sepia(75%) saturate(1015%) hue-rotate(352deg) brightness(87%) contrast(92%);
}

.review-modal-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.review-modal-panel .moderation-pill {
  width: max-content;
}

.review-modal-panel h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: 0;
}

.review-modal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.review-modal-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  gap: 10px;
  padding-top: 6px;
}

.review-modal-actions .primary-action,
.review-modal-actions .secondary-action {
  width: auto;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  text-decoration: none;
}

.review-modal-actions .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.import-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.import-progress[hidden] {
  display: none;
}

.import-progress-bar {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
}

.import-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.import-progress strong {
  min-width: 44px;
  text-align: right;
}

.upload-progress {
  grid-template-columns: minmax(0, 1fr) auto;
}

.upload-progress-meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-shell {
  display: grid;
  width: min(420px, 100%);
}

.login-panel {
  display: grid;
  gap: 16px;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  justify-content: center;
  margin-bottom: 2px;
}

.login-brand .brand-logo {
  width: 122px;
  height: 92px;
}

.login-panel .panel-heading {
  text-align: center;
}

.login-mode-toggle {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-mode-toggle:hover {
  background: #f3f4f6;
}

.suggest-password-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.suggest-password-button[hidden] {
  display: none;
}

.forgot-password-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.forgot-password-button[hidden] {
  display: none;
}

.forgot-password-button:hover {
  text-decoration: underline;
}

.upload-page {
  display: grid;
  gap: 14px;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 40px);
}

.upload-tabs {
  width: min(460px, 100%);
}

.upload-page-panel {
  padding: clamp(18px, 4vw, 28px);
}

.video-upload-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d9d9d9;
  background: #f4f4f4;
  border-radius: 8px;
}

.video-mode-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.video-mode-button.active {
  background: #19191d;
  color: #fff;
}

.video-source-form {
  display: none;
}

.video-source-form.active {
  display: grid;
}

.upload-drop {
  min-height: 112px;
}

.cover-drop {
  min-height: 78px;
}

.cover-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
}

.inline-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-weight: 800;
}

.inline-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.inline-option.disabled {
  color: var(--muted);
}

.live-output {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.live-output[hidden] {
  display: none;
}

.live-output input {
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.live-output .primary-action,
.live-output .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.audio-upload-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d9d9d9;
  background: #f4f4f4;
  border-radius: 8px;
}

.audio-mode-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.audio-mode-button.active {
  background: #19191d;
  color: #fff;
}

.cover-preview {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #18181b;
}

.library {
  overflow: hidden;
}

.library-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.library-heading span {
  color: var(--muted);
  font-size: 13px;
}

.video-list {
  display: grid;
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.album-list {
  display: grid;
  gap: 10px;
  padding: 10px;
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.empty-list {
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}

.empty-list p {
  margin: 0;
}

.video-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-align: left;
}

.video-card.active {
  background: #fafafa;
}

.video-card:hover {
  background: #fafafa;
}

.video-play {
  display: contents;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.thumb {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #18181b;
  color: #fff;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-play {
  position: absolute;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  font-size: 12px;
}

.video-card h3 {
  margin: 0 0 7px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 15px;
  line-height: 1.25;
}

.video-card .video-uploader {
  margin: 0 0 3px;
  color: #e11d48;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.video-card .user-link {
  cursor: pointer;
}

.video-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.video-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin-top: 6px;
}

.download-button,
.delete-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  min-height: 32px;
  background: #f3f4f6;
  color: #52525b;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.download-button:hover,
.delete-button:hover {
  background: #e8e9ec;
  color: var(--accent-dark);
}

.album-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.album-card.active,
.album-card:hover {
  background: #fafafa;
}

.album-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding-right: 32px;
}

.album-share {
  position: absolute;
  top: 15px;
  right: 34px;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: #f3f4f6;
  color: var(--muted);
  cursor: pointer;
}

.album-share:hover {
  background: #e5e7eb;
  color: var(--ink);
}

.album-share img,
.album-chevron img {
  display: block;
  width: 16px;
  height: 16px;
}

.album-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
  font-size: 24px;
}

.album-card h3 {
  margin: 2px 0 4px;
  font-size: 15px;
  line-height: 1.25;
}

.album-copy {
  min-width: 0;
}

.album-artist {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.album-uploader {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 4px;
  overflow: hidden;
  color: #e11d48;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.album-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.album-chevron {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  transition: transform 160ms ease;
}

.album-card.open .album-chevron {
  transform: rotate(180deg);
}

.track-list {
  display: none;
  gap: 2px;
}

.album-delete {
  display: none;
}

.album-card.open .track-list {
  display: grid;
}

.album-card.open .album-delete {
  display: inline-flex;
}

.album-card.open {
  padding-bottom: 12px;
}

.track-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3f3f46;
  text-align: left;
  cursor: pointer;
}

.track-button:hover,
.track-button.active {
  background: #f3f4f6;
  color: var(--accent-dark);
}

.track-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-delete {
  grid-column: auto;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 12px;
    padding-inline: 18px;
  }

  .brand-logo {
    width: 92px;
    height: 70px;
  }

  .member-actions,
  .guest-actions {
    gap: 8px;
  }

  .upload-toggle {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-inline: 18px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .app-shell.home-mode,
  .app-shell.guest-mode {
    grid-template-columns: 1fr;
    padding-inline: 18px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .app-shell.nav-collapsed,
  .app-shell.home-mode.nav-collapsed {
    grid-template-columns: 1fr;
    padding-inline: 18px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .sidebar-toggle {
    display: none;
  }

  .primary-nav {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 40;
    grid-template-columns: 1fr;
    min-height: 0;
    width: auto;
    max-height: min(48vh, 360px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 -18px 44px rgb(15 23 42 / 18%);
    transform: translateY(calc(100% + 96px));
    transition:
      box-shadow 180ms ease,
      transform 180ms ease;
  }

  .app-shell:not(.home-mode) .primary-nav {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-height: min(48vh, 360px);
    min-height: 0;
    padding: 14px;
  }

  .primary-nav-link {
    display: none;
    min-height: 44px;
    white-space: nowrap;
  }

  .app-shell.nav-collapsed .primary-nav,
  .app-shell.home-mode.nav-collapsed .primary-nav,
  .app-shell:not(.home-mode).nav-collapsed .primary-nav {
    width: auto;
    padding: 14px;
    box-shadow: none;
    transform: translateY(calc(100% + 96px));
  }

  .app-shell.mobile-subscriptions-open .primary-nav,
  .app-shell.mobile-subscriptions-open.nav-collapsed .primary-nav,
  .app-shell.home-mode.mobile-subscriptions-open.nav-collapsed .primary-nav,
  .app-shell:not(.home-mode).mobile-subscriptions-open.nav-collapsed .primary-nav {
    width: auto;
    padding: 14px;
    box-shadow: 0 -18px 44px rgb(15 23 42 / 18%);
    transform: translateY(0);
  }

  .app-shell.nav-collapsed .primary-nav-link,
  .app-shell:not(.home-mode).nav-collapsed .primary-nav-link {
    display: none;
  }

  .app-shell:not(.home-mode) .primary-nav-link {
    display: none;
  }

  .subscriptions-panel {
    margin-top: 0;
    padding: 0;
    border-top: 0;
  }

  .you-nav-panel {
    display: none;
  }

  .subscriptions-heading {
    padding: 0 4px 8px;
  }

  .subscriptions-heading h2 {
    font-size: 16px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-link {
    display: grid;
    place-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 52px;
    border: 0;
    border-radius: 0;
    padding: 0 2px;
    background: transparent;
    color: #18181b;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
  }

  .mobile-bottom-link.active {
    font-weight: 800;
  }

  .mobile-bottom-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: currentColor;
  }

  .mobile-bottom-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
  }

  .mobile-bottom-icon.account-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2f8f3a;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
  }

  .side-panel {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .video-list {
    max-height: none;
  }

  .album-list {
    max-height: none;
  }

  .home-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-studio-table {
    overflow-x: auto;
  }

  .dashboard-studio-row {
    min-width: 980px;
  }

  .home-category-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
  }

  .home-category-menu button {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    white-space: nowrap;
  }

  .audio-stage {
    grid-template-columns: 1fr;
  }

  .audio-side-playlist {
    min-height: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .audio-side-playlist .soundcloud-tracklist {
    max-height: 320px;
  }

  .video-title-row {
    grid-template-columns: 1fr;
  }

  .video-title-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .uploader-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inline-follow-button {
    margin-left: 60px;
  }

  .youtube-cookies-tools {
    flex-direction: column;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand actions"
      "search search";
    gap: 8px 10px;
    padding: 8px 12px 10px;
    align-items: center;
  }

  .topbar-left {
    grid-area: brand;
  }

  .brand-logo {
    width: 70px;
    height: 54px;
  }

  .site-search {
    grid-area: search;
    height: 38px;
  }

  .topbar-actions {
    grid-area: actions;
    min-width: 0;
    justify-self: end;
  }

  .member-actions,
  .guest-actions {
    min-width: 0;
    gap: 6px;
  }

  .account-button span {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell {
    padding: 12px 12px calc(92px + env(safe-area-inset-bottom));
  }

  .primary-nav,
  .app-shell:not(.home-mode) .primary-nav {
    top: auto;
    right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 10px;
  }

  .dashboard-page {
    padding: 12px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .avatar-settings-layout,
  .avatar-settings-control {
    grid-template-columns: 1fr;
  }

  .avatar-settings-control {
    gap: 16px;
  }

  .avatar-preview-frame {
    width: 100%;
    max-width: 360px;
  }

  .dashboard-studio-table {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .dashboard-studio-head {
    display: none;
  }

  .dashboard-studio-row {
    grid-template-columns: 1fr;
    min-width: 0;
    gap: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .studio-select-cell {
    display: none;
  }

  .studio-video-cell {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .studio-video-cell img,
  .studio-video-cell .dashboard-video-placeholder {
    width: 104px;
  }

  .studio-status-cell,
  .studio-date-cell,
  .studio-number-cell {
    justify-self: stretch;
  }

  .studio-number-cell::before {
    margin-right: 8px;
    color: var(--muted);
    font-weight: 800;
  }

  .dashboard-studio-row .studio-number-cell:nth-last-child(2)::before {
    content: "Προβολές:";
  }

  .dashboard-studio-row .studio-number-cell:last-child::before {
    content: "Σχόλια:";
  }

  .video-title-row {
    align-items: flex-start;
  }

  .favorite-button span {
    display: none;
  }

  .favorite-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .comment-form .primary-action {
    justify-self: end;
  }

  .upload-toggle,
  .logout-button,
  .account-button,
  .account-create-link,
  .login-link {
    padding: 0 10px;
    font-size: 13px;
  }

  .video-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .moderation-card {
    justify-items: stretch;
  }

  .moderation-content {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 12px;
  }

  .moderation-thumb,
  .moderation-thumb img,
  .moderation-thumb .dashboard-video-placeholder {
    width: 112px;
  }

  .moderation-card .moderation-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .home-feed-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .home-feed-heading > div {
    width: 100%;
  }

  .home-category-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    margin-top: 0;
  }

  .home-category-menu button {
    width: 100%;
    padding: 0 8px;
  }

  .home-feed-tools {
    width: 100%;
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .home-feed-tools label {
    width: 100%;
    justify-content: space-between;
  }

  .home-feed-tools select {
    flex: 1;
    min-width: 0;
  }

  .home-video-grid {
    grid-template-columns: 1fr !important;
  }

  .audio-player {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 420px;
  }

  .audio-side-heading {
    padding: 14px;
  }

  .album-art {
    width: 96px;
    font-size: 42px;
  }

  .waveform {
    height: 62px;
    gap: 2px;
  }

  .soundcloud-track {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .audio-controls-row {
    grid-template-columns: 1fr;
  }

  .review-modal-panel {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .review-modal-actions {
    grid-column: 1;
  }

  .review-modal-actions .primary-action,
  .review-modal-actions .secondary-action {
    flex: 1 1 100%;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "actions"
      "search";
  }

  .topbar-left,
  .topbar-actions {
    justify-self: center;
  }

  .member-actions,
  .guest-actions {
    justify-content: center;
    width: 100%;
  }

}
