/* =====================================================================
   PongPong — طراحی جدید: «شیشه و شفق»
   فونت متن: IRANYekan  ·  فونت تیتر: Estedad
   ===================================================================== */

/* ---------- فونت‌ها (فایل‌ها را در assets/fonts بگذارید — README داخل همان پوشه) ---------- */
@font-face { font-family: 'IRANYekan'; src: url('../fonts/iranyekan-regular.woff2') format('woff2'), url('../fonts/iranyekan-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANYekan'; src: url('../fonts/iranyekan-bold.woff2') format('woff2'), url('../fonts/iranyekan-bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANYekan'; src: url('../fonts/iranyekan-black.woff2') format('woff2'), url('../fonts/iranyekan-black.woff') format('woff'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('../fonts/estedad-medium.woff2') format('woff2'), url('../fonts/estedad-medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('../fonts/estedad-bold.woff2') format('woff2'), url('../fonts/estedad-bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Estedad'; src: url('../fonts/estedad-black.woff2') format('woff2'), url('../fonts/estedad-black.woff') format('woff'); font-weight: 900; font-style: normal; font-display: swap; }

/* ---------- توکن‌های رنگ (روشن) ---------- */
:root {
    --bg: #f6f2ff;
    --surface: rgba(255,255,255,.7);
    --surface-solid: #ffffff;
    --surface-2: #f1ecff;
    --line: rgba(88,60,170,.12);
    --line-strong: rgba(88,60,170,.28);
    --text: #1d1338;
    --text-muted: #5d5382;
    --text-dim: #9189b3;

    --pink: #ff4f9a;
    --coral: #ff7a59;
    --sun: #ffc53d;
    --mint: #2ed3a6;
    --sky: #3fb6ff;
    --violet: #7b61ff;

    /* نام‌های قدیمی برای سازگاری */
    --accent: #ff4f9a;
    --accent-2: #7b61ff;
    --accent-dim: #7b61ff;
    --accent-4: #12b98f;
    --gold: #f5a300;
    --gold-dim: #ffc53d;
    --danger: #ff3d6e;
    --success: #12b98f;
    --bg-card: #ffffff;
    --bg-card-hover: #faf8ff;
    --bg-input: #f1ecff;

    --grad-sun: linear-gradient(135deg, #ff4f9a 0%, #ff7a59 50%, #ffc53d 100%);
    --grad-violet: linear-gradient(135deg, #7b61ff 0%, #3fb6ff 100%);
    --grad-mint: linear-gradient(135deg, #2ed3a6 0%, #3fb6ff 100%);
    --grad-dream: linear-gradient(135deg, #7b61ff 0%, #ff4f9a 60%, #ffc53d 100%);

    --shadow-sm: 0 8px 22px -12px rgba(70,30,140,.28);
    --shadow: 0 30px 70px -30px rgba(70,30,140,.38);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;

    --font-main: 'IRANYekan', 'Vazirmatn', system-ui, sans-serif;
    --font-display: 'Estedad', 'Lalezar', 'Vazirmatn', sans-serif;
    --font-logo: 'Baloo Bhaijaan 2', 'Lalezar', sans-serif;
    color-scheme: light;
}

/* ---------- توکن‌های رنگ (شب) ---------- */
html.theme-dark {
    --bg: #0c0920;
    --surface: rgba(32,24,66,.66);
    --surface-solid: #1b1443;
    --surface-2: #261d55;
    --line: rgba(190,170,255,.13);
    --line-strong: rgba(190,170,255,.3);
    --text: #f3efff;
    --text-muted: #c1b6e6;
    --text-dim: #8a80b8;

    --accent: #ff6aa9;
    --accent-2: #a48bff;
    --accent-dim: #a48bff;
    --accent-4: #3fe6c0;
    --gold: #ffd25a;
    --gold-dim: #ffc53d;
    --danger: #ff6b8f;
    --success: #3fe6c0;
    --bg-card: #1b1443;
    --bg-card-hover: #251c58;
    --bg-input: #261d55;

    --shadow-sm: 0 10px 26px -12px rgba(0,0,0,.6);
    --shadow: 0 34px 80px -30px rgba(0,0,0,.75);
    color-scheme: dark;
}

/* ---------- پایه ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-main); font-weight: 400; color: var(--text);
    background: var(--bg); min-height: 100vh; line-height: 1.85; overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--pink); color: #fff; }
a { color: inherit; }
img, video { max-width: 100%; }
b, strong { font-weight: 900; }

/* ---------- پس‌زمینه شفق متحرک ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i {
    position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
    filter: blur(80px); opacity: .55; animation: drift 22s ease-in-out infinite;
}
.aurora i:nth-child(1) { background: #ff8fc0; top: -18vmax; right: -12vmax; }
.aurora i:nth-child(2) { background: #9e8bff; bottom: -22vmax; left: -14vmax; animation-delay: -7s; }
.aurora i:nth-child(3) { background: #ffd27a; top: 30%; left: 35%; width: 34vmax; height: 34vmax; opacity: .4; animation-delay: -13s; }
html.theme-dark .aurora i { opacity: .28; }
@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.12); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(46,211,166,.6); } 100% { box-shadow: 0 0 0 10px rgba(46,211,166,0); } }
@keyframes nudge { 0%,88%,100% { transform: rotate(0); } 92% { transform: rotate(-3deg); } 96% { transform: rotate(2deg); } }
@keyframes bounceBall { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes heartBeat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes stageFloat {
    0%,100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50%     { transform: translateY(-12px) rotate(var(--r, 0deg)); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- نوار بالا (شناور شیشه‌ای) ---------- */
.navbar {
    position: sticky; top: 12px; z-index: 100;
    width: min(1140px, calc(100% - 24px)); margin: 12px auto 0;
    background: var(--surface); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-sm);
}
.nav-container {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .5rem .7rem;
}
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.logo-icon {
    width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center;
    background: var(--grad-sun); font-size: 1.3rem; box-shadow: 0 8px 18px -8px rgba(255,79,154,.8);
}
.logo-text {
    font-family: var(--font-logo); font-weight: 800; font-size: 1.45rem; line-height: 1; direction: ltr;
    background: var(--grad-dream); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
.nav-link {
    position: relative; display: flex; align-items: center; gap: .35rem;
    padding: .5rem .85rem; border-radius: 18px; text-decoration: none;
    color: var(--text-muted); font-weight: 700; font-size: .9rem;
    transition: background .2s, color .2s, transform .2s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.nav-link.active { background: var(--grad-violet); color: #fff; box-shadow: 0 8px 18px -10px rgba(123,97,255,.9); }
.nav-emoji { font-size: 1.05rem; line-height: 1; }
.badge-count {
    position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--pink); color: #fff; font-size: .7rem; font-weight: 900;
    display: grid; place-items: center; border: 2px solid var(--surface-solid);
}
.nav-user { display: flex; align-items: center; gap: .5rem; }
.user-avatar-sm {
    width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: var(--grad-mint); color: #fff; display: grid; place-items: center; font-weight: 900;
    box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--pink);
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.nav-username { font-weight: 900; font-size: .88rem; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-icon {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--surface-2); cursor: pointer; font-size: 1rem; display: grid; place-items: center;
    transition: transform .25s;
}
.btn-icon:hover { transform: rotate(18deg) scale(1.06); }
.btn-logout {
    display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; border-radius: 999px;
    background: rgba(255,79,154,.12); color: var(--pink); text-decoration: none; font-weight: 900; font-size: .85rem;
    transition: background .2s;
}
.btn-logout:hover { background: rgba(255,79,154,.22); }
.nav-guest { gap: .5rem; }

/* ---------- محتوا ---------- */
.main-content {
    position: relative; z-index: 1;
    width: min(1040px, calc(100% - 24px)); margin: 26px auto 90px;
}
.main-wide { width: min(1140px, calc(100% - 24px)); }

.footer { position: relative; z-index: 1; text-align: center; padding: 1.5rem 1rem 3rem; color: var(--text-dim); font-size: .85rem; }
.footer-brand { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--text); margin-bottom: .2rem; }
.footer-sub { margin-top: .2rem; font-size: .8rem; }

.page-title {
    font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; line-height: 1.5;
    margin: .2rem 0 1rem;
}
.page-title + .page-title { font-size: 1.15rem; }

/* ---------- کارت شیشه‌ای ---------- */
.card {
    background: var(--surface); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 1.3rem;
    box-shadow: var(--shadow-sm);
}
.card-title { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; margin-bottom: .9rem; }

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .7rem 1.35rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
    font-family: var(--font-main); font-weight: 700; font-size: .92rem; line-height: 1.2;
    text-decoration: none; color: var(--text); background: var(--surface-solid);
    transition: transform .2s, box-shadow .25s, background .2s, color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
    background: var(--grad-sun); color: #fff; border-color: transparent;
    box-shadow: 0 12px 26px -12px rgba(255,79,154,.85);
}
.btn-primary:hover { box-shadow: 0 16px 32px -12px rgba(255,79,154,.9); }
.btn-ghost { background: var(--surface-solid); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { color: var(--violet); border-color: var(--line-strong); }
html.theme-dark .btn-ghost:hover { color: #c9b8ff; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 10px 22px -12px rgba(255,61,110,.85); }
.btn-following { background: transparent; color: var(--text-muted); border: 1.5px dashed var(--line-strong); box-shadow: none; }
.btn-following:hover { color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: .45rem .95rem; font-size: .82rem; }
.btn-lg { padding: .9rem 1.9rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-light { background: #fff; color: #3b2a7a; box-shadow: 0 14px 30px -14px rgba(0,0,0,.35); }
.btn-wiggle { animation: nudge 3.6s ease-in-out infinite; }
.btn-wiggle:hover { animation: none; }

/* ---------- فرم‌ها ---------- */
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-label { display: block; font-weight: 700; font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: .78rem 1rem; border-radius: 16px; border: 1.5px solid transparent;
    background: var(--surface-2); color: var(--text); font-family: var(--font-main); font-size: .95rem;
    outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--violet); background: var(--surface-solid); box-shadow: 0 0 0 4px rgba(123,97,255,.16);
}
.form-textarea { min-height: 96px; resize: vertical; }
.form-select { appearance: none; cursor: pointer; padding-left: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: 14px 52%, 19px 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-hint { font-size: .8rem; color: var(--text-dim); margin-top: .3rem; }
.input-wrap { position: relative; }
.input-wrap .form-input[type="password"] { padding-left: 3.3rem; }
.pass-toggle {
    position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--bg-card); color: var(--text); font-size: 1rem; display: grid; place-items: center;
    box-shadow: var(--shadow-sm); transition: transform .2s;
}
.pass-toggle:hover { transform: translateY(-50%) scale(1.08); }
.otp-input { letter-spacing: .55em; text-align: center; font-size: 1.5rem; font-weight: 900; direction: ltr; }

/* ---------- هشدار ---------- */
.alert {
    display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-radius: 18px;
    font-size: .9rem; font-weight: 700; margin-bottom: 1rem; animation: fadeUp .35s both;
}
.alert-error { background: rgba(255,61,110,.12); color: #d61f57; }
.alert-success { background: rgba(18,185,143,.14); color: #0a8f6c; }
.alert-info { background: rgba(123,97,255,.13); color: var(--violet); }
.alert a { color: inherit; }
html.theme-dark .alert-error { color: #ff9ab4; }
html.theme-dark .alert-success { color: #7ff2cf; }

/* ---------- حالت خالی ---------- */
.empty-state { text-align: center; padding: 3.2rem 1rem; color: var(--text-muted); }
.empty-state .icon { font-size: 3.4rem; display: inline-block; animation: bob 3.2s ease-in-out infinite; }
.empty-state h3 { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--text); margin: .6rem 0 .3rem; }
.empty-state p { font-size: .92rem; }

/* ---------- نوشتن پست ---------- */
.compose-box {
    background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm); margin-bottom: 1.1rem;
}
.compose-type-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: .8rem; }
.compose-tab {
    display: inline-flex; align-items: center; padding: .42rem 1rem; border-radius: 999px; cursor: pointer;
    font-weight: 900; font-size: .85rem; color: var(--text-muted); transition: background .2s, color .2s;
}
.compose-tab.active { background: var(--surface-solid); color: var(--pink); box-shadow: var(--shadow-sm); }
.compose-header { display: flex; gap: .8rem; align-items: flex-start; }
.compose-avatar {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: var(--grad-violet); color: #fff; display: grid; place-items: center; font-weight: 900;
}
.compose-avatar img { width: 100%; height: 100%; object-fit: cover; }
.compose-textarea {
    flex: 1; min-height: 84px; border: none; outline: none; resize: none; background: transparent;
    font-family: var(--font-main); font-size: 1.03rem; color: var(--text); padding: .5rem 0; line-height: 1.9;
}
.compose-textarea::placeholder { color: var(--text-dim); }
.media-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; margin: .5rem 0; }
.compose-footer {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem;
    margin-top: .7rem; padding-top: .8rem; border-top: 1px dashed var(--line);
}
.char-count { font-size: .8rem; color: var(--text-dim); }
.char-count.warning { color: var(--gold); }
.char-count.danger { color: var(--danger); }

/* ---------- خوش‌آمد ---------- */
.welcome-banner {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; margin-bottom: 1rem;
    border-radius: var(--radius-xl); color: #fff; background: var(--grad-dream);
    box-shadow: 0 22px 44px -22px rgba(123,97,255,.8); position: relative; overflow: hidden;
}
.welcome-banner::after {
    content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,.14); top: -110px; left: -60px;
}
.welcome-wave { font-size: 2.2rem; display: inline-block; animation: nudge 2.8s ease-in-out infinite; transform-origin: 70% 80%; position: relative; }
.welcome-title { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; line-height: 1.5; position: relative; }
.welcome-sub { font-size: .92rem; opacity: .95; position: relative; }

/* ---------- پست ---------- */
.post {
    background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 1.1rem 1.25rem;
    margin-bottom: .95rem; box-shadow: var(--shadow-sm); animation: rise .5s both;
    transition: box-shadow .25s;
}
.post:hover { box-shadow: var(--shadow); }
.post-header { display: flex; align-items: center; gap: .75rem; position: relative; }
.post-avatar {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: var(--grad-mint); color: #fff; display: grid; place-items: center; font-weight: 900;
    text-decoration: none; box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 5px rgba(255,79,154,.55);
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 900; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; color: var(--text); }
.post-author:hover { color: var(--pink); }
.post-username { font-size: .8rem; color: var(--text-dim); }
.verified-badge { color: var(--gold); font-size: .9rem; }
.repost-tag { font-size: .8rem; color: var(--text-dim); margin-bottom: .4rem; }
.action-btn {
    display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .75rem; border-radius: 999px;
    background: transparent; border: none; cursor: pointer; color: var(--text-muted);
    font-family: var(--font-main); font-weight: 700; font-size: .88rem; transition: background .2s, color .2s;
}
.action-btn:hover { background: var(--surface-2); color: var(--text); }
.post-menu-btn { font-size: 1.15rem; line-height: 1; }
.post-menu-wrap { position: relative; }
.post-menu {
    display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px;
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: .4rem;
    box-shadow: var(--shadow);
}
.post-menu.open { display: block; animation: fadeUp .2s both; }
.post-menu .action-btn { width: 100%; justify-content: flex-start; border-radius: 12px; }
.post-content { margin: .8rem 0 .6rem; font-size: 1.02rem; line-height: 2.05; white-space: pre-wrap; word-break: break-word; }
.post-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .45rem; margin-bottom: .7rem; }
.post-media img, .post-media video { width: 100%; max-height: 360px; object-fit: cover; border-radius: 20px; display: block; }
.post-link {
    display: block; margin-bottom: .7rem; padding: .6rem .95rem; border-radius: 16px; background: var(--surface-2);
    color: var(--violet); font-size: .86rem; text-decoration: none; word-break: break-all;
}
html.theme-dark .post-link { color: #b9a9ff; }
.post-actions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; padding-top: .55rem; border-top: 1px solid var(--line); }
.reaction-wrapper {
    position: relative; display: inline-flex; align-items: center; gap: 0;
    background: var(--surface-2); border-radius: 999px; padding: 0 .15rem 0 0;
}
.react-btn {
    display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border: none; cursor: pointer;
    background: transparent; border-radius: 999px; font-family: var(--font-main); font-weight: 900; font-size: .9rem;
    color: var(--text-muted); transition: transform .15s, color .2s;
}
.react-btn:hover { transform: scale(1.05); }
.react-btn.liked { color: var(--pink); }
.react-icon { font-size: 1.08rem; line-height: 1; }
.react-menu-toggle { padding: .45rem .35rem; font-size: .7rem; color: var(--text-dim); background: transparent; border: none; cursor: pointer; }
.react-menu {
    display: none; position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 40;
    gap: .15rem; padding: .35rem .5rem; border-radius: 999px; background: var(--bg-card);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.react-menu.open { display: flex !important; animation: fadeUp .2s both; }
.react-option {
    background: transparent; border: none; cursor: pointer; font-size: 1.45rem; padding: .15rem .25rem;
    border-radius: 50%; transition: transform .15s;
}
.react-option:hover { transform: scale(1.3) translateY(-3px); }
.comment-toggle { color: var(--text-muted); }
.comments-section { margin-top: .7rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.comments-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .7rem; }
.comment { display: flex; gap: .6rem; align-items: flex-start; }
.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: var(--grad-sun); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .85rem;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; padding: .55rem .85rem; border-radius: 18px; background: var(--surface-2); font-size: .9rem; line-height: 1.8; }
.comment-form { display: flex; gap: .5rem; }
.comment-form input {
    flex: 1; padding: .6rem 1rem; border-radius: 999px; border: 1.5px solid transparent;
    background: var(--surface-2); color: var(--text); font-family: var(--font-main); outline: none;
}
.comment-form input:focus { border-color: var(--violet); background: var(--surface-solid); }

.mention { color: var(--violet); font-weight: 900; text-decoration: none; }
html.theme-dark .mention { color: #b9a9ff; }
.hashtag { color: var(--pink); font-weight: 700; text-decoration: none; }
html.theme-dark .hashtag { color: #ff8fc0; }

/* ---------- پروفایل ---------- */
.profile-header {
    background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm);
    margin-bottom: 1.1rem;
}
.profile-cover { height: 190px; position: relative; background: var(--grad-dream); }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 45%); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.profile-info { padding: 0 1.4rem 1.4rem; }
.profile-avatar-lg {
    width: 112px; height: 112px; border-radius: 50%; margin-top: -56px; position: relative; z-index: 2;
    background: var(--grad-sun); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 2.5rem;
    overflow: hidden; border: 5px solid var(--surface-solid); box-shadow: var(--shadow-sm);
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-family: var(--font-display); font-weight: 900; font-size: 1.55rem; margin-top: .6rem; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.profile-name span:not(.verified-badge) { font-size: .75rem; color: var(--gold); font-family: var(--font-main); background: rgba(255,197,61,.16); padding: .15rem .6rem; border-radius: 999px; }
.profile-username { color: var(--text-dim); font-size: .9rem; }
.profile-bio { margin-top: .6rem; line-height: 2; color: var(--text-muted); white-space: pre-wrap; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 1.1rem 0; }
.profile-stats > div, .profile-stats > a {
    text-align: center; padding: .7rem .4rem; border-radius: 20px; background: var(--surface-2);
    text-decoration: none; transition: transform .2s; display: block;
}
.profile-stats > a:hover { transform: translateY(-3px); }
.profile-stats strong { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; color: var(--text); line-height: 1.4; }
.profile-stats span { font-size: .78rem; color: var(--text-muted); }
.profile-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.profile-actions form { display: inline; }

/* ---------- استوری ---------- */
.stories-section { margin-bottom: 1.1rem; }
.stories-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.stories-section-header .card-title { margin: 0; }
.story-quick-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.story-quick-form .form-input { padding: .55rem .9rem; border-radius: 999px; }
#story-form-msg { font-size: .85rem; margin-bottom: .4rem; }
.stories-carousel-wrap { position: relative; display: flex; align-items: center; gap: .5rem; }
.stories-viewport { overflow: hidden; flex: 1; padding: 6px 4px; }
.stories-track { display: flex; gap: 12px; transition: transform .45s cubic-bezier(.3,.8,.3,1); will-change: transform; }
.story-circle { flex: 0 0 auto; width: 84px; background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .35rem; font-family: var(--font-main); color: var(--text); }
.story-ring {
    width: 74px; height: 74px; border-radius: 50%; padding: 3px; position: relative;
    background: conic-gradient(from 0deg, #ff4f9a, #ffc53d, #2ed3a6, #3fb6ff, #7b61ff, #ff4f9a);
    transition: transform .25s;
}
.story-circle:hover .story-ring { transform: scale(1.06); }
.story-thumb-media { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--surface-solid); background: var(--surface-2); }
.story-circle-label { font-size: .74rem; color: var(--text-muted); }
.stories-nav {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--surface-solid); color: var(--text); font-size: 1.3rem; cursor: pointer; box-shadow: var(--shadow-sm);
    display: grid; place-items: center; transition: transform .2s, opacity .2s;
}
.stories-nav:hover { transform: scale(1.07); }
.stories-nav:disabled { opacity: .35; cursor: default; transform: none; }

/* نمایشگر استوری (همیشه تیره) */
/* نمایشگر استوری — فقط عکس/ویدیو + متن + بازدید (بدون لوگو/آواتار غول‌پیکر) */
.story-viewer-overlay {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.92); backdrop-filter: blur(8px); padding: 0;
    animation: fadeUp .25s both;
}
.story-viewer {
    position: relative; width: min(420px, 100%); height: min(92vh, 860px); border-radius: 0;
    background: #000; box-shadow: none; color: #fff; overflow: hidden;
}
@media (min-width: 480px) {
    .story-viewer { border-radius: 18px; height: min(88vh, 820px); box-shadow: 0 30px 80px -16px rgba(0,0,0,.85); }
    .story-viewer-overlay { padding: 1rem; }
}
.story-progress-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 3px; z-index: 6; }
.story-progress-bars .bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
.story-progress-bars .bar i { display: block; height: 100%; width: 0; background: #fff; }
.story-progress-bars .bar.done i { width: 100%; }
.story-viewer-top {
    position: absolute; top: 22px; left: 12px; right: 52px; z-index: 6;
    display: flex; align-items: center; gap: .55rem; pointer-events: none;
}
.story-viewer-user {
    display: flex; align-items: center; gap: .55rem;
    flex: 1; font-weight: 800; font-size: .88rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,.65);
}
/* آواتار کوچک — بدون محدودیت سایز، عکس پروفایل تمام استوری را می‌پوشاند */
.story-viewer-user img,
.story-viewer-user .av {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    border: 1.5px solid rgba(255,255,255,.55);
    background: #3a2a5c;
}
.story-viewer-user .av {
    display: grid; place-items: center; font-size: .75rem; font-weight: 900; color: #fff;
}
.story-viewer-user .story-user-meta { min-width: 0; overflow: hidden; }
.story-viewer-user .story-user-meta strong { font-weight: 900; }
.story-viewer-close {
    position: absolute; top: 18px; right: 12px; z-index: 8;
    width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.25rem;
    background: rgba(0,0,0,.35); color: #fff; backdrop-filter: blur(6px); display: grid; place-items: center;
}
.story-viewer-body {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    z-index: 1; background: #000;
}
.story-viewer-body img,
.story-viewer-body video {
    width: 100%; height: 100%; object-fit: contain; display: block; background: #000;
}
.story-text-only {
    padding: 2rem 1.4rem; text-align: center; font-family: var(--font-display);
    font-weight: 900; font-size: 1.55rem; line-height: 1.9; color: #fff;
}
.story-viewer-caption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    padding: 3.2rem 1.1rem 1.1rem;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 55%, transparent 100%);
    font-size: .93rem; line-height: 1.85; pointer-events: none;
}
.story-viewer-caption a { color: #c9a0ff; pointer-events: auto; }
.story-viewer-controls {
    position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5;
    display: flex; gap: .45rem; align-items: center; justify-content: flex-end; flex-wrap: wrap;
}
.story-viewer-controls:empty { display: none; }
.story-ctrl-btn {
    padding: .4rem .85rem; border-radius: 999px; border: none; cursor: pointer; font-family: var(--font-main);
    font-weight: 800; font-size: .78rem; color: #fff; background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
}
.story-views-info {
    font-size: .78rem; opacity: .95; margin-right: auto; cursor: pointer;
    background: rgba(0,0,0,.28); padding: .35rem .7rem; border-radius: 999px;
    pointer-events: auto; text-shadow: none;
}
.story-views-info:hover { background: rgba(255,255,255,.18); }
.story-viewer-nav-hit { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 3; background: transparent; border: none; cursor: pointer; }
.story-viewer-nav-hit.prev { left: 0; }
.story-viewer-nav-hit.next { right: 0; }
.story-viewer-row { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; font-size: .9rem; }
.story-viewers-panel {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-height: 58%; overflow-y: auto;
    padding: 1rem 1.1rem 1.3rem; border-radius: 22px 22px 0 0; background: rgba(12,8,28,.97);
}
.story-viewers-panel h4 { font-family: var(--font-display); font-weight: 900; font-size: 1rem; margin-bottom: .4rem; color: #d9ceff; }
.story-viewers-panel .av { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-sun); display: grid; place-items: center; font-weight: 900; overflow: hidden; flex-shrink: 0; }
.story-viewers-panel .av img { width: 100%; height: 100%; object-fit: cover; }
.burst-heart { position: absolute; pointer-events: none; font-size: 1.6rem; animation: rise .8s both; z-index: 5; }

/* ---------- اعلان‌ها ---------- */
.notif-list { padding: 0; overflow: hidden; }
.notif-item { display: flex; gap: .85rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); align-items: flex-start; transition: background .2s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: linear-gradient(90deg, rgba(255,79,154,.1), transparent 70%); }
.notif-icon {
    width: 44px; height: 44px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center;
    background: var(--surface-solid); font-size: 1.2rem; box-shadow: var(--shadow-sm);
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: .93rem; line-height: 1.9; }
.notif-text a { color: var(--pink); font-weight: 900; text-decoration: none; }
.notif-time { font-size: .78rem; color: var(--text-dim); }

/* ---------- کاربران / جستجو / کاوش ---------- */
.user-card {
    display: flex; align-items: center; gap: .85rem; padding: .9rem 1.05rem; margin-bottom: .6rem;
    background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-sm); transition: transform .2s;
}
.user-card:hover { transform: translateX(-3px); }
.user-card .post-avatar { width: 50px; height: 50px; }
.user-card .user-link { color: var(--text); font-weight: 900; text-decoration: none; }
.user-card .user-link:hover { color: var(--pink); }
.user-card .uname { font-size: .82rem; color: var(--text-dim); }
.user-card .ubio { font-size: .82rem; color: var(--text-muted); margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .uactions { display: flex; gap: .4rem; flex-shrink: 0; flex-wrap: wrap; }
.user-card .uactions form { display: inline; }
.user-card > div:nth-child(2) { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip {
    display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .4rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
    font-weight: 700; font-size: .88rem; box-shadow: var(--shadow-sm); transition: transform .2s;
}
.chip:hover { transform: translateY(-2px); }
.chip-av { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-violet); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 900; overflow: hidden; }
.chip-av img { width: 100%; height: 100%; object-fit: cover; }
.section-head { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; margin: 1.4rem 0 .8rem; }
.section-head::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--line-strong), transparent); }

.search-bar {
    display: flex; gap: .5rem; align-items: center; padding: .4rem .4rem .4rem 1rem; margin-bottom: 1.2rem;
    background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.search-bar input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-main); font-size: 1rem; color: var(--text); padding: .55rem .2rem; min-width: 0; }
.search-bar input::placeholder { color: var(--text-dim); }

/* ---------- پیام‌ها ---------- */
.msg-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.msg-layout.with-chat { grid-template-columns: minmax(230px, .9fr) 1.6fr; }
.msg-list { padding: .4rem; max-height: 70vh; overflow-y: auto; }
.conv-item {
    display: flex; align-items: center; gap: .75rem; padding: .75rem .8rem; border-radius: 20px;
    text-decoration: none; color: var(--text); transition: background .2s;
}
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--grad-violet); color: #fff; box-shadow: 0 10px 24px -14px rgba(123,97,255,.9); }
.conv-item.active .conv-last { color: rgba(255,255,255,.85); }
.conv-item .post-avatar { width: 44px; height: 44px; }
.conv-body { flex: 1; min-width: 0; }
.conv-name { font-weight: 900; font-size: .95rem; }
.conv-last { font-size: .8rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-card { display: flex; flex-direction: column; max-height: 70vh; padding: 1rem 1.1rem; }
.chat-head { padding-bottom: .8rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); font-weight: 900; }
.chat-head a { color: var(--text); text-decoration: none; }
.chat-head a:hover { color: var(--pink); }
.chat-stream { flex: 1; overflow-y: auto; padding: .4rem .2rem; display: flex; flex-direction: column; gap: .5rem; }
.bubble-row { display: flex; flex-direction: column; }
.bubble-row.me { align-items: flex-start; }
.bubble-row.them { align-items: flex-end; }
.bubble { max-width: 80%; padding: .6rem 1rem; border-radius: 22px; font-size: .92rem; line-height: 1.8; word-break: break-word; }
.bubble-row.me .bubble { background: var(--grad-violet); color: #fff; border-bottom-right-radius: 6px; }
.bubble-row.them .bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 6px; }
.bubble-time { font-size: .7rem; color: var(--text-dim); margin-top: .2rem; padding: 0 .4rem; }
.chat-form { display: flex; gap: .5rem; margin-top: .8rem; }
.chat-form .form-input { border-radius: 999px; }

/* ---------- ادمین ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.stat-card {
    position: relative; overflow: hidden; padding: 1.2rem 1rem; text-align: center; border-radius: var(--radius-xl);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.stat-card::before { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; top: -30px; left: -20px; background: var(--grad-sun); opacity: .25; }
.stat-value { font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1.5; background: var(--grad-dream); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: .85rem; color: var(--text-muted); }
.table-wrap { overflow-x: auto; border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .8rem; text-align: right; font-size: .9rem; border-bottom: 1px solid var(--line); }
th { color: var(--text-dim); font-weight: 900; font-size: .8rem; }
td a { color: var(--violet); font-weight: 700; text-decoration: none; }
html.theme-dark td a { color: #b9a9ff; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: none; }
.admin-row .meta { font-size: .8rem; color: var(--text-dim); }
.admin-row .content { font-size: .92rem; line-height: 1.8; }
.role-admin { color: var(--gold); font-weight: 900; }

/* ---------- گزارش ---------- */
.report-overlay {
    position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 1rem;
    background: rgba(12,7,30,.55); backdrop-filter: blur(8px); animation: fadeUp .25s both;
}
.report-box { width: min(440px, 100%); padding: 1.5rem; border-radius: var(--radius-xl); background: var(--bg-card); box-shadow: var(--shadow); }
.report-box h3 { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; margin-bottom: .3rem; }
.report-box p { font-size: .88rem; color: var(--text-dim); margin-bottom: .8rem; }

/* ---------- ورود/ثبت‌نام ساده (بازیابی رمز) ---------- */
.auth-page { width: min(440px, 100%); margin: 2rem auto; }
.auth-page .auth-heading { text-align: center; margin-bottom: 1.2rem; }
.auth-page .auth-heading .emo { font-size: 3rem; display: inline-block; animation: bob 3s ease-in-out infinite; }
.auth-page .auth-heading h1 { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; margin-top: .3rem; }
.auth-page .auth-heading p { color: var(--text-muted); font-size: .92rem; }
.auth-links { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--text-muted); }
.auth-links a { color: var(--violet); font-weight: 900; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
html.theme-dark .auth-links a { color: #b9a9ff; }

/* ======================================================================
   صفحه معرفی (مهمان)
   ====================================================================== */
.hero { position: relative; text-align: center; padding: 2.4rem 0 .5rem; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem .45rem .7rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font-weight: 900; font-size: .88rem; color: var(--text-muted);
}
.hero-badge::before {
    content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--mint);
    animation: pulseDot 1.8s infinite;
}
.hero-title {
    font-family: var(--font-display); font-weight: 900; font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 1.6; margin: 1.1rem auto .7rem; max-width: 980px;
}
.grad-txt {
    background: var(--grad-dream); -webkit-background-clip: text; background-clip: text; color: transparent;
    padding: 0 .05em;
}
.hero-sub { max-width: 600px; margin: 0 auto; color: var(--text-muted); font-size: 1.1rem; line-height: 2.05; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-perks { list-style: none; display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.hero-perks li {
    padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 700; color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--line);
}

.hero-stage { position: relative; height: 430px; margin: 2.8rem auto 0; max-width: 820px; }
.glass-post {
    position: absolute; width: 330px; padding: 1.1rem 1.2rem; border-radius: 26px;
    background: var(--surface); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--line); box-shadow: var(--shadow); text-align: right;
    animation: stageFloat 6s ease-in-out infinite;
    transform: rotate(var(--r, 0deg));
}
.gp-1 { --r: -5deg; top: 6px; right: 6%; z-index: 2; }
.gp-2 { --r: 4deg; top: 120px; left: 2%; z-index: 3; animation-delay: -2s; }
.gp-3 { --r: -2deg; bottom: 0; right: 22%; z-index: 1; animation-delay: -4s; width: 290px; opacity: .92; }
.gp-head { display: flex; align-items: center; gap: .6rem; }
.gp-av {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900;
    flex-shrink: 0; box-shadow: 0 0 0 3px var(--surface-solid);
}
.gp-name { font-weight: 900; font-size: .95rem; line-height: 1.3; }
.gp-time { font-size: .75rem; color: var(--text-dim); }
.gp-text { margin: .7rem 0 .8rem; font-size: .95rem; line-height: 1.9; }
.gp-react { display: flex; gap: .4rem; flex-wrap: wrap; }
.gp-react span {
    padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 900;
    background: var(--surface-2); color: var(--text-muted);
}
.gp-react span:first-child { background: rgba(255,79,154,.16); color: var(--pink); }
.gp-story-row { display: flex; gap: .6rem; margin-bottom: .8rem; }
.gp-ring {
    width: 48px; height: 48px; border-radius: 50%; padding: 2.5px; background: conic-gradient(#ff4f9a, #ffc53d, #2ed3a6, #3fb6ff, #ff4f9a);
}
.gp-ring span { width: 100%; height: 100%; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; font-size: 1.1rem; }
.floater {
    position: absolute; z-index: 4; font-size: 2.1rem; line-height: 1; padding: .6rem; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    animation: bob 4.2s ease-in-out infinite;
}
.fl-1 { top: 0; left: 14%; }
.fl-2 { top: 38%; right: 0; animation-delay: -1.5s; }
.fl-3 { bottom: 10px; left: 0; animation-delay: -2.8s; }
.chip-live {
    position: absolute; z-index: 5; right: 4%; bottom: 60px; display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .9rem; border-radius: 999px; font-weight: 900; font-size: .82rem; color: #fff;
    background: var(--grad-violet); box-shadow: 0 16px 30px -14px rgba(123,97,255,.9);
    animation: bob 5s ease-in-out infinite;
}
.chip-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9dffd9; box-shadow: 0 0 10px #9dffd9; }

.marquee {
    position: relative; overflow: hidden; margin: 2.8rem -12px 0; padding: .85rem 0;
    background: var(--grad-dream); transform: rotate(-1.2deg); box-shadow: 0 16px 40px -18px rgba(123,97,255,.8);
}
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span {
    padding: 0 1.4rem; font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; color: #fff; white-space: nowrap;
}

.section-title {
    font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.6;
    text-align: center; margin: 3.2rem 0 1.4rem;
}
.section-title small { display: block; font-family: var(--font-main); font-weight: 400; font-size: .95rem; color: var(--text-muted); line-height: 1.9; }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.b-card {
    position: relative; overflow: hidden; padding: 1.5rem; border-radius: 28px; min-height: 178px;
    background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s;
}
.b-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.b-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; left: -70px; bottom: -90px; opacity: .22; filter: blur(4px); }
.b-big { grid-column: span 2; grid-row: span 2; min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; }
.b-ico {
    width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; font-size: 1.9rem; color: #fff;
    margin-bottom: 1rem; position: relative; z-index: 1; box-shadow: 0 14px 26px -14px currentColor;
}
.b-card h3 { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; line-height: 1.6; position: relative; z-index: 1; }
.b-card p { color: var(--text-muted); font-size: .94rem; line-height: 1.95; margin-top: .25rem; position: relative; z-index: 1; }
.b-big h3 { font-size: 1.9rem; }
.b-big .b-demo { position: absolute; left: 1.4rem; top: 1.4rem; right: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.b-demo-row { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 18px; background: var(--surface-solid); box-shadow: var(--shadow-sm); font-size: .88rem; font-weight: 700; }
.b-demo-row:nth-child(2) { margin-inline-start: 26px; }
.b-demo-row:nth-child(3) { margin-inline-start: 10px; }
.b-demo-row .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .8rem; flex-shrink: 0; }
.tone-pink  .b-ico, .tone-pink::after  { background: var(--grad-sun); color: var(--pink); }
.tone-pink .b-ico { color: #fff; }
.tone-violet .b-ico { background: var(--grad-violet); }
.tone-violet::after { background: var(--violet); }
.tone-sun .b-ico { background: linear-gradient(135deg, #ffb13d, #ffd95a); }
.tone-sun::after { background: var(--sun); }
.tone-mint .b-ico { background: var(--grad-mint); }
.tone-mint::after { background: var(--mint); }
.tone-coral .b-ico { background: linear-gradient(135deg, #ff7a59, #ff4f9a); }
.tone-coral::after { background: var(--coral); }
.tone-sky .b-ico { background: linear-gradient(135deg, #3fb6ff, #7b61ff); }
.tone-sky::after { background: var(--sky); }

.steps-wrap { position: relative; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; position: relative; }
.steps-grid::before {
    content: ""; position: absolute; top: 46px; right: 16%; left: 16%; height: 3px; border-radius: 3px;
    background: var(--grad-dream); opacity: .45;
}
.step { text-align: center; padding: 0 .5rem; position: relative; }
.step-dot {
    position: relative; width: 92px; height: 92px; margin: 0 auto 1rem; border-radius: 30px; display: grid; place-items: center;
    background: var(--surface-solid); font-size: 2.3rem; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.step-no {
    position: absolute; top: -8px; left: -8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--grad-sun); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: 1rem;
    box-shadow: 0 8px 18px -8px rgba(255,79,154,.8);
}
.step h3 { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; margin-bottom: .2rem; }
.step p { color: var(--text-muted); font-size: .93rem; max-width: 260px; margin: 0 auto; }

.cta-band {
    position: relative; overflow: hidden; margin-top: 3.2rem; padding: 3rem 1.5rem; border-radius: 36px; text-align: center; color: #fff;
    background: linear-gradient(135deg, #7b61ff 0%, #ff4f9a 55%, #ffc53d 120%); box-shadow: 0 40px 80px -36px rgba(123,97,255,.9);
}
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.14); }
.cta-band::before { width: 320px; height: 320px; top: -160px; right: -80px; }
.cta-band::after { width: 240px; height: 240px; bottom: -130px; left: -60px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.6; }
.cta-band p { opacity: .95; margin-top: .2rem; }

/* ---------- پاپ‌آپ ورود / ثبت‌نام ---------- */
.auth-overlay {
    position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem;
    background: rgba(14,8,36,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.auth-overlay.is-open { display: flex; animation: fadeUp .25s both; }
.auth-modal {
    position: relative; width: min(440px, 100%); max-height: 92vh; display: flex; flex-direction: column;
    background: var(--bg-card); border-radius: 34px; overflow: hidden; box-shadow: 0 50px 110px -34px rgba(20,8,70,.6);
    border: 1px solid var(--line); animation: modalIn .5s cubic-bezier(.2,.9,.3,1.15) both;
}
.auth-close {
    position: absolute; top: 14px; left: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.22); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; backdrop-filter: blur(6px);
    transition: transform .25s, background .2s;
}
.auth-close:hover { transform: rotate(90deg); background: rgba(255,255,255,.34); }
.auth-banner {
    position: relative; overflow: hidden; text-align: center; color: #fff; padding: 2.2rem 1.5rem 1.8rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,.35), transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(255,197,61,.9), transparent 45%),
        linear-gradient(135deg, #7b61ff 0%, #ff4f9a 100%);
}
.ab-emo { position: absolute; font-size: 1.5rem; opacity: .9; animation: bob 3.4s ease-in-out infinite; z-index: 1; pointer-events: none; }
.ab1 { top: 18px; right: 22px; }
.ab2 { bottom: 20px; left: 26px; animation-delay: -1.3s; }
.ab3 { top: 58px; left: 72px; font-size: 1.1rem; animation-delay: -2.1s; }
.auth-banner > *:not(.ab-emo) { position: relative; z-index: 2; }
.auth-modal-logo {
    width: 68px; height: 68px; margin: 0 auto .5rem; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem;
    background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(8px);
    animation: bounceBall 2.2s ease-in-out infinite;
}
.auth-banner h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; line-height: 1.6; }
.brand-word { font-family: var(--font-logo); font-weight: 800; direction: ltr; display: inline-block; }
.auth-banner-sub { font-size: .92rem; opacity: .92; margin-top: .1rem; }
.auth-modal-scroll { padding: 1.3rem 1.5rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; }
.auth-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin-bottom: 1.2rem;
    background: var(--surface-2); border-radius: 999px;
}
.auth-tab {
    padding: .6rem .5rem; border: none; border-radius: 999px; cursor: pointer; background: transparent;
    font-family: var(--font-main); font-weight: 900; font-size: .95rem; color: var(--text-muted); transition: background .25s, color .25s;
}
.auth-tab.is-active { background: var(--grad-sun); color: #fff; box-shadow: 0 10px 20px -12px rgba(255,79,154,.9); }
.auth-panel { display: none; }
.auth-panel.is-active { display: block; animation: fadeUp .35s both; }
.auth-modal .form-input { border-radius: 16px; }
.auth-modal .form-group { margin-bottom: .9rem; }
.auth-modal .btn-block { margin-top: .3rem; }
.auth-modal .form-hint { font-size: .78rem; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 960px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .b-big { grid-column: span 2; grid-row: auto; min-height: 260px; }
    .steps-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .steps-grid::before { display: none; }
    .step { display: flex; align-items: center; gap: 1rem; text-align: right; }
    .step-dot { margin: 0; flex-shrink: 0; width: 76px; height: 76px; font-size: 1.9rem; border-radius: 24px; }
    .step p { margin: 0; }
}
@media (max-width: 760px) {
    .navbar { top: 8px; }
    .nav-container { padding: .45rem .5rem; gap: .4rem; }
    .logo-text, .nav-username, .logout-text, .nav-text { display: none; }
    .logo-icon { width: 38px; height: 38px; font-size: 1.15rem; }
    .nav-link { padding: .5rem .6rem; }
    .nav-emoji { font-size: 1.2rem; }
    .user-avatar-sm { width: 34px; height: 34px; }
    .btn-logout { padding: .45rem .6rem; }
    .msg-layout.with-chat { grid-template-columns: 1fr; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stage { height: 470px; }
    .glass-post { width: 270px; }
    .gp-1 { right: 0; }
    .gp-2 { left: 0; top: 150px; }
    .gp-3 { display: none; }
    .fl-1 { left: 2%; }
    .chip-live { right: 0; bottom: 14px; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .main-content { width: calc(100% - 20px); margin-top: 18px; }
    .bento { grid-template-columns: 1fr; }
    .b-big { grid-column: auto; }
    .hero-stage { height: 430px; }
    .glass-post { width: 250px; padding: .9rem; }
    .gp-2 { top: 168px; }
    .auth-modal-scroll { padding: 1.1rem 1.1rem 1.2rem; }
    .auth-banner { padding: 1.8rem 1rem 1.5rem; }
    .auth-banner h2 { font-size: 1.4rem; }
    .welcome-title { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- تکمیل: تب‌های بخش، پیام‌ها، پیش‌نمایش ---------- */
.seg { display: flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; border-radius: 999px; background: var(--surface-2); margin-bottom: 1.1rem; }
.seg a { padding: .5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 900; font-size: .88rem; color: var(--text-muted); transition: background .2s, color .2s; }
.seg a:hover { color: var(--text); }
.seg a.active { background: var(--grad-violet); color: #fff; box-shadow: 0 10px 20px -12px rgba(123,97,255,.9); }
.bubble-row.me { align-items: flex-end; }
.bubble-row.them { align-items: flex-start; }
.user-card .chip-av { width: 30px; height: 30px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.empty-inline { color: var(--text-dim); font-size: .92rem; padding: .4rem 0; }
.features { margin-top: 1rem; }
.like-count { font-weight: 900; }
.stories-nav-prev, .stories-nav-next { flex-shrink: 0; }
.theme-toggle { font-size: 1rem; }

/* ---------- AJAX UI ---------- */
.ajax-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    z-index: 9999; pointer-events: none;
    background: linear-gradient(90deg, #ff4f9a, #7b61ff, #4fd1c5);
    box-shadow: 0 0 12px rgba(123,97,255,.65);
    transition: width .25s ease, opacity .3s;
    opacity: 0;
}
.ajax-progress.active { opacity: 1; }

.pp-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    z-index: 10000; padding: .7rem 1.2rem; border-radius: 999px;
    background: rgba(18,12,40,.94); color: #fff; font-weight: 800; font-size: .9rem;
    box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s; max-width: 90vw; text-align: center;
}
.pp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pp-toast-err { background: rgba(160,40,60,.95); }
.pp-toast-ok { background: rgba(40,120,90,.95); }

.post-just-added {
    animation: postIn .45s ease both;
}
@keyframes postIn {
    from { opacity: 0; transform: translateY(-12px) scale(.98); }
    to { opacity: 1; transform: none; }
}
