/* ============================================================
   VALYRYESFANS — Premium Design System
   Dual Theme: Deep Purple & Gold (Dark) / Fuchsia Pink & Rose Gold (Light)
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* --- Static Design Tokens (shared across themes) --- */
:root {
  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;
  --text-6xl: 4rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Layout */
  --nav-height: 72px;
  --sidebar-width: 280px;
  --max-content-width: 1200px;

  /* Status — same in both themes */
  --success: #4ade80;
  --error: #f87171;
  --warning: #fbbf24;
  --online: #22c55e;
}

/* ============================================================
   DARK THEME — Deep Purple, Dark Gold, Black
   ============================================================ */
[data-theme="dark"],
:root {
  /* Backgrounds */
  --bg-primary: #09090f;
  --bg-secondary: #0f0e18;
  --bg-card: #14121f;
  --bg-elevated: #1a1726;
  --bg-hover: #1f1b2e;
  --bg-input: #100e1a;

  /* Accent — Dark Gold */
  --accent: #c9956b;
  --accent-light: #deb48d;
  --accent-dark: #a07550;
  --accent-glow: rgba(201, 149, 107, 0.15);
  --accent-subtle: rgba(201, 149, 107, 0.08);

  /* Text */
  --text-primary: #f0eef5;
  --text-secondary: #9d95b0;
  --text-muted: #6b6280;
  --text-accent: var(--accent-light);

  /* Borders */
  --border: rgba(160, 140, 200, 0.08);
  --border-light: rgba(160, 140, 200, 0.14);
  --border-accent: rgba(201, 149, 107, 0.3);

  /* Glass */
  --glass-bg: rgba(140, 120, 200, 0.04);
  --glass-bg-hover: rgba(140, 120, 200, 0.08);
  --glass-border: rgba(140, 120, 200, 0.1);
  --glass-blur: 20px;

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #c9956b 0%, #deb48d 50%, #a07550 100%);
  --gradient-dark: linear-gradient(180deg, transparent 0%, rgba(9, 9, 15, 0.8) 60%, #09090f 100%);
  --gradient-hero: linear-gradient(180deg, transparent 0%, rgba(9, 9, 15, 0.4) 40%, #09090f 100%);
  --gradient-card: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  --gradient-gold: linear-gradient(135deg, #c9956b 0%, #f0d4a8 40%, #c9956b 60%, #a07550 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(201, 149, 107, 0.2);
  --shadow-glow-lg: 0 0 60px rgba(201, 149, 107, 0.3);

  /* Specific overrides for components */
  --nav-bg: rgba(9, 9, 15, 0.85);
  --nav-bg-scrolled: rgba(9, 9, 15, 0.95);
  --mobile-menu-bg: rgba(9, 9, 15, 0.95);
  --scrollbar-thumb: rgba(201, 149, 107, 0.3);
  --btn-primary-text: #09090f;
  --btn-shimmer: rgba(255, 255, 255, 0.2);

  /* Overlays */
  --overlay-badge-bg: rgba(0, 0, 0, 0.6);
  --overlay-lock-bg: rgba(0, 0, 0, 0.5);
  --overlay-lightbox: rgba(0, 0, 0, 0.95);
  --overlay-modal: rgba(0, 0, 0, 0.7);

  /* Badges */
  --sub-badge-free-bg: rgba(140, 120, 200, 0.12);
  --sub-badge-free-border: rgba(140, 120, 200, 0.25);
  --sub-badge-free-color: #b0a3d0;
  --sub-badge-gold-bg: rgba(201, 149, 107, 0.15);

  /* Tier card popular glow */
  --tier-popular-bg: linear-gradient(180deg, rgba(201, 149, 107, 0.05) 0%, var(--bg-card) 40%);

  /* Paywall radial glow */
  --paywall-glow: radial-gradient(ellipse at center, rgba(201, 149, 107, 0.05) 0%, transparent 70%);

  /* Content detail header */
  --content-header-gradient: linear-gradient(transparent, rgba(0, 0, 0, 0.8));

  /* Form */
  --form-check-bg: rgba(255, 255, 255, 0.1);
  --form-check-active: rgba(255, 255, 255, 0.2);
  --form-divider-line: rgba(255, 255, 255, 0.06);
  --form-divider-bg: var(--bg-card);

  /* Toasts */
  --toast-bg: rgba(0, 0, 0, 0.6);

  /* Glassmorphism */
  --glass-card-bg: rgba(20, 18, 31, 0.55);
  --glass-card-border: rgba(140, 120, 200, 0.12);
  --glass-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-panel-bg: rgba(14, 12, 24, 0.65);
  --glass-panel-border: rgba(140, 120, 200, 0.08);
  --glass-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);

  /* Sidebar */
  --sidebar-bg: var(--glass-panel-bg);
  --sidebar-item-hover: rgba(140, 120, 200, 0.1);
  --sidebar-item-active: rgba(201, 149, 107, 0.1);
  --sidebar-divider: rgba(140, 120, 200, 0.08);

  /* Toggle switch */
  --toggle-bg: rgba(140, 120, 200, 0.2);
  --toggle-bg-active: var(--accent);
  --toggle-knob: #ffffff;

  /* Danger */
  --danger: #e74c3c;
  --danger-subtle: rgba(231, 76, 60, 0.1);
  --danger-border: rgba(231, 76, 60, 0.3);

  /* Success */
  --success: #2ecc71;
  --success-subtle: rgba(46, 204, 113, 0.1);
}

/* ============================================================
   LIGHT THEME — Fuchsia Pink, Rose Gold, White
   ============================================================ */
[data-theme="light"] {
  /* Backgrounds */
  --bg-primary: #fdf5f8;
  --bg-secondary: #fff0f5;
  --bg-card: #ffffff;
  --bg-elevated: #fff8fa;
  --bg-hover: #fce8f0;
  --bg-input: #fff0f5;

  /* Accent — Rose Gold / Fuchsia */
  --accent: #d4547a;
  --accent-light: #c43d66;
  --accent-dark: #a83a5c;
  --accent-glow: rgba(212, 84, 122, 0.12);
  --accent-subtle: rgba(212, 84, 122, 0.06);

  /* Text */
  --text-primary: #1a0e14;
  --text-secondary: #6b4a5a;
  --text-muted: #9a7a8a;
  --text-accent: var(--accent-light);

  /* Borders */
  --border: rgba(180, 100, 140, 0.12);
  --border-light: rgba(180, 100, 140, 0.2);
  --border-accent: rgba(212, 84, 122, 0.3);

  /* Glass */
  --glass-bg: rgba(212, 84, 122, 0.04);
  --glass-bg-hover: rgba(212, 84, 122, 0.08);
  --glass-border: rgba(212, 84, 122, 0.1);
  --glass-blur: 20px;

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #d4547a 0%, #e88fa6 50%, #c9416a 100%);
  --gradient-dark: linear-gradient(180deg, transparent 0%, rgba(253, 245, 248, 0.8) 60%, #fdf5f8 100%);
  --gradient-hero: linear-gradient(180deg, transparent 0%, rgba(253, 245, 248, 0.4) 40%, #fdf5f8 100%);
  --gradient-card: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.85) 100%);
  --gradient-gold: linear-gradient(135deg, #c9956b 0%, #f0d4a8 40%, #c9956b 60%, #a07550 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(180, 100, 140, 0.08);
  --shadow-md: 0 4px 16px rgba(180, 100, 140, 0.1);
  --shadow-lg: 0 8px 32px rgba(180, 100, 140, 0.12);
  --shadow-xl: 0 16px 48px rgba(180, 100, 140, 0.15);
  --shadow-glow: 0 0 30px rgba(212, 84, 122, 0.15);
  --shadow-glow-lg: 0 0 60px rgba(212, 84, 122, 0.2);

  /* Component overrides */
  --nav-bg: rgba(253, 245, 248, 0.85);
  --nav-bg-scrolled: rgba(253, 245, 248, 0.95);
  --mobile-menu-bg: rgba(253, 245, 248, 0.97);
  --scrollbar-thumb: rgba(212, 84, 122, 0.3);
  --btn-primary-text: #ffffff;
  --btn-shimmer: rgba(255, 255, 255, 0.3);

  /* Overlays */
  --overlay-badge-bg: rgba(255, 255, 255, 0.7);
  --overlay-lock-bg: rgba(255, 240, 245, 0.6);
  --overlay-lightbox: rgba(253, 245, 248, 0.96);
  --overlay-modal: rgba(253, 245, 248, 0.8);

  /* Badges */
  --sub-badge-free-bg: rgba(212, 84, 122, 0.08);
  --sub-badge-free-border: rgba(212, 84, 122, 0.2);
  --sub-badge-free-color: #d4547a;
  --sub-badge-gold-bg: rgba(201, 149, 107, 0.15);

  /* Tier card popular glow */
  --tier-popular-bg: linear-gradient(180deg, rgba(212, 84, 122, 0.06) 0%, var(--bg-card) 40%);

  /* Paywall radial glow */
  --paywall-glow: radial-gradient(ellipse at center, rgba(212, 84, 122, 0.05) 0%, transparent 70%);

  /* Content detail header */
  --content-header-gradient: linear-gradient(transparent, rgba(255, 255, 255, 0.9));

  /* Form */
  --form-check-bg: rgba(212, 84, 122, 0.08);
  --form-check-active: rgba(212, 84, 122, 0.15);
  --form-divider-line: rgba(180, 100, 140, 0.15);
  --form-divider-bg: var(--bg-card);

  /* Toasts */
  --toast-bg: rgba(255, 255, 255, 0.85);

  /* Glassmorphism */
  --glass-card-bg: rgba(255, 240, 245, 0.45);
  --glass-card-border: rgba(212, 84, 122, 0.12);
  --glass-card-shadow: 0 8px 32px rgba(180, 100, 140, 0.08);
  --glass-panel-bg: rgba(255, 245, 248, 0.6);
  --glass-panel-border: rgba(212, 84, 122, 0.08);
  --glass-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);

  /* Sidebar */
  --sidebar-bg: var(--glass-panel-bg);
  --sidebar-item-hover: rgba(212, 84, 122, 0.08);
  --sidebar-item-active: rgba(212, 84, 122, 0.12);
  --sidebar-divider: rgba(180, 100, 140, 0.12);

  /* Toggle switch */
  --toggle-bg: rgba(180, 100, 140, 0.2);
  --toggle-bg-active: var(--accent);
  --toggle-knob: #ffffff;

  /* Danger */
  --danger: #e74c3c;
  --danger-subtle: rgba(231, 76, 60, 0.06);
  --danger-border: rgba(231, 76, 60, 0.2);

  /* Success */
  --success: #2ecc71;
  --success-subtle: rgba(46, 204, 113, 0.06);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent);
}

img, video {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

input, textarea {
  font-family: var(--font-body);
  border: none;
  outline: none;
  background: none;
  color: var(--text-primary);
}

/* --- Typography Utilities --- */
.font-display {
  font-family: var(--font-display);
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- App Shell --- */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-content {
  flex: 1;
  margin-top: var(--nav-height);
  position: relative;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  padding: 0 var(--space-8);
  transition: background var(--transition-base);
}

.navbar.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--shadow-md);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  letter-spacing: 0.5px;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: var(--btn-primary-text);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--glass-bg-hover);
}

.nav-link.active {
  color: var(--accent-light);
  background: var(--accent-subtle);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--space-6);
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-accent);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: none;
  padding: 0;
}

.nav-avatar:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Profile Dropdown Menu --- */
.nav-dropdown-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sticky) + 5);
}

.nav-dropdown-overlay.open {
  display: block;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  width: 260px;
  max-height: calc(100vh - var(--nav-height) - var(--space-8));
  overflow-y: auto;
  background: rgba(15, 12, 25, 0.94); /* Darker background for visibility */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-2);
  box-shadow: var(--glass-card-shadow), 0 20px 60px rgba(0, 0, 0, 0.4);
  z-index: calc(var(--z-sticky) + 10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

body.light-theme .nav-dropdown {
  background: rgba(255, 238, 243, 0.94); /* Light theme version */
  border-color: rgba(0, 0, 0, 0.08);
}

.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-dropdown::-webkit-scrollbar { width: 3px; }
.nav-dropdown::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.nav-dropdown__section {
  padding: var(--space-1) 0;
}

.nav-dropdown__divider {
  height: 1px;
  background: var(--sidebar-divider);
  margin: var(--space-1) var(--space-3);
}

.nav-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
}

.nav-dropdown__item:hover {
  background: var(--sidebar-item-hover);
  color: var(--text-primary);
}

.nav-dropdown__item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.nav-dropdown__item:hover svg {
  color: var(--accent-light);
}

.nav-dropdown__item--danger {
  color: var(--danger);
}

.nav-dropdown__item--danger:hover {
  background: var(--danger-subtle);
  color: var(--danger);
}

.nav-dropdown__item--danger svg {
  color: var(--danger);
}


/* Mobile Menu Toggle */
.nav-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  margin-left: auto;
}

.nav-menu-toggle:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Shimmer effect on primary buttons */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--btn-shimmer), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before {
  left: 100%;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--glass-card-shadow), var(--glass-inset-shadow);
}

.card-glass:hover {
  border-color: var(--accent-subtle);
  box-shadow: var(--glass-card-shadow), var(--glass-inset-shadow), var(--shadow-glow);
}

.card-accent {
  border-color: var(--border-accent);
}

.card-accent:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

/* --- Profile Layout --- */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  min-height: calc(100vh - var(--nav-height));
  padding: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Profile Sidebar --- */
.profile-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
  height: fit-content;
  max-height: calc(100vh - var(--nav-height) - var(--space-16));
  overflow-y: auto;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-panel-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--glass-card-shadow);
}

.profile-sidebar::-webkit-scrollbar { width: 3px; }
.profile-sidebar::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.sidebar-section { margin-bottom: var(--space-2); }

.sidebar-divider {
  height: 1px;
  background: var(--sidebar-divider);
  margin: var(--space-2) var(--space-3);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  width: 100%;
}

.sidebar-item:hover {
  background: var(--sidebar-item-hover);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--sidebar-item-active);
  color: var(--accent-light);
}

.sidebar-item svg { flex-shrink: 0; }

.sidebar-item--danger { color: var(--danger); }
.sidebar-item--danger:hover { background: var(--danger-subtle); color: var(--danger); }

.sidebar-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* --- Toggle Switch --- */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--toggle-bg);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-switch .toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--toggle-knob);
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--toggle-bg-active);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* --- Checkout Form --- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8);
}

.checkout-card-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.checkout-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.checkout-summary {
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

/* --- Welcome Gold Page --- */
.welcome-gold-hero {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  position: relative;
  overflow: hidden;
}

.welcome-gold-hero .confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  opacity: 0;
}

@keyframes confettiFall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(calc(100vh)) rotate(720deg); opacity: 0; }
}

.welcome-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  max-width: 700px;
  margin: var(--space-10) auto 0;
}

/* --- Notification Items --- */
.notification-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-item--unread {
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
}

.notification-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}

/* --- Settings Sections --- */
.settings-section {
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
}

.settings-section--danger {
  border-color: var(--danger-border);
  background: var(--danger-subtle);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child { border-bottom: none; }

/* --- Static Page Content --- */
.static-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8) var(--space-24);
}

.static-page h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.static-page h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--accent-light);
}

.static-page p, .static-page li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.static-page ul {
  padding-left: var(--space-6);
  list-style-type: disc;
}

/* --- Leaderboard --- */
.leaderboard-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--space-2);
}

.leaderboard-table td {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: none;
}

.leaderboard-table tr td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.leaderboard-table tr td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.leaderboard-table tr.current-user td {
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
}

/* --- Mobile Responsive: Profile --- */
@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
    padding: var(--space-4);
  }

  .profile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    z-index: calc(var(--z-sticky) + 1);
    transition: left var(--transition-base);
  }

  .profile-sidebar.mobile-open {
    left: 0;
  }

  .sidebar-mobile-toggle {
    display: flex !important;
  }

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

  .welcome-benefits-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-podium {
    grid-template-columns: 1fr;
  }
}

.sidebar-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-card-border);
  color: var(--text-secondary);
  cursor: pointer;
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: var(--z-sticky);
}

.sidebar-mobile-toggle:hover {
  color: var(--accent-light);
  border-color: var(--border-accent);
}

/* --- Tip Modal --- */
.tip-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-modal);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.tip-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.tip-modal {
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--glass-card-shadow);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

.tip-modal-overlay.active .tip-modal {
  transform: translateY(0) scale(1);
}

.tip-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.tip-amount-btn {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.tip-amount-btn:hover,
.tip-amount-btn.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent-light);
}

/* --- Video Player Overlay --- */
.gallery-card__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 2;
  pointer-events: none;
  transition: all var(--transition-fast);
}

.gallery-card:hover .gallery-card__play-btn {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.video-player-wrapper video {
  width: 100%;
  display: block;
}

/* --- Gallery Card Tip Button --- */
.gallery-card__tip-btn {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition-fast);
  font-size: 16px;
}

.gallery-card__tip-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

/* --- Admin Panel --- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-height));
  gap: 0;
}

.admin-sidebar {
  background: var(--glass-panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-panel-border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.admin-tab:hover {
  background: var(--sidebar-item-hover);
  color: var(--text-primary);
}

.admin-tab.active {
  background: var(--sidebar-item-active);
  color: var(--accent-light);
}

.admin-content {
  padding: var(--space-8);
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-height));
}

.admin-messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: calc(100vh - var(--nav-height) - var(--space-16));
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--glass-card-border);
}

.admin-user-list {
  background: var(--glass-panel-bg);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--glass-panel-border);
  overflow-y: auto;
}

.admin-user-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border);
}

.admin-user-item:hover {
  background: var(--sidebar-item-hover);
}

.admin-user-item.active {
  background: var(--sidebar-item-active);
}

.admin-chat-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--glass-panel-border);
  }
  .admin-messages-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  padding: var(--space-4);
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  transition: all var(--transition-base);
}

.gallery-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.gallery-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-card__image {
  transform: scale(1.08);
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gallery-card:hover .gallery-card__overlay {
  opacity: 1;
}

.gallery-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.gallery-card__meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.gallery-card__type-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--overlay-badge-bg);
  backdrop-filter: blur(10px);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  z-index: 2;
}

/* Locked/Paywalled Content */
.gallery-card--locked .gallery-card__image {
  filter: blur(20px) brightness(0.5);
}

.gallery-card--locked .gallery-card__overlay {
  opacity: 1;
  background: var(--overlay-lock-bg);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.lock-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--accent-light);
  font-size: var(--text-xl);
}

.lock-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-8) var(--space-12);
}

.hero__avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 3px solid var(--accent);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-glow-lg);
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.hero__handle {
  font-size: var(--text-lg);
  color: var(--accent-light);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.hero__bio {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero__stats {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent-light);
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: var(--space-1);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

/* --- Section Layout --- */
.section {
  padding: var(--space-16) var(--space-8);
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-top: var(--space-2);
}

/* --- Subscription Tiers --- */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  padding: var(--space-4) 0;
  max-width: 800px;
  margin: 0 auto;
}

.tier-card {
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-card-shadow), var(--glass-inset-shadow);
}

.tier-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glass-card-shadow), var(--shadow-lg);
  border-color: var(--accent-subtle);
}

.tier-card--popular {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow), var(--glass-inset-shadow);
  background: var(--tier-popular-bg);
}

.tier-card--popular:hover {
  box-shadow: var(--shadow-glow-lg), var(--glass-inset-shadow);
}

.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: var(--btn-primary-text);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tier-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.tier-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
}

.tier-card__amount {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--accent-light);
}

.tier-card__period {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.tier-card__features {
  list-style: none;
  flex: 1;
  margin-bottom: var(--space-6);
}

.tier-card__feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.tier-card__feature svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.tier-card__feature--disabled {
  opacity: 0.35;
  text-decoration: line-through;
}

/* --- Messaging / Chat --- */
.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
}

.conversations-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.conversations-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.conversations-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border);
}

.conversation-item:hover {
  background: var(--bg-hover);
}

.conversation-item.active {
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
}

.conversation-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.conversation-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-indicator {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--online);
  border: 2px solid var(--bg-secondary);
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-name {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.conversation-preview {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}

.unread-badge {
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--btn-primary-text);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Chat Area */
.chat-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  height: calc(100vh - var(--nav-height));
}

.chat-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.chat-header__name {
  font-weight: 600;
  font-size: var(--text-base);
}

.chat-header__status {
  font-size: var(--text-xs);
  color: var(--online);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.message-bubble {
  max-width: 70%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  position: relative;
}

.message-bubble--sent {
  align-self: flex-end;
  background: var(--accent-dark);
  color: var(--text-primary);
  border-bottom-right-radius: var(--space-1);
}

.message-bubble--received {
  align-self: flex-start;
  background: var(--bg-elevated);
  border-bottom-left-radius: var(--space-1);
}

.message-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.message-bubble--sent .message-time {
  text-align: right;
}

/* Chat Input */
.chat-input-area {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: border-color var(--transition-fast);
}

.chat-input-wrapper:focus-within {
  border-color: var(--border-accent);
}

.chat-input {
  flex: 1;
  resize: none;
  min-height: 24px;
  max-height: 120px;
  font-size: var(--text-sm);
  line-height: 1.5;
  background: transparent;
  padding: var(--space-1) var(--space-2);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  color: var(--btn-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

/* Quick Actions in Chat */
.chat-quick-actions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  overflow-x: auto;
}

.quick-action-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.quick-action-btn:hover {
  background: var(--accent-subtle);
  color: var(--accent-light);
  border-color: var(--border-accent);
}

/* --- Auth Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-modal);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 440px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
  box-shadow: var(--glass-card-shadow);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.modal__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  text-align: center;
}

.modal__subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-align: center;
  margin-bottom: var(--space-8);
}

/* --- Form Controls --- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Filter Tabs --- */
.filter-tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.filter-tab {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent-subtle);
  color: var(--accent-light);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--overlay-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lightbox__content img,
.lightbox__content video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--form-check-bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  transition: all var(--transition-fast);
}

.lightbox__close:hover {
  background: var(--form-check-active);
}

.lightbox__info {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: var(--space-4) var(--space-8);
  background: var(--toast-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.lightbox__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- Content Detail --- */
.content-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8);
}

.content-detail__media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
  background: var(--bg-card);
}

.content-detail__media img,
.content-detail__media video {
  width: 100%;
  display: block;
}

.content-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.content-detail__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
}

.content-detail__date {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

.content-detail__actions {
  display: flex;
  gap: var(--space-3);
}

.content-detail__description {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.8;
}

/* --- Profile --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-8);
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  border: 3px solid var(--accent);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.profile-info .handle {
  color: var(--accent-light);
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.profile-info .bio {
  color: var(--text-secondary);
  max-width: 500px;
}

/* Subscription Badge */
.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sub-badge--free {
  background: var(--sub-badge-free-bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.sub-badge--gold {
  background: var(--sub-badge-gold-bg);
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
}

.sub-badge--vip {
  background: var(--gradient-accent);
  color: var(--btn-primary-text);
}

/* --- Paywall Overlay (full-page) --- */
.paywall-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16);
  min-height: 400px;
  background: var(--paywall-glow);
}

.paywall-overlay__icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
  color: var(--accent-light);
}

.paywall-overlay__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.paywall-overlay__text {
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-8);
}

/* --- Video Player Custom --- */
.video-player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.video-player video {
  width: 100%;
  display: block;
}

.video-player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-6);
  background: var(--content-header-gradient);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.video-player:hover .video-player__controls {
  opacity: 1;
}

.video-player__progress {
  flex: 1;
  height: 4px;
  background: var(--form-check-active);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
}

.video-player__progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 100ms;
}

/* --- Skeleton / Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
}

.skeleton-card {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-4));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--glass-card-shadow);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.toast--success {
  border-color: rgba(74, 222, 128, 0.3);
}

.toast--error {
  border-color: rgba(248, 113, 113, 0.3);
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-20);
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state__text {
  font-size: var(--text-sm);
  max-width: 300px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .messages-layout {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .nav-menu-toggle {
    display: none !important;
  }

  /* Mobile Nav Drawer */
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(20px);
    padding: var(--space-8);
    gap: var(--space-2);
    z-index: var(--z-overlay);
  }

  .hero__name {
    font-size: var(--text-3xl);
  }

  .hero__content {
    padding: var(--space-8) var(--space-4) var(--space-8);
  }

  .hero__stats {
    gap: var(--space-4);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .section {
    padding: var(--space-8) var(--space-4);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .tiers-grid {
    grid-template-columns: 1fr;
  }

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

  .conversations-sidebar {
    display: none;
  }

  .conversations-sidebar.mobile-open {
    display: flex;
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    z-index: var(--z-overlay);
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: var(--space-8) var(--space-4);
  }

  .content-detail {
    padding: var(--space-4);
  }

  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero__avatar {
    width: 80px;
    height: 80px;
  }

  .hero__name {
    font-size: var(--text-2xl);
  }
}

/* --- Utility Classes --- */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.opacity-50 { opacity: 0.5; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Theme Transition --- */
body,
.navbar,
.card,
.btn,
.gallery-card,
.tier-card,
.message-bubble,
.conversations-sidebar,
.chat-area,
.chat-header,
.form-input {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.theme-toggle:hover {
  color: var(--accent-light);
  background: var(--glass-bg-hover);
  border-color: var(--border-accent);
  transform: rotate(15deg);
}

.theme-toggle svg {
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: scale(1.15);
}

/* --- Security & Anti-Download --- */
.protect-media {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}
img, video { -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none; }

/* ============================================================
   POST FEED COMPONENTS
   ============================================================ */

/* --- Promo Banner --- */
.promo-banner-top {
  background: var(--gradient-accent);
  color: white;
  padding: var(--space-2) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  font-weight: 600;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 90;
  white-space: nowrap;
  overflow: hidden;
  height: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.promo-banner-scroller {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}
.promo-banner-scroller__inner {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  white-space: nowrap;
}
.promo-banner__content { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.promo-banner__code { background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: var(--radius-full); font-family: monospace; }
.promo-banner__timer { opacity: 0.9; }
.promo-banner__close { background: none; border: none; color: white; font-size: 18px; cursor: pointer; padding: var(--space-2); }

@media (max-width: 768px) {
  .promo-banner-top {
    padding: var(--space-2) var(--space-3);
  }
  .promo-banner-scroller__inner {
    padding-left: 100%;
    animation: promo-marquee 20s linear infinite;
  }
}

@keyframes promo-marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* --- Creator Header (OnlyFans style) --- */
.creator-header { max-width: 680px; margin: 0 auto; }
.creator-header__banner { height: 240px; overflow: hidden; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.creator-header__banner img { width: 100%; height: 100%; object-fit: cover; }
.creator-header__info {
  padding: 0 var(--space-6);
  margin-top: -50px;
  position: relative;
}
.creator-header__avatar-wrap {
  position: relative;
  display: inline-block;
}
.creator-header__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}
.online-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background: #4ade80;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}
.creator-header__name {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: var(--space-3) 0 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.verified-badge { flex-shrink: 0; }
.creator-header__handle {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: var(--space-1) 0;
}
.creator-header__bio {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: var(--space-3) 0;
  white-space: pre-line;
}
.creator-header__stats {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-item strong { display: block; font-size: var(--text-lg); color: var(--text-primary); }
.stat-item span { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Stories Bar --- */
.stories-bar {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  overflow-x: auto;
  max-width: 680px;
  margin: 0 auto;
  scrollbar-width: none;
}
.stories-bar::-webkit-scrollbar { display: none; }
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  flex-shrink: 0;
}
.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform var(--transition-base);
}
.story-ring:hover { transform: scale(1.08); }
.story-ring--unseen { background: var(--gradient-accent); }
.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-primary);
}
.story-ring span {
  font-size: 24px;
  color: var(--text-muted);
}
.story-label {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Feed Tabs --- */
.feed-tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-6);
  max-width: 680px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.feed-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}
.feed-tab:hover { color: var(--text-primary); }
.feed-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- Post Card --- */
.post-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
}
.post-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  margin-bottom: var(--space-3);
}
.post-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.post-card__name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-card__time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.post-card__menu {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: var(--space-2);
}
.post-card__caption {
  padding: 0 var(--space-4);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-primary);
}
.post-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.post-card__media img,
.post-card__media video {
  width: 100%;
  display: block;
  max-height: 600px;
  object-fit: cover;
}
.post-card__img--blur {
  filter: blur(20px) brightness(0.5);
  transform: scale(1.1);
}
.post-card__lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.post-card__lock-overlay span {
  font-size: var(--text-sm);
  font-weight: 600;
}
/* DRM Watermark */
.post-card__media::after {
  content: '@valyryes';
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  font-weight: 600;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.post-card__media--locked::after { display: none; }

/* --- Post Carousel --- */
.post-card__carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  touch-action: pan-y pinch-zoom;
}

.post-card__carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.post-card__carousel-track img {
  flex-shrink: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Dot Indicators */
.post-card__carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-dot.active {
  background: var(--accent, #e1306c);
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(225, 48, 108, 0.5);
}

/* Arrow Buttons */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
}

.post-card__carousel:hover .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.carousel-arrow--left {
  left: 8px;
}

.carousel-arrow--right {
  right: 8px;
}

/* Hide arrow when at boundary */
.carousel-arrow[disabled] {
  opacity: 0 !important;
  pointer-events: none;
}

/* On touch devices always show arrows subtly */
@media (hover: none) and (pointer: coarse) {
  .carousel-arrow {
    opacity: 0.6;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}

/* Disable the track transition during touch drag for responsiveness */
.post-card__carousel-track.is-dragging {
  transition: none;
}

/* --- Post Actions --- */
.post-card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
}
.post-action {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.post-action:hover { background: var(--bg-hover); color: var(--text-primary); }
.post-action--active { color: var(--accent); }
.post-action--active svg { fill: var(--accent); }

/* --- Post Comments --- */
.post-card__comments {
  padding: 0 var(--space-4) var(--space-2);
}
.post-comment {
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-1);
  color: var(--text-secondary);
}
.post-comment strong {
  color: var(--text-primary);
  margin-right: var(--space-2);
  font-size: var(--text-sm);
}
.creator-name { color: var(--accent); }
.post-comments__more {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: var(--space-1) 0;
}
.post-comment-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-light);
}
.comment-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
}
.comment-input::placeholder { color: var(--text-muted); }
.comment-send {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}
.comment-send:hover { opacity: 1; }

/* --- Poll Card --- */
.poll-card {
  padding: 0 var(--space-4);
}
.poll-card__question {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
.poll-card__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.poll-option {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-fast);
}
.poll-option:hover { border-color: var(--accent); }
.poll-option--voted { border-color: var(--accent); background: var(--accent-subtle); }
.poll-option--results { cursor: default; }
.poll-option__bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  z-index: 0;
  transition: width 0.6s ease;
}
.poll-option__text { position: relative; z-index: 1; }
.poll-option__pct {
  position: relative;
  z-index: 1;
  float: right;
  font-weight: 700;
  color: var(--accent);
}
.poll-card__meta {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- Tip Modal (inline) --- */
.tip-modal {
  padding: var(--space-4);
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--radius-lg);
  margin: var(--space-2) var(--space-4);
  animation: fadeSlideUp 0.25s ease;
}
.tip-amounts {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.tip-amount-btn {
  flex: 1;
  padding: var(--space-2);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tip-amount-btn:hover, .tip-amount-btn.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Suggested Creators --- */
.suggested-section {
  max-width: 680px;
  margin: var(--space-8) auto;
  padding: 0 var(--space-4);
}
.suggested-section h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}
.suggested-list {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
}
.suggested-list::-webkit-scrollbar { display: none; }
.suggested-card {
  min-width: 150px;
  padding: var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.suggested-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
}
.suggested-name { font-weight: 600; font-size: var(--text-sm); color: var(--text-primary); }
.suggested-handle { font-size: var(--text-xs); color: var(--text-muted); }

/* --- Pinned Badge --- */
.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-3);
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  margin-left: var(--space-4);
  margin-bottom: var(--space-2);
}

/* --- Mobile Bottom Nav --- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-card-border);
  z-index: 200;
  padding: var(--space-2) 0;
  padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
}
.mobile-bottom-nav__items {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast);
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}
.mobile-nav-item:hover, .mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-badge {
  position: absolute;
  top: -2px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .mobile-bottom-nav { display: block; }
  body { padding-bottom: 70px; }
  .creator-header__banner { height: 160px; }
  .creator-header__info { padding: 0 var(--space-4); }
  .creator-header__avatar { width: 80px; height: 80px; }
  .creator-header__stats { gap: var(--space-4); }
  .stories-bar { padding: var(--space-3) var(--space-4); }
  .story-ring { width: 56px; height: 56px; }
  .post-card__actions { padding: var(--space-2) var(--space-3); }
}

/* ============================================================
   DM MEDIA ATTACHMENTS & CUSTOM REQUEST BUBBLES
   ============================================================ */
.message-media {
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 280px;
  max-height: 280px;
  border: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.05);
}

.message-img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.message-video {
  width: 100%;
  max-height: 280px;
  display: block;
}

.request-card-bubble {
  padding: var(--space-1);
}

@media (max-width: 768px) {
  .chat-area {
    height: calc(100vh - var(--nav-height) - 70px) !important;
  }
}

/* ============================================================
   STORY VIEWER MODAL
   ============================================================ */
.story-viewer {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.story-viewer__container {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100%;
  max-height: 820px;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

@media (max-width: 480px) {
  .story-viewer__container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
}

.story-viewer__progress-container {
  display: flex;
  gap: 4px;
  padding: var(--space-4) var(--space-4) var(--space-2);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
}

.story-viewer__progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.story-viewer__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.story-viewer__header {
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 12;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.story-viewer__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

.story-viewer__creator-info {
  display: flex;
  flex-direction: column;
}

.story-viewer__name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.story-viewer__time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.story-viewer__close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  transition: background 0.2s, transform 0.2s;
  z-index: 20;
}

.story-viewer__close:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}

.story-viewer__content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.story-viewer__click-left, .story-viewer__click-right {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 11;
  cursor: pointer;
}

.story-viewer__click-left { left: 0; width: 25%; }
.story-viewer__click-right { right: 0; width: 75%; }

.story-viewer__media-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-viewer__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.story-viewer__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-8) var(--space-4) var(--space-8);
  background: linear-gradient(to top, rgba(0,0,0,0.85) 50%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 12;
}

.story-viewer__caption {
  font-size: var(--text-sm);
  color: #fff;
  max-width: 70%;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  line-height: 1.45;
  font-weight: 500;
}

.story-viewer__like-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.story-viewer__like-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.story-viewer__like-btn--active {
  background: rgba(233, 30, 140, 0.2) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.story-viewer__like-btn--active svg {
  fill: var(--accent);
}

/* Story viewer enhancements */
.story-viewer__nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  z-index: 15;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
  user-select: none;
}
.story-viewer__nav-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.05);
}
.story-viewer__nav-arrow--left {
  left: 12px;
}
.story-viewer__nav-arrow--right {
  right: 12px;
}
.story-viewer__stats-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Gold Verified Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}
.verified-badge svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  fill: none;
  stroke-width: 3;
}
[data-theme='light'] .verified-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

/* Gold avatar ring */
.avatar-ring--gold {
  border: 3px solid #FFD700 !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
[data-theme='light'] .avatar-ring--gold {
  border-color: #FFD700 !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Promo Banner */
.promo-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: promo-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1), promo-flash 2s infinite ease-in-out 0.6s;
}
@keyframes promo-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  50% { box-shadow: 0 0 20px 5px rgba(255,255,255,0.4); transform: scale(1.01); }
}
.promo-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
@keyframes promo-slide-in {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
.promo-banner__shimmer {
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: promo-shimmer 3s ease-in-out infinite;
}
@keyframes promo-shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}
.promo-banner__countdown {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ============================================================
   Site Footer — Social Hub Style
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: var(--space-16);
  border-top: 1px solid var(--glass-card-border);
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0;
  overflow: hidden;
}
.site-footer__glow {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  filter: blur(4px);
  opacity: 0.7;
}
.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.site-footer__creator {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.site-footer__avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--border-accent);
  flex-shrink: 0;
}
.site-footer__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-footer__name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.site-footer__handle {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.site-footer__socials {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.site-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-card-border);
  transition: all var(--transition-fast);
  text-decoration: none;
}
.site-footer__social-link:hover {
  color: var(--accent);
  background: var(--accent-subtle);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 30, 140, 0.2);
}
.site-footer__links {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.site-footer__links a {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-weight: 500;
}
.site-footer__links a:hover {
  color: var(--accent-light);
}
.site-footer__bottom {
  text-align: center;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--glass-card-border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.site-footer__bottom strong {
  color: var(--text-secondary);
  font-weight: 600;
}
.site-footer__dot {
  opacity: 0.4;
}

@media (max-width: 768px) {
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-5) var(--space-5);
  }
  .site-footer__creator {
    flex-direction: column;
    gap: var(--space-2);
  }
  .site-footer__links {
    justify-content: center;
  }
  .site-footer {
    margin-bottom: 64px; /* space for mobile bottom nav */
  }
}
