/* ═══════════════════════════════════════════════
   OHSURGEE — PRIVACY DESIGN SYSTEM (PHP Version)
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── VARIABLES ── */
:root {
  --color-primary: #00C853;
  --color-primary-hover: #00A844;
  --color-primary-glow: rgba(0, 200, 83, 0.1);
  --color-privacy: #00C853; /* Privacy native mapped to our green */
  
  --color-danger-soft: #FDA29B;
  --color-error: #FF3D57;
  --color-warning: #FFB300;

  --bs-body-bg: #0A0A0A;
  --bs-border-color: #2C2C2C;
  --bs-gray-200: #141414;
  --bs-gray-600: #888888;
  
  --bg-primary: #0A0A0A;
  --bg-secondary: #0A0A0A;
  --bg-card: #151515;
  --bg-input: #1E1E1E;
  
  --text-primary: #F5F5F5;
  --text-secondary: #CCCCCC;
  --text-muted: #888888;
  
  --border-color: #2C2C2C;
  --border-color-hover: #3E3E3E;
  
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  --space-xs: 4px; 
  --space-sm: 8px; 
  --space-md: 16px;
  --space-lg: 24px; 
  --space-xl: 32px; 
  
  --header-height: 56px;
  --tabbar-height: 60px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background-color: var(--bs-body-bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none; line-height: 1.2;
}
.btn:active { transform: scale(0.97); }
.btn-primary { 
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)); 
    color: #000; box-shadow: 0 4px 14px var(--color-primary-glow); border: 1px solid rgba(0, 200, 83, 0.2); 
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,200,83,0.3); }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: #2A2A2A; border-color: var(--border-color-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ── INPUTS ── */
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.input-field {
  width: 100%; padding: 12px 16px; background: transparent; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); color: var(--text-primary); font-size: 15px; font-family: var(--font-body);
  outline: none; transition: border-color 0.2s;
}
.input-field:focus { border-color: var(--color-primary); }
.input-field::placeholder { color: var(--text-muted); }

/* ── PRIVACY HEADER ── */
.privacy-header {
  width: 100%; position: fixed; top: 0; z-index: 50;
  height: var(--header-height); background-color: var(--bs-body-bg);
  border-bottom: 0.5px solid var(--bs-border-color);
}
.privacy-header--bar {
  height: 100%; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
}
.privacy-header--logo {
  font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
  color: var(--color-primary);
}
.privacy-header--buttons { display: flex; align-items: center; gap: 16px; }
.privacy-header--button { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; cursor: pointer; color: var(--text-primary); font-size: 20px; }
.notification-dot { position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; background-color: var(--color-primary); border-radius: 50%; }

.privacy-header--avatar {
  width: 32px !important; height: 32px !important; border-radius: 50%;
  border: 1px solid var(--bs-border-color); overflow: hidden;
  background-color: var(--bs-gray-200);
}
.privacy-header--avatar-initials {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--text-primary);
}

/* ── TAB BAR / SIDEBAR NAV ── */
/* Desktop Drawer (Left Side) */
.pwt-tab-bar__nav {
  position: fixed; top: var(--header-height); left: 0; bottom: 0; width: 260px;
  border-right: 1px solid var(--border-color); background: var(--bs-body-bg);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 8px;
  z-index: 40;
  overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 16px; padding: 12px 16px;
  border-radius: 999px; font-size: 16px; font-weight: 500; color: var(--text-primary);
  transition: background 0.2s; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.05); }
.nav-item.active { font-weight: 700; }
.nav-item .icon { font-size: 22px; width: 24px; text-align: center; }

/* ── LAYOUT WRAPPER ── */
.app-wrapper {
  margin-top: var(--header-height);
  margin-left: 260px; /* Sidebar width desktop */
  min-height: calc(100vh - var(--header-height));
  display: flex; justify-content: center;
}
.index-render-wrapper {
  width: 100%; max-width: 680px; /* Privacy feed is narrow */
  padding: 24px 16px; margin: 0 auto;
}
.index-render-wrapper.wide-wrapper {
  max-width: 1000px;
}

/* ── TIMELINE ITEM (PRIVACY CARD) ── */
.tl-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}
.tl-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px;
}
.header-user-info { display: flex; align-items: center; gap: 12px; }
.avatar-wrapper {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: var(--bg-input); border: 1px solid var(--border-color);
}
.avatar-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.text-wrapper .name { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 4px; }
.text-wrapper .handle { font-size: 13px; color: var(--text-muted); }

.tl-content { padding: 0 16px 16px; font-size: 15px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.tl-media { width: 100%; max-height: 600px; object-fit: contain; background: #000; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

.tl-action-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border-color); }
.tl-actions-left { display: flex; align-items: center; gap: 16px; }
.action-btn { background: none; border: none; display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); cursor: pointer; font-size: 14px; font-weight: 600; }
.action-btn .icon { font-size: 20px; }
.action-btn.liked { color: var(--color-error); }
.action-btn.favorited { color: var(--color-warning); }

/* ── LOCKED OVERLAY (PRIVACY STYLE) ── */
.locked-wrapper { position: relative; width: 100%; background: #1a1a1a; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); text-align: center; }
.locked-wrapper .icon { font-size: 32px; color: var(--text-muted); margin-bottom: 16px; }
.locked-wrapper .title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.locked-wrapper .desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; max-width: 300px; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge-success { background: rgba(0, 200, 83, 0.15); color: var(--color-primary); }
.badge-warning { background: rgba(255, 179, 0, 0.15); color: var(--color-warning); }

/* ── MOBILE BEHAVIOR (Like Privacy App) ── */
@media (max-width: 768px) {
  .app-wrapper { margin-left: 0; margin-bottom: var(--tabbar-height); }
  .index-render-wrapper { padding: 16px 0; border-radius: 0; }
  .tl-item { border-left: none; border-right: none; border-radius: 0; margin-bottom: 12px; }
  
  /* Convert Sidebar into Bottom Tab Bar */
  .pwt-tab-bar__nav {
    top: auto; bottom: 0; width: 100%; height: var(--tabbar-height);
    border-right: none; border-top: 1px solid var(--border-color);
    flex-direction: row; justify-content: space-around; align-items: center;
    padding: 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .nav-item { flex-direction: column; gap: 4px; padding: 8px; border-radius: 0; }
  .nav-item span { display: none; /* Hide text on mobile nav */ }
  .nav-item .icon { font-size: 24px; }
}

/* ── GENERIC CARDS ── */
.card { 
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); 
    padding: 24px; margin-bottom: 24px; position: relative;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.card:hover { border-color: var(--border-color-hover); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.alert { padding: 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; margin-bottom: 24px; }
.alert-success { background: rgba(0, 200, 83, 0.1); border: 1px solid rgba(0, 200, 83, 0.3); color: var(--color-primary); }
.alert-error { background: rgba(255, 61, 87, 0.1); border: 1px solid rgba(255, 61, 87, 0.3); color: var(--color-error); }
.alert-warning { background: rgba(255, 179, 0, 0.1); border: 1px solid rgba(255, 179, 0, 0.3); color: var(--color-warning); }

/* ── LEGACY LAYOUT COMPAT ── */
/* These are used by admin/creator/settings pages */
.page-content { padding: 0; }
.page-content-narrow { padding: 0; max-width: 100%; }

/* ── STAT CARDS (Dashboard/Admin) ── */
.stat-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 24px; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1.2; }
.stat-change { font-size: 12px; color: var(--color-primary); margin-top: 6px; }

/* ── AVATAR (Legacy Support) ── */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 72px; height: 72px; }
.avatar-2xl { width: 96px; height: 96px; }
.avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg-input); color: var(--text-primary); font-weight: 700; font-size: 14px; border-radius: 50%; }

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border-color); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── CONTENT LOCKED ── */
.content-locked { position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.content-blur { filter: blur(12px); opacity: .6; pointer-events: none; user-select: none; }
.unlock-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(10,10,10,.5); backdrop-filter: blur(4px); }

/* ── AUTH PAGES ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; background: var(--bs-body-bg); }
.auth-page::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 20%, rgba(0,200,83,.06) 0%, transparent 50%); pointer-events: none; }
.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 1; text-align: center; }
.auth-brand { font-size: 28px; font-weight: 900; margin-bottom: 8px; color: var(--color-primary); }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }

/* ── LANDING / NAVBAR ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: rgba(10,10,10,.9); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); }
.navbar-brand { font-size: 20px; font-weight: 900; color: var(--color-primary); }
.navbar-brand span { color: #fff; }
.navbar-links { display: flex; gap: 24px; }
.navbar-links a { font-size: 14px; color: var(--text-secondary); font-weight: 500; transition: color 0.2s; }
.navbar-links a:hover { color: var(--text-primary); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }

.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px 24px 80px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(0,200,83,.12) 0%, transparent 60%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; background: rgba(0,200,83,.1); border: 1px solid rgba(0,200,83,.2); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--color-primary); margin-bottom: 32px; }
.hero h1 { font-size: clamp(36px,6vw,72px); font-weight: 900; line-height: 1.1; margin-bottom: 24px; letter-spacing: -.02em; }
.hero p { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-stats { display: flex; gap: 64px; margin-top: 64px; flex-wrap: wrap; justify-content: center; }
.hero-stat-value { font-size: 32px; font-weight: 800; color: var(--color-primary); }
.hero-stat-label { font-size: 14px; color: var(--text-muted); }

.section { padding: 80px 24px; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 48px; }
.section-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--color-primary); margin-bottom: 12px; }
.section-title { font-size: clamp(28px,4vw,42px); font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.section-desc { color: var(--text-secondary); font-size: 16px; }

.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; max-width: 1200px; margin: 0 auto; }
.feature-card { text-align: left; }
.feature-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--color-primary-glow); display: flex; align-items: center; justify-content: center; color: var(--color-primary); margin-bottom: 16px; font-size: 20px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

.creators-row { display: flex; gap: 16px; max-width: 1000px; margin: 0 auto; justify-content: center; flex-wrap: wrap; }
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; max-width: 1000px; margin: 0 auto; }
.pricing-card { text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--color-primary); }
.pricing-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: #000; padding: 4px 16px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pricing-price { font-size: 42px; font-weight: 800; margin: 16px 0 8px; }
.pricing-period { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.pricing-features { text-align: left; }
.pricing-features li { padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 14px; color: var(--text-secondary); }

.faq-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { cursor: pointer; }
.faq-q { padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.faq-a { padding: 0 24px 16px; font-size: 14px; color: var(--text-secondary); display: none; }
.faq-item.open .faq-a { display: block; }

.footer { padding: 40px 24px; border-top: 1px solid var(--border-color); text-align: center; font-size: 13px; color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .features-grid, .pricing-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .app-wrapper { margin-left: 0; margin-bottom: var(--tabbar-height); }
  .index-render-wrapper { padding: 16px 0; }
  .tl-item { border-left: none; border-right: none; border-radius: 0; margin-bottom: 12px; }
  .pwt-tab-bar__nav {
    top: auto; bottom: 0; left: 0; width: 100%; height: var(--tabbar-height);
    border-right: none; border-top: 1px solid var(--border-color);
    flex-direction: row; justify-content: space-around; align-items: center;
    padding: 0; padding-bottom: env(safe-area-inset-bottom);
    overflow-x: auto;
  }
  .pwt-tab-bar__nav .nav-item { flex-direction: column; gap: 4px; padding: 8px; border-radius: 0; font-size: 11px; }
  .pwt-tab-bar__nav .nav-item span { display: none; }
  .pwt-tab-bar__nav .nav-item .icon { font-size: 22px; }
  /* Hide non-essential items on mobile bottom bar */
  .pwt-tab-bar__nav div[style*="border-top"] { display: none; }
  .pwt-tab-bar__nav div[style*="margin-top:auto"] { display: none; }
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .navbar-links { display: none; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3A3A3A; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── ANIMATION ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .4s ease forwards; }

/* ── MODALS ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); padding: 16px; }
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease forwards; }
.modal-overlay .modal-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); width: 100%; max-width: 400px; padding: 24px; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; transition: background 0.2s, color 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; font-family: var(--font-display, var(--font-body)); letter-spacing: -0.5px; }
.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.modal-qr-container { display: flex; flex-direction: column; align-items: center; background: #fff; padding: 12px; border-radius: var(--radius-md); margin-bottom: 16px; min-height: 200px; justify-content: center; }
.modal-qr-container img { width: 100%; max-width: 250px; border-radius: 4px; }
.modal-loader { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-left-color: var(--color-primary); border-radius: 50%; animation: spin 1s linear infinite; display: none; margin: 40px auto; }
.modal-copy-box { width: 100%; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px; font-size: 12px; color: var(--text-muted); word-break: break-all; text-align: center; margin-bottom: 16px; user-select: all; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   STORIES — INSTAGRAM-STYLE
   ═══════════════════════════════════════════════ */

/* ── STORIES BAR (horizontal scroll) ── */
.stories-bar {
  display: flex;
  gap: 16px;
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.stories-bar::-webkit-scrollbar { display: none; }

.story-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 72px;
  transition: transform 0.2s;
}
.story-avatar-item:hover { transform: scale(1.05); }
.story-avatar-item:active { transform: scale(0.95); }

.story-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 3px;
  background: var(--border-color);
  transition: background 0.3s;
}
.story-ring.unseen {
  background: conic-gradient(#00e676, #00c853, #69f0ae, #00e676);
  animation: storyRingSpin 3s linear infinite;
}
.story-ring.paid {
  background: conic-gradient(#FFD700, #FFA500, #FFD700, #FFA500, #FFD700);
  animation: storyRingSpin 3s linear infinite;
}
.story-ring.seen {
  background: var(--border-color);
}

@keyframes storyRingSpin {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

.story-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  overflow: hidden;
  background: var(--bg-input);
}
.story-ring-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-ring-inner .initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.story-avatar-name {
  font-size: 11px;
  color: var(--text-secondary);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-weight: 500;
}

/* ── STORY VIEWER (Fullscreen modal) ── */
.story-viewer-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.story-viewer-overlay.open { display: flex; }

.story-viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 420px;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Progress bars */
.story-progress-bar {
  display: flex;
  gap: 4px;
  padding: 12px 16px 8px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  padding-bottom: 40px;
}
.story-progress-segment {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}
.story-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}
.story-progress-segment.completed .story-progress-fill { width: 100%; }
.story-progress-segment.active .story-progress-fill { width: 0%; /* animated via JS */ }

/* Story header */
.story-viewer-header {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}
.story-viewer-user {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.story-viewer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
  background: var(--bg-input);
}
.story-viewer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-viewer-avatar .initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.story-viewer-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.story-viewer-time {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-left: 8px;
  font-weight: 400;
}
.story-viewer-close {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s;
}
.story-viewer-close:hover { background: rgba(255,255,255,0.3); }

/* Media area */
.story-viewer-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #000;
}
.story-viewer-media img,
.story-viewer-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Navigation zones */
.story-nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 5;
  cursor: pointer;
}
.story-nav-zone.left { left: 0; }
.story-nav-zone.right { right: 0; }

/* Locked story overlay */
.story-locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 8;
  text-align: center;
  padding: 24px;
}
.story-locked-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
  color: #000;
  box-shadow: 0 0 40px rgba(255,215,0,0.3);
}
.story-locked-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.story-locked-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
  max-width: 280px;
  line-height: 1.5;
}
.story-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
}
.story-unlock-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255,215,0,0.5);
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
  .stories-bar {
    border-left: none;
    border-right: none;
    border-radius: 0;
    margin-bottom: 12px;
    padding: 12px;
    gap: 12px;
  }
  .story-viewer-container {
    max-width: 100%;
  }
  .story-avatar-item { min-width: 64px; }
  .story-ring { width: 58px; height: 58px; }
  .story-avatar-name { font-size: 10px; max-width: 64px; }
}

/* ═══════════════════════════════════════════════
   PREMIUM EMPTY STATES
   ═══════════════════════════════════════════════ */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: var(--space-4xl) var(--space-md);
    animation: fadeIn 0.4s ease-out forwards;
}
.empty-state-icon-wrap {
    width: 96px; height: 96px; border-radius: 50%;
    background: radial-gradient(circle at top left, var(--bg-input), var(--bg-card));
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4), inset 0 2px 10px rgba(255,255,255,0.02);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--space-lg); font-size: 36px; color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.empty-state:hover .empty-state-icon-wrap {
    transform: scale(1.05) translateY(-4px);
    color: var(--color-primary); border-color: rgba(0, 200, 83, 0.2);
    box-shadow: 0 20px 50px rgba(0, 200, 83, 0.1), inset 0 2px 10px rgba(255,255,255,0.05);
}
.empty-state h3 {
    font-size: 20px; font-weight: 800; margin-bottom: var(--space-xs);
    color: var(--text-primary); letter-spacing: -0.02em;
}
.empty-state p {
    color: var(--text-muted); font-size: 14px; max-width: 320px;
    margin-bottom: var(--space-lg); line-height: 1.5;
}
