:root {
  --bg: #060816;
  --panel: #101528;
  --panel-2: #131a31;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f6ff;
  --muted: #98a2c7;
  --purple: #7c3aed;
  --pink: #d946ef;
  --blue: #3b82f6;
  --green: #22c55e;
  --chip: rgba(255, 255, 255, 0.08);
  --bubble-in: #171d35;
  --bubble-out: linear-gradient(135deg, #6d28d9, #d946ef);
  --shadow: 0 18px 60px rgba(4, 8, 20, 0.55);
  --radius: 26px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(124, 58, 237, 0.22), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(217, 70, 239, 0.16), transparent 18%),
    linear-gradient(180deg, #070b18 0%, #090d1d 40%, #0a0f1f 100%);
}

a { color: inherit; text-decoration: none; }
button, input {
  font: inherit;
}

.mobile-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 28px;
  position: relative;
}

.screen {
  background: linear-gradient(180deg, rgba(12, 17, 33, 0.96), rgba(7, 10, 22, 0.98));
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 32px;
  min-height: calc(100vh - 32px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 24%),
    radial-gradient(circle at center left, rgba(217, 70, 239, 0.12), transparent 20%);
  pointer-events: none;
}

.safe-top {
  padding: 14px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}

.content {
  padding: 16px 18px 110px;
  position: relative;
  z-index: 1;
}

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

.page-title {
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 18px 0 10px;
}

.page-title .accent {
  color: #e879f9;
}

.subtle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.icon-btn,
.nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(140deg, rgba(14, 18, 38, 0.7), rgba(12, 16, 34, 0.9)),
    var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.22), transparent 58%);
}

.hero-stack {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.hero-stack img {
  width: 68px;
  height: 110px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

.cta-primary {
  background: linear-gradient(135deg, #3b82f6, #d946ef);
  color: white;
  border: none;
  padding: 15px 18px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.35);
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 20px;
  margin: 0;
}

.section-head a {
  color: #b794f4;
  font-size: 13px;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.character-card {
  background: linear-gradient(180deg, rgba(20,24,45,0.92), rgba(16,20,37,0.98));
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.character-card.locked {
  opacity: 0.62;
}

.character-card img {
  width: 100%;
  aspect-ratio: 0.84;
  object-fit: cover;
  display: block;
}

.character-card .meta {
  padding: 10px 10px 12px;
}

.character-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.character-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  min-height: 30px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.online-chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: #dbe4ff;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.06);
}

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

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.history-item img,
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.history-item h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.history-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.history-item .time {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.bottom-nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 14px;
  border-radius: 22px;
  background: rgba(10, 13, 26, 0.92);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bottom-nav a.active {
  color: white;
}

.bottom-pulse {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -26px;
  background: linear-gradient(135deg, #3b82f6, #d946ef);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.36);
  color: white;
  font-weight: 800;
}

.profile-hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
}

.profile-hero img,
.profile-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.profile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,8,22,0.1), rgba(6,8,22,0.75) 62%, rgba(6,8,22,0.96));
}

.profile-overlay {
  position: relative;
  z-index: 1;
  padding: 18px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-topbar {
  display: flex;
  justify-content: space-between;
}

.media-strip {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}

.media-thumb {
  width: 54px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 12, 28, 0.72);
  color: white;
  flex: 0 0 auto;
  position: relative;
}

.media-thumb.active {
  border-color: #9648ff;
}

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

.media-thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.34);
}

.profile-name {
  font-size: 36px;
  font-weight: 800;
  margin: 12px 0 6px;
}

.metric-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.16);
  border-top-color: #d946ef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-align: center;
  background: rgba(10, 14, 28, 0.58);
}

.panel-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}

.panel-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #dbe4ff;
}

.panel-card p,
.mini {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.work-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background: #11172d;
}

.work-card img {
  width: 100%;
  aspect-ratio: 0.88;
  object-fit: cover;
  display: block;
}

.work-card .label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.sticky-cta {
  position: sticky;
  bottom: 18px;
  z-index: 4;
  margin-top: 20px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(8, 11, 22, 0.86);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.sticky-cta .cta-primary {
  width: 100%;
}

.chat-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 32px);
}

.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  background: rgba(8, 11, 22, 0.92);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.chat-meta {
  flex: 1;
}

.chat-meta h1 {
  margin: 0 0 2px;
  font-size: 18px;
}

.chat-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.messages {
  flex: 1;
  padding: 14px 16px 120px;
  display: grid;
  gap: 12px;
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.msg-row.outgoing {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 76%;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--bubble-in);
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
  line-height: 1.55;
}

.msg-row.outgoing .msg-bubble {
  background: var(--bubble-out);
  border: none;
}

.msg-bubble.typing {
  min-width: 74px;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  animation: typingPulse 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingPulse {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.msg-time {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.composer {
  position: sticky;
  bottom: 0;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(8,11,22,0.15), rgba(8,11,22,0.95) 24%);
}

.composer-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(16, 21, 40, 0.96);
  border: 1px solid var(--line);
}

.composer-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: white;
  padding: 8px 4px;
  outline: none;
}

.send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #d946ef);
  color: white;
  font-weight: 800;
}

.center-note {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
}

.lock-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(217, 70, 239, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.22);
  color: #f5d0fe;
  font-size: 13px;
  line-height: 1.5;
}

.current-plan-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(217, 70, 239, 0.16));
  border: 1px solid rgba(255,255,255,0.08);
}

.current-plan-card h2 {
  margin: 6px 0;
  font-size: 24px;
}

.plans-list {
  display: grid;
  gap: 14px;
}

.plan-card {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--line);
}

.plan-card.featured {
  border-color: rgba(217, 70, 239, 0.5);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.18), rgba(255,255,255,0.045));
}

.plan-card.current {
  border-color: rgba(34, 197, 94, 0.55);
}

.plan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.plan-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.plan-price {
  color: #f0abfc;
  font-weight: 800;
  white-space: nowrap;
}

.plan-features {
  margin: 14px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.plan-features li {
  color: #c8d2ef;
  font-size: 13px;
  line-height: 1.45;
}

.plan-action {
  width: 100%;
}
