/* =========================================================
   PIJAMA PARTY — CSS
   Mobile-first, acessível e organizado por componentes.
========================================================= */

:root {
  --bg: #0f0f12;
  --surface: #18181f;
  --surface-2: #22222c;
  --border: #2d2d38;
  --primary: #ff2a5f;
  --primary-2: #ff2a8d;
  --gold: #ffb800;
  --gold-text: #ffb800;
  --text: #fff;
  --text-soft: #d8d8e0;
  --muted: #9696a6;
  --success: #00d084;
  --danger: #ff4d5e;
  --danger-text: #ff6977;
  --input-bg: #121217;
  --bar-bg: rgba(15,15,18,.92);
  --nav-bg: rgba(24,24,31,.96);
  --surface-glass: rgba(24,24,31,.94);
  --overlay-soft: rgba(255,255,255,.05);
  --scrim: rgba(0,0,0,.8);
  --auth-glow: #321225;
  --wallet-bg: linear-gradient(135deg, rgba(45,27,0,.6), rgba(26,26,36,.8));
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --nav-height: 68px;
  --radius: 16px;
  --max-width: 1100px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #eceef4;
  --border: #dcdfe8;
  --text: #15151c;
  --text-soft: #3b3c4b;
  --muted: #6a6b7c;
  --gold-text: #a86f00;
  --danger-text: #d3263a;
  --input-bg: #f4f5f9;
  --bar-bg: rgba(243,244,248,.92);
  --nav-bg: rgba(255,255,255,.96);
  --surface-glass: rgba(255,255,255,.94);
  --overlay-soft: rgba(20,20,40,.05);
  --scrim: rgba(15,15,25,.55);
  --auth-glow: #ffd9e6;
  --wallet-bg: linear-gradient(135deg, rgba(255,243,214,.9), rgba(255,255,255,.95));
  --shadow: 0 20px 60px rgba(30,30,60,.14);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body { overflow-x: hidden; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.hidden { display: none !important; }

.btn {
  border: 0;
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px dashed var(--border); }
.btn.danger { background: rgba(255,77,94,.12); color: var(--danger-text); border: 1px solid rgba(255,77,94,.25); }
.btn.full { width: calc(100% - 40px); margin: 20px; }
.btn.compact { min-height: 36px; padding: 6px 12px; font-size: 0.8rem; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid; place-items: center;
  position: relative;
}
.text-btn { background: none; border: 0; color: var(--primary); font-weight: 700; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, var(--auth-glow) 0%, var(--bg) 58%);
}
.auth-card {
  width: min(100%, 440px);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.brand { text-align: center; margin-bottom: 24px; }
.brand h1 { margin: 0; font-size: 1.8rem; letter-spacing: -.04em; }
.brand h1 span, .logo span { color: var(--primary); }
.brand h1 i { color: var(--primary); font-size: 1rem; }
.brand p { color: var(--muted); margin: 8px 0 0; font-size: .9rem; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.auth-tab {
  background: transparent; border: 0; color: var(--muted);
  padding: 12px; border-bottom: 2px solid var(--border); font-weight: 700;
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--primary); }

.auth-form { display: grid; gap: 14px; }
.auth-form label, .modal-card label {
  display: grid; gap: 7px; color: var(--muted); font-size: .85rem;
}
input, select {
  width: 100%; min-height: 46px; border-radius: 11px;
  border: 1px solid var(--border); outline: 0;
  background: var(--input-bg); color: var(--text); padding: 11px 13px;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,42,95,.12); }
.check-row { display: flex !important; align-items: center; gap: 9px; }
.check-row input { width: 18px; min-height: 18px; }

.app-screen { min-height: 100vh; }
.app-shell {
  width: min(100%, var(--max-width));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

.page { display: none; min-height: 100vh; padding-bottom: calc(var(--nav-height) + 24px); }
.page.active { display: block; }

.topbar, .page-header {
  min-height: 68px; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
  background: var(--bar-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 25;
}
.logo { font-weight: 900; font-size: 1.2rem; letter-spacing: -.04em; }
.page-header h2 { margin: 0; font-size: 1.25rem; }
.eyebrow { color: var(--primary); font-size: .68rem; font-weight: 900; letter-spacing: .13em; }

/* PONTO DE NOTIFICAÇÃO E ATIVIDADES */
.notification-dot {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px;
  background: var(--primary); border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* STORIES & CÍRCULO DE LIVE */
.stories {
  display: flex; gap: 14px; overflow-x: auto;
  padding: 14px 20px 10px; scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.story-item { flex: 0 0 72px; text-align: center; background: none; border: 0; color: inherit; padding: 0; position: relative; }

.avatar-live-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  padding: 3px;
  background: transparent;
  transition: transform 0.2s ease;
}

.avatar-live-wrapper.is-live {
  background: linear-gradient(45deg, #ff007f, #ffaa00, #ff007f);
  background-size: 200% 200%;
  animation: liveRingPulse 2s linear infinite;
  cursor: pointer;
}

.avatar-live-wrapper.is-live::after {
  content: 'LIVE';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--bg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

@keyframes liveRingPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.story-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); overflow: hidden;
  margin: 0 auto; color: var(--text); font-weight: bold;
}
.story-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-name { display: block; color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.story-time-tag { display: block; color: var(--primary); font-size: 0.6rem; font-weight: 700; margin-top: 1px; }

/* FEED DE FOTOS & EDIÇÃO DO POST */
.create-post-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 20px 16px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
}

.create-post-bar input {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  pointer-events: none;
  font-size: 0.88rem;
}

.photo-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 20px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

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

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.post-author-info {
  display: flex;
  flex-direction: column;
}

.post-author-info strong {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
}

.post-author-info small {
  color: var(--muted);
  font-size: 0.75rem;
}

.post-owner-options {
  display: flex;
  gap: 6px;
}

.post-image-container {
  width: 100%;
  max-height: 520px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-image-container img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 8px;
}

.post-action-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.35rem;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.post-action-btn:active { transform: scale(1.2); }
.post-action-btn.liked { color: var(--primary); }

.post-likes {
  padding: 0 16px 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.post-caption {
  padding: 0 16px 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-soft);
}

.post-caption strong {
  color: var(--text);
  margin-right: 6px;
}

.post-comments-section {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  background: var(--overlay-soft);
}

.post-comments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.post-comment-item {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.post-comment-item strong {
  color: var(--text);
}

.post-comment-form {
  display: flex;
  gap: 8px;
}

.post-comment-form input {
  min-height: 36px;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
}

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 16px 20px 10px; }
.section-heading h2 { margin: 4px 0 0; font-size: 1.15rem; }

/* EM ALTA — TIKTOK STYLE FEED DE LIVES */
.tiktok-feed {
  height: calc(100vh - var(--nav-height) - 68px);
  height: calc(100dvh - var(--nav-height) - 68px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  padding: 0 10px;
}

.tiktok-feed::-webkit-scrollbar { display: none; }

.tiktok-card {
  height: calc(100vh - var(--nav-height) - 90px);
  height: calc(100dvh - var(--nav-height) - 90px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 15px;
  background: radial-gradient(circle at center, #2a1122 0%, #050507 80%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
}

.tiktok-bg-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.15);
  font-size: 5rem;
  z-index: 1;
}

.tiktok-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.tiktok-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tiktok-live-tag {
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tiktok-viewers {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tiktok-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
}

.tiktok-info { flex: 1; }

.tiktok-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tiktok-title {
  font-size: 1.1rem;
  margin: 0 0 6px 0;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.tiktok-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.tiktok-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px;
  display: grid; place-items: center; background: linear-gradient(135deg,var(--primary),var(--primary-2));
  font-weight: 900; color: #fff; overflow: hidden;
}
.avatar.small { width: 36px; height: 36px; flex: 0 0 36px; font-size: 0.8rem; }
.avatar { position: relative; aspect-ratio: 1 / 1; }
.avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; border-radius: 50%; display: block;
}

/* AVATAR DO PERFIL */
#profileAvatar,
#otherAvatar {
  width: 110px !important;
  height: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  min-height: 110px !important;
  max-height: 110px !important;
  align-self: center !important;
  border-radius: 50% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 3px solid #ff007f !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  background-color: transparent !important;
}

.profile-main .avatar-live-wrapper {
  box-sizing: border-box;
  margin: -55px auto 10px auto !important;
  display: block;
  width: 116px;
  height: 116px;
}

/* SELOS DE VERIFICADO E DESENVOLVEDOR */
.profile-main h2 {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 90%; 
  flex-wrap: nowrap;
}

.name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.badges-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}

.badge-verified { color: #00d2ff; font-size: 0.88em; }
.badge-developer { color: #ffb800; font-size: 0.88em; }

.grow { flex: 1; min-width: 0; }
.result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.search-box { margin: 8px 20px 18px; position: relative; }
.search-box i { position: absolute; left: 14px; top: 15px; color: var(--muted); }
.search-box input { padding-left: 40px; }

.profile-cover {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #ff007f 0%, #7928ca 100%);
  background-size: cover;
  background-position: center;
}

.profile-main { text-align: center; padding: 0 20px; margin-top: -44px; position: relative; z-index: 1; }
.profile-main .avatar { margin: 0 auto 10px; }
.profile-main > p { margin: 5px 0; color: var(--muted); }
.profile-main .bio { max-width: 520px; margin: 10px auto; color: var(--text-soft); line-height: 1.45; }
.profile-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.icon-square { width: 46px; padding: 0; }
.stats {
  margin: 20px; padding: 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; display: grid; grid-template-columns: repeat(3,1fr); text-align: center;
}
.stats strong { display: block; font-size: 1.1rem; }
.stats span { color: var(--muted); font-size: .72rem; }

/* CARTEIRA / WALLET & PIX */
.wallet-card {
  margin: 0 20px 20px;
  padding: 15px;
  background: var(--wallet-bg);
  border: 1px solid rgba(255, 184, 0, 0.4);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wallet-card .balance {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wallet-card .balance i {
  font-size: 1.8rem;
  color: var(--gold);
}
.wallet-card .balance span {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold-text);
}
.wallet-card .balance small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 2px;
}

/* TABELA PIX E NOTIFICAÇÕES DE COMPRA */
.pix-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.pix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.pix-table th, .pix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.pix-table th {
  background: var(--overlay-soft);
  color: var(--muted);
  font-weight: 700;
}

.pix-table tr:last-child td {
  border-bottom: none;
}

.pix-table tr.selected {
  background: rgba(255, 42, 95, 0.15);
}

.pix-info-box {
  background: rgba(255, 184, 0, 0.08);
  border: 1px dashed var(--gold);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  margin: 12px 0;
}

.pix-info-box strong {
  color: var(--gold-text);
  font-size: 0.95rem;
  user-select: all;
  display: block;
  margin-top: 4px;
}

.admin-notification-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-notification-card.pending-pix {
  border-color: var(--gold);
  background: rgba(255, 184, 0, 0.05);
}

.admin-notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-notification-body {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.admin-notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.badge-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-status.pending { background: rgba(255, 184, 0, 0.2); color: var(--gold-text); }
.badge-status.approved { background: rgba(0, 208, 132, 0.2); color: var(--success); }
.badge-status.rejected { background: rgba(255, 77, 94, 0.2); color: var(--danger); }

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px 0;
}
.gift-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}
.gift-item:hover, .gift-item.active {
  border-color: var(--primary);
  background: rgba(255, 42, 95, 0.1);
}
.gift-item i {
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: block;
  font-style: normal;
}
.gift-item span {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--gold-text);
}
.live-animation-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}
.gift-anim {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4rem;
  animation: flyUp 3s ease-in-out forwards;
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
  text-align: center;
}
@keyframes flyUp {
  0% { bottom: 10%; opacity: 1; transform: translateX(-50%) scale(0.5); }
  50% { transform: translateX(-50%) scale(1.2); }
  100% { bottom: 90%; opacity: 0; transform: translateX(-50%) scale(1); }
}

.profile-tabs { display: flex; border-bottom: 1px solid var(--border); }
.profile-tabs button {
  flex: 1; background: none; border: 0; color: var(--muted); padding: 12px; font-weight: 700; cursor: pointer;
}
.profile-tabs button.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.profile-content { padding: 16px 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state i { font-size: 2rem; margin-bottom: 10px; display: block; }

/* CHAT LIST & BALÕES DE MENSAGENS */
.chat-list { display: flex; flex-direction: column; }
.chat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.chat-header {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 42px 1fr 42px; gap: 10px;
  align-items: center; padding: 12px 16px;
  background: var(--bar-bg); border-bottom: 1px solid var(--border);
}
.chat-header small { display: block; color: var(--success); font-size: .7rem; }
.messages { padding: 20px; padding-bottom: 80px; min-height: calc(100vh - 150px); overflow-y: auto; }
.message {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  margin: 8px 0;
  font-size: .9rem;
  word-break: break-word;
  cursor: pointer;
  transition: transform 0.1s ease;
  position: relative;
}
.message:active { transform: scale(0.98); }
.message.mine { margin-left: auto; background: var(--primary); color: #fff; }
.message.system-msg { margin: 10px auto; background: var(--overlay-soft); text-align: center; font-size: 0.8rem; color: var(--muted); }
.message.deleted { opacity: 0.7; }
.message .deleted-msg { font-style: italic; color: rgba(255,255,255,0.7); }
.message .edited-tag { font-size: 0.65rem; opacity: 0.75; margin-left: 4px; }
.message small { display: block; opacity: .65; font-size: .62rem; margin-top: 4px; text-align: right; }

.message-form {
  position: fixed; bottom: 0; width: min(100%, var(--max-width));
  display: flex; gap: 8px; padding: 10px 16px;
  background: var(--bar-bg); border-top: 1px solid var(--border); 
  z-index: 101;
}
.message-form input { flex: 1; }
.send-btn { width: 46px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; }

.settings-list { padding: 0 20px; }
.settings-list button {
  width: 100%; display: grid; grid-template-columns: 24px 1fr 20px; gap: 10px;
  align-items: center; padding: 16px 0; background: none; border: 0;
  color: var(--text); border-bottom: 1px solid var(--border); text-align: left;
}
.settings-list button i:first-child { color: var(--primary); }

.navbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, var(--max-width)); height: var(--nav-height);
  background: var(--nav-bg); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5,1fr); align-items: center;
  z-index: 100; backdrop-filter: blur(14px);
}
.nav-item {
  height: 100%; border: 0; background: none; color: var(--muted);
  display: grid; place-items: center; align-content: center; gap: 4px;
  font-size: .68rem;
  position: relative;
}
.nav-item i { font-size: 1.15rem; }
.nav-item.active { color: var(--primary); }
.fab {
  width: 50px; height: 50px; border: 0; border-radius: 50%;
  justify-self: center; transform: translateY(-11px);
  background: linear-gradient(135deg,var(--primary),var(--primary-2));
  color: #fff; font-size: 1.25rem; box-shadow: 0 7px 25px rgba(255,42,95,.35);
  display: grid; place-items: center;
}

.modal {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  padding: 20px; background: var(--scrim); backdrop-filter: blur(5px);
}
.modal.active { display: flex; }
.modal-card {
  width: min(100%, 440px); background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 22px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-header h2 { margin: 0; font-size: 1.1rem; }
.modal-card form { display: grid; gap: 14px; }

.post-preview-area {
  width: 100%;
  height: 200px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.post-preview-area:hover {
  border-color: var(--primary);
  background-color: rgba(255, 42, 95, 0.05);
}

.post-preview-area i {
  font-size: 2.2rem;
  color: var(--primary);
}

.post-preview-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-caption-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.post-caption-box label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.post-caption-box textarea {
  width: 100%;
  min-height: 90px;
  background-color: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-caption-box textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 42, 95, 0.15);
}

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  text-align: left; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); border-radius: 12px; padding: 13px; display: grid; gap: 5px;
  cursor: pointer;
}
.choice i { color: var(--primary); }
.choice small { color: var(--muted); }
.choice.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,42,95,.1); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* LIVE STAGE & CÂMERA DO APRESENTADOR */
.page.live-room {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding-bottom: 0 !important;
  display: none;
  flex-direction: column;
}

.page.live-room.active { display: flex !important; }

.live-stage {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  background: #050507;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.live-preview {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #33152a 0%, #050507 85%);
}

.live-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #aaa;
  text-align: center;
  z-index: 1;
}
.camera-placeholder i { font-size: 3.8rem; color: var(--primary); animation: pulse 2s infinite; }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

.floating-back {
  position: absolute; z-index: 10; top: calc(16px + env(safe-area-inset-top, 0px)); left: 16px;
  width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.6); backdrop-filter: blur(8px); color: #fff;
  border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem;
}

.live-top-info {
  position: absolute; z-index: 10; left: 70px; right: 16px; top: calc(16px + env(safe-area-inset-top, 0px));
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
  padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
}

.live-indicator {
  background: var(--primary); padding: 3px 8px; border-radius: 6px;
  font-size: .68rem; font-weight: 900; letter-spacing: 0.5px;
}

.live-overlay-container {
  position: absolute;
  bottom: var(--kb, 0px);
  padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-info-panel { padding: 0; }
.live-info-panel h2 { margin: 0 0 4px; font-size: 1.15rem; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.live-info-panel p { color: var(--text-soft); margin: 2px 0; font-size: 0.82rem; }
.host-pill {
  border: 1px solid var(--border); background: rgba(24,24,31,0.8);
  color: #fff; border-radius: 20px; padding: 4px 12px; font-size: 0.8rem; font-weight: 700;
}

.live-chat {
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: none;
}
.live-chat::-webkit-scrollbar { display: none; }

.live-chat .message {
  background: rgba(24, 24, 31, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  margin: 0;
  max-width: 90%;
}

.live-message-form {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  background: transparent !important;
  border-top: none !important;
  padding: 0 !important;
}

/* NOTIFICAÇÃO TOAST */
.toast {
  position: fixed; z-index: 500; left: 50%; bottom: 82px; transform: translate(-50%, 20px);
  background: rgba(24, 24, 31, 0.95); border: 1px solid var(--border);
  color: #fff; padding: 12px 20px; border-radius: 30px; font-weight: 600; font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; backdrop-filter: blur(10px);
}
.toast.show {
  opacity: 1; transform: translate(-50%, 0); pointer-events: auto;
}

/* ================= TIKTOK FEED STYLE ================= */
.tiktok-feed {
  height: calc(100vh - var(--nav-height) - 68px); 
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  display: flex;
  flex-direction: column;
}
.tiktok-feed::-webkit-scrollbar {
  display: none; /* Esconde a barra de rolagem nativa */
}
.tiktok-card {
  flex: 0 0 100%;
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  position: relative;
  background-color: #000;
  overflow: hidden;
}
.tiktok-bg-placeholder, .tiktok-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
.tiktok-bg-placeholder {
  display: grid;
  place-items: center;
  font-size: 4rem;
  color: var(--surface);
}
.tiktok-overlay {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, rgba(0,0,0,0.8) 100%);
  z-index: 2;
}
.tiktok-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tiktok-live-tag {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulseLive 2s infinite;
}
.tiktok-viewers {
  background: rgba(0,0,0,0.5);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
}
.tiktok-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.tiktok-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tiktok-title {
  margin: 0;
  font-size: 1.2rem;
}
.tiktok-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.tiktok-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 15px rgba(255, 42, 95, 0.4);
}
@keyframes pulseLive {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}


/* ===== V2: selos sempre visíveis + painel admin ===== */
.badges-container { display: inline-flex !important; overflow: visible !important; }
.badge-verified, .badge-developer { display: inline-block !important; opacity: 1 !important; visibility: visible !important; }
.profile-main h2 { overflow: visible; }
#adminTabs { overflow-x: auto; white-space: nowrap; }
#adminContent .result-card { cursor: default; align-items: center; }
#adminContent small { color: var(--muted); }


/* =========================================================
   V3 — TEMA CLARO/ESCURO, EDIÇÃO, CHAT, NOTIFICAÇÕES
========================================================= */

/* Áreas que são sempre escuras (vídeo): mantêm a paleta escura nos dois temas */
.page.live-room,
.tiktok-card {
  --bg: #0f0f12; --surface: #18181f; --surface-2: #22222c; --border: #2d2d38;
  --text: #fff; --text-soft: #d8d8e0; --muted: #b4b4c2;
  --input-bg: #121217; --overlay-soft: rgba(255,255,255,.05);
  --gold-text: #ffb800; --danger-text: #ff6977;
  color: #fff;
}

/* Foco visível e movimento reduzido */
button:focus-visible, [role="button"]:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Campos de formulário */
textarea {
  width: 100%; min-height: 90px; border-radius: 11px; border: 1px solid var(--border); outline: 0;
  background: var(--input-bg); color: var(--text); padding: 11px 13px; line-height: 1.45; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.form-group { display: grid; gap: 7px; }
.form-group > label { color: var(--muted); font-size: .82rem; font-weight: 700; }
.field-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .72rem; }
.char-counter { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Botões e contadores */
.btn.danger-solid { background: var(--danger); color: #fff; }
.pix-table tr.coin-pack-row { cursor: pointer; }
.pix-table tr.coin-pack-row:hover { background: var(--overlay-soft); }

.notification-dot.has-count {
  width: auto; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center;
  font-size: .62rem; font-weight: 800; color: #fff; line-height: 1; box-shadow: none; animation: none;
}
.icon-btn .notification-dot.has-count { top: -3px; right: -3px; }
.nav-item .notification-dot { top: 9px; right: calc(50% - 24px); }

/* ---------- Editar perfil ---------- */
#editProfileModal .edit-preview-card { position: relative; margin-bottom: 56px; }
#editProfileModal .preview-banner {
  display: block; position: relative; height: 130px; border-radius: 14px; overflow: hidden; cursor: pointer;
  background-image: linear-gradient(135deg, #ff007f 0%, #7928ca 100%); background-size: cover; background-position: center;
}
#editProfileModal .preview-avatar-wrapper { position: absolute; left: 50%; bottom: -48px; transform: translateX(-50%); }
#editProfileModal .preview-avatar {
  position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; cursor: pointer;
  border: 4px solid var(--surface); box-shadow: 0 6px 20px rgba(0,0,0,.3);
  background-image: linear-gradient(135deg, var(--primary), var(--primary-2)); background-size: cover; background-position: center;
  color: #fff; font-size: 1.9rem; font-weight: 900;
}
.preview-overlay, .avatar-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(0,0,0,.4); color: #fff; font-weight: 700; font-size: .85rem; opacity: 0; transition: opacity .15s ease;
}
.avatar-overlay { font-size: 1.1rem; }
.preview-banner:hover .preview-overlay, .preview-avatar:hover .avatar-overlay,
#editProfileModal label:focus-within .preview-overlay { opacity: 1; }
@media (hover: none) { .preview-overlay, .avatar-overlay { opacity: 1; background: rgba(0,0,0,.28); } }
.edit-fields { display: grid; gap: 14px; }

/* ---------- Editar texto (legenda / mensagem) e confirmação ---------- */
.edit-text-media { border-radius: 14px; overflow: hidden; background: #000; display: flex; justify-content: center; }
.edit-text-media img { max-width: 100%; max-height: 220px; object-fit: contain; display: block; }
.confirm-card { text-align: center; max-width: 380px; }
.confirm-card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.confirm-card p { margin: 0 0 18px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px;
  background: rgba(255,184,0,.15); color: var(--gold-text); font-size: 1.4rem;
}
.confirm-icon.danger { background: rgba(255,77,94,.15); color: var(--danger-text); }

/* ---------- Configurações ---------- */
.settings-section { padding: 14px 20px 6px; }
.theme-card {
  margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; display: grid; gap: 12px;
}
.theme-card strong { display: block; }
.theme-card small, .switch-row small { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
.segmented button {
  border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 9px; font-weight: 700;
  display: flex; gap: 8px; align-items: center; justify-content: center; transition: background .15s ease, color .15s ease;
}
.segmented button.active { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(255,42,95,.3); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.modal-card .switch, .switch { position: relative; display: block; width: 46px; height: 26px; flex: 0 0 46px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); transition: .2s ease; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: .2s ease; }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Chat ---------- */
#pageChatRoom.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; padding-bottom: 0; }
#pageChatRoom .chat-header { flex: 0 0 auto; }
#pageChatRoom .messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 12px; }
#pageChatRoom .message-form { position: relative; bottom: auto; width: 100%; flex: 0 0 auto; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.chat-header-info { cursor: pointer; min-width: 0; }
.chat-header-info strong { display: flex; align-items: center; gap: 4px; }
.chat-header small.offline { color: var(--muted); }

.message:not(.mine):not(.system-msg) { border: 1px solid var(--border); }
.message small { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.message .edited-tag { display: inline; margin-top: 0; text-align: left; }
.message .receipt { font-size: .66rem; opacity: .9; }
.message.mine .receipt.read { color: #9be7ff; opacity: 1; }
.message .receipt.failed { color: #fff; }
.message.failed { outline: 1px solid var(--danger); }
.failed-tag { display: block; margin-top: 4px; font-size: .68rem; opacity: .95; }
.date-sep {
  width: max-content; margin: 14px auto 6px; padding: 3px 12px; border-radius: 99px;
  background: var(--overlay-soft); color: var(--muted); font-size: .7rem; font-weight: 700;
}
.msg-info { display: grid; gap: 3px; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--overlay-soft); color: var(--muted); font-size: .8rem; }
.msg-actions { display: grid; gap: 10px; }

.chat-preview { margin: 2px 0 0; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-preview.unread { color: var(--text); font-weight: 700; }
.chat-preview .receipt { font-size: .66rem; margin-right: 2px; }
.chat-preview .receipt.read { color: #38bdf8; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--muted); font-size: .7rem; }
.unread-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800;
}

/* ---------- Notificações ---------- */
.notif-section-title { padding: 14px 20px 4px; }
.notif-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.notif-item.unread { background: rgba(255,42,95,.07); }
.notif-item.unread::before { content: ""; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); transform: translateY(-50%); }
.notif-item p { margin: 0; font-size: .86rem; line-height: 1.35; color: var(--text-soft); }
.notif-item p strong { color: var(--text); }
.notif-item small { color: var(--muted); font-size: .72rem; }
.notif-type { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .9rem; }
.notif-type.like { color: var(--primary); }
.notif-type.comment { color: #38bdf8; }
.notif-type.follow { color: var(--success); }
.notif-type.coins { color: var(--gold-text); background: rgba(255,184,0,.14); }
.notif-type.rejected { color: var(--danger-text); background: rgba(255,77,94,.12); }
.notif-section-title + .admin-notification-card { margin-top: 6px; }

/* ---------- Publicações: ações do dono, detalhes e grade do perfil ---------- */
.post-owner-options .icon-btn { width: 36px; height: 36px; font-size: .8rem; }
.post-owner-options .btn-edit-post:hover { color: var(--primary); border-color: var(--primary); }
.post-owner-options .btn-delete-post:hover { color: var(--danger-text); border-color: rgba(255,77,94,.5); }
.post-comments-list .no-comments, .detail-list .no-comments { margin: 0; color: var(--muted); font-size: .85rem; }

.detail-author { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.detail-image { background: #000; border-radius: 12px; overflow: hidden; }
.detail-image img { display: block; width: 100%; max-height: 60vh; object-fit: contain; }
#postDetailContent .post-actions, #postDetailContent .post-likes, #postDetailContent .post-caption { padding-left: 0; padding-right: 0; }
.detail-comments { border-top: 1px solid var(--border); padding-top: 12px; }
.detail-comments h3 { margin: 0 0 10px; font-size: 1rem; }
.detail-list { max-height: 240px; }
.detail-comment-form { display: flex; gap: 8px; margin-top: 10px; }
.detail-comment-form input { flex: 1; min-height: 40px; }

.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid-item { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-likes {
  position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; font-weight: 800;
}
.grid-edit {
  position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem;
}
.grid-edit:hover { background: var(--primary); }

/* =========================================================
   V4 — EM ALTA (lives estilo TikTok) e comentários resumidos
========================================================= */
.tiktok-feed {
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.tiktok-card { scroll-snap-stop: always; }
.tiktok-bg-placeholder { overflow: hidden; background: linear-gradient(160deg, #2a1030 0%, #0f0f12 70%); }
.tiktok-bg-placeholder > i { position: relative; z-index: 1; color: rgba(255,255,255,.18); }
.tiktok-cover {
  position: absolute; inset: -30px; background-size: cover; background-position: center;
  filter: blur(22px) brightness(.55) saturate(1.2);
}
.tiktok-card { cursor: pointer; }
.tiktok-category { margin: 4px 0 0; font-size: .8rem; color: var(--text-soft); }
.tiktok-actions { align-items: center; }
.tiktok-counter {
  padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.5);
  font-size: .72rem; font-weight: 800; letter-spacing: .02em;
}
.tiktok-swipe-hint {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; font-size: .7rem; color: rgba(255,255,255,.7);
  pointer-events: none; animation: swipeBob 1.8s ease-in-out infinite;
}
@keyframes swipeBob { 0%, 100% { transform: translate(-50%, 0); opacity: .9; } 50% { transform: translate(-50%, -6px); opacity: .5; } }

.live-swipe-hint {
  position: absolute; left: 50%; bottom: 96px; z-index: 5; transform: translate(-50%, 10px);
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px;
  background: rgba(0,0,0,.6); color: #fff; font-size: .78rem; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.live-swipe-hint.show { opacity: 1; transform: translate(-50%, 0); }

.view-all-comments {
  display: block; margin: 0 0 6px; padding: 0; background: none; border: 0;
  color: var(--muted); font-size: .8rem; font-weight: 700; text-align: left; cursor: pointer;
}
.view-all-comments:hover { color: var(--text); }
.view-all-slot:empty { display: none; }
.post-card .post-comments-list { max-height: none; overflow: visible; }

/* Em Alta: cards de tela cheia, como no TikTok */
.tiktok-feed { padding: 0; }
.tiktok-card { flex: 0 0 100%; height: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; }

/* =========================================================
   V3 — Chat: grupos, digitando, anexos, opções da conversa;
   posts em vídeo; privacidade.
========================================================= */

/* ---------- Abas Chats / Grupos (deslizar para o lado) ---------- */
.chat-tabs { display: flex; gap: 18px; margin-top: 4px; }
.chat-tabs button {
  position: relative; background: none; border: 0; padding: 0 0 4px;
  color: var(--muted); font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em;
  border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.chat-tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 99px; background: var(--primary); color: #fff; font-size: .66rem; font-weight: 800;
  vertical-align: middle; transform: translateY(-2px);
}

.chat-swiper {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.chat-swiper::-webkit-scrollbar { display: none; }
.chat-pane { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }

.group-actions { display: grid; gap: 10px; padding: 14px 20px 6px; }
.group-join-form { display: flex; gap: 8px; }
.group-join-form input { flex: 1; text-transform: uppercase; letter-spacing: .08em; }
.group-join-form input::placeholder { text-transform: none; letter-spacing: 0; }
.avatar.group-avatar { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }

/* ---------- Lista de conversas: segurar para abrir opções ---------- */
.chat-card { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background .15s ease; }
.chat-card.pressing { background: var(--overlay-soft); }
.chat-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px;
  background: rgba(255,77,94,.14); color: var(--danger-text); font-size: .62rem; font-weight: 800; letter-spacing: .03em;
  vertical-align: middle;
}
.chat-preview i { margin-right: 2px; }

/* ---------- Status do topo: online / offline / digitando ---------- */
.chat-header small.typing { color: var(--primary); font-weight: 700; }
.typing-dots { display: inline-flex; gap: 2px; margin-left: 3px; vertical-align: middle; }
.typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: typingBounce 1.1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Mensagens com mídia e nome do remetente (grupos) ---------- */
.msg-sender { display: block; margin-bottom: 3px; color: var(--primary); font-size: .72rem; font-weight: 800; }
.message.mine .msg-sender { color: rgba(255,255,255,.9); }
.message.has-media { padding: 6px; max-width: min(78%, 320px); }
.message.has-media .msg-content { padding: 6px 8px 0; }
.message.has-media > small { padding: 0 8px 2px; }
.message.has-media .msg-sender { padding: 2px 8px 0; }
.msg-media-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; line-height: 0; }
.msg-media { display: block; width: 100%; max-height: 320px; object-fit: cover; background: #000; }
.msg-media[data-media-type="image"] { cursor: zoom-in; }
.message.pending-media .msg-media-wrap { opacity: .7; }
.msg-more {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: .72rem; line-height: 1;
}

/* ---------- Anexo pendente e botão de anexar ---------- */
.attach-btn {
  width: 46px; flex: 0 0 46px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); display: grid; place-items: center;
}
.attach-btn:hover { color: var(--primary); border-color: var(--primary); }
.chat-media-preview {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--bar-bg); border-top: 1px solid var(--border);
}
.chat-media-preview .grow { min-width: 0; }
.chat-media-preview strong { display: block; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-media-preview small { color: var(--muted); font-size: .72rem; }
.chat-media-thumb { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.chat-media-thumb img, .chat-media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-media-thumb .thumb-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .9rem; background: rgba(0,0,0,.25); }

.chat-blocked-banner {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bar-bg); border-top: 1px solid var(--border);
  color: var(--muted); font-size: .85rem;
}
.chat-blocked-banner i { color: var(--danger-text); margin-right: 4px; }

/* ---------- Visualizador de mídia ---------- */
.media-viewer {
  position: fixed; inset: 0; z-index: 450; display: grid; place-items: center;
  background: rgba(0,0,0,.94); padding: 56px 12px 24px;
}
.media-viewer img, .media-viewer video { max-width: 100%; max-height: 100%; border-radius: 10px; }
.media-viewer-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; display: grid; place-items: center;
}

/* ---------- Grupos: ID, membros e privacidade ---------- */
.group-id-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
  padding: 12px 14px; border-radius: 14px; background: var(--overlay-soft); border: 1px dashed var(--border);
}
.group-id-box small { display: block; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .12em; }
.group-id-box strong { font-size: 1.35rem; letter-spacing: .12em; }
.group-id-actions { display: flex; gap: 8px; }
.member-list { display: grid; margin-top: 6px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.member-row:last-child { border-bottom: 0; }
.member-row .grow { min-width: 0; }
.member-row .grow strong { display: flex; align-items: center; gap: 4px; font-size: .9rem; }
.member-row .grow small { color: var(--muted); font-size: .74rem; }
.member-role { margin-left: auto; padding: 2px 9px; border-radius: 99px; background: rgba(255,42,95,.12); color: var(--primary); font-size: .64rem; font-weight: 800; }
.member-empty { margin: 8px 0 0; color: var(--muted); font-size: .85rem; }
.privacy-block { margin-top: 16px; }

/* ---------- Posts em vídeo ---------- */
.post-image-container video { width: 100%; height: auto; max-height: 520px; display: block; background: #000; object-fit: contain; }
.detail-image video { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; }
.grid-item video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.grid-play {
  position: absolute; bottom: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; font-size: .62rem;
}
.post-preview-area video { width: 100%; height: 100%; object-fit: cover; }
.edit-text-media video { width: 100%; max-height: 220px; border-radius: 12px; }
/* ---------- Comentários: a caixa de digitar fica só nos detalhes da publicação ---------- */
.post-card .post-comments-section:not(:has(.post-comment-item, .view-all-comments)) { display: none; }
.post-card .post-comments-list { margin-bottom: 0; }

/* ---------- Foto do grupo ---------- */
.group-photo-block { position: relative; width: 96px; height: 96px; margin: 0 auto 16px; }
.group-photo {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-size: 2rem;
  border: 4px solid var(--surface); box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: opacity .15s ease;
}
.group-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.group-photo.editable { cursor: pointer; }
.group-photo.loading { opacity: .5; pointer-events: none; }
.group-photo-overlay { border-radius: 50%; pointer-events: none; }
.group-photo-block:hover .group-photo-overlay { opacity: 1; }
.chat-header-group-photo { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; object-fit: cover; }


/* ---------- Perfil bloqueado (modo anônimo) ---------- */
.guest-gate { display: none; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 70px 28px; }
.guest-gate-icon {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 7px 25px rgba(255,42,95,.35);
}
.guest-gate h3 { margin: 10px 0 0; font-size: 1.15rem; }
.guest-gate p { margin: 0; max-width: 340px; color: var(--muted); line-height: 1.45; }
.guest-gate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(100%, 320px); margin-top: 14px; }
#pageProfile.is-guest .guest-gate { display: flex; }
#pageProfile.is-guest > :not(.page-header):not(.guest-gate) { display: none !important; }

/* ---------- Ajustar foto de perfil ---------- */
.crop-modal { z-index: 320; }
.crop-hint { margin: 0 0 14px; color: var(--muted); font-size: .88rem; text-align: center; }
.crop-stage {
  position: relative; width: min(100%, 280px); aspect-ratio: 1 / 1; margin: 0 auto; overflow: hidden;
  border-radius: 16px; background: #000; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.9);
}
.crop-zoom { display: flex; align-items: center; gap: 12px; margin: 18px 4px; color: var(--muted); }
.crop-zoom input[type="range"] { flex: 1; accent-color: var(--primary); }


/* =========================================================
   V4 — CARTEIRA COMPACTA, LOJA E MELHORIAS DE LIVE
========================================================= */
.header-actions, .heading-actions { display: flex; align-items: center; gap: 8px; }
.heading-actions { gap: 12px; }

.wallet-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--wallet-bg); border: 1px solid rgba(255,184,0,.4);
  color: var(--gold-text); font-weight: 900; font-size: .9rem; cursor: pointer;
}
.wallet-chip i { color: var(--gold); font-size: .95rem; }
.wallet-chip.static { cursor: default; }
#pageProfile.is-guest .wallet-chip { display: none; }

/* LOJA */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px 20px; }
.store-grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.store-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
}
.store-card .store-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.store-card h3 { margin: 0; font-size: .95rem; }
.store-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.store-card .btn { margin-top: auto; }
.store-price { color: var(--gold-text); font-weight: 900; }
.store-price i { color: var(--gold); }
.store-coin-art { display: grid; place-items: center; height: 96px; background: var(--wallet-bg); font-size: 2.4rem; color: var(--gold); }
.store-preview { position: relative; aspect-ratio: 16 / 7; background: linear-gradient(135deg, #ff007f, #7928ca); overflow: hidden; }
.store-preview img, .store-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-tag { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,.65); color: #fff; font-size: .62rem; font-weight: 800; padding: 3px 8px; border-radius: 99px; letter-spacing: .04em; }
.store-pane.hidden { display: none; }
.store-upload-area { min-height: 150px; }
.store-upload-area img, .store-upload-area video { max-width: 100%; max-height: 180px; border-radius: 10px; }

/* BANNER EM VÍDEO (perfil) */
.banner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* LIVE */
.live-preview video.fit-contain { object-fit: contain; }
.live-preview video.mirror { transform: scaleX(-1); }
.live-sound-btn {
  position: absolute; z-index: 11; left: 16px; top: calc(70px + env(safe-area-inset-top, 0px));
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.65); backdrop-filter: blur(8px);
  color: #fff; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.live-sound-btn.hidden { display: none; }
.live-chat .message.host { border-color: var(--primary); background: rgba(255,42,95,.22); }

/* =========================================================
   DESEMPENHO (ajustes adicionados no checkup)
========================================================= */

/* Live: o blur (backdrop-filter) sobre vídeo em movimento força a GPU a refazer o efeito a cada quadro
   e causa travadas no vídeo/áudio em celulares. Aqui trocamos por fundo semitransparente, visualmente igual. */
.page.live-room .floating-back,
.page.live-room .live-top-info,
.page.live-room .live-chat .message,
.page.live-room .live-sound-btn,
.page.live-room .live-swipe-hint {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.page.live-room .floating-back { background: rgba(0, 0, 0, .72); }
.page.live-room .live-top-info { background: rgba(0, 0, 0, .7); }
.page.live-room .live-chat .message { background: rgba(24, 24, 31, .84); }
.page.live-room .live-sound-btn { background: rgba(0, 0, 0, .78); }

/* Feed: o navegador só desenha os posts perto da tela (rolagem e abertura bem mais leves). */
.post-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 560px;
}

/* Skeleton do feed: mostra a estrutura na hora enquanto os posts chegam. */
.feed-skeleton { display: grid; gap: 16px; padding: 4px 0; }
.skeleton-card {
  display: grid; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface, transparent);
}
.skeleton-line, .skeleton-media {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(128,128,140,.14) 25%, rgba(128,128,140,.26) 50%, rgba(128,128,140,.14) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.3s ease-in-out infinite;
}
.skeleton-line { height: 12px; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w70 { width: 70%; }
.skeleton-media { height: 260px; border-radius: 14px; }
@keyframes skeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line, .skeleton-media { animation: none; } }


/* =========================================================
   Melhorias: desempenho, preview de banner, respostas e swipe
========================================================= */
/* Preview de banner na loja */
.store-preview[data-preview-item] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.store-eye {
  position: absolute; right: 8px; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.65); color: #fff; font-size: .66rem; font-weight: 700; padding: 4px 9px; border-radius: 99px;
}
.banner-preview-card { width: min(100%, 460px); }
.banner-preview-stage { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.banner-preview-me { padding: 0 16px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.banner-preview-me > div { margin-top: -36px; margin-bottom: 6px; }
.banner-preview-me h3 { margin: 0; font-size: 1rem; }
.banner-preview-me small { color: var(--muted); }
.banner-preview-desc { margin: 12px 0 0; color: var(--text-soft); font-size: .85rem; }
#bannerPreviewModal .modal-actions { margin-top: 14px; justify-content: flex-end; }

/* Responder comentários */
.post-comment-item.replyable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.detail-list .post-comment-item.replyable { padding: 6px 8px; margin: 0 -8px; border-radius: 10px; transition: background .15s ease; }
.detail-list .post-comment-item.replyable:active { background: var(--surface-2); }
.mention { color: var(--primary); font-weight: 600; }
.reply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 6px 12px;
  border-radius: 10px; background: var(--surface-2); color: var(--text-soft); font-size: .76rem;
}
.reply-bar.hidden { display: none; }
.reply-bar .reply-cancel { background: none; border: 0; color: inherit; cursor: pointer; padding: 4px; }
.reply-bar + .detail-comment-form { margin-top: 6px; }

/* Arrastar notificação para excluir */
.notif-swipe { position: relative; overflow: hidden; background: var(--danger-text, #ff4d5e); transition: height .22s ease, opacity .22s ease; }
.notif-swipe .notif-item { background: var(--bg, var(--surface)); touch-action: pan-y; will-change: transform; }
.notif-swipe .notif-item.unread { background: linear-gradient(rgba(255,42,95,.07), rgba(255,42,95,.07)), var(--bg, var(--surface)); }
.notif-swipe-bg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px;
  color: #fff; font-size: 1.1rem; opacity: 0; transition: opacity .15s ease;
}
.notif-swipe[data-dir="right"] .notif-swipe-bg { justify-content: flex-start; }
.notif-swipe.swiping .notif-swipe-bg, .notif-swipe.removing .notif-swipe-bg { opacity: .75; }
.notif-swipe.will-delete .notif-swipe-bg { opacity: 1; }
.notif-swipe.swiping .notif-item { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.notif-swipe.removing { opacity: .6; }

/* =========================================================
   LIVE: MENU DO APRESENTADOR (⋯), COMPARTILHAR TELA E ROLETA
========================================================= */
.live-more-btn { top: calc(70px + env(safe-area-inset-top, 0px)); }
.live-more-btn.hidden { display: none !important; }
.live-menu {
  position: absolute; z-index: 12; left: 16px; top: calc(122px + env(safe-area-inset-top, 0px));
  min-width: 200px; display: grid; gap: 2px; padding: 6px;
  background: rgba(0,0,0,.86); border: 1px solid rgba(255,255,255,.18); border-radius: 14px;
}
.live-menu.hidden { display: none !important; }
.live-menu button {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 10px;
  background: transparent; color: #fff; font-weight: 700; font-size: .85rem; text-align: left; cursor: pointer;
}
.live-menu button i { width: 18px; text-align: center; color: var(--primary); }
.live-menu button:hover, .live-menu button:active { background: rgba(255,255,255,.1); }
.live-menu button.on i { color: var(--gold); }
/* o botão "Ativar som" fica logo abaixo do voltar; com o ⋯ no apresentador não há conflito (só espectadores veem o som) */

.roulette-overlay {
  position: absolute; z-index: 15; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 10px; padding: 16px 16px 14px;
  background: rgba(0,0,0,.74); border: 1px solid rgba(255,255,255,.18); border-radius: 22px;
  width: min(84vw, 300px);
}
.roulette-overlay.hidden { display: none !important; }
.roulette-close {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; cursor: pointer;
}
.roulette-wheel-wrap { position: relative; width: min(66vw, 220px); aspect-ratio: 1; margin-top: 6px; }
.roulette-wheel {
  width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--gold);
  box-shadow: 0 0 22px rgba(255,184,0,.35); overflow: hidden;
}
.roulette-wheel svg { width: 100%; height: 100%; display: block; }
.roulette-pointer {
  position: absolute; z-index: 2; top: -9px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--primary); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
}
.roulette-result { min-height: 1.3em; color: #fff; font-weight: 800; text-align: center; font-size: .95rem; text-shadow: 0 2px 4px rgba(0,0,0,.8); }
.roulette-result.win { color: var(--gold); }
.roulette-options-list { display: grid; gap: 8px; margin-bottom: 8px; }
.roulette-option-row { display: flex; gap: 8px; align-items: center; }
.roulette-option-row input { flex: 1; }
.roulette-option-row button { flex: 0 0 auto; }
#rouletteSetupModal .modal-actions { grid-template-columns: 1fr; }

/* ---------- Boas-vindas e aviso de moedas ---------- */
.confirm-card .full-link { width: 100%; text-decoration: none; margin-bottom: 10px; }
.coins-disabled-notice {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  background: rgba(255,184,0,.08); border: 1px dashed var(--gold);
  border-radius: 12px; padding: 12px; margin: 12px 0;
}
.coins-disabled-notice > i { color: var(--gold-text); font-size: 1.2rem; margin-top: 2px; }
.coins-disabled-notice strong { display: block; color: var(--gold-text); font-size: .95rem; }
.coins-disabled-notice small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }


/* ---------- Compartilhar pelo bate-papo: cartão de prévia ---------- */
.message.has-share { padding: 6px; max-width: min(78%, 300px); }
.message.has-share > small { padding: 0 8px 2px; }
.message.has-share .msg-sender { padding: 2px 8px 0; }
.message.has-share .msg-content { padding: 6px 8px 0; }
.share-card {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; padding-right: 38px;
  border-radius: 12px; background: var(--overlay-soft); border: 1px solid var(--border); cursor: pointer; min-width: 220px;
}
.share-card:hover { border-color: var(--primary); }
.share-thumb {
  width: 58px; height: 58px; flex: 0 0 58px; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center; color: var(--muted); font-size: 1.2rem;
}
.share-thumb.round { border-radius: 50%; }
.share-thumb img, .share-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-info { min-width: 0; display: grid; gap: 2px; }
.share-kind { color: var(--primary); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.share-info strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-info small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.share-card .msg-more { top: 8px; right: 8px; }
.share-preview { margin-bottom: 12px; }
.share-preview .share-card { cursor: default; min-width: 0; padding-right: 8px; }
.share-preview .share-card:hover { border-color: var(--border); }
.share-recipients { max-height: 38vh; overflow-y: auto; margin-top: 8px; }

/* ---------- Privacidade: excluir conta ---------- */
.danger-zone { border-top: 1px solid var(--border); padding-top: 16px; }
.danger-zone-text { margin: 6px 0 12px; color: var(--muted); font-size: .8rem; }
.danger-zone .btn { width: 100%; }


/* ---------- Seletor de arquivo do chat (fora da tela, mas "visível" para o navegador abrir o seletor) ---------- */
.file-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; clip: rect(0 0 0 0); }

/* ---------- Botão enviar ⇄ gravar áudio ---------- */
.send-btn { cursor: pointer; transition: background .15s ease, transform .15s ease; }
.send-btn.mic { background: var(--surface-2); color: var(--primary); border: 1px solid var(--border); }
.send-btn.mic:hover { border-color: var(--primary); }
.send-btn.recording { background: var(--primary); color: #fff; border: 0; }
.send-btn:active { transform: scale(.94); }

.record-bar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; min-height: 46px;
}
.record-bar.hidden { display: none !important; }
.record-cancel { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--danger-text, #ff6b6b); display: grid; place-items: center; cursor: pointer; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b3b; flex: 0 0 10px; animation: recPulse 1.1s infinite ease-in-out; }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; }
.rec-hint { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes recPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.message-form.recording .attach-btn,
.message-form.recording #messageInput { display: none; }

/* ---------- Mensagem de áudio ---------- */
.message.has-audio { padding: 6px; max-width: min(84%, 320px); }
.message.has-audio .msg-content { padding: 6px 8px 0; }
.message.has-audio > small { padding: 0 8px 2px; }
.msg-audio-wrap { position: relative; line-height: 0; min-width: 220px; }
.msg-audio { display: block; width: 100%; height: 40px; border-radius: 20px; }
.msg-audio-wrap .msg-more { top: 7px; right: 6px; background: rgba(0,0,0,.35); }
.message.pending-media .msg-audio-wrap { opacity: .7; }

/* Live: o botão "Encerrar Transmissão" do criador ficava por cima do painel de título */
.page.live-room.is-host .live-top-info { top: calc(64px + env(safe-area-inset-top, 0px)); }

/* Live: toque na tela oculta todo o layout e deixa só o vídeo; um novo toque traz tudo de volta. */
.page.live-room .floating-back,
.page.live-room .live-menu,
.page.live-room .live-top-info,
.page.live-room .live-overlay-container,
.page.live-room .live-sound-btn { transition: opacity .25s ease, visibility .25s ease; }
.page.live-room #btnEndLive { transition: transform .15s ease, opacity .25s ease, background .15s ease, visibility .25s ease; }
.page.live-room.immersive .floating-back,
.page.live-room.immersive .live-menu,
.page.live-room.immersive .live-top-info,
.page.live-room.immersive .live-overlay-container,
.page.live-room.immersive .live-sound-btn,
.page.live-room.immersive .live-swipe-hint,
.page.live-room.immersive #btnEndLive { opacity: 0; visibility: hidden; pointer-events: none; }

/* Live: vídeo transparente até o 1º quadro chegar (o aviso "Conectando..." aparece em vez de uma tela preta) e proteção de captura. */
.live-preview video.loading { opacity: 0; }
.page.live-room.capture-hidden .live-preview video { visibility: hidden; }

/* Live: barra da meta do apresentador */
.live-goal { margin-top: 8px; }
.live-goal-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; color: #fff; font-size: .75rem; font-weight: 800; }
.live-goal-head span:last-child { color: var(--gold-text); }
.live-goal-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.live-goal-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(135deg, var(--primary), var(--primary-2)); transition: width .4s ease; }
.live-goal.done .live-goal-bar i { background: var(--gold); }

/* Live: saldo de moedas dentro do modal de presentes */
#giftsModal .wallet-chip { margin: 0 8px 0 auto; }
