/* ==========================================================================
   RÉCITS INAVOUABLES - DARK THEME STYLESHEET
   Style Dark Luxury, Néo-Gothique, Transgressif, Glassmorphism
   ========================================================================== */

:root {
  --bg-deep: #08090d;
  --bg-dark: #0e1118;
  --bg-card: #151922;
  --bg-card-hover: #1c2230;
  --bg-input: #11141d;
  --border-subtle: #232a3b;
  --border-focus: #8b5cf6;
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.35);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --nowpayments-orange: #f7931a;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-display: 'Cinzel', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-reading: 'Lora', Georgia, serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px var(--accent-purple-glow);
  --header-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body.dark-mode {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-ui);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(6, 182, 212, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

/* ==========================================================================
   HEADER & TOP STATUS BANNER
   ========================================================================== */

.conn-banner {
  background: rgba(14, 17, 24, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.live {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.btn-text-action {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-text-action:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-purple), #4c1d95);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--text-main);
  line-height: 1.1;
}

.accent-glow {
  color: var(--accent-purple);
  text-shadow: 0 0 12px var(--accent-purple-glow);
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(21, 25, 34, 0.7);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-main);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-purple-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-switch-btn:hover {
  border-color: var(--accent-purple);
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 44px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-purple-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-cyan-glow);
}

.btn-accent:hover {
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-nowpayments {
  background: linear-gradient(135deg, #f7931a, #ea580c);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.35);
}

.btn-nowpayments:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(247, 147, 26, 0.5);
}

.btn-block {
  width: 100%;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-purple);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.btn-link:hover {
  gap: 10px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  min-height: 34px;
  border-radius: var(--radius-sm);
}

.text-gradient {
  background: linear-gradient(135deg, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold { color: var(--accent-gold); }
.text-purple { color: var(--accent-purple); }
.text-cyan { color: var(--accent-cyan); }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* ==========================================================================
   TABS & SECTIONS
   ========================================================================== */

.main-viewport {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
}

.content-tab {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.content-tab.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */

.hero-section {
  position: relative;
  background: linear-gradient(180deg, #12151f 0%, #0d0f15 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 56px 36px;
  margin-bottom: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 40%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 680px;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.7rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Filter bar & Genre chips */
.filter-bar-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 52px;
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.search-box i {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-right: 12px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
  width: 100%;
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}

.genre-chips-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.genre-chips-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  color: var(--text-main);
  border-color: rgba(139, 92, 246, 0.4);
}

.chip.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

/* Section Header */
.section-container {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stories-count {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==========================================================================
   TOP CREATORS CARDS
   ========================================================================== */

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

.creator-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  transition: all 0.25s ease;
}

.creator-card-item:hover {
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.rank-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.rank-badge.top-1 {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.creator-avatar-wrap {
  position: relative;
}

.creator-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.creator-info-block h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.creator-meta-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.creator-meta-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   STORIES GRID & CARDS
   ========================================================================== */

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

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
  position: relative;
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-purple-glow);
}

.story-cover-box {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #000;
}

.story-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-card:hover .story-cover-img {
  transform: scale(1.05);
}

.story-cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(21, 25, 34, 0.95) 100%);
}

.story-genre-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(14, 17, 24, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.story-free-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.story-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-main);
}

.story-card-author {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.story-card-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-top: auto;
}

.story-episodes-info {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.story-episodes-info strong {
  color: var(--text-main);
}

/* ==========================================================================
   READER VIEW
   ========================================================================== */

.reader-container {
  max-width: 820px;
  margin: 0 auto;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-back:hover {
  color: var(--text-main);
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--accent-purple);
}

.reader-story-meta {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  align-items: center;
}

.reader-cover-thumb img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.genre-tag {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 6px;
}

.reader-story-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.reader-author {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.reader-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Episodes selector */
.episodes-selector-wrapper {
  margin-bottom: 24px;
}

.episodes-selector-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.episodes-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.episode-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.episode-pill:hover {
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
}

.episode-pill.active {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 14px var(--accent-purple-glow);
}

.pill-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.pill-badge.free {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.pill-badge.locked {
  background: rgba(247, 147, 26, 0.2);
  color: #fb923c;
}

/* Reader Paper */
.reader-paper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.episode-title-bar {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.ep-num-badge {
  font-size: 0.8rem;
  color: var(--accent-purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.ep-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 6px;
}

.reader-body {
  font-family: var(--font-reading);
  font-size: 1.15rem;
  line-height: 1.9;
  color: #e2e8f0;
  white-space: pre-line;
}

.reader-body p {
  margin-bottom: 1.4em;
}

/* Paywall Box */
.paywall-lock-box {
  background: linear-gradient(180deg, rgba(247, 147, 26, 0.05) 0%, rgba(20, 24, 34, 0.8) 100%);
  border: 1px dashed rgba(247, 147, 26, 0.4);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  margin: 32px 0;
}

.paywall-icon {
  width: 64px;
  height: 64px;
  background: rgba(247, 147, 26, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--nowpayments-orange);
  margin: 0 auto 16px;
  box-shadow: 0 0 20px rgba(247, 147, 26, 0.25);
}

.paywall-badge {
  color: var(--nowpayments-orange);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.paywall-heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.paywall-desc {
  max-width: 460px;
  margin: 0 auto 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.paywall-price-tag {
  font-size: 2.8rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: 24px;
}

.price-currency {
  font-size: 1.8rem;
  color: var(--accent-gold);
}

.supported-cryptos {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.crypto-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.crypto-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.reader-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  margin-top: 40px;
  gap: 16px;
}

/* ==========================================================================
   CREATOR DASHBOARD
   ========================================================================== */

.dashboard-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.creator-profile-summary {
  display: flex;
  align-items: center;
  gap: 18px;
}

.creator-avatar {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 0 16px var(--accent-purple-glow);
}

.creator-badge {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 4px;
}

.dashboard-user-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-subtext {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.dash-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-purple);
  border: 1px solid var(--border-subtle);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

.card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.card-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.creator-story-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.creator-story-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.creator-story-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* ==========================================================================
   MODALS & FORMS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card.wide {
  max-width: 640px;
}

.modal-card.extra-wide {
  max-width: 860px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-header-branding {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo-modal {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-purple), #4c1d95);
  border-radius: var(--radius-md);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-purple-glow);
}

.modal-header-branding h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.modal-header-branding p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group label i {
  margin-right: 6px;
  color: var(--accent-purple);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Role Selector */
.role-selector-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.role-card {
  position: relative;
  cursor: pointer;
}

.role-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.role-card-inner {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  transition: all 0.2s ease;
}

.role-card input:checked + .role-card-inner,
.role-card.selected .role-card-inner {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.role-card-inner i {
  font-size: 1.4rem;
  color: var(--accent-purple);
  margin-bottom: 6px;
  display: block;
}

.role-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.role-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.3;
}

/* Preset Covers */
.preset-covers {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.preset-tag {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-tag:hover {
  border-color: var(--accent-cyan);
  color: var(--text-main);
}

/* Checkbox group */
.checkbox-group {
  margin: 16px 0;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: inline-block;
  position: relative;
  margin-top: 2px;
}

.checkbox-container input:checked ~ .checkmark {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.checkbox-container input:checked ~ .checkmark:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  display: flex;
  flex-direction: column;
}

.checkbox-text small {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 2px;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.modal-footer-actions.column-actions {
  flex-direction: column;
}

/* NOWPayments Modal specific */
.nowpayments-brand-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nowpayments-orange);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 1px;
  margin-bottom: 20px;
  justify-content: center;
}

.checkout-summary {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.checkout-amount-box {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.checkout-amount-box .currency {
  font-size: 1.4rem;
  color: var(--accent-gold);
}

.checkout-amount-box .amount {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: var(--font-display);
}

.checkout-amount-box .usd-badge {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.crypto-radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.crypto-radio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.crypto-radio-card input {
  display: none;
}

.crypto-radio-card.selected {
  border-color: var(--nowpayments-orange);
  background: rgba(247, 147, 26, 0.1);
}

.check-icon {
  color: var(--nowpayments-orange);
  display: none;
}

.crypto-radio-card.selected .check-icon {
  display: block;
}

.crypto-info {
  display: flex;
  flex-direction: column;
}

.crypto-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.crypto-rate {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.crypto-security-note {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 16px;
}

/* SQL Code Block Modal */
.sql-code-container {
  position: relative;
  margin-top: 16px;
}

.btn-copy-sql {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px var(--accent-purple-glow);
}

.sql-code-container pre {
  background: #080a0f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  max-height: 380px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  line-height: 1.5;
}

/* Quick test bar in auth */
.demo-role-quickbar {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.demo-role-quickbar span {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
}

.demo-buttons-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-chip:hover, .btn-chip.active-chip {
  border-color: var(--accent-purple);
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.15);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(21, 25, 34, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-purple);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  max-width: 380px;
}

.toast.success { border-left-color: var(--accent-green); }
.toast.error { border-left-color: var(--accent-red); }
.toast.warning { border-left-color: var(--accent-gold); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto 16px;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

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

/* Top creators leaderboard view */
.leaderboard-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.leaderboard-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tab-hero-box {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.tab-hero-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.tab-hero-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tab-hero-desc {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.become-creator-card {
  margin-top: 36px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --header-height: auto;
  }

  .header-container {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-around;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: 36px 20px;
  }

  .reader-paper {
    padding: 24px 18px;
  }

  .reader-story-meta {
    flex-direction: column;
    text-align: center;
  }

  .reader-cover-thumb img {
    width: 140px;
    height: 180px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   GENRES SPÉCIAUX : ÉROTISME & TABOU
   ========================================================================== */

.chip-erotisme {
  border-color: rgba(244, 63, 94, 0.4) !important;
  color: #fda4af !important;
}

.chip-erotisme:hover, .chip-erotisme.active {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(225, 29, 72, 0.4) !important;
}

.chip-tabou {
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fde68a !important;
}

.chip-tabou:hover, .chip-tabou.active {
  background: linear-gradient(135deg, #b45309, #78350f) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(180, 83, 9, 0.4) !important;
}

.story-genre-badge.genre-erotisme {
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.4);
  color: #fb7185;
}

.story-genre-badge.genre-tabou {
  background: rgba(217, 119, 6, 0.2);
  border-color: rgba(217, 119, 6, 0.4);
  color: #fcd34d;
}

/* Platform Empty State */
.virgin-platform-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 56px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
  margin: 16px 0;
}

.virgin-icon-glow {
  width: 72px;
  height: 72px;
  background: rgba(139, 92, 246, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-purple);
  margin: 0 auto 20px;
  box-shadow: 0 0 25px var(--accent-purple-glow);
}

.virgin-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.virgin-desc {
  max-width: 580px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.empty-creators-box {
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.empty-creators-box i {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.reader-badge-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-notice {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-top: 12px;
  text-align: left;
}

.moderation-notice-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.84rem;
  color: #fed7aa;
}

.story-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.story-status-pill.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.story-status-pill.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
