/* =============================================
   FanCentro AI — Global Styles
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #e91e8c;
  --brand-dark: #c2177a;
  --brand-light: #ff6bb5;
  --brand-glow: rgba(233, 30, 140, 0.25);
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #18181f;
  --bg-4: #1e1e28;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #f0f0f5;
  --text-muted: #888898;
  --text-dim: #555565;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-brand: 0 4px 24px var(--brand-glow);
  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.18s ease;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea { font-family: var(--font); }

/* =============================================
   Utilities
   ============================================= */
.gradient-text {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.w-full { width: 100%; }

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 32px var(--brand-glow); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-3); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-loading {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

/* =============================================
   Header
   ============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.logo-ai {
  color: var(--brand);
}

.logo-sm { font-size: 15px; }
.logo-sm .logo-icon { width: 30px; height: 30px; font-size: 11px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Header buttons — 25% smaller than base ── */
.header-nav .btn {
  padding: 7px 14px;
  font-size: 12px;
  gap: 5px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }

/* =============================================
   Hero
   ============================================= */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* Chat Preview */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-preview {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 340px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 80px rgba(233,30,140,0.1);
}

.chat-preview-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}

.chat-preview-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ff6b35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.chat-preview-name { font-weight: 600; font-size: 15px; }
.chat-preview-status { font-size: 12px; color: #4ade80; }

.chat-preview-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

.preview-msg {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 85%;
  animation: fadeIn 0.4s ease;
}

.preview-msg.assistant {
  background: var(--bg-3);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.preview-msg.user {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.preview-msg.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px;
  width: 64px;
}

.preview-msg.typing span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.preview-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.preview-msg.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* =============================================
   Creators Section
   ============================================= */
.creators-section {
  background: var(--bg-2);
  padding: 80px 24px;
}

.recommended-label {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 24px 20px;
  margin-bottom: 10px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 16px;
}

.creators-grid {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.creator-card {
  background: var(--bg-3);
  border: 1px solid rgba(233,30,140,0.4);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 40px var(--brand-glow);
}

.creator-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-glow), transparent);
  opacity: 1;
  transition: opacity var(--transition);
  pointer-events: none;
}

.creator-card:hover {
  border-color: var(--border);
  transform: translateY(0);
  box-shadow: none;
}

.creator-card:hover::before { opacity: 0; }

.creator-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

.creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.creator-avatar img,
.creator-avatar-lg img,
.creator-avatar-sm img,
.message-avatar img,
.gc-avatar img,
.modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.creator-avatar.color-0  { background: linear-gradient(135deg, #e91e8c, #ff6b35); }
.creator-avatar.color-1  { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.creator-avatar.color-2  { background: linear-gradient(135deg, #00b894, #00cec9); }
.creator-avatar.color-3  { background: linear-gradient(135deg, #e17055, #fdcb6e); }
.creator-avatar.color-4  { background: linear-gradient(135deg, #fd79a8, #e84393); }
.creator-avatar.color-5  { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.creator-avatar.color-6  { background: linear-gradient(135deg, #d63031, #ff7675); }
.creator-avatar.color-7  { background: linear-gradient(135deg, #6ab04c, #badc58); }
.creator-avatar.color-8  { background: linear-gradient(135deg, #be2edd, #e056fd); }
.creator-avatar.color-9  { background: linear-gradient(135deg, #f9ca24, #f0932b); }
.creator-avatar.color-10 { background: linear-gradient(135deg, #30336b, #686de0); }
.creator-avatar.color-11 { background: linear-gradient(135deg, #c0392b, #e74c3c); }

.creator-card-info { flex: 1; }
.creator-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.creator-username {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 5px #4ade80;
}
.creator-country {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.creator-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(233,30,140,0.15);
  color: var(--brand-light);
  border: 1px solid rgba(233,30,140,0.25);
}
.creator-gender-men {
  background: rgba(33,150,243,0.15);
  color: #64b5f6;
  border-color: rgba(33,150,243,0.3);
}
.creator-gender-trans {
  background: rgba(91,206,250,0.12);
  color: #5bcefa;
  border-color: rgba(91,206,250,0.3);
}

.creator-bio {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.creator-stats {
  display: flex;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.creator-stat { display: flex; flex-direction: column; }
.creator-stat-value { font-size: 15px; font-weight: 700; }
.creator-stat-label { font-size: 11px; color: var(--text-muted); }

.creator-card-action {
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.creator-card-profile-btn {
  flex: 1;
}

.creator-card-chat-btn {
  flex: 1;
}

.creator-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.creator-meta-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.creator-meta-trans {
  background: rgba(91,206,250,0.12);
  border-color: rgba(91,206,250,0.3);
  color: #5bcefa;
}
.creator-top-match-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(233,30,140,0.25), rgba(156,39,176,0.25));
  border: 1px solid rgba(233,30,140,0.5);
  color: var(--brand);
  letter-spacing: 0.02em;
}
.creator-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.creator-match-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(233,30,140,0.1);
  border: 1px solid rgba(233,30,140,0.3);
  color: var(--brand);
}

/* =============================================
   Features Section
   ============================================= */
.features-section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* =============================================
   Footer
   ============================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-text { font-size: 13px; color: var(--text-muted); }

/* =============================================
   Loading Spinner
   ============================================= */
.loading-spinner {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   Chat Page
   ============================================= */
body.chat-page {
  overflow: hidden;
  height: 100vh;
}

/* Chat-specific header creator info (left side of standard header) */
.chat-header-creator-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.chat-header-creator-info .menu-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Sidebar */
.chat-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-2);
  z-index: 1;
}

.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text-muted);
  font-size: 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.creator-profile {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.creator-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 3px solid rgba(233,30,140,0.3);
  box-shadow: 0 0 30px var(--brand-glow);
}

.creator-info { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.creator-info h3 { font-size: 18px; font-weight: 700; }

.creator-category-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(233,30,140,0.15);
  color: var(--brand-light);
  border: 1px solid rgba(233,30,140,0.25);
}

.creator-bio-sidebar {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.creator-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.topic-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg-4);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.sidebar-actions {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-footer {
  padding: 16px 20px;
  margin-top: auto;
}

.sidebar-footer p {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.6;
}

/* Chat Main */
.chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.chat-header {
  padding: 12px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.chat-header-creator {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.creator-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.creator-header-name { font-size: 15px; font-weight: 600; }
.creator-header-status { font-size: 12px; color: #4ade80; }
.creator-header-status #creatorHeaderCity { color: rgba(255,255,255,0.45); font-size: 11px; }

.chat-header-actions { display: flex; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-hover); color: var(--text); }

/* Messages */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  scroll-behavior: smooth;
}

.messages-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  animation: fadeIn 0.25s ease;
}

.message.user { flex-direction: row-reverse; }

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.message.assistant .message-avatar {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.message.user .message-avatar {
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.message-content { max-width: 70%; }

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
}

.message.assistant .message-bubble {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.message.user .message-bubble {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
  text-align: right;
}

.message-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 5px;
  padding: 0 4px;
}

.message.user .message-time { text-align: right; }

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

/* PPV Cards */
.ppv-message { align-items: flex-start; }

.ppv-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

.ppv-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ppv-cards {
  display: flex;
  gap: 8px;
}

.ppv-card {
  position: relative;
  width: 90px;
  height: 115px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(233,30,140,0.25);
}

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

.ppv-blur-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.35);
}

.ppv-lock-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.ppv-unlock-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.ppv-unlock-btn:hover { opacity: 0.88; }

.ppv-hint {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.clothing-card { position: relative; }
.clothing-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  text-align: center;
  padding: 4px 2px;
  border-radius: 0 0 8px 8px;
}
.clothing-ship-btn {
  background: linear-gradient(135deg, #ff6b35, #ff1744) !important;
}
.clothing-ship-btn:hover {
  background: linear-gradient(135deg, #ff8c5a, #ff4569) !important;
}

/* Snapchat button */
.snapchat-btn {
  background: linear-gradient(135deg, #FFFC00, #FFD700) !important;
  color: #1a1a1a !important;
}
.snapchat-btn:hover { background: linear-gradient(135deg, #fff44f, #ffc800) !important; }

/* Facebook button */
.facebook-btn {
  background: linear-gradient(135deg, #1877F2, #0a5dc2) !important;
  color: #fff !important;
}
.facebook-btn:hover { background: linear-gradient(135deg, #3b93ff, #1464d8) !important; }

/* Dinner date card */
.dinner-date-card { overflow: hidden; }
.dinner-date-inner {
  position: relative;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.dinner-date-emoji { font-size: 36px; flex-shrink: 0; }
.dinner-date-details { flex: 1; }
.dinner-date-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.dinner-date-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.dinner-date-btn {
  background: linear-gradient(135deg, #b8860b, #8b0000, #c0392b) !important;
  background-size: 200% 200% !important;
}
.dinner-date-btn:hover {
  background: linear-gradient(135deg, #d4a017, #a0001a, #e74c3c) !important;
}

/* Video play icon overlay */
.video-play-icon {
  font-size: 28px !important;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* Weather card */
.weather-card {
  background: linear-gradient(135deg, #1a2a4a 0%, #0f1f3a 100%);
  border: 1px solid rgba(99,179,237,0.25);
  border-radius: 16px;
  padding: 16px 20px;
  min-width: 240px;
  max-width: 280px;
  color: #fff;
}
.weather-location {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.weather-emoji { font-size: 38px; line-height: 1; }
.weather-temp  { font-size: 44px; font-weight: 700; letter-spacing: -1px; }
.weather-condition {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 14px;
  margin-left: 2px;
}
.weather-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
}
.weather-detail {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  display: flex;
  gap: 6px;
}

.venue-content { max-width: 280px; }

.venue-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.venue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.venue-card:hover {
  border-color: rgba(233,30,140,0.4);
  background: var(--bg-3);
}

.venue-icon { font-size: 20px; }
.venue-label { flex: 1; font-size: 14px; font-weight: 600; }
.venue-arrow { font-size: 16px; color: var(--brand-light); }

.locked-phone-card {
  background: var(--bg-4);
  border: 1px solid rgba(233,30,140,0.25);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.locked-phone-inner {
  position: relative;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.locked-phone-number {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  filter: blur(5px);
  user-select: none;
}

.locked-phone-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.locked-phone-icon {
  position: absolute;
  font-size: 24px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.locked-phone-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  padding: 6px 0 10px;
  border-top: 1px solid var(--border);
}

.ppv-unlocked {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* Greeting card */
.greeting-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.greeting-card .gc-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 0 30px var(--brand-glow);
}

.greeting-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.greeting-card p { font-size: 14px; color: var(--text-muted); }

/* Input Area */
.chat-input-area {
  padding: 16px 20px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
  transition: border-color var(--transition);
}

.chat-input-inner:focus-within {
  border-color: rgba(233,30,140,0.5);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.message-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  outline: none;
  max-height: 160px;
  padding: 6px 0;
  overflow-y: auto;
}

.message-input::placeholder { color: var(--text-dim); }

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  opacity: 0.5;
  pointer-events: none;
}

.send-btn:not(:disabled) {
  opacity: 1;
  pointer-events: all;
  cursor: pointer;
}

.send-btn:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-brand);
}

.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.input-disclaimer {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 10px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   Fan Name Modal
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  box-shadow: 0 0 40px var(--brand-glow);
}

.modal h2 { font-size: 24px; font-weight: 800; }
.modal p { font-size: 15px; color: var(--text-muted); }

.modal-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
  text-align: center;
}

.modal-input:focus {
  border-color: rgba(233,30,140,0.5);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.modal-input::placeholder { color: var(--text-dim); }

/* =============================================
   Creator Dashboard
   ============================================= */
.dashboard-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-header h1 { font-size: 28px; font-weight: 800; }
.dashboard-header p { color: var(--text-muted); font-size: 15px; margin-top: 4px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.stat-card-icon { font-size: 24px; margin-bottom: 12px; }
.stat-card-value { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.stat-card-label { font-size: 13px; color: var(--text-muted); }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h2 { font-size: 18px; font-weight: 700; }
.panel-body { padding: 24px; }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.form-input, .form-textarea, .form-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: rgba(233,30,140,0.5);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-3); }

.creator-select-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.creator-select-item {
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition);
}

.creator-select-item:hover { background: var(--bg-3); }
.creator-select-item.active { background: rgba(233,30,140,0.1); border: 1px solid rgba(233,30,140,0.2); }

.csi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.csi-info { flex: 1; }
.csi-name { font-size: 14px; font-weight: 600; }
.csi-category { font-size: 12px; color: var(--text-muted); }

.success-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #22c55e;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 300;
}

.success-toast.show { transform: translateY(0); opacity: 1; }

/* =============================================
   Animations
   ============================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 24px 60px;
    text-align: center;
  }

  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }

  .chat-layout { grid-template-columns: 1fr; }

  .chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 150;
    transform: translateX(-100%);
  }

  .chat-sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .menu-btn { display: flex; }

  .message-content { max-width: 85%; }
}

@media (max-width: 900px) {
  .creators-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .header-nav .nav-link { display: none; }
  .creators-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .modal { padding: 28px 20px; }
  .creator-card-action { flex-direction: column; gap: 6px; }
  .creator-card-action .btn { width: 100%; text-align: center; justify-content: center; }
}

/* =============================================
   Burger / Mobile Menu
   ============================================= */

/* Hidden on desktop, shown on mobile */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.burger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}

.burger-btn.open .burger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.open .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open .burger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile slide-down panel */
.mobile-menu-panel {
  display: none;            /* only flex on mobile */
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 98;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px 20px;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-menu-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.mobile-nav-link {
  width: 100%;
  text-align: center;
  padding: 13px 16px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: var(--radius) !important;
  justify-content: center !important;
  display: flex !important;
  background: var(--bg-3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  transition: background 0.15s, border-color 0.15s;
}

.mobile-nav-link:hover {
  background: var(--bg-4) !important;
  border-color: var(--border-hover) !important;
}

/* Home nav button */
.home-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.home-nav-btn.active {
  color: var(--brand-light);
  background: rgba(233,30,140,0.1);
  border-color: rgba(233,30,140,0.25);
}

.home-nav-btn svg {
  flex-shrink: 0;
  vertical-align: middle;
}

@media (max-width: 640px) {
  /* Show burger, hide desktop nav links */
  .burger-btn { display: flex; }
  .header-nav a.btn-ghost { display: none; }
  .mobile-menu-panel { display: flex; }

  /* Keep wallet badge and notif bell visible */
  .header-nav .wallet-badge,
  #notifBadgeBtn { display: inline-flex; }

  /* Tighten header so burger fits */
  .header-inner { padding: 0 14px; }
  .header-nav { gap: 8px; }

  /* Compact wallet badge on mobile */
  .wallet-badge { font-size: 11px; padding: 5px 9px; gap: 4px; }
  .wallet-badge-amount { font-size: 11px; }

  /* Compact notif bell — icon only on mobile */
  .notif-bell { padding: 8px 10px; font-size: 14px; }
  .notif-bell span { display: none; }  /* hide "Inbox" text */
}

/* =============================================
   Wallet Badge (header)
   ============================================= */
.wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.wallet-badge:hover { border-color: var(--brand); color: var(--brand); }
.wallet-badge-amount { color: var(--brand); font-weight: 700; }

/* Notif bell — match header button sizing */
.header-nav .notif-bell {
  padding: 7px 10px;
  font-size: 13px;
}
.header-nav .notif-bell span[style] {
  font-size: 11px;
}

/* =============================================
   Preferences Onboarding Modal
   ============================================= */
.prefs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.prefs-overlay.hidden { display: none; }

.prefs-modal {
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prefs-header { display: flex; flex-direction: column; gap: 10px; }
.prefs-step-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.prefs-progress-track {
  width: 100%;
  height: 4px;
  background: var(--bg-4);
  border-radius: 99px;
  overflow: hidden;
}
.prefs-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 99px;
  transition: width 0.35s ease;
}

.prefs-step { display: none; flex-direction: column; gap: 14px; }
.prefs-step.active { display: flex; }

.prefs-step-emoji { font-size: 36px; text-align: center; }
.prefs-step-title { font-size: 20px; font-weight: 800; color: var(--text); text-align: center; margin: 0; }
.prefs-step-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin: -6px 0 0; }

/* Chips */
.prefs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.prefs-chip {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: 500px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.prefs-chip:hover { border-color: var(--border-hover); color: var(--text); }
.prefs-chip.active {
  background: rgba(233,30,140,0.12);
  border-color: var(--brand);
  color: var(--brand-light);
}

/* Age range dual slider */
.prefs-age-readout {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.prefs-age-readout span { color: var(--brand-light); }

.prefs-dual-range {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  margin: 4px 0;
}
.dual-range-track {
  position: absolute;
  left: 0; right: 0;
  height: 5px;
  background: var(--bg-4);
  border-radius: 99px;
  pointer-events: none;
}
.dual-range-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 99px;
}
.dual-range-thumb {
  position: absolute;
  width: 100%;
  height: 5px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
}
.dual-range-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid var(--bg-2);
  box-shadow: 0 2px 8px rgba(233,30,140,0.5);
  cursor: grab;
  pointer-events: all;
  transition: transform 0.15s;
}
.dual-range-thumb::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }
.dual-range-thumb::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--bg-2);
  cursor: grab; pointer-events: all;
}
.dual-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: -4px;
}

/* Nav buttons */
.prefs-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.prefs-back-btn { flex: 0; min-width: 90px; }
.prefs-next-btn { flex: 1; }

.prefs-skip-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 0;
  margin-top: -8px;
  opacity: 0.6;
  transition: opacity 0.15s;
  font-family: inherit;
}
.prefs-skip-link:hover { opacity: 1; }

@media (max-width: 480px) {
  .prefs-modal { padding: 20px 16px 18px; }
  .prefs-step-title { font-size: 17px; }
  .prefs-chip { font-size: 12px; padding: 7px 12px; }
}

/* =============================================
   Spinner Modal
   ============================================= */
.spinner-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: spinOverlayIn 0.3s ease;
}
.spinner-overlay.hidden { display: none; }

@keyframes spinOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.spinner-modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 80px rgba(233,30,140,0.25), var(--shadow);
  animation: spinModalIn 0.45s cubic-bezier(0.16,1,0.3,1);
}

@keyframes spinModalIn {
  from { transform: translateY(28px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.spinner-modal-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.spinner-modal-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.spinner-wheel-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.spinner-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 26px solid var(--brand);
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(233,30,140,0.7));
}

#wheelCanvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(233,30,140,0.3), 0 0 0 4px var(--bg-4);
}

.spinner-result {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.spinner-win-msg {
  font-size: 20px;
  font-weight: 800;
  animation: winPop 0.5s cubic-bezier(0.16,1,0.3,1);
}

@keyframes winPop {
  0%   { transform: scale(0.4); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.spinner-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spinner-snooze-btn {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  opacity: 0.7;
}
.spinner-snooze-btn:hover { opacity: 1; }

/* =============================================
   Wallet Page
   ============================================= */
.wallet-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.wallet-page-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.wallet-page-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 36px;
}

.wallet-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.wallet-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-balance-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.wallet-balance-amount {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wallet-balance-symbol {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
}

.wallet-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.wallet-mini-stat {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.wallet-mini-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.wallet-mini-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.apr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(233,30,140,0.12);
  border: 1px solid rgba(233,30,140,0.35);
  color: var(--brand);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.rewards-counter {
  font-size: 40px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 4px 0 6px;
  transition: opacity 0.15s ease;
}
.rewards-counter.tick { opacity: 0.7; }

.rewards-rate {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.rewards-rate span { color: var(--text); font-weight: 600; }

.stake-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.stake-info-row:last-of-type { border-bottom: none; }
.stake-info-label { color: var(--text-muted); }
.stake-info-value { font-weight: 600; font-variant-numeric: tabular-nums; }

.stake-input-group {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.stake-input-wrap {
  flex: 1;
  position: relative;
}
.stake-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 56px 11px 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}
.stake-input:focus { border-color: var(--brand); }
.stake-input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  pointer-events: none;
  letter-spacing: 0.04em;
}
.stake-max-btn {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 3px;
  font-family: var(--font);
  transition: color var(--transition);
}
.stake-max-btn:hover { color: var(--brand); }

.stake-section-label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 20px;
  margin-bottom: 4px;
}
.stake-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
}

.wallet-spin-card {
  text-align: center;
  padding: 36px 28px;
}
.wallet-spin-icon { font-size: 52px; margin-bottom: 12px; }
.wallet-spin-text { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }

@media (max-width: 600px) {
  .wallet-balance-amount { font-size: 40px; }
  .rewards-counter { font-size: 30px; }
  .wallet-page { padding: 28px 16px 60px; }
  .wallet-balance-grid { grid-template-columns: 1fr; }
}

/* =============================================
   Free Spinner — session counter
   ============================================= */
.spinner-spins-left {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

/* =============================================
   Games Page
   ============================================= */
.games-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.games-page-header {
  text-align: center;
  margin-bottom: 32px;
}
.games-page-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.games-page-subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

/* Tabs */
.games-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.games-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.games-tab:hover { color: var(--text); }
.games-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Game Panel */
.games-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.games-panel.hidden { display: none; }

/* Info bar */
.games-info-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.games-balance-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.games-balance-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.games-balance-value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.games-balance-unit {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}
.games-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233,30,140,0.12);
  border: 1px solid rgba(233,30,140,0.35);
  color: var(--brand);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
}

.games-footer-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  text-align: center;
}

.games-insufficient {
  font-size: 14px;
  font-weight: 600;
  color: #f87171;
  text-align: center;
}

/* =============================================
   Roulette
   ============================================= */
#rouletteCanvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(233,30,140,0.3), 0 0 0 4px var(--bg-4);
}
.roulette-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.roulette-chip {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg-3);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roulette-chip:hover { border-color: var(--brand); }
.roulette-chip.active {
  border-color: var(--brand);
  background: rgba(233,30,140,0.2);
  color: var(--brand);
  box-shadow: 0 0 16px rgba(233,30,140,0.35);
}
.roulette-bet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 380px;
  margin-bottom: 16px;
}
.roulette-bet-btn {
  padding: 12px 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.roulette-bet-btn:hover { border-color: rgba(233,30,140,0.5); }
.roulette-bet-btn.active {
  border-color: var(--brand);
  background: rgba(233,30,140,0.15);
  color: var(--brand);
}
.roulette-red.active  { background: rgba(183,28,28,0.25); border-color: #e53935; color: #ef9a9a; }
.roulette-black.active{ background: rgba(10,10,20,0.6);   border-color: #555;    color: #ccc; }
.bet-payout {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}
.roulette-bet-btn.active .bet-payout { color: inherit; opacity: 0.75; }

/* =============================================
   3 Card Poker
   ============================================= */
.poker-area {
  width: 100%;
  max-width: 380px;
  margin-bottom: 20px;
  text-align: center;
}
.poker-area-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.poker-hand {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.poker-card {
  width: 72px;
  height: 104px;
  border-radius: 8px;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.12);
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  position: relative;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  font-weight: 800;
  font-size: 14px;
}
.poker-card.red { color: #c62828; }
.poker-card-corner {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  align-self: stretch;
}
.poker-card-corner small { font-size: 10px; font-weight: 700; }
.poker-card-tl { text-align: left; }
.poker-card-br { text-align: right; transform: rotate(180deg); }
.poker-card-suit {
  font-size: 26px;
  line-height: 1;
}
.poker-card-back {
  background: repeating-linear-gradient(
    45deg,
    #1a237e,
    #1a237e 4px,
    #283593 4px,
    #283593 8px
  );
  border-color: rgba(255,255,255,0.1);
}
.poker-card-empty {
  background: var(--bg-2);
  border: 2px dashed var(--border);
  box-shadow: none;
}
.poker-action-btns {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
}
.poker-action-btns .btn { flex: 1; }

/* =============================================
   Slots Machine
   ============================================= */
.slots-machine {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 24px;
}
.slots-reels {
  display: flex;
  gap: 8px;
  background: var(--bg);
  border: 2px solid rgba(233,30,140,0.4);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 0 32px rgba(233,30,140,0.15);
  position: relative;
}
.slots-reel {
  flex: 1;
  height: 240px;   /* 3 × 80px */
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
}
.slots-reel-inner {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.slots-cell {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
  user-select: none;
}
/* Payline — horizontal bar across all 3 reels at middle cell */
.slots-payline {
  position: absolute;
  top: calc(50% - 1px);
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(233,30,140,0.7), transparent);
  pointer-events: none;
  z-index: 2;
}
/* Fade top/bottom of each reel for depth */
.slots-reel::before,
.slots-reel::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 48px;
  z-index: 1;
  pointer-events: none;
}
.slots-reel::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-2), transparent);
}
.slots-reel::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg-2), transparent);
}

/* Paytable */
.slots-paytable {
  width: 100%;
  max-width: 380px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.slots-paytable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.slots-paytable-row:last-child { border-bottom: none; }
.slots-pay-amount {
  font-weight: 700;
  color: var(--brand);
}

@media (max-width: 600px) {
  .games-page { padding: 28px 16px 60px; }
  .games-info-bar { flex-direction: column; gap: 12px; text-align: center; }
}

/* =============================================
   Footer Config Button
   ============================================= */
.footer-config-btn {
  margin-top: 12px;
  opacity: 0.6;
  font-size: 12px;
}
.footer-config-btn:hover { opacity: 1; }

/* =============================================
   Streaming — Leaderboard Page
   ============================================= */

/* Shared live dot */
.live-dot {
  width: 9px; height: 9px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  animation: livePulse 1.4s ease-in-out infinite;
}
.live-dot-xs { width: 6px; height: 6px; }

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(1.35); }
}

/* Gold gradient text */
.gradient-text-gold {
  background: linear-gradient(135deg, #f9c74f, #f4a118, #e8740a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Body override for streaming page */
.streaming-body { background: #0d0d18; }

/* ── Hero ── */
.stream-hero {
  position: relative;
  padding: 56px 24px 0;
  text-align: center;
  overflow: hidden;
}
.stream-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(233,30,140,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 20% 50%, rgba(124,58,237,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.stream-hero-content { position: relative; z-index: 1; }

.stream-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.stream-hero-title {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1.1;
}
.stream-hero-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Time Tabs ── */
.stream-tabs {
  display: inline-flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 48px;
}
.stream-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.stream-tab:hover { color: var(--text); }
.stream-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

/* ── Main ── */
.stream-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ── Podium ── */
.stream-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  flex: 1;
  max-width: 220px;
}
.podium-slot:hover { transform: translateY(-6px); }

.podium-rank-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  border: 2px solid var(--bg);
}
.rank-1 { background: linear-gradient(135deg, #f9c74f, #e8740a); color: #1a1a1a; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #808080); color: #1a1a1a; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }

.podium-avatar-wrap {
  position: relative;
  margin-top: 10px;
  margin-bottom: 4px;
}
.podium-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  display: block;
}
.podium-avatar-lg .podium-avatar-img-lg {
  width: 100px; height: 100px;
}
.podium-avatar-img-lg {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f9c74f;
  box-shadow: 0 0 24px rgba(249,199,79,0.4);
  display: block;
}
.podium-1 .podium-avatar { border-color: #f9c74f; }
.podium-2 .podium-avatar { border-color: #c0c0c0; }
.podium-3 .podium-avatar { border-color: #cd7f32; }

.podium-live-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 12px; height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #0d0d18;
}

.podium-crown {
  font-size: 24px;
  margin-bottom: 6px;
  line-height: 1;
}
.rank-2-crown, .rank-3-crown { font-size: 20px; }

.podium-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  text-align: center;
}
.podium-name-lg { font-size: 16px; }

.podium-country {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.podium-diamonds {
  font-size: 13px;
  font-weight: 700;
  color: #818cf8;
  margin-bottom: 4px;
}
.podium-diamonds-lg { font-size: 15px; color: #a78bfa; }

.podium-viewers {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.podium-base {
  width: 100%;
  border-radius: 12px 12px 0 0;
  margin-top: 8px;
}
.podium-base-1 { height: 80px; background: linear-gradient(180deg, rgba(249,199,79,0.25), rgba(249,199,79,0.05)); border: 1px solid rgba(249,199,79,0.2); border-bottom: none; }
.podium-base-2 { height: 56px; background: linear-gradient(180deg, rgba(192,192,192,0.15), rgba(192,192,192,0.03)); border: 1px solid rgba(192,192,192,0.15); border-bottom: none; }
.podium-base-3 { height: 40px; background: linear-gradient(180deg, rgba(205,127,50,0.15), rgba(205,127,50,0.03)); border: 1px solid rgba(205,127,50,0.15); border-bottom: none; }

/* Watch buttons */
.stream-watch-btn-sm {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 20px;
  border-radius: 100px;
  margin-top: 10px;
}
.stream-watch-btn-sm:hover {
  box-shadow: 0 4px 16px var(--brand-glow);
  transform: translateY(-1px);
}
.stream-watch-btn-gold {
  background: linear-gradient(135deg, #f9c74f, #e8740a);
  color: #1a1a1a;
}
.stream-watch-btn-gold:hover { box-shadow: 0 4px 20px rgba(249,199,79,0.4); }

/* ── Ranked List ── */
.stream-ranked-list {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}

.ranked-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.ranked-row:last-child { border-bottom: none; }
.ranked-row:hover { background: var(--bg-4); }

.ranked-pos {
  width: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ranked-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.ranked-info { flex: 1; min-width: 0; }
.ranked-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ranked-flag { font-size: 13px; }
.ranked-category {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.ranked-viewers {
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ranked-diamonds {
  font-size: 13px;
  font-weight: 700;
  color: #818cf8;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.stream-watch-btn-xs {
  background: rgba(233,30,140,0.15);
  color: var(--brand);
  border: 1px solid rgba(233,30,140,0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.stream-watch-btn-xs:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ── Prize Banner ── */
.stream-prize-banner {
  background: linear-gradient(135deg, rgba(249,199,79,0.1), rgba(232,116,10,0.08));
  border: 1px solid rgba(249,199,79,0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.prize-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.prize-icon { font-size: 32px; flex-shrink: 0; }
.prize-text { flex: 1; }
.prize-title { font-size: 15px; font-weight: 800; color: #f9c74f; margin-bottom: 2px; }
.prize-sub { font-size: 13px; color: var(--text-muted); }
.prize-sub strong { color: var(--text); }
.prize-btn { flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .stream-hero-title { font-size: 32px; }
  .stream-podium { gap: 8px; }
  .podium-avatar { width: 64px; height: 64px; }
  .podium-avatar-img-lg { width: 80px; height: 80px; }
  .ranked-diamonds { display: none; }
  .stream-tabs { flex-wrap: wrap; border-radius: 16px; }
  .prize-banner-inner { flex-wrap: wrap; }
}

/* =============================================
   Stream View Page (stream.html)
   ============================================= */
.stream-view-body {
  background: #000;
  overflow: hidden;
  height: 100vh;
}

.stream-view-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Video Panel ── */
.stream-video-panel {
  flex: 1;
  position: relative;
  background: #0a0a0f;
  overflow: hidden;
  min-width: 0;
}

.stream-video-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: blur(2px) brightness(0.55) saturate(1.2);
  transform: scale(1.05);
  transition: background-image 0.3s ease;
}

.stream-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 40%, transparent 70%),
    linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 20%);
}

/* Top bar */
.stream-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 10;
}

.stream-back-btn {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: background var(--transition);
}
.stream-back-btn:hover { background: rgba(0,0,0,0.65); }

.stream-top-actions { display: flex; gap: 8px; }
.stream-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.stream-icon-btn:hover { background: rgba(0,0,0,0.65); }

/* Creator overlay */
.stream-creator-overlay {
  position: absolute;
  bottom: 110px; left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.stream-creator-ava-wrap { position: relative; flex-shrink: 0; }
.stream-creator-ava {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
  box-shadow: 0 0 16px var(--brand-glow);
}
.stream-live-badge-sm {
  position: absolute;
  bottom: -4px; left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.stream-creator-meta {}
.stream-creator-oname {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  margin-bottom: 2px;
}
.stream-creator-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.stream-follow-btn {
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.stream-follow-btn:hover { background: var(--brand-dark); box-shadow: 0 4px 16px var(--brand-glow); }

/* Stats overlay */
.stream-stats-overlay {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.stream-stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
}

/* Floating gifts */
.stream-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}
.stream-float-item {
  position: absolute;
  bottom: 120px;
  font-size: 32px;
  animation: floatUp 2.6s ease-out forwards;
  pointer-events: none;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  15%  { transform: translateY(-20px) scale(1.2); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-220px) scale(0.9); opacity: 0; }
}

/* ── Chat Panel ── */
.stream-chat-panel {
  width: 340px;
  flex-shrink: 0;
  background: #0d0d18;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.stream-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.stream-chat-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.stream-rank-badge {
  font-size: 12px;
  font-weight: 700;
  color: #f9c74f;
  background: rgba(249,199,79,0.12);
  border: 1px solid rgba(249,199,79,0.25);
  padding: 3px 10px;
  border-radius: 100px;
}

.stream-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth;
}
.stream-chat-messages::-webkit-scrollbar { width: 4px; }
.stream-chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  word-break: break-word;
}
.chat-msg-gift {
  background: rgba(233,30,140,0.08);
  border: 1px solid rgba(233,30,140,0.15);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--text);
}
.chat-msg-name {
  font-weight: 700;
  color: var(--brand-light);
  margin-right: 4px;
}

/* ── Gift bar ── */
.stream-gift-bar {
  border-top: 1px solid var(--border);
  padding: 12px 14px 8px;
  flex-shrink: 0;
}
.stream-gift-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stream-gifts-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gift-btn {
  flex: 1;
  min-width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 4px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.gift-btn:hover {
  border-color: var(--brand);
  background: rgba(233,30,140,0.1);
  transform: translateY(-2px);
}
.gift-emoji { font-size: 20px; line-height: 1; }
.gift-price {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
}

/* ── Input row ── */
.stream-input-row {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stream-wallet-mini {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}
.stream-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.stream-msg-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-size: 13px;
  padding: 9px 16px;
  outline: none;
  transition: border-color var(--transition);
}
.stream-msg-input:focus { border-color: var(--brand); }
.stream-msg-input::placeholder { color: var(--text-dim); }
.stream-send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: all var(--transition);
}
.stream-send-btn:hover { background: var(--brand-dark); box-shadow: 0 4px 12px var(--brand-glow); }

/* ── Responsive ── */
@media (max-width: 700px) {
  .stream-view-layout { flex-direction: column; }
  .stream-video-panel { height: 50vh; flex: none; }
  .stream-chat-panel { width: 100%; height: 50vh; border-left: none; border-top: 1px solid var(--border); }
  .stream-creator-overlay { bottom: 20px; }
}

/* =============================================
   Light Mode
   ============================================= */
body.light {
  --bg: #f5f5fa;
  --bg-2: #ffffff;
  --bg-3: #ededf4;
  --bg-4: #e4e4ee;
  --border: rgba(0,0,0,0.09);
  --border-hover: rgba(0,0,0,0.18);
  --text: #0d0d14;
  --text-muted: #5a5a70;
  --text-dim: #9999b0;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
}

body.light .header {
  background: rgba(245,245,250,0.92);
  border-bottom-color: rgba(0,0,0,0.09);
}

body.light .creator-card,
body.light .token-card,
body.light .wallet-card,
body.light .game-card {
  background: var(--bg-2);
}

body.light .chat-messages {
  background: var(--bg);
}

body.light .msg.assistant .msg-bubble {
  background: var(--bg-3);
  border-color: var(--border);
}

/* =============================================
   Theme Toggle Button
   ============================================= */
.theme-toggle-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  line-height: 1;
}
.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-4);
}

/* =============================================
   Chat history restore separator
   ============================================= */
.chat-restore-header {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 10px 0 18px;
  letter-spacing: 0.04em;
  position: relative;
}
.chat-restore-header::before,
.chat-restore-header::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: var(--border);
}
.chat-restore-header::before { left: 0; }
.chat-restore-header::after  { right: 0; }

/* =============================================
   Sidebar Tabs (chat page — Profile / Followed)
   ============================================= */
.sidebar-tabs {
  display: flex;
  padding: 6px 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 2px;
  flex-shrink: 0;
}
.sidebar-tab {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: all var(--transition);
  white-space: nowrap;
}
.sidebar-tab:hover { color: var(--text); }
.sidebar-tab.active {
  color: var(--brand-light);
  border-bottom-color: var(--brand);
}

/* Followed creators list */
.followed-panel {
  flex: 1;
  overflow-y: auto;
  display: none;
}
.followed-panel.active { display: block; }
.followed-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.followed-empty a {
  color: var(--brand-light);
  text-decoration: none;
}
.followed-creator-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition);
}
.followed-creator-item:hover { background: var(--bg-3); }
.followed-creator-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
}
.followed-creator-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.followed-creator-info { flex: 1; min-width: 0; }
.followed-creator-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.followed-creator-user {
  font-size: 11px;
  color: var(--text-muted);
}
.followed-chat-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  background: rgba(233,30,140,0.15);
  color: var(--brand-light);
  border: 1px solid rgba(233,30,140,0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =============================================
   Follow Button (profile page)
   ============================================= */
.btn-following {
  background: rgba(233,30,140,0.15) !important;
  border-color: rgba(233,30,140,0.4) !important;
  color: var(--brand-light) !important;
}
