/* ═══════════════════════════════════════════════════════════════
   NowssB Social Design System
   Overrides app/app.css Instagram-style rules.
   All !important required to beat: global *{border-radius:0!important}
   and any inline styles set by SS.open().
   Colors: #060c18 navy · #e8d5a3 gold · #c8e8f5 blue
═══════════════════════════════════════════════════════════════ */

/* ── BASE backgrounds ── */
.ig,
#sub-people,
#sub-ig-profile,
#sub-social-home {
  background: #060c18 !important;
}

/* Subtle ambient glow over the navy bg */
#sub-people::before,
#sub-ig-profile::before,
#sub-social-home::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 35% at 15% 8%, rgba(232,213,163,.05) 0%, transparent 60%),
    radial-gradient(ellipse 55% 30% at 85% 88%, rgba(200,232,245,.04) 0%, transparent 55%);
}

/* ── TOP BAR ── */
.ig-topbar {
  background: rgba(6,12,24,.97) !important;
  border-bottom: 1px solid rgba(232,213,163,.08) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.ig-topbar .ig-username {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #e8d5a3 !important;
}

/* ── SEARCH ── */
.ig-searchwrap {
  background: #060c18 !important;
}

.ig-searchbar {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: rgba(255,255,255,.55) !important;
}

.ig-searchbar input::placeholder {
  color: rgba(255,255,255,.28) !important;
}

/* ── EXPLORE GRID — rounded tiles, bigger gap ── */
.ig-tile {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.04) !important;
}

.ig-explore {
  gap: 5px !important;
  padding: 5px !important;
}

/* ── USER ROWS — glass cards ── */
.ig-userrow {
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 16px !important;
  margin: 4px 12px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  padding: 12px 14px !important;
}

.ig-userrow .ig-u {
  color: #fff !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600 !important;
}

.ig-userrow .ig-n {
  color: rgba(255,255,255,.42) !important;
  font-family: 'DM Sans', sans-serif !important;
}

/* ── AVATAR RING — gold → blue headphone gradient ── */
.ig-prof-avatar-ring {
  background: linear-gradient(135deg, #e8d5a3, #c8e8f5) !important;
  padding: 3px !important;
  box-shadow:
    0 0 18px rgba(232,213,163,.22),
    0 0 36px rgba(200,232,245,.1) !important;
}

.ig-prof-avatar-ring img,
.ig-prof-avatar-ring .ig-av-fallback {
  border: 3px solid #060c18 !important;
}

/* ── SMALL AVATARS in user rows ── */
.ig-userrow .ig-av {
  border-radius: 50% !important;
  border: 2px solid rgba(232,213,163,.25) !important;
}

/* ── FOLLOW BUTTON ── */
.ig-mini-follow {
  background: linear-gradient(135deg, #e8d5a3, #c4a35a) !important;
  color: #060c18 !important;
  border-radius: 14px !important;
  font-weight: 700 !important;
  font-family: 'DM Sans', sans-serif !important;
  border: none !important;
}

.ig-mini-follow.following {
  background: rgba(255,255,255,.07) !important;
  color: rgba(255,255,255,.65) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}

/* ── PROFILE ACTION BUTTONS ── */
.ig-btn {
  border-radius: 14px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700 !important;
}

.ig-btn.primary {
  background: linear-gradient(135deg, #e8d5a3, #c4a35a) !important;
  color: #060c18 !important;
  border: none !important;
}

.ig-btn.primary.following {
  background: rgba(255,255,255,.06) !important;
  color: rgba(255,255,255,.65) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}

.ig-btn.gray {
  background: rgba(255,255,255,.06) !important;
  color: rgba(255,255,255,.85) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}

.ig-btn.icon {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}

/* ── PROFILE PAGE ── */
.ig-prof-banner {
  background: linear-gradient(160deg, #0d1a3a 0%, #1a0a2e 55%, #060c18 100%) !important;
}

.ig-prof-top {
  background: #060c18 !important;
}

.ig-prof-name {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700 !important;
  color: #fff !important;
  font-size: 16px !important;
}

.ig-prof-cat {
  color: rgba(232,213,163,.65) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
}

.ig-stat .n {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 800 !important;
  color: #e8d5a3 !important;
}

.ig-stat .l {
  color: rgba(255,255,255,.42) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
}

/* ── PROFILE TABS ── */
.ig-tabs {
  background: #060c18 !important;
  border-top: 1px solid rgba(255,255,255,.06) !important;
}

.ig-tab {
  color: rgba(255,255,255,.3) !important;
  border-bottom: 2px solid transparent !important;
}

.ig-tab.active {
  color: #e8d5a3 !important;
  border-bottom-color: #e8d5a3 !important;
}

/* ── PROFILE GRID — rounded tiles ── */
.ig-grid {
  gap: 4px !important;
  padding: 4px !important;
}

.ig-grid .ig-tile {
  border-radius: 12px !important;
}

/* ── HIGHLIGHTS ── */
.ig-hl-circle {
  border: 2px solid rgba(232,213,163,.28) !important;
  background: rgba(255,255,255,.04) !important;
  border-radius: 50% !important;
}

.ig-hl-label {
  font-family: 'DM Sans', sans-serif !important;
  color: rgba(255,255,255,.55) !important;
  font-size: 11px !important;
}

/* ── SOCIAL BOTTOM NAV ── */
#ig-social-nav {
  background: rgba(6,12,24,.97) !important;
  border-top: 1px solid rgba(232,213,163,.08) !important;
}

.ig-social-btn span {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .6px !important;
  text-transform: uppercase !important;
}

/* ── VERIFIED BADGE (replaced with headphone SVG in JS) ── */
.nwsb-badge-hp {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
}

.nwsb-badge-tier    { color: #c8e8f5; }
.nwsb-badge-ult     { color: #e8d5a3; filter: drop-shadow(0 0 4px rgba(232,213,163,.55)); }
.nwsb-badge-massive { color: #e8d5a3; filter: drop-shadow(0 0 8px rgba(232,213,163,.8)) drop-shadow(0 0 14px rgba(232,213,163,.4)); }

/* ── SOCIAL HOME SCREEN ── */
#sub-social-home {
  position: absolute !important;
  inset: 0 !important;
}

.nwsb-home-scroll {
  position: absolute;
  inset: 0;
  top: 48px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 16px);
}
.nwsb-home-scroll::-webkit-scrollbar { display: none; }

/* Hero glass cube */
.nwsb-hero {
  margin: 14px 14px 0;
  border-radius: 22px !important;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(232,213,163,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 40px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* Evolution / origin imagery banner inside the cube */
.nwsb-hero-img {
  position: relative;
  height: 132px;
  background:
    linear-gradient(to bottom, rgba(6,12,24,.15) 0%, rgba(6,12,24,.55) 60%, #060c18 100%),
    url('https://res.cloudinary.com/dfc8lwj22/image/upload/q_auto/f_auto/v1778922166/grok_image_1778922009415_qtoteo.jpg') center 60% / 160% auto no-repeat;
}

.nwsb-hero-body {
  position: relative;
  padding: 0 20px 18px;
  margin-top: -34px;
}

.nwsb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 50% at 50% -10%, rgba(232,213,163,.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
}

.nwsb-hero-tag {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #e8d5a3;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 20px !important;
  background: rgba(6,12,24,.6);
  border: 1px solid rgba(232,213,163,.25);
}

.nwsb-hero-title {
  position: relative;
  z-index: 2;
  font-family: 'DM Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.nwsb-hero-sub {
  position: relative;
  z-index: 2;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin-top: 4px;
  margin-bottom: 16px;
}

.nwsb-hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 14px;
}

.nwsb-hero-stat {
  flex: 1;
  text-align: center;
  padding: 0 4px;
  border-right: 1px solid rgba(255,255,255,.07);
}

.nwsb-hero-stat:last-child {
  border-right: none;
}

.nwsb-hero-stat-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #e8d5a3;
  display: block;
}

.nwsb-hero-stat-lbl {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
  margin-top: 1px;
}

/* Section headings */
.nwsb-section-hd {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  padding: 18px 14px 8px;
}

/* People strip on social home */
.nwsb-home-people {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 8px;
}

/* Placeholder reels strip */
.nwsb-reels-strip {
  display: flex;
  gap: 10px;
  padding: 0 14px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nwsb-reels-strip::-webkit-scrollbar { display: none; }

.nwsb-reel-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 160px;
  border-radius: 16px !important;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.nwsb-reel-thumb-word {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  padding: 8px 8px 10px;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
  position: relative;
  z-index: 2;
}

.nwsb-reel-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,12,24,.85) 0%, transparent 55%);
}

/* ═══════════════════════════════════════════
   REELS FEED — Phase 2
═══════════════════════════════════════════ */

/* Reels feed sub-screen */
#sub-reels-feed {
  background: #060c18 !important;
}

.nwsb-reels-feed-scroll {
  position: absolute;
  inset: 0;
  top: 48px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px calc(72px + env(safe-area-inset-bottom, 0px));
}
.nwsb-reels-feed-scroll::-webkit-scrollbar { display: none; }

/* Vertical reel card */
.nwsb-reel-card {
  position: relative;
  border-radius: 20px !important;
  overflow: hidden;
  min-height: 340px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
}

.nwsb-reel-card-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Gradient overlay for readability */
.nwsb-reel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6,12,24,.96) 0%,
    rgba(6,12,24,.55) 40%,
    rgba(6,12,24,.1) 70%,
    transparent 100%
  );
  z-index: 1;
}

.nwsb-reel-card-body {
  position: relative;
  z-index: 2;
  padding: 18px 18px 18px;
}

.nwsb-reel-word {
  font-family: 'DM Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
  line-height: 1.05;
}

.nwsb-reel-syllables {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(232,213,163,.75);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.nwsb-reel-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.nwsb-reel-score-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  background: rgba(232,213,163,.12);
  border: 1px solid rgba(232,213,163,.28);
  border-radius: 20px !important;
  padding: 5px 14px;
}

.nwsb-reel-score-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #e8d5a3;
  line-height: 1;
}

.nwsb-reel-score-suffix {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(232,213,163,.5);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.nwsb-reel-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.nwsb-reel-av {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  border: 2px solid rgba(232,213,163,.35);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
}

.nwsb-reel-av-init {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  border: 2px solid rgba(232,213,163,.35);
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #e8d5a3;
}

.nwsb-reel-username {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

/* Post as Reel button — injected into player score wrap */
.nwsb-post-reel-btn {
  margin-top: 12px;
  width: 100%;
  padding: 11px 20px;
  border-radius: 14px !important;
  border: 1px solid rgba(232,213,163,.28);
  background: rgba(232,213,163,.1);
  color: #e8d5a3;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, opacity .15s;
}

.nwsb-post-reel-btn:active {
  opacity: .8;
}

.nwsb-post-reel-btn:disabled {
  opacity: .4;
  cursor: default;
}

/* Empty state in reels feed */
.nwsb-reels-empty {
  text-align: center;
  padding: 60px 30px;
}

.nwsb-reels-empty-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  margin-bottom: 8px;
}

.nwsb-reels-empty-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,.3);
  line-height: 1.55;
}

/* Free-claim button on reel cards */
.nwsb-reel-claim-btn {
  margin-left: auto;
  padding: 6px 16px;
  border-radius: 20px !important;
  border: 1px solid rgba(200,232,245,.35);
  background: rgba(200,232,245,.12);
  color: #c8e8f5;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.nwsb-reel-claim-btn:active { opacity: .8; }
.nwsb-reel-claim-btn.claimed {
  border-color: rgba(232,213,163,.35);
  background: rgba(232,213,163,.12);
  color: #e8d5a3;
}

/* Stats button on profile */
.nwsb-stats-btn { flex: 0 0 auto !important; padding: 0 16px !important; }

/* ═══════════════════════════════════════════
   PHASE 4 — VERIFICATION BADGE STYLES
═══════════════════════════════════════════ */

/* Hide Instagram blue check everywhere in the social section */
.ig .ig-verified,
#sub-people .ig-verified,
#sub-ig-profile .ig-verified {
  display: none !important;
}

/* Headphone badge base */
.nwsb-badge-hp {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 3px;
}

/* Tier badge — blue (paid subscriber) */
.nwsb-badge-tier {
  color: #c8e8f5;
  stroke: #c8e8f5;
}

/* Ultimate badge — gold (50+ words & sentences) */
.nwsb-badge-ult {
  color: #e8d5a3;
  stroke: #e8d5a3;
  filter: drop-shadow(0 0 4px rgba(232,213,163,.5));
}

/* Massive badge — bright gold + glow (1000+) */
.nwsb-badge-massive {
  color: #e8d5a3;
  stroke: #e8d5a3;
  filter: drop-shadow(0 0 8px rgba(232,213,163,.9)) drop-shadow(0 0 18px rgba(232,213,163,.4));
}

/* Profile top-bar verified area */
#ig-prof-verified-top .nwsb-badge-hp {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════
   PHASE 5 — IMAGE-EXPLAINER SLOTS + SOCIAL SETTINGS
═══════════════════════════════════════════ */

/* Image-explainer placeholder grid (user adds their own imagery later) */
.nwsb-explainer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px;
}

.nwsb-explainer-slot {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px !important;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 12px, rgba(255,255,255,.04) 12px 24px);
  border: 1px dashed rgba(232,213,163,.2);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.nwsb-explainer-slot span {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(232,213,163,.5);
  padding: 10px 12px;
}

/* Social settings sheet (self-contained, separate from app Settings) */
#nwsb-social-settings {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: flex-end;
}
#nwsb-social-settings.open { display: flex; }

.nwsb-ss-panel {
  width: 100%;
  background: #0a1628;
  border-radius: 22px 22px 0 0;
  border-top: 1.5px solid rgba(232,213,163,.22);
  padding: 0 0 calc(20px + env(safe-area-inset-bottom,0px));
  font-family: 'DM Sans', sans-serif;
  max-height: 80vh;
  overflow-y: auto;
}

.nwsb-ss-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,.14);
  border-radius: 2px;
  margin: 14px auto 8px;
}

.nwsb-ss-title {
  font-size: 18px;
  font-weight: 800;
  color: #e8d5a3;
  letter-spacing: .5px;
  padding: 8px 22px 4px;
}

.nwsb-ss-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  padding: 0 22px 16px;
}

.nwsb-ss-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,.05);
}

.nwsb-ss-row-body { flex: 1; min-width: 0; }
.nwsb-ss-row-label { font-size: 15px; font-weight: 600; color: #fff; }
.nwsb-ss-row-sub   { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 2px; }

.nwsb-ss-toggle {
  width: 46px; height: 26px;
  border-radius: 13px !important;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  background: rgba(255,255,255,.1);
  transition: background .2s;
}
.nwsb-ss-toggle.on { background: #e8d5a3; }
.nwsb-ss-toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50% !important;
  background: rgba(255,255,255,.55);
  transition: left .2s, background .2s;
}
.nwsb-ss-toggle.on .nwsb-ss-toggle-knob { left: 23px; background: #060c18; }

.nwsb-ss-close {
  margin: 8px 22px 0;
  padding: 14px;
  text-align: center;
  border-radius: 14px !important;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
