/* Paraíso Privado PE — In-App UI */
:root {
  --bg: #0F0B14;
  --bg-card: #1A0A0E;
  --bg-elevated: #241014;
  --pe-red: #D91023;
  --pe-red-light: #ff2a3d;
  --pe-gold: #E8B923;
  --text: #FFF5F5;
  --text-muted: rgba(255, 245, 245, 0.62);
  --border: rgba(255, 255, 255, 0.08);
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 440px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 16, 35, 0.22) 0%, transparent 36%),
    radial-gradient(circle at 88% 4%, rgba(232, 185, 35, 0.1) 0%, transparent 40%),
    linear-gradient(180deg, #1A060A 0%, var(--bg) 100%);
}

.pe-strip {
  height: 3px;
  background: linear-gradient(90deg, #D91023 33%, #FFFFFF 33% 66%, #D91023 66%);
  flex-shrink: 0;
}

.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--pe-red);
}
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { transform: scale(0.94); }

.panel-wrap { flex: 1; overflow: hidden; position: relative; }
.panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 0 14px calc(var(--nav-h) + var(--safe-b) + 16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.panel.active { opacity: 1; pointer-events: auto; transform: none; }

.stories {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.story { flex-shrink: 0; text-align: center; width: 68px; cursor: pointer; }
.story-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--pe-red), var(--pe-gold), #fff5f5);
  margin: 0 auto 6px;
}
.story-ring.live { animation: pulse-ring 2s ease infinite; }
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 16, 35, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(217, 16, 35, 0); }
}
.story-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
  border: 2px solid var(--bg);
  display: block;
}
.story-name { font-size: 10px; color: var(--text-muted); font-weight: 700; }

.live-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(217, 16, 35, 0.12);
  border: 1px solid rgba(217, 16, 35, 0.28);
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pe-red);
  box-shadow: 0 0 10px rgba(217, 16, 35, 0.85);
  animation: blink 1.2s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
.live-banner b { color: var(--pe-gold); }

.section-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-hd h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.section-hd a {
  font-size: 12px;
  color: var(--pe-red-light);
  text-decoration: none;
  font-weight: 700;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-elevated);
  aspect-ratio: 3/4;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(217, 16, 35, 0.14), 0 10px 28px rgba(0,0,0,0.28);
}
.card:active { transform: scale(0.98); }
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 10%;
  display: block;
}
.card-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 9px; font-weight: 800;
}
.badge-live { background: linear-gradient(90deg, #D91023, #ff3d4a); }
.badge-new { background: linear-gradient(90deg, var(--pe-gold), #c9a015); color: #1a0a0c; }
.card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 12px 12px;
  background: linear-gradient(transparent, rgba(10,6,10,0.92));
}
.card-name { font-size: 13px; font-weight: 800; }
.card-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.card-heart {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: none; color: #fff; font-size: 14px;
  cursor: pointer;
}
.card-heart.liked { color: var(--pe-red-light); }

.featured-live {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  cursor: pointer;
}
.featured-live img {
  width: 100%; height: 180px;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.featured-live-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,6,10,0.9) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
}
.featured-live h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.featured-live p { margin: 0; font-size: 12px; color: var(--text-muted); }
.viewers {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(0,0,0,0.55); font-size: 11px; font-weight: 700;
}

.live-list { display: flex; flex-direction: column; gap: 12px; }
.live-row {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  cursor: pointer;
}
.live-thumb {
  width: 72px; height: 72px;
  border-radius: 16px;
  object-fit: cover;
  object-position: center 10%;
  flex-shrink: 0;
}
.live-row-info { flex: 1; }
.live-row-info h4 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.live-row-info p { margin: 0; font-size: 11px; color: var(--text-muted); }
.live-join {
  padding: 8px 14px; border-radius: 999px; border: none;
  background: linear-gradient(180deg, var(--pe-red-light), var(--pe-red));
  color: #fff; font-size: 12px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 16, 35, 0.28);
}

.msg-list { display: flex; flex-direction: column; gap: 4px; }
.msg-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 8px; border-radius: 16px; cursor: pointer;
}
.msg-item:active { background: rgba(255,255,255,0.05); }
.msg-avatar-wrap { position: relative; flex-shrink: 0; }
.msg-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
}
.msg-online {
  position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #3ddc84; border: 2px solid var(--bg);
}
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; justify-content: space-between; }
.msg-name { font-size: 14px; font-weight: 800; }
.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-preview {
  font-size: 13px; color: var(--text-muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-unread {
  min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--pe-red); color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.profile-hero { text-align: center; padding: 20px 0 24px; }
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; object-position: center 10%;
  border: 3px solid var(--pe-red);
}
.profile-hero h2 {
  margin: 14px 0 4px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.profile-hero p { margin: 0; font-size: 13px; color: var(--text-muted); }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 20px 0; }
.profile-stat {
  text-align: center; padding: 14px 8px;
  border-radius: 18px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.profile-stat b { display: block; font-size: 20px; color: var(--pe-gold); }
.profile-stat span { font-size: 11px; color: var(--text-muted); }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.menu-icon { font-size: 18px; width: 28px; text-align: center; }
.menu-arrow { margin-left: auto; color: var(--text-muted); }

.vip-banner {
  margin: 16px 0;
  padding: 16px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(232,185,35,0.16), rgba(217,16,35,0.14));
  border: 1px solid rgba(232,185,35,0.3);
  text-align: center;
}
.vip-banner h3 { margin: 0 0 6px; font-size: 16px; color: var(--pe-gold); }
.vip-banner p { margin: 0 0 12px; font-size: 12px; color: var(--text-muted); }
.vip-btn {
  padding: 10px 24px; border-radius: 999px; border: none;
  background: linear-gradient(180deg, var(--pe-gold), #c9a015);
  color: #1a0a0c; font-weight: 900; font-size: 13px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(232, 185, 35, 0.25);
}

.bottom-nav {
  flex-shrink: 0;
  display: flex;
  background: rgba(16, 8, 12, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding-bottom: var(--safe-b);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 10px 4px;
  border: none; background: none;
  color: var(--text-muted);
  font-size: 10px; font-weight: 700;
  cursor: pointer; position: relative;
  font-family: inherit;
}
.nav-item .nav-icon { font-size: 22px; }
.nav-item.active { color: var(--pe-red-light); }
.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 22px);
  min-width: 16px; height: 16px; border-radius: 999px;
  background: var(--pe-red); color: #fff;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.chat-sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 201;
  width: min(440px, 100%);
  transform: translateX(-50%) translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  max-height: 92vh;
  display: flex; flex-direction: column;
}
.chat-sheet.open { transform: translateX(-50%) translateY(0); }

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.chat-header img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
}
.chat-header-info h3 { margin: 0; font-size: 16px; font-weight: 800; }
.chat-header-info p { margin: 2px 0 0; font-size: 12px; color: #3ddc84; }
.chat-close {
  margin-left: auto; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border);
  background: rgba(255,255,255,0.06); color: var(--text);
  font-size: 18px; cursor: pointer;
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 260px; max-height: 50vh;
}
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.bubble.them { align-self: flex-start; background: rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--pe-red-light), var(--pe-red));
  border-bottom-right-radius: 4px;
}

.chat-input-bar {
  display: flex; gap: 8px; padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text); font-size: 14px; outline: none;
  font-family: inherit;
}
.chat-send {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: linear-gradient(180deg, var(--pe-red-light), var(--pe-red));
  color: #fff; font-size: 18px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 16, 35, 0.28);
}

.toast {
  position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%) translateY(-80px);
  padding: 10px 18px; border-radius: 999px;
  background: rgba(16,8,12,0.95);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
  z-index: 300; transition: transform 0.3s;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.onboard {
  position: fixed; inset: 0; z-index: 400;
  background:
    radial-gradient(circle at 50% 20%, rgba(217, 16, 35, 0.28) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(232, 185, 35, 0.12) 0%, transparent 40%),
    var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px; text-align: center;
  transition: opacity 0.4s, visibility 0.4s;
}
.onboard.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.onboard-flag {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, #D91023 33%, #FFFFFF 33% 66%, #D91023 66%);
  box-shadow: 0 0 20px rgba(217, 16, 35, 0.4);
}
.onboard h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(36px, 10vw, 46px);
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--text);
  line-height: 0.95;
}
.onboard h1 span { color: var(--pe-red); display: block; }
.onboard p {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 320px;
  font-weight: 600;
}
.onboard-btn {
  width: 100%; max-width: 300px; min-height: 54px;
  border: none; border-radius: 999px;
  background: linear-gradient(180deg, var(--pe-red-light), var(--pe-red));
  color: #fff; font-size: 17px; font-weight: 900; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 12px 28px rgba(217, 16, 35, 0.35);
}
.onboard-btn:active { transform: scale(0.98); }
