:root{
  --bg:#171717;
  --surface:#1f1f1f;
  --muted:#303030;
  --accent:#ffffff;
  --topbar:#060606;
  --topbar-height:56px;
}

html,body{
  height:100%;
  margin:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:linear-gradient(180deg, var(--bg) 0%, #0f0f0f 100%);
  color:var(--accent);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-y:auto; /* allow vertical scrolling */
}

/* Top header */
#topbar{
  height:var(--topbar-height);
  width:100%;
  background:linear-gradient(180deg, #040404 0%, var(--topbar) 100%);
  box-shadow:0 3px 12px rgba(0,0,0,0.7);
  display:flex;
  align-items:center;
  position:fixed; /* fixed to stay always visible */
  top:0; left:0; right:0;
  z-index:2000; /* ensure it sits above content */
  flex:0 0 var(--topbar-height);
  padding:0 16px;
}

/* Logo on the left of the header */
#logo{
  height:28px;
  width:auto;
  display:block;
  user-select:none;
  -webkit-user-drag:none;
  touch-action:manipulation;
  margin-right:12px;
  min-width:36px;
  min-height:36px;
}

/* brand text beside logo: minimalistic, YouTube-like wordmark */
.brand{
  display:flex;
  align-items:center;
  gap:8px;
  user-select:none;
  -webkit-user-drag:none;
}
.brand-title{
  font-family:Inter, "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-weight:700;
  font-size:18px;
  letter-spacing:0.2px;
  color:var(--accent); /* use white for stronger contrast */
  line-height:1;
  display:inline-block;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* User avatar button on the right */
.user-btn{
  margin-left:auto; /* push to far right */
  margin-right:12px; /* reduced to make room for random button */
  width:32px;
  height:32px;
  min-width:32px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.04);
  color:var(--accent);
  cursor:pointer;
  padding:0;
  transition:background .14s ease, transform .08s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45); /* added subtle elevation */
}
.user-btn:focus{
  outline:2px solid rgba(255,255,255,0.12);
  outline-offset:2px;
}
.user-btn:hover{
  background:rgba(255,255,255,0.06);
  transform:translateY(-1px);
}
.user-icon{
  display:block;
  color:var(--accent);
}

/* Ensure single-screen layout (no vertical scroll) */
#app{
  height:calc(100vh - var(--topbar-height));
  width:100vw;
  display:flex;
  align-items:flex-start; /* move conteúdo para cima */
  justify-content:flex-start;
  box-sizing:border-box;
  padding:8px 12px 12px; /* mais compacto e próximo do topo */
  margin-top:var(--topbar-height); /* prevent content from going under the fixed header */
  overflow-y:auto; /* enable vertical scroll within app */
  overflow-x:hidden; /* prevent horizontal scroll */
}

/* NEW: rows container and headers */
.rows{
  width:100%;
  /* height:100%; */ /* remove fixed height to allow content growth */
  height:auto;
  display:flex;
  flex-direction:column;
  gap:32px; /* aumentado: distância mais significativa entre seções */
  overflow:visible; /* allow rows to extend vertically */
}
.row{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:0;
}
.row-header{
  font-size:12px;
  font-weight:700;
  color:rgba(255,255,255,0.9);
  padding:0 2px;
  letter-spacing:.2px;
}

/* Row size variants to fit on one screen (mais compactos) */
.row.primary .carousel{
  height: clamp(100px, 22vh, 130px);
}
.row.compact .carousel{
  height: clamp(88px, 18vh, 115px);
}
.row.mini .carousel{
  height: clamp(74px, 15vh, 100px);
}

/* --- Carousel --- */
.carousel{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  overflow:hidden;
  position:relative;
}
/* gradient edge masks to darken extremes and subtly reveal arrows */
.carousel::before,
.carousel::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width:clamp(28px, 12vw, 72px);
  pointer-events:none;
  z-index:3; /* below arrows (arrows are z-index:5) */
}
.carousel::before{
  left:0;
  background:linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.0) 100%);
}
.carousel::after{
  right:0;
  background:linear-gradient(270deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.0) 100%);
}
.carousel-track{
  display:grid;
  grid-auto-flow: column;
  gap:14px; /* aumentado: mais espaço entre vídeos horizontalmente */
  width:100%;
  height:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type: x mandatory;
  padding:6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar{ display:none; }

.carousel-card{
  position:relative;
  width:42vw;
  max-width:220px;
  height:100%;
  display:block;
  background:#0a0a0a; /* thumb cobre 100% */
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  overflow:hidden;
  color:var(--accent);
  text-decoration:none;
  box-shadow:0 6px 18px rgba(0,0,0,0.5);
  scroll-snap-align:center;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.carousel-card:hover{ transform:translateY(-2px); box-shadow:0 10px 26px rgba(0,0,0,0.55); border-color:rgba(255,255,255,0.12); }

.carousel-thumb{
  width:100%;
  height:100%;          /* cobre 100% do container */
  object-fit:cover;
  display:block;
  background:#000;
}

/* Info overlay organizado no rodapé do card */
.carousel-info{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:6px 8px;
  background:linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.65) 40%, rgba(0,0,0,0.75) 100%);
  display:flex;
  flex-direction:column;
  gap:3px;
}

.carousel-title{
  font-size:11px;
  line-height:1.3;
  font-weight:700;
  color:#fff;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.carousel-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  font-size:9px;
  color:rgba(255,255,255,0.9);
  opacity:0.95;
}

/* tip button mantém posição */
.tip-btn{
  position:absolute;
  left:6px;
  bottom:10px;
  width:26px;
  height:26px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.06);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.tip-btn:hover{ background:rgba(255,255,255,0.1); transform:translateY(-1px); }

/* Remover botão de ação dos cards (apenas no modal para Parceiros) */
.video-action{
  display:none;
}

/* Modal action button (estilo aproveitado) */
.modal-action{
  align-self:flex-start;
  height:28px;
  font-size:12px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.08);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.modal-action:hover{ transform:translateY(-1px); background:rgba(255,255,255,0.12); }

/* Modal 85% x 85% */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition: opacity .18s ease;
  z-index: 1200;
}
.modal-overlay.show{ opacity:1; }

.modal{
  width:85vw;
  height:85vh;
  background:linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.6);
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:34px;
  height:34px;
  border-radius:50%;
  background:transparent; /* sem fundo */
  border:none;
  color:#fff;            /* branco total */
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease;
}
.modal-close:hover{ background:rgba(255,255,255,0.06); transform:translateY(-1px); }

.modal-frame{
  width:100%;
  height:62%;
  background:#000;
}
.modal-frame iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

.modal-info{
  flex:1;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch; /* ensure children stretch to full width for consistent alignment */
}
/* Make modal title and date fully white and tidy spacing */
.modal-title{
  font-size:15px; /* slightly increased for clarity */
  font-weight:800;
  color:#ffffff; /* enforced white */
  line-height:1.25;
  margin-bottom:4px;
}
.carousel-release{
  font-size:11px;
  color:#ffffff; /* release date white */
  margin-top:4px;
}

/* Modal recommendations: smaller, tighter cards */
.modal-recs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:4px;
  padding-top:6px;
  align-items:center;
}
.modal-rec-card{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:180px; /* smaller width */
  max-width:220px;
  background:transparent;
  border:1px solid rgba(255,255,255,0.04);
  border-radius:10px;
  padding:6px;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease;
}
.modal-rec-card img{
  width:84px;
  height:52px;
  object-fit:cover;
  border-radius:6px;
  flex:0 0 84px;
}
.modal-rec-card .rec-info{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  overflow:hidden;
}
.modal-rec-card .rec-info .rec-title{
  font-size:12px;
  font-weight:700;
  color:#ffffff; /* title white */
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.modal-rec-card .rec-info .rec-sub{
  font-size:11px;
  color:#ffffff; /* date/class white */
  opacity:0.9;
}

/* subtle hover for rec cards */
.modal-rec-card:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 26px rgba(0,0,0,0.5);
}
/* reduce modal-note prominence for layout */
.modal-note{
  font-size:12px;
  color:rgba(255,255,255,0.85);
  margin-bottom:4px;
}
/* ensure modal participants wrap nicely */
.modal-participants{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:2px;
}
.participant-chip{
  font-size:11px;
  line-height:18px;
  padding:0 8px;
  border-radius:10px;
  background:rgba(255,255,255,0.08);
  color:#fff;
  white-space:nowrap;
}
.modal-note{
  font-size:12px;
  color:rgba(255,255,255,0.8);
}

/* --- Partner Ad Banner --- */
.ad-row{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px; /* slightly tighter for compact look */
  min-height:0;
}
.ad-banner{
  width:90%;              /* a bit narrower for compact layout */
  margin:0 auto;
  height: clamp(100px, 19vh, 140px); /* compact and organized */
  border-radius:14px;
  overflow:hidden;
  position:relative;
  background:#0a0a0a;
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 10px 28px rgba(0,0,0,0.5);
  cursor:pointer;
}
.ad-thumb{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition: opacity .2s ease;
}
.ad-banner.playing .ad-thumb{
  opacity:0;
}
.ad-banner iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}
/* subtle top overlay for polish */
.ad-banner::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.0) 50%, rgba(0,0,0,0.22) 100%);
  pointer-events:none;
}
.ad-meta{
  display:flex;
  align-items:center;
  gap:8px;               /* tighter spacing */
  padding:0 4px;         /* more compact padding */
}
.ad-label{
  font-size:10px;        /* smaller for compactness */
  font-weight:700;
  color:rgba(255,255,255,0.75);
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:2px 8px;
}
.ad-title{
  font-size:11px;        /* slightly smaller */
  font-weight:700;
  color:#fff;
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ad-action{
  height:26px;
  padding:0 10px;
  border-radius:13px;
  border:1px solid rgba(139,92,246,0.5);
  background:linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  color:#fff;
  font-weight:800;
  font-size:11px;        /* compact */
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow:0 6px 18px rgba(109,40,217,0.35);
}
.ad-action:hover{ transform:translateY(-1px); filter:brightness(1.05); }

/* Promo strip above partner ad: small thumb + title + purple CTA */
.ad-promo{
  width:90%;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid rgba(255,255,255,0.04);
  box-shadow:0 6px 18px rgba(0,0,0,0.45);
}
.ad-promo-thumb{
  width:48px;
  height:48px;
  object-fit:cover;
  border-radius:8px;
  flex:0 0 48px;
  background:#000;
  border:1px solid rgba(255,255,255,0.06);
}
.ad-promo-title{
  font-size:13px;
  font-weight:700;
  color:#fff;
  flex:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ad-promo-cta{
  height:34px;
  padding:0 12px;
  border-radius:16px;
  border:none;
  background:linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  color:#fff;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(109,40,217,0.28);
  transition:transform .12s ease, filter .12s ease;
}
.ad-promo-cta:hover{ transform:translateY(-2px); filter:brightness(1.05); }

/* --- Existing search and suggestions styles remain --- */

/* Remove old grid (not used) but keep styles for chips etc. */
/* .video-grid, .video-card, .video-thumb, .video-info, .video-title, .video-meta { no longer used in carousel } */

/* ... existing code ... */

/* centered minimal search */
.search-wrap{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  height:32px; /* reduzida para uma barra mais compacta */
  width:min(360px, 40%); /* menor por padrão */
  max-width:calc(100% - 200px); /* garante espaço para logo e botão usuário */
  pointer-events:auto;
  box-sizing:border-box;
  padding-right:8px; /* space for clear button */
}
.search-input{
  width:100%;
  height:100%;
  border-radius:16px; /* ligeiramente menor para combinar com altura reduzida */
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.02);
  color:var(--accent);
  padding:0 12px; /* padding reduzido */
  font-size:13px; /* fonte ligeiramente menor */
  outline:none;
  box-shadow:0 1px 4px rgba(0,0,0,0.5) inset;
}
.search-input::placeholder{ color:rgba(255,255,255,0.45); }

/* Clear button styled like a Font Awesome 'times' icon */
.clear-btn{
  position:relative;
  margin-left:-34px; /* slight adjustment to sit neatly inside input */
  width:28px;
  height:28px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent; /* removed background - now fully transparent */
  backdrop-filter: none; /* remove frosted effect */
  -webkit-backdrop-filter: none;
  border: none; /* remove border to keep it clean */
  color:#ffffff; /* full white for icon */
  cursor:pointer;
  padding:0;
  transition:transform .12s cubic-bezier(.2,.9,.3,1), color .12s ease, background .12s ease, box-shadow .12s ease, opacity .12s ease;
  -webkit-tap-highlight-color: transparent;
  outline:none;
  flex:0 0 28px;
  box-shadow: none; /* remove inset shadow to match transparent look */
  will-change:transform, opacity;
}
.clear-btn svg { display:block; transform-origin:center; }
.clear-btn svg line { transition: stroke-dashoffset .28s ease, stroke .12s ease; stroke-dasharray: 18; stroke-dashoffset: 0; stroke: #ffffff; }

/* hover / focus interactions */
.clear-btn:hover{
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.95);
  transform:translateY(-2px) scale(1.02);
  box-shadow:0 6px 18px rgba(0,0,0,0.45);
}
.clear-btn:active{ transform:translateY(0) scale(0.995); }
.clear-btn:focus{
  box-shadow:0 0 0 4px rgba(255,255,255,0.06);
  border-radius:50%;
}

/* hidden uses opacity for smoother transitions instead of display:none */
.clear-btn.hidden{
  opacity:0;
  pointer-events:none;
  transform:translateY(0) scale(0.98);
}

/* visible state override for clarity */
.clear-btn:not(.hidden){
  opacity:1;
  pointer-events:auto;
}

/* accessibility: enlarge hit area on mobile without changing visual size */
@media (pointer:coarse){
  .clear-btn{ padding:6px; margin-left:-30px; }
}

/* new send button (compact, circular, minimal) */
.send-btn{
  margin-left:25px; /* atualizado: 25px de distância da barra de busca */
  width:30px;
  height:30px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.06);
  color:var(--accent);
  cursor:pointer;
  padding:0;
  transition:transform .12s ease, background .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
  flex:0 0 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35); /* slightly reduced elevation */
}
.send-btn svg { display:block; width:14px; height:14px; }
.send-btn:hover{ transform:translateY(-2px); background:rgba(255,255,255,0.06); }
.send-btn:active{ transform:translateY(0) scale(0.995); }
.send-btn:focus{ box-shadow:0 0 0 4px rgba(255,255,255,0.06); outline:none; }
/* suggestions dropdown */
.suggestions{
  position:fixed; /* ajustado dinamicamente via JS */
  z-index: 1000;
  background: linear-gradient(180deg, #101010 0%, #0b0b0b 100%);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  overflow: hidden;
  max-height: 60vh; /* cabe em uma tela sem rolagem global */
  backdrop-filter: saturate(120%) blur(4px);
  -webkit-backdrop-filter: saturate(120%) blur(4px);
}
.suggestions.hidden{
  display:none;
}
.suggestion-item{
  padding:12px 14px;
  font-size:14px;
  line-height:20px;
  color:rgba(255,255,255,0.92);
  cursor:pointer;
  display:flex;
  align-items:center;
  min-height:44px; /* touch-friendly */
  border-bottom:1px solid rgba(255,255,255,0.04);
}
.suggestion-item:last-child{
  border-bottom:none;
}
.suggestion-item:hover,
.suggestion-item.active{
  background: rgba(255,255,255,0.06);
  color:#fff;
}

/* highlight for matched query */
.suggestion-item mark{
  background:rgba(255,255,255,0.12);
  color:#fff;
  border-radius:4px;
  padding:0 2px;
}

/* "Pesquisar por..." action row */
.suggestion-action{
  padding:12px 14px;
  font-size:14px;
  line-height:20px;
  color:rgba(255,255,255,0.92);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:44px;
  background:rgba(255,255,255,0.03);
}
.suggestion-action:hover{ background:rgba(255,255,255,0.06); color:#fff; }

/* subtle meta text (e.g., Recentes) */
.suggestion-meta{
  font-size:12px;
  color:rgba(255,255,255,0.6);
  margin-left:auto;
}
/* empty state */
.suggestions-empty{
  padding:12px 14px;
  font-size:13px;
  color:rgba(255,255,255,0.6);
}

.carousel-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:36px; height:36px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.06);
  color:#fff; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  box-shadow:0 6px 18px rgba(0,0,0,0.45);
  z-index:5; -webkit-tap-highlight-color:transparent;
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease, opacity .18s ease;
}
.carousel-arrow.left{ left:8px; }
.carousel-arrow.right{ right:8px; }
.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow{
  opacity:1;
}
.carousel .carousel-arrow{
  opacity:0.92; /* slightly softer at rest, pops on hover/focus */
}

#search-panel{ width:100%; height:auto; display:flex; align-items:center; justify-content:center; padding:8px 0; }

/* Generic small circular icon button (used by Random) */
.icon-btn{
  width:32px;
  height:32px;
  min-width:32px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.04);
  color:var(--accent);
  cursor:pointer;
  padding:0;
  transition:background .14s ease, transform .08s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
  /* give the header Random button a bit more breathing room from the edge */
  margin-right:16px;
}
.icon-btn:hover{ background:rgba(255,255,255,0.06); transform:translateY(-1px); }
.icon-btn:focus{ outline:2px solid rgba(255,255,255,0.12); outline-offset:2px; }

/* Random Player Modal */
.random-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition: opacity .18s ease;
  z-index: 1300;
}
.random-overlay.show{ opacity:1; }
.random-modal{
  width:88vw;
  height:88vh;
  max-width:980px;
  background:linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.6);
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.random-topbar{
  position:absolute;
  /* increased top offset so the 'Próximo' button sits further from the modal top */
  top:22px; left:8px; right:8px;
  display:flex; gap:8px; justify-content:flex-end; align-items:center;
  z-index:2;
}
.random-btn{
  height:32px; min-width:32px; padding:0 10px;
  border-radius:16px; border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.08); color:#fff; font-weight:700; font-size:12px;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
  display:inline-flex; align-items:center; justify-content:center;
  transition:transform .12s ease, background .12s ease;
}
.random-btn:hover{ transform:translateY(-1px); background:rgba(255,255,255,0.12); }
.random-close{
  width:34px; height:34px; border-radius:50%; border:none; background:transparent; color:#fff; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.random-frame{ position:absolute; inset:0; }
.random-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

.ad-skip{
  position:absolute; top:14px; left:14px;
  height:28px; padding:0 10px; border-radius:14px;
  background:rgba(0,0,0,0.55); color:#fff; border:1px solid rgba(255,255,255,0.18);
  font-size:12px; font-weight:800; letter-spacing:.2px;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:not-allowed; user-select:none;
  z-index:3;
}
.ad-skip.enabled{
  background:rgba(255,255,255,0.12);
  cursor:pointer;
}
.random-label{
  position:absolute;
  bottom:60px; /* moved 50px lower inside the modal */
  left:14px;
  padding:6px 12px;
  border-radius:12px;
  background:rgba(255,255,255,0.08);
  color:#fff;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(255,255,255,0.12);
  z-index:2;
  box-shadow:0 8px 20px rgba(0,0,0,0.45);
}

/* Random Player: idle/motion transforms */
.random-topbar .random-btn,
.random-topbar .random-close,
.random-label{
  transition: transform .28s cubic-bezier(.2,.9,.3,1), opacity .18s ease;
  will-change: transform, opacity;
}

/* when idle over video (buttons move down) */
.random-topbar.idle .random-btn,
.random-topbar.idle .random-close{
  transform: translateY(50px);
}

/* label: when idle it moves down 50px (subtle) */
.random-label.idle{
  transform: translateY(50px);
}

/* label: when motion-triggered it moves up 50px and stays (motion state)
(random-label.motion){ transform: translateY(-50px); }
*/

.carousel-release{
  font-size:10px;
  color:rgba(255,255,255,0.85);
  margin-top:4px;
}

/* modal recommendations styling */
.modal-recs{
  display:flex;
  gap:10px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:4px;
}
.modal-rec-card img{ flex:0 0 auto; }
.modal-rec-card:hover{ transform:translateY(-2px); box-shadow:0 8px 28px rgba(0,0,0,0.5); }

/* User modal specific styles - premium, organized */
.user-modal .user-modal-grid{ display:grid; grid-template-columns: 1fr 1.2fr; gap:18px; padding:18px; height:100%; box-sizing:border-box; align-items:stretch; }
.user-modal-side{ background:linear-gradient(180deg, rgba(124,58,237,0.12), rgba(124,58,237,0.04)); border-radius:12px; padding:18px; display:flex; flex-direction:column; gap:10px; align-items:flex-start; justify-content:center; }
.user-modal-logo{ width:72px; height:auto; border-radius:8px; background:#000; padding:6px; box-shadow:0 8px 24px rgba(109,40,217,0.12); }
.user-modal-side h3{ margin:0; font-size:18px; color:#fff; font-weight:800; }
.user-modal-side .muted{ color:rgba(255,255,255,0.85); font-size:13px; margin:0; opacity:0.95; }
.user-modal-features{ margin:6px 0 0 12px; padding:0; list-style:disc; color:rgba(255,255,255,0.9); font-weight:700; font-size:13px; }
.user-modal-forms{ background:linear-gradient(180deg,#0b0b0b, #090909); border-radius:12px; padding:12px; display:flex; flex-direction:column; gap:10px; }
.user-forms-tabs{ display:flex; gap:8px; }
.user-forms-tabs .tab{ background:transparent; border:1px solid rgba(255,255,255,0.06); padding:8px 12px; border-radius:10px; font-weight:800; cursor:pointer; color:rgba(255,255,255,0.85); }
.user-forms-tabs .tab.active{ background:linear-gradient(180deg,#7c3aed,#6d28d9); border-color:rgba(255,255,255,0.12); color:#fff; box-shadow:0 8px 22px rgba(109,40,217,0.22); }
.forms-wrap{ display:block; }
.form{ display:flex; flex-direction:column; gap:8px; padding-top:8px; }
.form.hidden{ display:none; }
.form label{ display:flex; flex-direction:column; font-size:13px; color:rgba(255,255,255,0.9); gap:6px; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="date"]{ height:38px; padding:0 10px; border-radius:10px; border:1px solid rgba(255,255,255,0.06); background:rgba(255,255,255,0.02); color:#fff; font-size:13px; }
.form .terms{ font-size:12px; display:flex; gap:8px; align-items:center; }
.form .terms .link{ background:none; border:none; color:#dbeafe; text-decoration:underline; cursor:pointer; padding:0; font-weight:700; }
.form .form-actions{ display:flex; gap:8px; margin-top:6px; align-items:center; }
.form button.primary{ background:linear-gradient(180deg,#7c3aed,#6d28d9); border:none; color:#fff; padding:8px 12px; border-radius:12px; font-weight:900; cursor:pointer; }
.form button.secondary{ background:transparent; border:1px solid rgba(255,255,255,0.06); color:#fff; padding:8px 12px; border-radius:12px; cursor:pointer; }
.form .form-note{ font-size:12px; color:rgba(255,255,255,0.75); margin-top:6px; }
/* make modal slightly narrower for user modal layout */
.user-modal{ width:76vw; max-width:920px; height:auto; max-height:84vh; border-radius:14px; }
/* ensure overlay style consistent */
.user-modal-overlay.modal-overlay{ display:flex; align-items:center; justify-content:center; padding:12px; }
/* compact responsive adjustments */
@media (max-width:780px){
  .user-modal .user-modal-grid{ grid-template-columns: 1fr; }
  .user-modal-side{ order:2; }
  .user-modal-forms{ order:1; }
}