    /* ========== RESET & BASE ========== */
    *, *::before, *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    :root {
      --bg-dark: #0c0b1a;
      --bg-card: #14121f;
      --bg-elevated: #1b182a;
      --bg-input: #1e1a2e;
      --border-light: rgba(255, 215, 0, 0.12);
      --border-glow: rgba(255, 215, 0, 0.25);
      --gold: #ffd966;
      --gold-dim: #c9a82b;
      --text-primary: #f0edf7;
      --text-secondary: #a89fc0;
      --text-muted: #6e6488;
      --accent-gradient: linear-gradient(135deg, #ffd966, #e6b422);
      --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
      --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
      --radius-sm: 0.75rem;
      --radius-md: 1.25rem;
      --radius-lg: 2rem;
      --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      --header-height: 60px;
      --bottom-nav-height: 64px;
    }

    html {
      scroll-behavior: smooth;
      -webkit-text-size-adjust: 100%;
    }

    body {
      background: var(--bg-dark);
      background-image: radial-gradient(circle at 10% 20%, rgba(98, 0, 255, 0.12) 0%, transparent 45%),
                        radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.06) 0%, transparent 45%);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      color: var(--text-primary);
      min-height: 100vh;
      padding-bottom: calc(var(--bottom-nav-height) + 16px);
      overflow-x: hidden;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }

    ::-webkit-scrollbar { width: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255, 215, 0, 0.2); border-radius: 4px; }

    /* ========== APP LAYOUT ========== */
    .app-container {
      max-width: 640px;
      margin: 0 auto;
      position: relative;
      padding: 0 12px;
    }

    /* ========== TOP HEADER ========== */
    .top-header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(12, 11, 26, 0.9);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border-light);
      height: var(--header-height);
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      padding: 0 16px;
      margin: 0 -12px;
      transition: box-shadow var(--transition);
    }

    .top-header.scrolled { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }

    .header-create-btn {
      justify-self: start;
      width: 40px; height: 40px; min-height: 40px;
      display: flex; align-items: center; justify-content: center;
      background: var(--accent-gradient); color: #12101f; border: none; border-radius: 50%;
      font-size: 1.05rem; cursor: pointer;
      transition: transform var(--transition), box-shadow var(--transition);
    }
    .header-create-btn:hover { transform: scale(1.06); box-shadow: 0 6px 16px -4px rgba(230, 180, 34, 0.55); }
    .header-create-btn:active { transform: scale(0.94); }

    .logo-area { justify-self: center; }
    .header-actions { justify-self: end; }

    /* ================================================================
   PREMIUM ANNOUNCEMENT BAR
   ================================================================ */
.announcement-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  background: rgba(20, 18, 31, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 217, 102, 0.25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  z-index: 45;
  overflow: hidden;
}

/* Glowing Gold Icon Badge */
.announcement-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 217, 102, 0.22), rgba(230, 180, 34, 0.08));
  border: 1px solid rgba(255, 217, 102, 0.4);
  color: #ffd966;
  font-size: 0.75rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255, 217, 102, 0.2);
}

/* Track Container & Soft Fade Edges */
.announcement-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

/* Right-to-Left Swipe Animation */
.announcement-marquee {
  display: inline-block;
  padding-left: 100%;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #f0edf7;
  animation: swipeRightToLeft 16s linear infinite;
  will-change: transform;
}

/* User ke hover karne par animation pause hoga taaki aasaani se padha ja sake */
.announcement-bar:hover .announcement-marquee {
  animation-play-state: paused;
}

@keyframes swipeRightToLeft {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Close Button */
.announcement-close {
  background: none;
  border: none;
  color: rgba(240, 237, 247, 0.45);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.25s ease, transform 0.25s ease;
}

.announcement-close:hover {
  color: #ffd966;
  transform: scale(1.15);
}


    .logo-area { display: flex; align-items: center; gap: 8px; cursor: pointer; }

    .logo-icon {
      font-size: 1.6rem;
      background: var(--accent-gradient);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
    }

    .logo-text {
      font-family: 'Playfair Display', serif;
      font-weight: 600;
      font-size: 1.5rem;
      background: linear-gradient(135deg, #fff6d5, #ffd966);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      letter-spacing: 0.5px;
    }

    .header-actions { display: flex; gap: 18px; align-items: center; }
    .header-login-btn {
      display: none;
      min-height: 34px; padding: 0 16px;
      background: var(--accent-gradient); color: #12101f;
      border: none; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
      cursor: pointer; font-family: 'Inter', sans-serif; letter-spacing: 0.2px;
    }
    .header-login-btn.visible { display: inline-flex; align-items: center; }

    .header-install-btn {
      display: none;
      width: 34px; height: 34px; min-height: 34px;
      align-items: center; justify-content: center;
      background: var(--bg-elevated); color: var(--gold);
      border: 1px solid var(--border-light); border-radius: 50%; font-size: 0.85rem;
      cursor: pointer;
    }
    .header-install-btn.visible { display: inline-flex; }
    .header-install-btn:hover { border-color: var(--gold); }

    .header-install-btn {
      display: none;
      width: 34px; height: 34px; min-height: 34px;
      align-items: center; justify-content: center;
      background: var(--bg-elevated); color: var(--gold);
      border: 1px solid var(--border-light); border-radius: 50%;
      cursor: pointer; font-size: 0.9rem;
      transition: transform var(--transition), border-color var(--transition);
    }
    .header-install-btn.visible { display: inline-flex; }
    .header-install-btn:hover { transform: translateY(-1px); border-color: var(--gold); }
    .header-install-btn:active { transform: scale(0.94); }

    .header-actions i {
      font-size: 1.25rem;
      color: var(--text-primary);
      cursor: pointer;
      transition: color var(--transition), transform var(--transition);
      padding: 4px;
      position: relative;
    }

    .header-actions i:hover, .header-actions i:active {
      color: var(--gold);
      transform: scale(1.08);
    }

    .notification-dot {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 8px;
      height: 8px;
      background: #ff4d6d;
      border-radius: 50%;
      border: 2px solid var(--bg-dark);
      display: none;
    }

    .notification-dot.visible { display: block; }

    /* ========== VIEW SECTIONS ========== */
    .view-section {
      display: none;
      animation: fadeIn 0.35s ease;
    }

    .view-section.active { display: block; }

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

    /* ========== TOP 10 SHAYAR LEADERBOARD ========== */
    .leaderboard-section {
      padding: 16px 0 18px;
      border-bottom: 1px solid var(--border-light);
      margin-bottom: 4px;
    }
    .leaderboard-header { display: flex; align-items: center; margin-bottom: 12px; }
    .leaderboard-header h2 {
      font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600;
      color: var(--gold); display: flex; align-items: center; gap: 8px;
    }
    .leaderboard-list { display: flex; flex-direction: column; gap: 2px; }
    .leaderboard-row {
      display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: var(--radius-sm);
      background: none; border: none; width: 100%; text-align: left; cursor: pointer;
      transition: background var(--transition); font-family: 'Inter', sans-serif;
    }
    .leaderboard-row:hover { background: var(--bg-elevated); }
    .leaderboard-rank {
      width: 26px; text-align: center; font-family: 'Playfair Display', serif; font-weight: 600;
      font-size: 1rem; color: var(--text-muted); flex-shrink: 0;
    }
    .leaderboard-row.rank-1 .leaderboard-rank { color: #ffd966; }
    .leaderboard-row.rank-2 .leaderboard-rank { color: #d5d5e0; }
    .leaderboard-row.rank-3 .leaderboard-rank { color: #cd8a52; }
    .leaderboard-avatar {
      width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
      font-size: 0.85rem; font-weight: 700; border: 1.5px solid var(--border-light); flex-shrink: 0;
    }
    .leaderboard-info { flex: 1; min-width: 0; }
    .leaderboard-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 5px; }
    .leaderboard-name .lb-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .leaderboard-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
    .leaderboard-likes { font-size: 0.82rem; font-weight: 700; color: var(--gold); flex-shrink: 0; display: flex; align-items: center; gap: 4px; }

    /* ========== "noor" — VERTICAL SWIPEABLE REELS FEED ========== */
    .reels-container {
      height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
      height: calc(100dvh - var(--header-height) - var(--bottom-nav-height));
      overflow-y: scroll;
      scroll-snap-type: y mandatory;
      margin: 0 -16px;
      -webkit-overflow-scrolling: touch;
      position: relative;
    }
    .reel-item {
      height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
      height: calc(100dvh - var(--header-height) - var(--bottom-nav-height));
      scroll-snap-align: start;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px 60px 20px 24px;
      background: linear-gradient(160deg, #1a1530, #0e0c1c);
      border-bottom: 1px solid var(--border-light);
      overflow: hidden;
    }
    .reel-bg-glow {
      position: absolute; inset: -20%; z-index: 0;
      background: radial-gradient(circle at 30% 25%, rgba(255, 217, 102, 0.08) 0%, transparent 45%),
                  radial-gradient(circle at 75% 75%, rgba(98, 0, 255, 0.1) 0%, transparent 45%);
      pointer-events: none;
    }
    .reel-shayari {
      position: relative; z-index: 1;
      font-family: 'Playfair Display', serif; text-align: center; color: #f5f0ff;
      line-height: 1.7; max-width: 100%; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
    }
    .reel-author {
      position: absolute; left: 20px; bottom: 24px; z-index: 2;
      display: flex; align-items: center; gap: 10px; cursor: pointer;
    }
    .reel-avatar {
      width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border-light);
      display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 700; flex-shrink: 0;
    }
    .reel-author span { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
    .reel-actions {
      position: absolute; right: 10px; bottom: 24px; z-index: 2;
      display: flex; flex-direction: column; align-items: center; gap: 18px;
    }
    .reel-action-btn {
      background: rgba(20, 18, 32, 0.6); backdrop-filter: blur(6px); border: none; color: var(--text-primary);
      width: 46px; height: 46px; border-radius: 50%; display: flex; flex-direction: column; align-items: center;
      justify-content: center; gap: 2px; font-size: 1.1rem;
    }
    .reel-action-btn span { font-size: 0.62rem; font-weight: 600; }
    .reel-action-btn.liked, .reel-action-btn.liked i { color: #ff4d6d; }
    .reel-action-btn.saved, .reel-action-btn.saved i { color: var(--gold); }

    /* ========== BATTLE PAGE ========== */
    .battle-container { padding: 4px 0 24px; }
    .battle-header { text-align: center; padding: 12px 0 18px; }
    .battle-header h2 {
      font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--gold);
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .battle-header p { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
    .battle-topic-card {
      background: linear-gradient(135deg, rgba(255, 77, 109, 0.12), rgba(98, 0, 255, 0.12));
      border: 1px solid var(--border-glow); border-radius: var(--radius-md); padding: 22px;
      display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px;
    }
    .battle-topic-side { flex: 1; text-align: center; }
    .battle-topic-side h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--text-primary); }
    .battle-vs { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--gold); font-weight: 700; }
    .battle-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
    .battle-tab {
      flex: 1; min-height: 44px; background: var(--bg-card); border: 1px solid var(--border-light);
      color: var(--text-secondary); border-radius: 999px; font-size: 0.85rem; font-weight: 600;
      font-family: 'Inter', sans-serif;
    }
    .battle-tab.active { background: rgba(255, 217, 102, 0.12); border-color: var(--gold); color: var(--gold); }
    .battle-entries { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
    .battle-entry-card {
      background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 16px;
    }
    .battle-entry-shayari { font-family: 'Playfair Display', serif; color: var(--text-secondary); line-height: 1.6; white-space: pre-line; margin-bottom: 8px; }
    .battle-entry-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--text-muted); }
    .battle-featured-banner {
      background: linear-gradient(135deg, rgba(255, 217, 102, 0.15), rgba(255, 217, 102, 0.05));
      border: 1px solid var(--border-glow); border-radius: var(--radius-md); padding: 16px; margin-bottom: 18px;
      text-align: center;
    }
    .battle-featured-banner .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
    .btn-outline-battle {
      width: 100%; min-height: 48px; background: var(--accent-gradient); color: #12101f; border: none;
      border-radius: 999px; font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .battle-side-choice { display: flex; gap: 8px; }
    .battle-side-btn {
      flex: 1; min-height: 44px; background: var(--bg-input); border: 1px solid var(--border-light);
      color: var(--text-secondary); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600;
      font-family: 'Inter', sans-serif;
    }
    .battle-side-btn.active { background: rgba(255, 77, 109, 0.12); border-color: #ff4d6d; color: #ff4d6d; }

    /* ========== FEED ========== */
    .feed { display: flex; flex-direction: column; gap: 20px; padding: 12px 0; }

    /* ========== POST CARD ========== */
    .post-card {
      background: var(--bg-card);
      border-radius: var(--radius-md);
      border: 1px solid var(--border-light);
      overflow: hidden;
      transition: transform var(--transition), box-shadow var(--transition);
      box-shadow: var(--shadow-sm);
      /* Lets the browser skip layout/paint work for cards scrolled far
         off-screen — with a long feed this meaningfully cuts scroll-
         time DOM recalculation without changing anything visually. */
      content-visibility: auto;
      contain-intrinsic-size: auto 420px;
    }

    .post-card:hover {
      box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-glow);
    }

    .post-header {
      display: flex;
      align-items: center;
      padding: 12px 14px;
      gap: 10px;
    }

    .post-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: linear-gradient(135deg, #2a2440, #1e1a30);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--gold);
      flex-shrink: 0;
      border: 1.5px solid var(--border-glow);
      overflow: hidden;
      cursor: pointer;
    }

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

    .post-username {
      font-weight: 600;
      font-size: 0.88rem;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
    }

    .post-username:hover { color: var(--gold); }

    .verified-badge {
      font-size: 0.7rem;
      color: var(--gold);
      background: rgba(255, 215, 0, 0.12);
      padding: 1px 5px;
      border-radius: 10px;
      font-weight: 500;
    }

    .post-location { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

    .post-more {
      color: var(--text-muted);
      font-size: 1.1rem;
      cursor: pointer;
      padding: 4px 8px;
      transition: color var(--transition);
      background: none;
      border: none;
    }

    .post-more:hover { color: var(--gold); }

    /* ========== POST IMAGE ========== */
    .post-image {
      width: 100%;
      min-height: 320px;
      /* No fixed aspect-ratio: a rigid square used to clip long shayari
         via overflow:hidden. The box now grows with its content instead,
         and overflow:hidden here only contains the oversized decorative
         glow below, never the text. */
      background: linear-gradient(145deg, #1e1a2e, #14101f);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      user-select: none;
      cursor: pointer;
      padding: 24px 0;
    }

    .post-image .shayari-content {
      padding: 32px 28px;
      text-align: center;
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      line-height: 1.7;
      color: #f5f0ff;
      text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
      font-weight: 400;
      letter-spacing: 0.3px;
      max-width: 90%;
      word-break: break-word;
      position: relative;
      z-index: 2;
      /* font-size is fine-tuned per post by JS (computeShayariFontSize)
         based on character count, so very long shayari shrinks to fit
         instead of overflowing; this is the fallback for short posts
         and for the shayari.split('\n')[0] previews elsewhere. */
    }

    .post-image .bg-glow {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 200%;
      height: 200%;
      background: radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.06) 0%, transparent 50%),
                  radial-gradient(circle at 70% 60%, rgba(98, 0, 255, 0.06) 0%, transparent 50%);
      pointer-events: none;
      z-index: 1;
    }

    /* ========== POST ACTIONS ========== */
    .post-actions {
      display: flex;
      align-items: center;
      padding: 10px 14px 6px;
      gap: 18px;
    }

    .action-btn {
      background: none;
      border: none;
      color: var(--text-primary);
      font-size: 1.5rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: transform var(--transition), color var(--transition);
      padding: 4px 0;
      font-family: 'Inter', sans-serif;
    }

    .action-btn:active { transform: scale(0.88); }
    .action-btn.liked i { color: #ff4d6d; filter: drop-shadow(0 0 8px rgba(255, 77, 109, 0.5)); }
    .action-btn.saved i { color: var(--gold); }

    .post-actions .spacer { flex: 1; }

    /* ========== POST DETAILS ========== */
    .post-details { padding: 4px 14px 14px; }

    .post-likes {
      font-weight: 600;
      font-size: 0.85rem;
      color: var(--text-primary);
      margin-bottom: 6px;
    }

    .post-caption {
      font-size: 0.85rem;
      color: var(--text-secondary);
      line-height: 1.5;
      margin-bottom: 6px;
    }

    .post-caption .caption-username {
      font-weight: 600;
      color: var(--text-primary);
      margin-right: 6px;
    }

    .post-caption .caption-hashtags { color: var(--gold-dim); font-weight: 400; }

    .post-time {
      font-size: 0.68rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      font-weight: 500;
    }

    /* ========== QUICK COMMENT CHIPS ========== */
    .quick-react-toggle {
      background: none; border: none; color: var(--text-muted); font-size: 0.76rem;
      font-weight: 600; padding: 6px 0; margin-top: 2px; display: flex; align-items: center; gap: 6px;
      font-family: 'Inter', sans-serif;
    }
    .quick-react-toggle:hover { color: var(--gold); }
    .quick-react-toggle .cc-count { color: var(--text-secondary); font-weight: 500; }
    .chip-panel { display: none; margin-top: 8px; }
    .chip-panel.open { display: block; animation: fadeIn 0.2s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
    .chip-categories { display: flex; gap: 6px; margin-bottom: 8px; }
    .chip-category-btn {
      background: none; border: 1px solid var(--border-light); color: var(--text-muted);
      border-radius: 999px; padding: 4px 12px; font-size: 0.7rem; font-weight: 600;
      font-family: 'Inter', sans-serif;
    }
    .chip-category-btn.active { background: rgba(255, 217, 102, 0.12); border-color: var(--gold); color: var(--gold); }
    .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
    .comment-chip {
      background: var(--bg-elevated); border: 1px solid var(--border-light); color: var(--text-secondary);
      border-radius: 999px; padding: 6px 13px; font-size: 0.76rem; font-weight: 500;
      font-family: 'Inter', sans-serif; transition: all var(--transition); min-height: 32px;
    }
    .comment-chip:hover { border-color: var(--gold); color: var(--gold); background: rgba(255, 217, 102, 0.08); }
    .comment-chip:disabled { opacity: 0.5; cursor: not-allowed; }
    .comment-chip.sent { border-color: #3ddc97; color: #3ddc97; }

    /* ========== EXPLORE GRID ========== */
    .explore-header {
      padding: 20px 0 12px;
      text-align: center;
    }

    .explore-header h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.6rem;
      color: var(--gold);
      letter-spacing: 1px;
      margin-bottom: 4px;
    }

    .explore-header p {
      font-size: 0.8rem;
      color: var(--text-muted);
      letter-spacing: 0.5px;
    }

    .explore-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 3px;
      padding: 8px 0 20px;
    }

    .explore-item {
      aspect-ratio: 1 / 1;
      background: linear-gradient(145deg, #1e1a2e, #14101f);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px 10px;
      cursor: pointer;
      transition: opacity var(--transition), transform var(--transition);
      position: relative;
      overflow: hidden;
      border: none;
      font-family: inherit;
      color: inherit;
    }

    .explore-item:hover { opacity: 0.85; }
    .explore-item:active { transform: scale(0.97); }

    .explore-item .explore-shayari {
      font-family: 'Playfair Display', serif;
      font-size: 0.62rem;
      line-height: 1.4;
      color: #e8e2f5;
      text-align: center;
      word-break: break-word;
      position: relative;
      z-index: 2;
    }

    .explore-item .explore-glow {
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
      pointer-events: none;
    }

    .explore-item .explore-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      opacity: 0;
      transition: opacity var(--transition);
      color: #fff;
      font-size: 0.75rem;
      font-weight: 600;
      z-index: 3;
    }

    .explore-item:hover .explore-overlay { opacity: 1; }

    .explore-overlay span { display: flex; align-items: center; gap: 4px; }

    /* ========== SEARCH VIEW ========== */
    .search-container { padding: 16px 0; }

    .search-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--bg-input);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-sm);
      padding: 12px 16px;
      margin-bottom: 20px;
      transition: border-color var(--transition), box-shadow var(--transition);
    }

    .search-bar:focus-within {
      border-color: var(--gold);
      box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    }

    .search-bar i { color: var(--text-muted); font-size: 1rem; }

    .search-bar input {
      flex: 1;
      background: none;
      border: none;
      outline: none;
      color: var(--text-primary);
      font-size: 0.9rem;
      font-family: 'Inter', sans-serif;
    }

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

    .search-bar .clear-search {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 1rem;
      padding: 4px;
      display: none;
    }

    .search-bar .clear-search.visible { display: block; }

    .search-trending h3 {
      font-size: 0.9rem;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 2px;
      margin-bottom: 14px;
      font-weight: 500;
    }

    .search-people h3 { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 2px; margin: 20px 0 14px; font-weight: 500; }
    .search-people { display: flex; flex-direction: column; }

    .trending-tag {
      display: inline-block;
      background: var(--bg-elevated);
      border: 1px solid var(--border-light);
      padding: 8px 18px;
      border-radius: 2rem;
      font-size: 0.82rem;
      color: var(--text-secondary);
      margin: 0 8px 10px 0;
      cursor: pointer;
      transition: all var(--transition);
    }

    .trending-tag:hover {
      background: rgba(255, 215, 0, 0.1);
      border-color: var(--gold);
      color: var(--gold);
      transform: translateY(-2px);
    }

    .search-results { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

    .search-result-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      background: var(--bg-card);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-light);
      cursor: pointer;
      transition: all var(--transition);
    }

    .search-result-item:hover {
      border-color: var(--border-glow);
      transform: translateX(4px);
    }

    .search-result-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: linear-gradient(135deg, #2a2440, #1e1a30);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.85rem;
      color: var(--gold);
      flex-shrink: 0;
      border: 1.5px solid var(--border-glow);
    }

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

    .search-result-name {
      font-weight: 600;
      font-size: 0.88rem;
      color: var(--text-primary);
    }

    .search-result-handle {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .search-result-action {
      background: var(--accent-gradient);
      color: #12101f;
      border: none;
      padding: 7px 18px;
      border-radius: 2rem;
      font-size: 0.75rem;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      transition: transform var(--transition);
    }

    .search-result-action:active { transform: scale(0.94); }

    /* ========== CREATE VIEW ========== */
    .create-container { padding: 16px 0; }

    .create-card {
      background: var(--bg-card);
      border-radius: var(--radius-md);
      border: 1px solid var(--border-light);
      padding: 24px 20px;
    }

    .create-card h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      color: var(--gold);
      margin-bottom: 6px;
    }

    .create-card p {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin-bottom: 20px;
    }

    .create-field {
      margin-bottom: 18px;
    }

    .create-field label {
      display: block;
      font-size: 0.78rem;
      color: var(--text-secondary);
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 500;
    }

    .create-field textarea,
    .create-field input {
      width: 100%;
      background: var(--bg-input);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-sm);
      padding: 14px 16px;
      color: var(--text-primary);
      font-size: 0.9rem;
      font-family: 'Inter', sans-serif;
      outline: none;
      transition: border-color var(--transition), box-shadow var(--transition);
      resize: vertical;
    }

    .create-field textarea { min-height: 100px; line-height: 1.6; }

    .create-field textarea:focus,
    .create-field input:focus {
      border-color: var(--gold);
      box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    }

    .field-hint-inline { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-muted); font-size: 0.72rem; }

    .collab-results { position: relative; margin-top: 6px; }
    .collab-result-item {
      display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-elevated);
      border: 1px solid var(--border-light); border-radius: var(--radius-sm); margin-bottom: 4px; cursor: pointer;
    }
    .collab-result-item:hover { border-color: var(--gold); }
    .collab-result-avatar {
      width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
      font-size: 0.7rem; font-weight: 700; flex-shrink: 0; border: 1.5px solid var(--border-light);
    }
    .collab-result-name { font-size: 0.85rem; color: var(--text-primary); }
    .collab-chosen {
      display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 10px 14px;
      background: rgba(255, 217, 102, 0.1); border: 1px solid var(--border-glow); border-radius: var(--radius-sm);
      font-size: 0.85rem; color: var(--gold); font-weight: 600;
    }
    .collab-chosen button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
    .collab-chosen button:hover { color: #ff4d6d; }

    .create-submit {
      width: 100%;
      background: var(--accent-gradient);
      color: #12101f;
      border: none;
      padding: 14px;
      border-radius: var(--radius-sm);
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      transition: transform var(--transition), box-shadow var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .create-submit:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 24px -8px rgba(230, 180, 34, 0.6);
    }

    .create-submit:active { transform: translateY(0); }

    /* ========== PROFILE VIEW ========== */
    .profile-container { padding: 16px 0; }

    .profile-header {
      display: flex;
      align-items: center;
      gap: 24px;
      padding: 0 4px 20px;
    }

    .profile-avatar-large {
      width: 86px;
      height: 86px;
      border-radius: 50%;
      background: linear-gradient(135deg, #2a2440, #1e1a30);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      font-weight: 700;
      color: var(--gold);
      border: 3px solid var(--gold);
      box-shadow: 0 0 24px rgba(255, 215, 0, 0.25);
      flex-shrink: 0;
      position: relative;
    }

    .profile-avatar-large .profile-ring {
      position: absolute;
      inset: -6px;
      border-radius: 50%;
      border: 2px solid rgba(255, 215, 0, 0.3);
      animation: pulseRing 2.5s ease-in-out infinite;
    }

    @keyframes pulseRing {
      0%, 100% { transform: scale(1); opacity: 0.6; }
      50% { transform: scale(1.05); opacity: 0.2; }
    }

    .profile-stats {
      display: flex;
      gap: 24px;
      flex: 1;
      justify-content: space-around;
    }

    .profile-stat { text-align: center; }

    .profile-stat .stat-value {
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--text-primary);
      display: block;
    }

    .profile-stat .stat-label {
      font-size: 0.72rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .profile-bio {
      padding: 0 4px 20px;
      border-bottom: 1px solid var(--border-light);
      margin-bottom: 16px;
    }

    .profile-bio .bio-name {
      font-weight: 600;
      font-size: 1rem;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .profile-bio .bio-text {
      font-size: 0.84rem;
      color: var(--text-secondary);
      line-height: 1.5;
      margin-bottom: 6px;
    }

    .profile-bio .bio-link {
      font-size: 0.82rem;
      color: var(--gold);
      text-decoration: none;
      font-weight: 500;
    }

    .profile-actions {
      display: flex;
      gap: 10px;
      padding: 0 4px 20px;
    }

    .profile-actions button {
      flex: 1;
      padding: 10px;
      border-radius: var(--radius-sm);
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      transition: all var(--transition);
      border: 1px solid var(--border-light);
    }

    .btn-edit-profile {
      background: var(--bg-elevated);
      color: var(--text-primary);
    }

    .btn-edit-profile:hover { border-color: var(--gold); color: var(--gold); }

    .btn-share-profile {
      background: var(--accent-gradient);
      color: #12101f;
      border: none;
    }

    .btn-share-profile:hover { transform: translateY(-2px); }

    .profile-tabs {
      display: flex;
      border-bottom: 1px solid var(--border-light);
      margin-bottom: 8px;
    }

    .profile-tab {
      flex: 1;
      padding: 12px;
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 1.1rem;
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all var(--transition);
      font-family: 'Inter', sans-serif;
    }

    .profile-tab.active {
      color: var(--gold);
      border-bottom-color: var(--gold);
    }

    .profile-tab:hover { color: var(--gold); }

    .profile-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 3px;
    }

    .profile-grid-item {
      aspect-ratio: 1 / 1;
      background: linear-gradient(145deg, #1e1a2e, #14101f);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px;
      cursor: pointer;
      transition: opacity var(--transition);
      position: relative;
      border: none;
      font-family: inherit;
      color: inherit;
    }

    .profile-grid-item:hover { opacity: 0.8; }

    .pin-badge, .pin-toggle {
      position: absolute; top: 6px; right: 6px; z-index: 2;
      width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
      font-size: 0.65rem; background: rgba(12, 11, 26, 0.75); backdrop-filter: blur(4px);
    }
    .pin-badge { color: var(--gold); }
    .pin-toggle { color: var(--text-muted); left: 6px; right: auto; cursor: pointer; transition: color var(--transition); }
    .pin-toggle:hover { color: var(--gold); }

    .profile-grid-item .grid-shayari {
      font-family: 'Playfair Display', serif;
      font-size: 0.58rem;
      line-height: 1.4;
      color: #e8e2f5;
      text-align: center;
      word-break: break-word;
    }

    /* ========== NOTIFICATIONS PANEL ========== */
    .notifications-panel {
      position: fixed;
      top: var(--header-height);
      right: 0;
      width: 100%;
      max-width: 360px;
      height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
      background: rgba(20, 18, 31, 0.98);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-left: 1px solid var(--border-light);
      z-index: 150;
      transform: translateX(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      padding: 16px;
      box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
    }

    .notifications-panel.open { transform: translateX(0); }

    .notifications-panel h3 {
      font-size: 1rem;
      color: var(--gold);
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .notification-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border-radius: var(--radius-sm);
      background: var(--bg-elevated);
      margin-bottom: 8px;
      border: 1px solid var(--border-light);
      transition: all var(--transition);
      cursor: pointer;
    }

    .notification-item:hover {
      border-color: var(--border-glow);
      background: rgba(255, 215, 0, 0.05);
    }

    .notification-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: linear-gradient(135deg, #2a2440, #1e1a30);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.8rem;
      color: var(--gold);
      flex-shrink: 0;
      border: 1.5px solid var(--border-glow);
    }

    .notification-content { flex: 1; min-width: 0; }

    .notification-text {
      font-size: 0.82rem;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    .notification-text strong { color: var(--text-primary); }

    .notification-time {
      font-size: 0.68rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .notifications-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 149;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
    }

    .notifications-overlay.visible {
      opacity: 1;
      pointer-events: auto;
    }

    /* ========== MESSAGES PANEL ========== */
    .messages-panel {
      position: fixed;
      top: var(--header-height);
      left: 0;
      width: 100%;
      max-width: 360px;
      height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
      background: rgba(20, 18, 31, 0.98);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-right: 1px solid var(--border-light);
      z-index: 150;
      transform: translateX(-100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      padding: 16px;
      box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6);
    }

    .messages-panel.open { transform: translateX(0); }

    .messages-panel h3 {
      font-size: 1rem;
      color: var(--gold);
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .message-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border-radius: var(--radius-sm);
      background: var(--bg-elevated);
      margin-bottom: 8px;
      border: 1px solid var(--border-light);
      transition: all var(--transition);
      cursor: pointer;
    }

    .message-item:hover {
      border-color: var(--border-glow);
      background: rgba(255, 215, 0, 0.05);
    }

    .message-avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: linear-gradient(135deg, #2a2440, #1e1a30);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.85rem;
      color: var(--gold);
      flex-shrink: 0;
      border: 1.5px solid var(--border-glow);
    }

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

    .message-name {
      font-weight: 600;
      font-size: 0.85rem;
      color: var(--text-primary);
    }

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

    .message-time {
      font-size: 0.65rem;
      color: var(--text-muted);
      flex-shrink: 0;
    }

    /* ========== BOTTOM NAV ========== */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: var(--bottom-nav-height);
      background: rgba(12, 11, 26, 0.94);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-top: 1px solid var(--border-light);
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 0 8px;
      z-index: 200;
      padding-bottom: env(safe-area-inset-bottom, 0);
      max-width: 640px;
      margin: 0 auto;
    }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 0.6rem;
      cursor: pointer;
      transition: color var(--transition), transform var(--transition);
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      font-family: 'Inter', sans-serif;
      letter-spacing: 0.3px;
      min-width: 56px;
    }

    .nav-item i { font-size: 1.35rem; transition: transform var(--transition); }
    .nav-item:active { transform: scale(0.9); }
    .nav-item.active { color: var(--gold); }
    .nav-item.active i { filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4)); }
    .nav-item:hover { color: var(--gold); }
    .nav-item .nav-label { font-weight: 500; }

    /* ========== TOAST ========== */
    .toast {
      position: fixed;
      bottom: calc(var(--bottom-nav-height) + 20px);
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--gold);
      color: #12101f;
      padding: 10px 24px;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.82rem;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
      opacity: 0;
      transition: opacity 0.3s, transform 0.3s;
      pointer-events: none;
      z-index: 999;
      letter-spacing: 0.3px;
      white-space: nowrap;
      max-width: 90vw;
      text-align: center;
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* ========== MODAL ========== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      z-index: 300;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    .modal-overlay.visible {
      opacity: 1;
      pointer-events: auto;
    }

    .modal-content {
      background: var(--bg-card);
      border-radius: var(--radius-md);
      border: 1px solid var(--border-glow);
      padding: 24px;
      max-width: 400px;
      width: 100%;
      box-shadow: var(--shadow-lg);
      transform: scale(0.9);
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .modal-overlay.visible .modal-content { transform: scale(1); }

    .modal-content h3 {
      font-family: 'Playfair Display', serif;
      font-size: 1.3rem;
      color: var(--gold);
      margin-bottom: 12px;
    }

    .modal-content p {
      font-size: 0.85rem;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 20px;
    }

    .modal-actions { display: flex; gap: 10px; }

    .modal-actions button {
      flex: 1;
      padding: 12px;
      border-radius: var(--radius-sm);
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      transition: all var(--transition);
      border: none;
    }

    .modal-cancel {
      background: var(--bg-elevated);
      color: var(--text-primary);
      border: 1px solid var(--border-light) !important;
    }

    .modal-confirm {
      background: var(--accent-gradient);
      color: #12101f;
    }

    /* ========== POST DETAIL MODAL (deep-linkable) ========== */
    #postDetailOverlay .modal-content { max-width: 420px; text-align: left; }
    .pd-author {
      display: flex; align-items: center; gap: 10px; margin-bottom: 16px; cursor: pointer;
    }
    .pd-avatar {
      width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
      border: 1.5px solid var(--border-light); font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
    }
    .pd-author-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
    .pd-shayari {
      font-family: 'Playfair Display', serif; font-size: 1.05rem; line-height: 1.9;
      white-space: pre-line; color: var(--text-primary); margin-bottom: 18px;
    }
    .pd-actions { display: flex; gap: 8px; margin-bottom: 4px; }
    .pd-actions button {
      flex: 1; min-height: 44px; background: var(--bg-elevated); border: 1px solid var(--border-light);
      border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.8rem; font-weight: 600;
      cursor: pointer; font-family: 'Inter', sans-serif; display: flex; align-items: center; justify-content: center; gap: 6px;
    }
    .pd-actions button.liked { color: #ff4d6d; border-color: #ff4d6d; }
    .pd-close-btn {
      position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; min-height: 0;
      background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 50%;
      color: var(--text-secondary); cursor: pointer;
    }
    #postDetailOverlay .modal-content { position: relative; }

    /* ========== EDIT PROFILE MODAL ========== */
    #editProfileOverlay .modal-content { max-width: 420px; text-align: left; position: relative; }
    #editProfileOverlay .auth-field textarea {
      width: 100%; min-height: 80px; background: var(--bg-input); border: 1px solid var(--border-light);
      border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text-primary); font-size: 0.9rem;
      font-family: 'Inter', sans-serif; outline: none; resize: vertical;
    }
    #editProfileOverlay .auth-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1); }
    #editProfileOverlay .field-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
    .edit-profile-save {
      width: 100%; min-height: 48px; background: var(--accent-gradient); color: #12101f; border: none;
      border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 700; display: flex; align-items: center;
      justify-content: center; gap: 8px; cursor: pointer; font-family: 'Inter', sans-serif; margin-top: 4px;
    }
    .edit-profile-save:disabled { opacity: 0.6; cursor: not-allowed; }

    /* ========== SHAYARI IMAGE EXPORTER ========== */
    .export-modal-content { max-width: 380px; text-align: center; position: relative; }
    #exportCanvas {
      width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm); margin: 14px 0 12px;
      background: #14101f; display: block;
    }
    .export-templates { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
    .export-template-swatch {
      width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
      transition: transform var(--transition), border-color var(--transition);
    }
    .export-template-swatch.active { border-color: var(--gold); transform: scale(1.1); }
    .export-actions { display: flex; gap: 10px; }
    .btn-mini-export {
      flex: 1; min-height: 46px; background: var(--bg-elevated); border: 1px solid var(--border-light);
      color: var(--text-primary); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600;
      display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Inter', sans-serif;
    }
    .btn-mini-export:hover { border-color: var(--gold); color: var(--gold); }

    /* ========== RESPONSIVE ========== */
    @media (min-width: 641px) {
      .app-container { padding: 0 24px; }
      .top-header { margin: 0 -24px; padding: 0 24px; }
      .bottom-nav {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        max-width: 640px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 100%;
      }
      .post-image .shayari-content { font-size: 1.6rem; padding: 40px 36px; }
      .notifications-panel { max-width: 400px; }
      .messages-panel { max-width: 400px; }
    }

    @media (min-width: 1024px) {
      .app-container { max-width: 680px; }
      .bottom-nav { max-width: 680px; }
    }

    @media (max-width: 380px) {
      .post-image .shayari-content { font-size: 1.05rem; padding: 20px 16px; }
      .story-ring { width: 58px; height: 58px; }
      .story-name { font-size: 0.6rem; max-width: 58px; }
      .nav-item { min-width: 48px; padding: 6px 8px; font-size: 0.55rem; }
      .nav-item i { font-size: 1.15rem; }
      .explore-item .explore-shayari { font-size: 0.5rem; }
      .profile-avatar-large { width: 70px; height: 70px; font-size: 1.5rem; }
      .profile-stats { gap: 12px; }
    }

    /* ========== ANIMATIONS ========== */
    .fade-in { animation: fadeInUp 0.5s ease forwards; }

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

    .heart-pop { animation: heartPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

    @keyframes heartPop {
      0% { transform: scale(1); }
      50% { transform: scale(1.4); }
      100% { transform: scale(1); }
    }

    .like-burst {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0);
      font-size: 5rem;
      color: #ff4d6d;
      pointer-events: none;
      z-index: 10;
      opacity: 0;
    }

    .like-burst.animate {
      animation: likeBurst 0.6s ease forwards;
    }

    @keyframes likeBurst {
      0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
      50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
      100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
    }

    /* ========== SPLASH (auth resolving) ========== */
    #authSplash {
      position: fixed; inset: 0; z-index: 500;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 14px; background: var(--bg-dark);
    }
    #authSplash .splash-logo {
      font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 600;
      background: linear-gradient(135deg, #fff6d5, #ffd966);
      -webkit-background-clip: text; background-clip: text; color: transparent;
      animation: pulseRing 1.8s ease-in-out infinite;
    }
    #authSplash .splash-sub { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

    /* ========== AUTH MODAL (dismissable — browsing never requires login) ========== */
    #authGate {
      position: fixed; inset: 0; z-index: 400;
      display: none;
      overflow-y: auto;
      background: rgba(8, 7, 16, 0.82);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding: 40px 20px calc(40px + env(safe-area-inset-bottom, 0px));
    }
    #authGate.visible { display: flex; align-items: center; justify-content: center; }
    .auth-card {
      width: 100%; max-width: 400px;
      position: relative;
      background: var(--bg-card);
      border: 1px solid var(--border-glow);
      border-radius: var(--radius-lg);
      padding: 32px 26px;
      box-shadow: var(--shadow-lg);
    }
    .auth-close {
      position: absolute; top: 14px; right: 14px;
      width: 36px; height: 36px; min-height: 0;
      display: flex; align-items: center; justify-content: center;
      background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 50%;
      color: var(--text-secondary); font-size: 0.9rem; cursor: pointer;
      transition: all var(--transition);
    }
    .auth-close:hover { color: var(--gold); border-color: var(--gold); }
    .auth-card .auth-logo {
      text-align: center; margin-bottom: 4px;
      font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 600;
      background: linear-gradient(135deg, #fff6d5, #ffd966);
      -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .auth-card .auth-tagline {
      text-align: center; font-size: 0.78rem; color: var(--text-muted);
      margin-bottom: 24px; letter-spacing: 0.4px;
    }
    .auth-tabs { display: flex; background: var(--bg-input); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 22px; }
    .auth-tab {
      flex: 1; min-height: 44px; background: none; border: none; border-radius: calc(var(--radius-sm) - 2px);
      color: var(--text-muted); font-weight: 600; font-size: 0.85rem; cursor: pointer;
      font-family: 'Inter', sans-serif; transition: all var(--transition);
    }
    .auth-tab.active { background: var(--accent-gradient); color: #12101f; }
    .auth-form { display: none; }
    .auth-form.active { display: block; }
    .auth-field { margin-bottom: 16px; }
    .auth-field label {
      display: block; font-size: 0.72rem; color: var(--text-secondary);
      text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 500;
    }
    .auth-field input {
      width: 100%; min-height: 46px; background: var(--bg-input);
      border: 1px solid var(--border-light); border-radius: var(--radius-sm);
      padding: 12px 14px; color: var(--text-primary); font-size: 0.9rem;
      font-family: 'Inter', sans-serif; outline: none;
      transition: border-color var(--transition), box-shadow var(--transition);
    }
    .auth-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1); }
    .auth-error {
      display: none; font-size: 0.78rem; color: #ff8a94;
      background: rgba(255, 77, 109, 0.1); border: 1px solid rgba(255, 77, 109, 0.3);
      border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px; line-height: 1.4;
    }
    .auth-error.visible { display: block; }
    .auth-submit {
      width: 100%; min-height: 48px; background: var(--accent-gradient); color: #12101f;
      border: none; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600;
      cursor: pointer; font-family: 'Inter', sans-serif; display: flex; align-items: center;
      justify-content: center; gap: 8px; transition: transform var(--transition), box-shadow var(--transition);
    }
    .auth-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(230, 180, 34, 0.6); }
    .auth-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    .auth-hint { text-align: center; font-size: 0.72rem; color: var(--text-muted); margin-top: 16px; line-height: 1.5; }

    /* ========== SKELETON LOADERS ========== */
    .skel { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: skelLoad 1.4s ease infinite; border-radius: var(--radius-sm); }
    @keyframes skelLoad { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
    .skel-post { height: 320px; border-radius: var(--radius-md); margin-bottom: 20px; }
    .skel-explore { aspect-ratio: 1/1; }
    .skel-story { width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0; }

    /* ========== EMPTY / ERROR STATE ========== */
    .empty-state, .error-state {
      text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6;
    }
    .empty-state i, .error-state i { font-size: 2rem; margin-bottom: 12px; display: block; color: var(--text-muted); }
    .error-state i { color: #ff4d6d; }
    .retry-btn {
      margin-top: 14px; background: var(--bg-elevated); color: var(--text-primary);
      border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 22px;
      font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
      min-height: 44px;
    }
    .retry-btn:hover { border-color: var(--gold); color: var(--gold); }

    /* ========== GUEST PROMPT (shown inside Create/Profile for logged-out visitors) ========== */
    .guest-prompt {
      text-align: center; padding: 56px 24px; max-width: 340px; margin: 0 auto;
    }
    .guest-prompt i {
      font-size: 2.4rem; color: var(--gold-dim); margin-bottom: 16px; display: block;
    }
    .guest-prompt h3 {
      font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 8px; color: var(--text-primary);
    }
    .guest-prompt p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 22px; }
    .guest-prompt .auth-submit { max-width: 220px; margin: 0 auto; }

    /* ========== FOOTER ========== */
    .app-footer {
      text-align: center; padding: 28px 16px 8px; color: var(--text-muted); font-size: 0.7rem;
      line-height: 1.8; border-top: 1px solid var(--border-light); margin-top: 24px;
    }
    .app-footer strong { color: var(--gold-dim); }
    .logout-link { color: var(--text-muted); text-decoration: underline; cursor: pointer; }
    .logout-link:hover { color: var(--gold); }

    .toast.toast-error { background: #ff4d6d; color: #fff; }
