﻿:root {
  --qplay-bg: #0f0710;
  --qplay-surface: #1c0f1a;
  --qplay-surface-2: #0f0710;
  --qplay-primary: #af4694;
  --qplay-brand-pink: #c44292;
  --qplay-brand-wine: #700f4b;
  --qplay-text: #ffffff;
  --qplay-light: #d6cacd;
  --qplay-muted: #9b8a95;
  --qplay-border: rgba(255, 255, 255, 0.08);
  --qplay-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --qplay-gradient: linear-gradient(135deg, #c44292 0%, #700f4b 100%);
  --bs-body-bg: var(--qplay-bg);
  --bs-body-color: #f5f5f7;
  --bs-heading-color: #ffffff;
  --bs-border-color: rgba(255, 255, 255, 0.08);
  --bs-secondary-color: var(--qplay-muted);
  color-scheme: dark;
}

html {
  min-height: 100%;
  font-size: 16px;
  background: var(--qplay-bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--qplay-bg) !important;
  color: #f5f5f7;
  font-family: Sora, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

a:hover {
  color: inherit;
}

/* ===== Container ===== */
.qplay-container,
.page-shell {
  width: min(1152px, calc(100% - 48px));
  margin: 0 auto;
}

/* ===== Header (antigo: sticky top-0 border-b border-white/5 bg-background/80 backdrop-blur) ===== */
.qplay-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(9, 4, 9, 0.86);
  backdrop-filter: blur(18px);
}

/* antigo: py-3 -> ~12px vertical, items-center gap-5 */
.qplay-nav {
  padding: 0;
}

.qplay-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 57px;
}

/* antigo: shrink-0 h-7 w-auto */
.qplay-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.qplay-brand img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* antigo: hidden sm:flex items-center gap-5 text-sm text-muted */
.qplay-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
}

.navbar-nav {
  align-items: center;
  flex-direction: row;
  flex-shrink: 0;
  gap: 14px;
}

.nav-link {
  color: var(--qplay-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff;
}

.navbar-toggler {
  border-color: var(--qplay-border);
  margin-left: auto;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Ações do usuário (sino + avatar) — sempre visíveis, mesmo no modo estreito */
.qplay-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* antigo: ml-auto max-w-xs rounded-lg border border-white/10 bg-surface px-3 py-1.5 text-sm */
.qplay-search {
  flex: 0 1 320px;
  max-width: 320px;
  margin-left: 14px;
  margin-right: auto;
}

.qplay-search input,
.form-control {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(20, 10, 19, 0.86);
  color: var(--qplay-text);
  padding: 6px 12px;
  font-size: 0.875rem;
  outline: 0;
}

.qplay-search input::placeholder,
.form-control::placeholder {
  color: rgba(214, 202, 205, 0.56);
}

.qplay-search input:focus,
.form-control:focus {
  border-color: var(--qplay-primary);
  background: rgba(20, 10, 19, 0.96);
  color: var(--qplay-text);
  box-shadow: none;
}

/* Lucide icons inside any element */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.qplay-login,
.qplay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  transition: opacity 150ms;
}

.qplay-login {
  height: 34px;
  padding: 0 12px;
  flex-shrink: 0;
}

.qplay-button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.qplay-login:hover,
.qplay-login:focus,
.qplay-button:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}

.qplay-notification-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--qplay-muted);
  text-decoration: none;
}

.qplay-notification-link:hover,
.qplay-notification-link:focus {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.qplay-notification-link span {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--qplay-primary);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.qplay-avatar-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 2px 9px 2px 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: transparent;
  color: var(--qplay-muted);
}

.qplay-avatar-button:hover,
.qplay-avatar-button:focus {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.qplay-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

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

/* ===== Main (antigo: mx-auto max-w-6xl space-y-8 px-6 pb-16 pt-6) ===== */
.page-shell {
  padding-top: 24px;
  padding-bottom: 64px;
}

.page-shell > main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.page-shell:has(.player-page-tight),
.page-shell:has(.player-page-wide) {
  padding-top: 4px;
}

.player-page-tight {
  width: min(860px, 100%);
}

/* Página de live: container largo (vídeo grande + chat à direita, estilo YouTube) */
.player-page-wide {
  width: min(1320px, 100%);
}

.qplay-player-shell {
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

/* Tela cheia: vídeo preenche o espaço e a barra de controles continua visível embaixo */
.qplay-player-shell.is-fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}
.qplay-player-shell.is-fullscreen .ratio {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
.qplay-player-shell.is-fullscreen .ratio::before {
  display: none;
}
.qplay-player-shell.is-fullscreen .qplay-video-frame {
  position: relative;
  width: 100%;
  height: 100%;
}
.qplay-player-shell.is-fullscreen .qplay-player-bar {
  flex: 0 0 auto;
}

.lesson-player-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.course-detail-page {
  width: min(860px, 100%);
}

.course-detail-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #080508;
  box-shadow: var(--qplay-shadow);
}

.course-detail-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

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

.attendance-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(196, 66, 146, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(196, 66, 146, 0.18), rgba(255, 255, 255, 0.035)),
    rgba(14, 7, 14, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.attendance-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: var(--qplay-gradient);
}

.attendance-icon svg {
  width: 19px;
  height: 19px;
}

.attendance-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.attendance-copy strong {
  color: #fff;
  font-size: 0.9rem;
}

.attendance-copy span {
  color: var(--qplay-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.attendance-action {
  margin: 0;
  flex: 0 0 auto;
}

.live-room-panel {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

/* Layout 2 colunas: vídeo à esquerda, painel de online + chat à direita */
.live-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: stretch;
}
.live-top-main { min-width: 0; }
.live-side { min-width: 0; }
.live-side .live-room-panel {
  margin-top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-side .live-chat-card {
  height: auto;
  flex: 1;
  min-height: 240px;
}

@media (max-width: 992px) {
  .live-top {
    grid-template-columns: 1fr;
  }
  .live-side .live-chat-card {
    height: min(420px, calc(100vh - 220px));
    flex: none;
  }
}

.live-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

.live-room-header a {
  color: var(--qplay-brand-pink);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.live-room-header a:hover,
.live-room-header a:focus {
  text-decoration: underline;
}

.live-room-viewers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
}

.live-chat-card {
  display: flex;
  height: 448px;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.live-chat-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 12px;
}

.live-chat-message {
  color: var(--qplay-muted);
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}

.live-chat-message strong {
  color: #fff;
  font-weight: 800;
}

.live-chat-empty,
.live-chat-error {
  margin: 0;
  color: var(--qplay-muted);
  font-size: 0.8125rem;
}

.live-chat-error {
  padding: 0 12px 8px;
  color: #ff8fa3;
}

.live-chat-form {
  display: flex;
  gap: 8px;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
}

.live-chat-form input {
  min-width: 0;
  min-height: 38px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 5, 8, 0.55);
  color: #fff;
  padding: 8px 10px;
  outline: none;
}

.live-chat-form input:focus {
  border-color: rgba(196, 66, 146, 0.72);
  box-shadow: 0 0 0 3px rgba(196, 66, 146, 0.12);
}

.live-chat-form button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--qplay-primary);
  color: var(--qplay-primary-foreground);
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 800;
}

.live-chat-form input:disabled,
.live-chat-form button:disabled {
  opacity: 0.6;
}

.qplay-player-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 38px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.9);
}

.qplay-player-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.qplay-player-action:hover,
.qplay-player-action:focus {
  background: rgba(255, 255, 255, 0.1);
}

.qplay-speed-menu {
  position: relative;
  z-index: 2;
}

.qplay-speed-label {
  min-width: 24px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.qplay-speed-options {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  min-width: 80px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #171717;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  padding: 4px 0;
}

.qplay-speed-options button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 6px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.qplay-speed-options button:hover,
.qplay-speed-options button:focus {
  background: rgba(255, 255, 255, 0.1);
}

.qplay-speed-options button[aria-checked="true"] {
  color: var(--qplay-primary);
}

/* ===== Hero Split (antigo: flex flex-col gap-3 md:flex-row) ===== */
/* antigo: hero-main md:flex-[2], hero-side md:flex-1 md:flex-col */
/* antigo: hero h-72 sm:h-80 = 288px/320px */
.hero-split {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.hero-main {
  position: relative;
  flex: 2;
  height: 320px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--qplay-surface);
}

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

/* antigo: absolute inset-0 bg-gradient-to-r from-background via-background/60 to-transparent */
.hero-main::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(9, 4, 9, 0.97) 0%, rgba(9, 4, 9, 0.68) 40%, transparent 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(9, 4, 9, 0.82) 34%, rgba(9, 4, 9, 0.36) 68%, transparent 100%);
}

/* antigo: absolute inset-0 flex max-w-xl flex-col justify-end gap-3 p-6 */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  max-width: 36rem;
  padding: 24px;
}

/* antigo: text-xs font-bold uppercase tracking-[0.18em] text-brand-pink */
.eyebrow {
  display: inline-block;
  color: var(--qplay-brand-pink);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(196, 66, 146, 0.16);
  color: #f2b4dc;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* antigo: text-3xl font-extrabold sm:text-4xl */
.hero-content h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
}

.hero-content p,
.muted {
  color: var(--qplay-muted);
}

/* antigo: line-clamp-2 text-sm text-muted */
.hero-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* antigo: flex gap-3 md:flex-1 md:flex-col */
.hero-side {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
}

/* antigo: group relative flex flex-1 flex-col justify-end gap-1 overflow-hidden rounded-2xl border border-white/10 bg-surface p-4 hover:border-brand-magenta/60 */
.live-mini {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--qplay-surface);
  padding: 16px;
  text-decoration: none;
  transition: border-color 150ms;
}

.live-mini:hover {
  border-color: rgba(175, 70, 148, 0.6);
}

.live-mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 150ms;
}

.live-mini:hover img {
  opacity: 0.75;
}

/* antigo: absolute inset-0 bg-gradient-to-t from-background via-background/70 to-transparent */
.live-mini::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(9, 4, 9, 0.82) 42%, rgba(9, 4, 9, 0.32) 76%, transparent 100%);
  pointer-events: none;
}

.live-mini .badge-soft,
.live-mini h3 {
  position: relative;
  z-index: 1;
}

/* antigo: font-semibold text-white */
.live-mini h3 {
  margin: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

/* ===== Section Title (antigo: mb-3 text-lg font-bold text-white) ===== */
.section-title {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

/* Convite de personalização na home (perfil sem onboarding) */
.personalize-prompt {
  display: block;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(175, 70, 148, 0.15);
  color: var(--qplay-primary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.personalize-prompt:hover {
  background: rgba(175, 70, 148, 0.22);
}

/* ===== Catalog Row (antigo: flex gap-3 overflow-x-auto pb-2 [scrollbar-width:none]) ===== */
.catalog-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.catalog-row::-webkit-scrollbar {
  display: none;
}

.row-scroller {
  position: relative;
}

.row-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: none;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(9, 4, 9, 0.86);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.row-arrow:hover {
  background: rgba(9, 4, 9, 1);
}

.row-arrow-prev {
  left: 4px;
}

.row-arrow-next {
  right: 4px;
}

.row-scroller.is-scrollable:hover .row-arrow:not([hidden]) {
  display: grid;
  opacity: 1;
}

/* ===== Media Grid ===== */
/* Cursos antigo: grid grid-cols-3 gap-4 sm:grid-cols-4 md:grid-cols-6 */
/* Lives antigo:  grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 */
/* Vídeos antigo: usa rows (coleções) em vez de grid plano */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.media-grid.landscape {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ===== Media Card ===== */
/* ANTIGO: O card é só a imagem com ring + texto solto abaixo (NÃO é container com fundo) */
/* group shrink-0 w-32 sm:w-36 (poster) ou w-48 sm:w-56 (landscape) */
.media-card {
  display: block;
  flex-shrink: 0;
  width: 144px;
  text-decoration: none;
  color: var(--qplay-text);
}

.media-card.landscape {
  width: 224px;
}

/* Em grid, o card se adapta à coluna */
.media-grid .media-card {
  width: auto;
}

.media-card:hover {
  color: var(--qplay-text);
}

.media-art {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.media-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
}

/* antigo: relative overflow-hidden rounded-xl bg-surface ring-1 ring-white/5 transition
   group-hover:ring-brand-magenta/60 group-hover:shadow-[0_8px_30px_-8px_rgba(175,70,148,.6)]
   aspect-[2/3] (poster) ou aspect-video (landscape) */
.media-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--qplay-surface);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: box-shadow 160ms ease, transform 300ms ease;
}

.media-card:hover .media-thumb {
  box-shadow: 0 0 0 1px rgba(175, 70, 148, 0.6), 0 8px 30px -8px rgba(175, 70, 148, 0.6);
  transform: scale(1.05);
}

/* Placeholder quando não há imagem real: gradiente + título (igual ao site antigo) */
.media-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  object-fit: unset;
  overflow: hidden;
}

.media-card.landscape .media-thumb,
.media-thumb.landscape {
  aspect-ratio: 16 / 9;
}

/* antigo: mt-1.5 truncate text-sm font-medium text-white */
.media-title,
.media-body {
  padding: 6px 0 0;
}

.media-title,
.media-body h3 {
  margin: 0 0 2px;
  overflow: hidden;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* antigo: truncate text-xs text-muted */
.media-subtitle,
.media-body p {
  margin: 0;
  overflow: hidden;
  color: var(--qplay-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ===== Page Hero (para /videos, /cursos, /lives) ===== */
/* antigo: <SectionTitle> direto como h2 sem hero grande */
.page-hero {
  padding: 0 0 8px;
}

.page-hero .eyebrow {
  margin-bottom: 4px;
}

.page-hero h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.page-hero p {
  max-width: 720px;
  margin: 4px 0 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

/* ===== Detail pages ===== */
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
}

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

.detail-panel,
.panel {
  border: 1px solid var(--qplay-border);
  border-radius: 14px;
  background: rgba(15, 7, 14, 0.9);
  padding: 20px;
}

.detail-panel h1 {
  margin: 12px 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
}

/* ===== Footer (antigo: mt-12 border-t border-white/10 px-6 py-8) ===== */
.qplay-footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--qplay-bg);
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

.qplay-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qplay-footer p {
  margin: 0;
}

.qplay-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qplay-socials a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--qplay-muted);
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease;
}

.qplay-socials a:hover,
.qplay-socials a:focus {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.qplay-socials svg,
.qplay-socials [data-lucide] {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Preview modal ===== */
.preview-open {
  overflow: hidden;
}

.preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(0, 0, 0, 0.85);
}

.preview-modal {
  display: flex;
  flex-direction: column;
  width: min(540px, 90vw, calc((90vh - 180px) * 16 / 9));
  max-height: 90vh;
  overflow: hidden;
  border-radius: 12px;
  background: #0f070e;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.preview-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  background: #000;
}

.preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196, 66, 146, 0.45), rgba(112, 15, 75, 0.4), #000);
}

.preview-media-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.78) 34%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.preview-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.preview-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.preview-content h2 {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
}

.preview-content p {
  margin: 14px 0 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.preview-actions {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

/* ===== Button variants ===== */
.qplay-button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 150ms, background 150ms;
  cursor: pointer;
}
.qplay-button-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.qplay-button-outline.active {
  border-color: rgba(112, 15, 75, 0.5);
  background: rgba(112, 15, 75, 0.18);
  color: var(--qplay-primary);
}

.star-btn {
  background: none;
  border: none;
  padding: 0 2px;
  font-size: 1.35rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.2);
  transition: color 150ms, transform 150ms;
  line-height: 1;
}
.star-btn.on { color: #facc15; }
button.star-btn:hover { transform: scale(1.15); color: #facc15; }

.qplay-button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: #c0392b;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 150ms;
  cursor: pointer;
}
.qplay-button-danger:hover {
  opacity: 0.85;
  color: #fff;
}

.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--qplay-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms;
}
.btn-text:hover { color: #fff; }
.btn-text.text-danger { color: #e74c3c; }
.btn-text.text-danger:hover { color: #ff6b6b; }

.btn-icon {
  background: none;
  border: none;
  padding: 2px 6px;
  color: var(--qplay-muted);
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 150ms, color 150ms;
}
.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ===== Page hero (section header with optional action button) ===== */
.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  flex-wrap: wrap;
}
.page-hero > div, .page-hero > h1 {
  flex: 1;
}
.page-hero h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.page-hero p {
  max-width: 720px;
  margin: 4px 0 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

/* ===== Alerts ===== */
.alert-success {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(39, 174, 96, 0.14);
  border: 1px solid rgba(39, 174, 96, 0.28);
  color: #6fcf97;
  font-size: 0.875rem;
}
.alert-error {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(235, 59, 90, 0.14);
  border: 1px solid rgba(235, 59, 90, 0.28);
  color: #ff7675;
  font-size: 0.875rem;
}
.alert-warning {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(243, 156, 18, 0.14);
  border: 1px solid rgba(243, 156, 18, 0.28);
  color: #f9ca24;
  font-size: 0.875rem;
}
.panel-danger {
  padding: 16px;
  border-radius: 10px;
  background: rgba(235, 59, 90, 0.1);
  border: 1px solid rgba(235, 59, 90, 0.24);
  color: #ff7675;
  font-size: 0.875rem;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--qplay-light);
}
.form-group textarea.form-control {
  height: auto;
}
.form-narrow {
  max-width: 440px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--qplay-border);
}
.field-group {
  margin-bottom: 16px;
}
.field-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--qplay-light);
}
.field-error {
  display: block;
  margin-top: 4px;
  color: #ff7675;
  font-size: 0.8125rem;
}
.required {
  color: #ff7675;
}
select.form-control {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b8a95' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.font-mono { font-family: ui-monospace, Consolas, monospace; }
.w-100 { width: 100%; }
.d-block { display: block; }
.text-center { text-align: center; }
.text-capitalize { text-transform: capitalize; }
.fw-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }

/* ===== Auth pages ===== */
.auth-body {
  background: radial-gradient(ellipse 120% 80% at 60% 110%, rgba(112,15,75,0.35) 0%, transparent 60%),
              var(--qplay-bg);
  min-height: 100vh;
}

.auth-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  width: min(480px, calc(100% - 48px));
  margin: 0 auto;
  gap: 28px;
  padding: 48px 0;
}

/* logo centralizada */
.auth-logo {
  display: flex;
  justify-content: center;
  text-decoration: none;
}
.auth-logo img {
  height: 56px;
  width: auto;
}

.auth-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.auth-subtitle {
  margin: -12px 0 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.auth-form-wrap {
  width: 100%;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--qplay-muted);
}

.auth-input {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #1c0f1a;
  padding: 0 14px;
  color: #fff;
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: var(--qplay-primary);
}
.auth-input::placeholder {
  color: rgba(155, 138, 149, 0.5);
}

.auth-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--qplay-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 150ms;
  letter-spacing: 0.01em;
}
.auth-submit:hover { opacity: 0.88; }
.auth-submit:disabled { opacity: 0.55; cursor: default; }

.auth-google {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms;
}
.auth-google:hover { background: rgba(255,255,255,0.05); }

.auth-alert-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(235, 59, 90, 0.12);
  border: 1px solid rgba(235, 59, 90, 0.28);
  color: #ff7675;
  font-size: 0.875rem;
}
.auth-alert-success {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(39, 174, 96, 0.12);
  border: 1px solid rgba(39, 174, 96, 0.28);
  color: #6fcf97;
  font-size: 0.875rem;
}

.auth-links {
  font-size: 0.875rem;
  color: var(--qplay-muted);
  line-height: 2;
}
.auth-links p { margin: 0; }
.auth-links a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-links a:hover { color: var(--qplay-brand-pink); }

.auth-divider {
  margin: 0;
  border: none;
  border-top: 1px solid var(--qplay-border);
}

/* ===== Bootstrap dropdown dark override ===== */
.dropdown-menu {
  background: rgba(20, 10, 19, 0.98);
  border: 1px solid var(--qplay-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 6px;
  min-width: 200px;
}
.qplay-user-menu .dropdown-menu {
  width: 192px;
  overflow: hidden;
  padding: 0;
}
.qplay-menu-profile {
  padding: 9px 12px;
  border-bottom: 1px solid var(--qplay-border);
}
.qplay-menu-profile strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  color: #fff;
  font-size: 0.875rem;
  padding: 8px 12px;
  transition: background 120ms;
}
.qplay-user-menu .dropdown-item {
  border-radius: 0;
  padding: 10px 12px;
}
.dropdown-item-primary {
  border-bottom: 1px solid var(--qplay-border);
  color: var(--qplay-primary);
  font-weight: 700;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.dropdown-divider {
  border-color: var(--qplay-border);
  margin: 4px 0;
}

/* ===== Progress bar ===== */
.progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--qplay-gradient);
  transition: width 400ms ease;
}

/* ===== Media card body (card with text below) ===== */
.media-card-body {
  padding: 8px 0 4px;
}
.media-card-body h3 {
  margin: 0 0 2px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.media-card-body p, .media-card-body small {
  margin: 0;
  font-size: 0.75rem;
  color: var(--qplay-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
}

/* ===== User pages ===== */
.user-page {
  width: min(1152px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.user-page-narrow {
  width: min(672px, calc(100% - 48px));
}

.user-page-profile {
  width: min(896px, calc(100% - 48px));
}

.section-title {
  margin-bottom: 18px;
}

.section-title h1 {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

.user-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.user-empty,
.notification-empty {
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--qplay-muted);
  font-size: 0.875rem;
  text-align: center;
}

.user-list-card {
  position: relative;
}

.user-list-section + .user-list-section {
  margin-top: 32px;
}

.user-section-empty {
  margin: 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

.user-list-card a {
  color: inherit;
  text-decoration: none;
}

.user-card-action {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.user-card-action button,
.history-remove button,
.notification-meta button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  line-height: 1;
}

.user-card-action button svg,
.history-remove button svg,
.notification-meta button svg {
  display: block;
  width: 16px;
  height: 16px;
}

.user-card-action button:hover,
.history-remove button:hover,
.notification-meta button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.history-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.history-list,
.notification-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  list-style: none;
}

.history-item,
.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.history-item + .history-item,
.notification-item + .notification-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-link {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.history-link:hover {
  color: inherit;
}

.history-thumb {
  display: block;
  width: 112px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--qplay-surface);
}

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

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

.history-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy small,
.notification-link small,
.notification-meta {
  color: var(--qplay-muted);
  font-size: 0.75rem;
}

.history-copy .progress-bar {
  width: min(180px, 100%);
  margin-top: 4px;
}

.notification-item {
  justify-content: space-between;
}

.notification-item.unread {
  background: rgba(255, 255, 255, 0.03);
}

.notification-link {
  min-width: 0;
  flex: 1;
}

.notification-link p {
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

.notification-link small {
  display: block;
  margin-top: 2px;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.user-panel + .user-panel {
  margin-top: 18px;
}

.user-panel h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.password-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.password-panel h2 { margin: 0; }
.password-panel p { margin: 4px 0 0; color: var(--qplay-muted); font-size: 0.875rem; }

/* Modal genérico (tema escuro QPlay) */
.qplay-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
}
.qplay-modal-backdrop[hidden] { display: none; }
.qplay-modal {
  width: min(440px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: var(--qplay-surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.qplay-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.qplay-modal-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #fff; }
.qplay-modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--qplay-muted);
  cursor: pointer;
}
.qplay-modal-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.qplay-modal-body { padding: 20px; }
.qplay-modal-body .field-group input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 10px 12px;
  outline: none;
}
.qplay-modal-body .field-group input:focus {
  border-color: rgba(196, 66, 146, 0.72);
  box-shadow: 0 0 0 3px rgba(196, 66, 146, 0.12);
}
.qplay-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.profile-form {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
}

.profile-avatar-preview {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--qplay-gradient);
  color: #fff;
}

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

.profile-fields {
  max-width: 520px;
}

.qplay-complete-profile {
  align-items: flex-start;
  border-bottom: 1px solid var(--qplay-border);
  color: #fff;
  font-weight: 700;
  white-space: normal;
}

.qplay-complete-profile svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--qplay-brand-pink);
}

.qplay-complete-profile span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.qplay-complete-profile strong {
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.15;
}

.qplay-complete-profile small {
  color: #f072c2;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.15;
}

.profile-rich-shell {
  display: grid;
  gap: 18px;
}

.profile-completion-card,
.profile-identity-card,
.profile-rich-form,
.profile-notifications {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-completion-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.profile-completion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-completion-head span {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.profile-completion-head strong {
  color: var(--qplay-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-completion-head .completion-ok {
  color: #80f0b2;
}

.profile-completion-card p {
  margin: 0;
  color: var(--qplay-muted);
  font-size: 0.8125rem;
}

.profile-completion-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-completion-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--qplay-gradient);
}

.profile-rich-form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.profile-identity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-avatar-preview.large {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  font-size: 2rem;
  font-weight: 800;
}

.profile-identity-card strong,
.profile-identity-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity-card strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.profile-identity-card span,
.profile-identity-card p,
.profile-required-note {
  color: var(--qplay-muted);
  font-size: 0.8125rem;
}

.profile-identity-card p,
.profile-required-note {
  margin: 4px 0 0;
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-fields-grid .full {
  grid-column: 1 / -1;
}

.profile-rich-form .field-group input,
.profile-rich-form .field-group select,
.profile-rich-form .field-group textarea,
.profile-rich-form .profile-interests-field input[type="text"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 10px 12px;
  outline: none;
}

.profile-rich-form .field-group textarea {
  min-height: 92px;
  resize: vertical;
}

.profile-rich-form .field-group input:focus,
.profile-rich-form .field-group select:focus,
.profile-rich-form .field-group textarea:focus,
.profile-rich-form .profile-interests-field input[type="text"]:focus {
  border-color: rgba(196, 66, 146, 0.72);
  box-shadow: 0 0 0 3px rgba(196, 66, 146, 0.12);
}

.profile-rich-form .field-group select option {
  background: #171017;
  color: #fff;
}

.profile-interests-field,
.profile-notifications {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-interests-field legend,
.profile-notifications legend {
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}

.profile-notifications {
  padding: 14px;
}

.profile-notifications label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--qplay-muted);
  font-size: 0.8125rem;
}

.profile-notifications input {
  accent-color: var(--qplay-brand-pink);
}

/* ===== Lesson player layout ===== */
.lesson-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 60px);
}
.lesson-nav {
  border-right: 1px solid var(--qplay-border);
  overflow-y: auto;
  background: rgba(12, 6, 12, 0.6);
  padding-bottom: 32px;
}
.lesson-nav-header {
  padding: 16px;
  border-bottom: 1px solid var(--qplay-border);
  position: sticky;
  top: 0;
  background: rgba(12, 6, 12, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.back-link {
  font-size: 0.8125rem;
  color: var(--qplay-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 150ms;
}
.back-link:hover { color: #fff; }
.lesson-module {
  padding: 12px 0;
}
.lesson-module-title {
  padding: 8px 16px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--qplay-muted);
}
.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lesson-item a {
  display: block;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--qplay-muted);
  text-decoration: none;
  transition: background 120ms, color 120ms;
  line-height: 1.4;
}
.lesson-item a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.lesson-item.active a {
  color: #fff;
  background: rgba(196, 66, 146, 0.15);
  border-left: 3px solid var(--qplay-brand-pink);
}
.lesson-main {
  padding: 24px;
  overflow-y: auto;
}
.player-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--qplay-shadow);
}
.player-wrapper .player-frame {
  border-radius: 0;
  box-shadow: none;
}
.player-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 10, 19, 0.8);
  border: 1px solid var(--qplay-border);
}
.lesson-info {
  margin-top: 20px;
}
.lesson-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.course-lesson-strip {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-module-flat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.lesson-list-flat {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.lesson-item-flat a {
  display: block;
  padding: 9px 16px;
  color: var(--qplay-muted);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.35;
}

.lesson-item-flat a:hover,
.lesson-item-flat.active a {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* ===== Admin tables ===== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--qplay-muted);
  border-bottom: 1px solid var(--qplay-border);
}
.admin-table td {
  padding: 12px;
  color: #f5f5f7;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(255,255,255,0.02);
}
.admin-table td a {
  color: var(--qplay-brand-pink);
  text-decoration: none;
}
.admin-table td a:hover { text-decoration: underline; }

.admin-form-card {
  max-width: 720px;
  padding: 28px;
  border: 1px solid var(--qplay-border);
  border-radius: 16px;
  background: rgba(15, 7, 14, 0.88);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  padding: 20px;
  border: 1px solid var(--qplay-border);
  border-radius: 14px;
  background: rgba(28, 15, 26, 0.7);
  text-align: center;
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--qplay-muted);
  font-weight: 500;
}

/* ===== Leaderboard ===== */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 640px;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 120ms;
}
.leaderboard-row:hover {
  background: rgba(255,255,255,0.04);
}
.leaderboard-me {
  background: rgba(196, 66, 146, 0.1);
  border-color: rgba(196, 66, 146, 0.25);
}
.leaderboard-rank {
  width: 28px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--qplay-muted);
  flex-shrink: 0;
}
.leaderboard-row:nth-child(1) .leaderboard-rank { color: #f1c40f; }
.leaderboard-row:nth-child(2) .leaderboard-rank { color: #bdc3c7; }
.leaderboard-row:nth-child(3) .leaderboard-rank { color: #cd6133; }
.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
}
.leaderboard-name {
  flex: 1;
  font-size: 0.9375rem;
  color: #fff;
  font-weight: 500;
}
.leaderboard-score {
  font-size: 0.875rem;
  color: var(--qplay-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* ===== Wrapped page ===== */
.wrapped-hero {
  text-align: center;
  padding: 40px 0 24px;
}
.wrapped-hero h1 {
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 800;
  background: var(--qplay-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wrapped-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.wrapped-card {
  padding: 24px 16px;
  border: 1px solid var(--qplay-border);
  border-radius: 16px;
  background: rgba(28, 15, 26, 0.7);
  text-align: center;
}
.wrapped-card.accent {
  border-color: rgba(196, 66, 146, 0.3);
  background: rgba(196, 66, 146, 0.08);
}
.wrapped-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 8px;
}
.wrapped-card.accent .wrapped-number {
  background: var(--qplay-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wrapped-label {
  font-size: 0.8125rem;
  color: var(--qplay-muted);
}

/* ===== Top list ===== */
.top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.top-list li {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  font-size: 0.875rem;
  color: #fff;
  border: 1px solid var(--qplay-border);
}

/* ===== Family page ===== */
.user-page-family {
  width: min(672px, calc(100% - 48px));
}

.family-invite-card {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.family-invite-card h2,
.family-section h2 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.family-invite-card p {
  margin: 6px 0 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

.family-invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-invite-row input {
  min-width: 220px;
  min-height: 42px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 10px 12px;
  outline: none;
}

.family-invite-row input:focus {
  border-color: rgba(196, 66, 146, 0.72);
  box-shadow: 0 0 0 3px rgba(196, 66, 146, 0.12);
}

.family-invite-row .qplay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
}

.family-invite-row .qplay-button svg {
  width: 16px;
  height: 16px;
}

.family-section {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.family-list-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  list-style: none;
}

.family-person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.family-person-row + .family-person-row,
.family-empty + .family-person-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.family-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}

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

.family-person-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.family-person-copy strong,
.family-person-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-person-copy strong {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.family-person-copy small,
.family-empty,
.family-waiting {
  color: var(--qplay-muted);
  font-size: 0.75rem;
}

.family-empty {
  padding: 12px;
}

.family-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.family-action-button.primary {
  border-color: transparent;
  background: var(--qplay-primary);
  color: var(--qplay-primary-foreground);
}

.family-action-button.muted {
  color: var(--qplay-muted);
}

.family-action-button:hover,
.family-action-button:focus {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.family-action-button.primary:hover,
.family-action-button.primary:focus {
  background: var(--qplay-primary-hover);
}

.family-action-button svg {
  width: 14px;
  height: 14px;
}

.family-waiting {
  margin-left: auto;
}

.family-person-row form {
  margin: 0;
}

.family-name {
  flex: 1;
  font-size: 0.9375rem;
  color: #fff;
}

/* ===== Profiles ===== */
.profiles-page {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.profiles-heading {
  text-align: center;
}

.profiles-heading h1 {
  margin: 4px 0 6px;
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
}

.profiles-heading p,
.profile-create-panel p {
  margin: 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.profile-tile {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.profile-select-form {
  margin: 0;
}

.profile-select-form button {
  display: flex;
  width: 100%;
  min-height: 206px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  padding: 16px;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.profile-select-form button:hover,
.profile-select-form button:focus,
.profile-tile.active .profile-select-form button {
  border-color: rgba(196, 66, 146, 0.7);
  background: rgba(196, 66, 146, 0.1);
}

.profile-select-form button:hover {
  transform: translateY(-2px);
}

.profile-avatar-large {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

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

.profile-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.profile-badge,
.profile-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--qplay-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.profile-active {
  background: rgba(196, 66, 146, 0.22);
  color: #fff;
}

.profile-editor {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.profile-editor summary {
  cursor: pointer;
  color: var(--qplay-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.profile-editor form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.profile-editor label,
.profile-create-form label {
  display: grid;
  gap: 5px;
  color: var(--qplay-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-editor-actions {
  display: flex;
  justify-content: flex-start;
}

.profile-create-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
  gap: 24px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(15, 7, 14, 0.9);
  padding: 20px;
}

.profile-create-panel h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.profile-create-form {
  display: grid;
  gap: 12px;
}

.profiles-screen {
  display: flex;
  width: min(768px, 100%);
  min-height: calc(100vh - 220px);
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0 24px;
}

.profiles-screen h1 {
  margin: 0 0 40px;
  color: #fff;
  text-align: center;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 700;
}

.profiles-error {
  margin: -20px 0 24px;
  border: 1px solid rgba(235, 59, 90, 0.3);
  border-radius: 8px;
  background: rgba(235, 59, 90, 0.1);
  color: #ffb3bd;
  padding: 8px 14px;
  font-size: 0.875rem;
}

.profiles-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.profile-card {
  display: flex;
  width: 112px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-pick-form {
  margin: 0;
  width: 100%;
}

.profile-pick {
  display: flex;
  width: 112px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-art,
.family-profile-art,
.profile-add-card span {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--qplay-gradient);
  color: #fff;
  font-weight: 800;
}

.profile-art {
  position: relative;
  width: 112px;
  height: 112px;
  font-size: 2.5rem;
  transition: box-shadow 150ms ease;
}

.profile-art img,
.family-profile-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-pick:hover .profile-art,
.profile-card.active .profile-art {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.72);
}

.profile-caption {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-kids {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-manage-overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.profiles-screen.is-managing .profile-manage-overlay {
  display: grid;
}

.profiles-screen.is-managing .profile-pick {
  cursor: default;
}

.profile-manage-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.profiles-screen.is-managing .profile-manage-actions {
  display: flex;
}

.profile-icon-button,
.profile-cancel-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  color: var(--qplay-muted);
  padding: 0;
}

.profile-icon-button:hover,
.profile-icon-button:focus,
.profile-cancel-button:hover,
.profile-cancel-button:focus {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.profile-icon-button.danger {
  border-color: rgba(235, 59, 90, 0.3);
  color: #ffb3bd;
}

.profile-icon-button.danger:hover,
.profile-icon-button.danger:focus {
  border-color: rgba(235, 59, 90, 0.65);
  color: #ffd1d7;
}

.profile-add-card {
  display: flex;
  width: 112px;
  border: 0;
  background: transparent;
  color: var(--qplay-muted);
  padding: 0;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profiles-screen.is-managing .profile-add-card,
.profiles-screen.is-managing .profiles-family {
  display: none;
}

.profile-add-card span {
  width: 112px;
  height: 112px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--qplay-muted);
}

.profile-add-card:hover,
.profile-add-card:focus {
  color: #fff;
}

.profile-add-card:hover span,
.profile-add-card:focus span {
  border-color: rgba(255, 255, 255, 0.4);
}

.profile-add-card strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-add-form,
.profile-inline-form {
  display: flex;
  width: 176px;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--qplay-surface);
  padding: 16px;
}

.profile-add-form[hidden],
.profile-inline-form[hidden] {
  display: none;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-save-button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--qplay-gradient);
  color: #fff;
  padding: 7px 10px;
  font-size: 0.875rem;
  font-weight: 700;
}

.profiles-family {
  width: min(576px, 100%);
  margin-top: 56px;
}

.profiles-family-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profiles-family-head h2 {
  margin: 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profiles-family-head a {
  color: var(--qplay-primary);
  font-size: 0.75rem;
  text-decoration: none;
}

.profiles-family-head a:hover {
  text-decoration: underline;
}

.profiles-family-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profiles-family-list li {
  display: flex;
  width: 80px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.family-profile-art {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

.profiles-family-list span:last-child {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profiles-family-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--qplay-muted);
  padding: 16px;
  text-decoration: none;
  font-size: 0.875rem;
}

.profiles-family-empty:hover,
.profiles-family-empty:focus {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.profiles-manage-button {
  margin-top: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: var(--qplay-muted);
  padding: 8px 24px;
  font-size: 0.875rem;
  font-weight: 600;
}

.profiles-manage-button:hover,
.profiles-manage-button:focus {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.field-error {
  color: #ff7675;
  font-size: 0.75rem;
}

.btn-text {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--qplay-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.btn-text:hover,
.btn-text:focus {
  color: #fff;
}

/* ===== Quadradinho ===== */
.quadradinho-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.quadradinho-panel {
  display: flex;
  width: min(352px, calc(100vw - 32px));
  height: min(448px, calc(100vh - 104px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(20, 10, 19, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

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

.quadradinho-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quadradinho-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.quadradinho-title strong {
  display: block;
  color: #fff;
  font-size: 0.875rem;
}

.quadradinho-title small {
  display: block;
  color: var(--qplay-muted);
  font-size: 0.65rem;
}

.quadradinho-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: var(--qplay-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.quadradinho-title .quadradinho-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.quadradinho-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--qplay-muted);
}

.quadradinho-close:hover,
.quadradinho-close:focus {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.quadradinho-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
}

.quadradinho-empty {
  margin: 0;
  color: var(--qplay-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.quadradinho-message {
  max-width: 86%;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.quadradinho-message.user {
  align-self: flex-end;
  background: var(--qplay-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.quadradinho-message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  color: #f5f5f7;
  border-bottom-left-radius: 4px;
}

.quadradinho-error {
  margin: 0;
  padding: 0 12px 6px;
  color: #ff7675;
  font-size: 0.75rem;
}

.quadradinho-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quadradinho-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(9, 4, 9, 0.92);
  color: #fff;
  padding: 8px 10px;
  font-size: 0.875rem;
  outline: 0;
}

.quadradinho-form input:focus {
  border-color: var(--qplay-primary);
}

.quadradinho-form button,
.quadradinho-fab {
  border: 0;
  background: var(--qplay-gradient);
  color: #fff;
  font-weight: 700;
}

.quadradinho-form button {
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.8125rem;
}

.quadradinho-form button:disabled {
  opacity: 0.55;
}

.quadradinho-fab {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

/* FAB icon swap (Q <-> X): SVG do Lucide é centralizado geometricamente,
   evitando o deslocamento do caractere "×". Só um ícone fica visível por vez,
   ocupando a célula centralizada do grid do avatar. */
.quadradinho-fab .quadradinho-avatar {
  position: relative;
}

.quadradinho-fab-icon {
  display: grid;
  place-items: center;
  line-height: 1;
}

.quadradinho-fab-icon--x {
  display: none;
}

.quadradinho-fab-icon--x [data-lucide],
.quadradinho-fab-icon--x svg {
  width: 24px;
  height: 24px;
}

.quadradinho-widget.is-open .quadradinho-fab-icon--q {
  display: none;
}

.quadradinho-widget.is-open .quadradinho-fab-icon--x {
  display: grid;
}

/* ===== Interest grid (onboarding / personalizar) ===== */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.interest-item {
  padding: 12px 14px;
  border: 2px solid var(--qplay-border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  text-align: center;
  font-size: 0.875rem;
  color: var(--qplay-light);
  transition: border-color 150ms, background 150ms;
}
.interest-item:hover { border-color: rgba(196, 66, 146, 0.5); }
.interest-item.selected {
  border-color: var(--qplay-brand-pink);
  background: rgba(196, 66, 146, 0.12);
  color: #fff;
}

/* Chips de áreas de interesse (/perfil) — estilo do site antigo */
.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.interest-chip {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-size: 0.8125rem;
  color: var(--qplay-muted);
  transition: background 150ms, color 150ms, border-color 150ms;
}
.interest-chip:hover { background: rgba(255, 255, 255, 0.05); }
.interest-chip:has(input:checked) {
  border-color: var(--qplay-primary);
  background: rgba(175, 70, 148, 0.2);
  color: #fff;
}

/* ===== Analytics bar chart ===== */
.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
}
.chart-label {
  width: 36px;
  color: var(--qplay-muted);
  text-align: right;
  flex-shrink: 0;
}
.chart-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--qplay-gradient);
  min-width: 4px;
  transition: width 400ms ease;
}
.chart-value {
  width: 28px;
  color: var(--qplay-muted);
  font-weight: 600;
}

/* ===== Integration cards ===== */
.integration-card {
  padding: 20px;
  border: 1px solid var(--qplay-border);
  border-radius: 14px;
  background: rgba(20,10,19,0.5);
}
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--qplay-light);
  cursor: pointer;
}
.toggle-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--qplay-primary);
  cursor: pointer;
}

/* ===== Moderation (live chat) ===== */
.moderation-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.chat-panel {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  max-height: 600px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--qplay-border);
  border-radius: 14px;
  background: rgba(12,6,12,0.6);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.chat-msg {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 100ms;
}
.chat-msg:hover {
  background: rgba(255,255,255,0.04);
}
.chat-muted {
  opacity: 0.4;
}
.chat-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--qplay-brand-pink);
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-content {
  flex: 1;
  font-size: 0.875rem;
  color: #f5f5f7;
  word-break: break-word;
}
.chat-time {
  font-size: 0.6875rem;
  color: var(--qplay-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-actions {
  display: none;
  gap: 4px;
  flex-shrink: 0;
}
.chat-msg:hover .chat-actions {
  display: flex;
}

/* ===== Utility spacing ===== */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.fw-bold { font-weight: 700; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .qplay-menu {
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
  }

  .navbar-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .qplay-search {
    width: 100%;
    max-width: 100%;
    margin: 8px 0 0;
  }

  /* antigo: flex-col gap-3 */
  .hero-split {
    flex-direction: column;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-main {
    height: 288px;
  }

  /* antigo: flex gap-3 (horizontal no tablet) */
  .hero-side {
    flex-direction: row;
  }
}

@media (max-height: 760px) and (min-width: 768px) {
  .player-page-tight {
    width: min(800px, 100%);
  }
}

@media (max-height: 680px) and (min-width: 768px) {
  .player-page-tight {
    width: min(740px, 100%);
  }
}

@media (max-width: 680px) {
  .qplay-container,
  .page-shell {
    width: min(100% - 24px, 1152px);
  }

  .qplay-footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .qplay-brand img {
    height: 24px;
  }

  .hero-main {
    height: 288px;
  }

  .hero-content {
    padding: 20px;
  }

  .hero-side {
    flex-direction: column;
  }

  /* antigo: w-32 (128px) e w-48 (192px) */
  .media-card {
    width: 128px;
  }

  .media-card.landscape {
    width: 192px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .media-grid.landscape {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .user-page,
  .user-page-narrow,
  .user-page-profile {
    width: min(100% - 24px, 1152px);
  }

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

  .profile-completion-head,
  .profile-identity-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .profile-fields-grid,
  .interest-grid {
    grid-template-columns: 1fr;
  }

  .family-person-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .family-actions {
    width: 100%;
    padding-left: 52px;
  }

  .family-waiting {
    margin-left: 52px;
  }

  .history-thumb {
    width: 96px;
  }

  .notification-item {
    align-items: flex-start;
  }

  .user-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-create-panel {
    grid-template-columns: 1fr;
  }

  .profiles-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .profile-select-form button {
    min-height: 184px;
  }

  .profile-avatar-large {
    width: 82px;
    height: 82px;
  }

  .quadradinho-widget {
    right: 12px;
    bottom: 12px;
  }

  .quadradinho-panel {
    width: calc(100vw - 24px);
    height: min(440px, calc(100vh - 92px));
  }

  .live-chat-card {
    height: min(420px, calc(100vh - 220px));
  }

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

