/* ============================================================
   VELORA — Live Streaming, Séries e Bottom Nav
   ============================================================ */

/* ─── Live player (espectador) ───────────────────────────────── */
.live-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #0a0a0f;
  flex-shrink: 0;
}

.live-player-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0530, #2d0a4e, #1a1030);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1.5rem;
  position: relative;
}

.live-player-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(168,85,247,.25) 0%, transparent 70%);
}

.live-creator-initial {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  border: 3px solid rgba(255,255,255,.2);
  position: relative;
  z-index: 1;
}

.live-player-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 90%;
}

.live-player-sub {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  position: relative;
  z-index: 1;
}

/* Badge AO VIVO */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: .2rem .6rem;
  border-radius: 6px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

.live-viewers-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: .35rem;
  z-index: 2;
}

.live-status-ended {
  color: rgba(255,255,255,.5);
  font-size: .9rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Scheduled countdown */
.live-countdown {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
}

/* ─── Live layout ─────────────────────────────────────────────── */
.live-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .live-layout { grid-template-columns: 1fr; }
}

.live-chat-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: 500px;
  overflow: hidden;
}

.live-chat-header {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text1);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.live-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  animation: fadeInUp .2s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.chat-msg-body { flex: 1; min-width: 0; }

.chat-msg-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .1rem;
}

.chat-msg-text {
  font-size: .82rem;
  color: var(--text1);
  word-break: break-word;
  line-height: 1.4;
}

.chat-msg.is-tip {
  background: rgba(234,179,8,.08);
  border: 1px solid rgba(234,179,8,.2);
  border-radius: 10px;
  padding: .5rem .65rem;
}
.chat-msg.is-tip .chat-msg-name { color: #ca8a04; }
.chat-msg.is-tip .chat-msg-text { color: #ca8a04; font-weight: 600; }

.chat-msg.is-system {
  justify-content: center;
}
.chat-msg.is-system .chat-msg-text {
  font-size: .74rem;
  color: var(--text3);
  font-style: italic;
}

.live-chat-input {
  padding: .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
}

.live-chat-input input {
  flex: 1;
  padding: .55rem .85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text1);
  font-size: .88rem;
}

.live-chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ─── Live creator controls ──────────────────────────────────── */
.live-controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.live-controls h4 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text2);
  margin: 0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stream-info-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem .85rem;
  margin-bottom: .6rem;
}

.stream-info-label {
  font-size: .75rem;
  color: var(--text3);
  font-weight: 600;
  min-width: 90px;
  flex-shrink: 0;
}

.stream-info-value {
  flex: 1;
  font-family: monospace;
  font-size: .8rem;
  color: var(--text1);
  word-break: break-all;
}

/* ─── Live cards (lista de lives) ────────────────────────────── */
.live-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s;
}

.live-card:hover { border-color: var(--primary); }

.live-card-thumb {
  height: 140px;
  background: linear-gradient(135deg, #1a0530, #2d0a4e);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-card-thumb .live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.live-card-thumb .scheduled-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(234,179,8,.9);
  color: #000;
  font-size: .7rem;
  font-weight: 800;
  padding: .2rem .6rem;
  border-radius: 6px;
}

.live-card-thumb .ended-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.6);
  color: rgba(255,255,255,.6);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 6px;
}

.live-card-body { padding: 1rem; }
.live-card-title { font-size: .95rem; font-weight: 700; color: var(--text1); margin-bottom: .35rem; }
.live-card-meta  { font-size: .78rem; color: var(--text3); display: flex; gap: .75rem; flex-wrap: wrap; }

.lives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ─── Séries ─────────────────────────────────────────────────── */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.series-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}

.series-card:hover { border-color: var(--primary); transform: translateY(-2px); }

.series-cover {
  height: 130px;
  background: linear-gradient(135deg, #1e0a3c, #3b0764);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 2.5rem;
}

.series-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.3);
}

.series-ep-count {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 5px;
}

.series-card-body { padding: 1rem; }
.series-card-title { font-size: .95rem; font-weight: 700; color: var(--text1); margin-bottom: .25rem; }
.series-card-meta  { font-size: .78rem; color: var(--text3); }

.series-badge {
  display: inline-flex;
  padding: .15rem .5rem;
  border-radius: 5px;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(168,85,247,.15);
  color: var(--primary);
  margin-top: .35rem;
}

/* Episodes accordion */
.episodes-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 1.25rem;
  overflow: hidden;
}

.episode-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.episode-row:last-child { border-bottom: none; }
.episode-row:hover { background: var(--card); }

.ep-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  color: var(--text2);
  flex-shrink: 0;
}

.ep-info { flex: 1; min-width: 0; }
.ep-title { font-size: .88rem; font-weight: 600; color: var(--text1); }
.ep-meta  { font-size: .75rem; color: var(--text3); margin-top: .1rem; }

.ep-lock {
  font-size: 1rem;
  color: var(--text3);
  flex-shrink: 0;
}

/* ─── Bottom Navigation (mobile PWA) ─────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 0 .5rem;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .35rem .5rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text3);
  font-size: .62rem;
  font-weight: 600;
  min-width: 50px;
  transition: color .2s;
  position: relative;
}

.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:hover  { color: var(--primary); }

.bottom-nav-item svg { width: 22px; height: 22px; }

.bottom-nav-dot {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid var(--card);
}

@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  .dash-body { padding-bottom: 60px; }
  .live-layout { grid-template-columns: 1fr; }
}
