/* ================================================
   VELVET — Seductive Private Feed
   Deep purple / crimson / velvet black
   ================================================ */

:root {
    --void: #07030c;
    --deep: #0e0614;
    --surface: #160b1f;
    --elevated: #1f122b;
    --card: #241533;

    --crimson: #e11d48;
    --rose: #f43f5e;
    --magenta: #db2777;
    --orchid: #c026d3;
    --violet: #7c3aed;
    --plum: #581c87;

    --grad-story: linear-gradient(135deg, #e11d48 0%, #db2777 40%, #a21caf 70%, #7c3aed 100%);
    --grad-btn: linear-gradient(135deg, #e11d48 0%, #be185d 45%, #9d174d 100%);
    --grad-glow: radial-gradient(ellipse at center, rgba(225, 29, 72, 0.35) 0%, transparent 70%);
    --grad-card: linear-gradient(160deg, rgba(36, 21, 51, 0.95) 0%, rgba(14, 6, 20, 0.98) 100%);

    --text: #fdf2f8;
    --text-soft: #f9a8d4;
    --text-muted: #c084b8;
    --text-dim: #7a5278;

    --border: rgba(225, 29, 72, 0.18);
    --border-hot: rgba(244, 63, 94, 0.45);

    --shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    --glow: 0 0 48px rgba(225, 29, 72, 0.25);

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-full: 9999px;

    --nav-h: 54px;
    --bot-h: 62px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    background: var(--void);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.5;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input { font-family: inherit; border: none; outline: none; background: none; color: inherit; }

/* ---- Ambient sensual glow ---- */
.ambient-bg {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.glow {
    position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45;
    animation: drift 14s ease-in-out infinite;
}
.glow-1 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(190, 24, 93, 0.55), transparent 70%);
    top: -120px; right: -100px;
}
.glow-2 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 70%);
    bottom: 15%; left: -120px; animation-delay: -5s;
}
.glow-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.35), transparent 70%);
    bottom: -60px; right: 15%; animation-delay: -9s;
}
.glow-4 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(192, 38, 211, 0.3), transparent 70%);
    top: 40%; left: 30%; animation-delay: -3s; opacity: 0.3;
}
@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -18px) scale(1.06); }
    66% { transform: translate(-18px, 12px) scale(0.96); }
}

/* ---- App shell ---- */
.app {
    position: relative; z-index: 1;
    max-width: 480px; margin: 0 auto;
    min-height: 100dvh;
    background: var(--void);
    display: flex; flex-direction: column;
    padding-bottom: var(--bot-h);
}

/* ---- Top nav ---- */
.top-nav {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between;
    height: var(--nav-h); padding: 0 16px;
    background: rgba(7, 3, 12, 0.82);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 7px; }
.logo-icon {
    font-size: 1.45rem;
    background: var(--grad-story);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.6));
}
.logo-text {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em;
    background: linear-gradient(120deg, #fdf2f8, #f9a8d4, #e11d48);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-actions { display: flex; gap: 2px; }
.icon-btn {
    position: relative; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-full); color: var(--text-soft);
    transition: all 0.25s var(--ease);
}
.icon-btn:hover { background: rgba(225, 29, 72, 0.14); color: var(--rose); }
.notif-dot {
    position: absolute; top: 10px; left: 11px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--crimson); box-shadow: 0 0 8px var(--crimson);
}

/* ---- Stories ---- */
.stories-section { padding: 14px 0 10px; border-bottom: 1px solid var(--border); }
.stories-scroll {
    display: flex; gap: 15px; padding: 0 16px;
    overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory;
}
.stories-scroll::-webkit-scrollbar { display: none; }

.story-item {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    flex-shrink: 0; cursor: pointer; scroll-snap-align: start;
    transition: transform 0.2s var(--ease);
}
.story-item:active { transform: scale(0.93); }

.story-ring {
    width: 74px; height: 74px; border-radius: 50%; padding: 3px;
    background: var(--grad-story);
    box-shadow: 0 0 18px rgba(225, 29, 72, 0.4), 0 0 40px rgba(124, 58, 237, 0.15);
    transition: box-shadow 0.35s, transform 0.3s var(--spring);
}
.story-item:hover .story-ring {
    transform: scale(1.06);
    box-shadow: 0 0 28px rgba(225, 29, 72, 0.6), 0 0 50px rgba(192, 38, 211, 0.25);
}
.story-avatar {
    width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
    background: var(--void); border: 2.5px solid var(--void);
}
.story-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-name {
    font-size: 0.72rem; font-weight: 500; color: var(--text-soft);
    max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}

/* ---- Live stories ---- */
.story-item.live .story-ring {
    background: linear-gradient(135deg, #ef4444 0%, #e11d48 35%, #f97316 70%, #ef4444 100%);
    background-size: 200% 200%;
    animation: livePulse 2.2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.55), 0 0 40px rgba(225, 29, 72, 0.25);
}
@keyframes livePulse {
    0%, 100% { background-position: 0% 50%; box-shadow: 0 0 16px rgba(239, 68, 68, 0.45); }
    50% { background-position: 100% 50%; box-shadow: 0 0 28px rgba(239, 68, 68, 0.7), 0 0 50px rgba(249, 115, 22, 0.25); }
}
.story-ring {
    position: relative;
}
.live-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ef4444, #e11d48);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1.5px solid var(--void);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    z-index: 2;
    line-height: 1.2;
}
.story-item.live .story-name {
    color: #fda4af;
    font-weight: 600;
}


/* ---- Feed / Posts ---- */
.feed { flex: 1; padding: 10px 0 28px; }

.post {
    margin-bottom: 22px;
    background: var(--surface);
}

.post-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
}
.post-user { display: flex; align-items: center; gap: 10px; }
.post-avatar {
    width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
    background: var(--grad-story); padding: 1.5px;
}
.post-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
    border: 1.5px solid var(--surface);
}
.post-meta { display: flex; flex-direction: column; gap: 1px; }
.post-username { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.post-location { font-size: 0.7rem; color: var(--text-dim); }
.post-more {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: var(--text-dim); border-radius: var(--r-full);
}

/* Post media + lock */
.post-media {
    position: relative; width: 100%; aspect-ratio: 4/5;
    overflow: hidden; background: var(--elevated);
}
.post-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: filter 0.5s;
}
.post.locked .post-img {
    filter: blur(6px) brightness(0.78) saturate(1.15);
    transform: scale(1.02);
}

.post-lock-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(7,3,12,0.08) 0%, rgba(7,3,12,0.22) 50%, rgba(7,3,12,0.35) 100%);
    z-index: 5;
}
.lock-content {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-align: center; padding: 20px;
    animation: fadeUp 0.5s var(--ease);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.lock-icon-wrap {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.22);
    display: flex; align-items: center; justify-content: center;
    color: rgba(244, 63, 94, 0.75);
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.12);
    backdrop-filter: blur(6px);
}
.lock-icon-wrap.large {
    width: 72px; height: 72px;
}

.lock-title {
    font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 8px rgba(0,0,0,0.35);
    margin-top: 2px;
}
.lock-sub {
    font-size: 0.75rem; color: var(--text-soft); opacity: 0.55;
}

.lock-cta {
    margin-top: 6px;
    padding: 10px 28px;
    font-size: 0.85rem; font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.75) 0%, rgba(190, 24, 93, 0.7) 45%, rgba(157, 23, 77, 0.75) 100%);
    border-radius: var(--r-full);
    box-shadow: 0 3px 16px rgba(225, 29, 72, 0.28);
    transition: all 0.3s var(--spring);
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.lock-cta:hover {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 5px 22px rgba(225, 29, 72, 0.42);
    color: #fff;
}
.lock-cta:active { transform: scale(0.97); }

.post-actions {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px 2px;
}
.actions-left { display: flex; gap: 0; }
.action-btn {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    color: var(--text-soft); border-radius: var(--r-full);
    transition: all 0.2s;
}
.action-btn:hover { color: var(--rose); background: rgba(225, 29, 72, 0.1); }
.action-btn.liked { color: var(--crimson); }
.action-btn.liked svg { fill: var(--crimson); stroke: var(--crimson); animation: pop 0.4s var(--spring); }
@keyframes pop {
    0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); }
}

.post-likes { padding: 2px 16px 4px; font-size: 0.85rem; font-weight: 600; }
.post-caption { padding: 0 16px 14px; font-size: 0.85rem; line-height: 1.5; }
.caption-user { font-weight: 600; margin-left: 6px; }
.caption-text { color: var(--text-soft); }

/* ---- End of feed CTA ---- */
.end-cta {
    margin: 8px 14px 36px;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(225, 29, 72, 0.28);
    background: linear-gradient(165deg, rgba(36, 21, 51, 0.92) 0%, rgba(14, 6, 20, 0.96) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.end-cta-glow {
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.22), transparent 68%);
    pointer-events: none;
}
.end-cta-inner {
    position: relative;
    z-index: 1;
    padding: 28px 22px 26px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.end-cta-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fda4af;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.3);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.end-cta-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
    background: var(--grad-story);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.45));
}
.end-cta-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.end-cta-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 300px;
    margin-bottom: 22px;
}
.end-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    background: var(--grad-btn);
    border-radius: var(--r-full);
    box-shadow: 0 4px 24px rgba(225, 29, 72, 0.45);
    transition: all 0.3s var(--spring);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.end-cta-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 32px rgba(225, 29, 72, 0.6);
}
.end-cta-btn:active { transform: scale(0.97); }
.end-cta-note {
    margin-top: 14px;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* ---- Bottom nav ---- */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; height: var(--bot-h);
    display: flex; align-items: center; justify-content: space-around;
    background: rgba(7, 3, 12, 0.92);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border-top: 1px solid var(--border); z-index: 40;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); border-radius: var(--r-full); transition: color 0.2s, transform 0.2s;
}
.nav-item.active { color: var(--rose); }
.nav-item:active { transform: scale(0.9); }

.create-circle {
    width: 46px; height: 46px; border-radius: 15px;
    background: var(--grad-btn); display: flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 4px 20px rgba(225, 29, 72, 0.5);
    transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.create-btn:hover .create-circle {
    transform: scale(1.1); box-shadow: 0 6px 28px rgba(225, 29, 72, 0.65);
}
.nav-avatar {
    width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
    border: 1.5px solid var(--text-dim);
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ================================================
   AUTH MODAL — Centered, seductive
   ================================================ */
.auth-modal {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
    padding: 20px;
}
.auth-modal.open { opacity: 1; visibility: visible; }

.auth-backdrop {
    position: absolute; inset: 0;
    background: rgba(7, 3, 12, 0.75);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

.auth-card {
    position: relative; z-index: 2;
    width: 100%; max-width: 380px;
    background: var(--grad-card);
    border: 1px solid var(--border-hot);
    border-radius: 28px;
    padding: 32px 28px 28px;
    box-shadow: var(--shadow), var(--glow), 0 0 80px rgba(124, 58, 237, 0.15);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s var(--spring);
    overflow: hidden;
}
.auth-modal.open .auth-card {
    transform: scale(1) translateY(0);
}

.auth-card::before {
    content: '';
    position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.2), transparent 70%);
    pointer-events: none;
}

.auth-close {
    position: absolute; top: 14px; left: 14px;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); background: rgba(255,255,255,0.04);
    transition: all 0.2s;
}
.auth-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-logo {
    font-size: 2rem; margin-bottom: 10px;
    background: var(--grad-story);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    filter: drop-shadow(0 0 12px rgba(225, 29, 72, 0.5));
}
.auth-title {
    font-size: 1.4rem; font-weight: 800; color: var(--text);
    margin-bottom: 8px; letter-spacing: -0.02em;
}
.auth-subtitle {
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.55;
}

.auth-step {
    display: none; flex-direction: column; gap: 16px;
    animation: fadeUp 0.35s var(--ease);
}
.auth-step.active { display: flex; }

/* Phone field — LTR, +98 on LEFT */
.phone-field {
    display: flex; align-items: center; direction: ltr;
    background: var(--elevated);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.phone-field:focus-within {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.22);
}
.phone-prefix {
    padding: 15px 14px;
    font-size: 0.95rem; font-weight: 700;
    color: var(--text-soft);
    background: rgba(225, 29, 72, 0.08);
    border-right: 1px solid var(--border);
    letter-spacing: 0.02em;
}
.phone-input {
    flex: 1; padding: 15px 16px;
    font-size: 1.05rem; font-weight: 500;
    letter-spacing: 0.06em; direction: ltr; text-align: left;
}
.phone-input::placeholder { color: var(--text-dim); letter-spacing: 0; font-weight: 400; }

.auth-btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 15px 24px;
    font-size: 0.95rem; font-weight: 700;
    color: #fff; border-radius: var(--r-md);
    background: var(--grad-btn);
    box-shadow: 0 4px 22px rgba(225, 29, 72, 0.4);
    transition: all 0.3s var(--ease);
    overflow: hidden;
}
.auth-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(225, 29, 72, 0.55);
}
.auth-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.auth-btn.loading span { opacity: 0; }
.auth-btn.loading .btn-spinner { opacity: 1; }

.btn-spinner {
    position: absolute; width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.25); border-top-color: #fff;
    border-radius: 50%; opacity: 0;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.otp-hint {
    font-size: 0.85rem; color: var(--text-muted); text-align: center;
}
.otp-hint strong { color: var(--text-soft); direction: ltr; display: inline-block; }

.otp-row {
    display: flex; gap: 8px; justify-content: center; direction: ltr;
}
.otp-box {
    width: 46px; height: 54px; text-align: center;
    font-size: 1.35rem; font-weight: 700;
    background: var(--elevated);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text); caret-color: var(--rose);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.otp-box:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}
.otp-box.filled {
    border-color: var(--orchid);
    background: rgba(192, 38, 211, 0.12);
}

.auth-link {
    font-size: 0.85rem; color: var(--text-soft); text-align: center;
    padding: 6px; transition: color 0.2s;
}
.auth-link:hover { color: var(--rose); }
.auth-link.subtle { color: var(--text-dim); font-size: 0.8rem; }
.auth-link:disabled { opacity: 0.5; pointer-events: none; }

/* ================================================
   STORY MODAL
   ================================================ */
.story-modal {
    position: fixed; inset: 0; z-index: 1500;
    display: flex; flex-direction: column;
    background: #000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.story-modal.open { opacity: 1; visibility: visible; }

.story-backdrop { position: absolute; inset: 0; background: #000; }

.story-progress {
    position: absolute; top: 12px; left: 12px; right: 12px;
    display: flex; gap: 4px; z-index: 20;
}
.progress-track {
    flex: 1; height: 2.5px; background: rgba(255,255,255,0.22); border-radius: 2px; overflow: hidden;
}
.progress-fill {
    height: 100%; width: 0%; background: #fff; border-radius: 2px;
}

.story-top {
    position: absolute; top: 26px; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px; z-index: 20;
}
.story-user { display: flex; align-items: center; gap: 10px; }
.story-user img {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.35);
}
.s-name { display: block; font-size: 0.9rem; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.s-time { font-size: 0.7rem; color: rgba(255,255,255,0.65); }

.story-x {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    color: #fff; border-radius: 50%; background: rgba(0,0,0,0.35);
}

.story-body {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.story-pic {
    width: 100%; height: 100%; object-fit: cover;
    transition: filter 0.6s var(--ease), transform 0.6s;
}
.story-pic.blurred {
    filter: blur(30px) brightness(0.4) saturate(1.4);
    transform: scale(1.1);
}

.story-lock {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7, 3, 12, 0.4);
    z-index: 5;
}
.story-lock-inner {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed; bottom: calc(var(--bot-h) + 20px); left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--elevated); color: var(--text);
    padding: 12px 26px; border-radius: var(--r-full);
    font-size: 0.875rem; font-weight: 500;
    box-shadow: var(--shadow), 0 0 24px rgba(225, 29, 72, 0.15);
    border: 1px solid var(--border); z-index: 3000;
    opacity: 0; visibility: hidden; transition: all 0.35s var(--ease);
    white-space: nowrap; max-width: 90vw;
}
.toast.show {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}

body.modal-open { overflow: hidden; }

@media (max-width: 380px) {
    .story-ring { width: 64px; height: 64px; }
    .story-name { font-size: 0.65rem; max-width: 64px; }
    .otp-box { width: 40px; height: 48px; font-size: 1.2rem; }
    .auth-card { padding: 28px 20px 24px; }
}


/* Success state after registration */
.auth-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 12px 0 8px;
    animation: fadeUp 0.4s var(--ease);
}
.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(52, 211, 153, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #34d399;
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.25);
}
.success-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.6;
}
.success-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}


/* OTP wait message */
.otp-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    line-height: 1.6;
}
.otp-main-msg {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fdf2f8;
}
.otp-wait-msg {
    font-size: 0.82rem;
    color: #f9a8d4;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    max-width: 320px;
}
.otp-phone-line {
    font-size: 0.8rem;
    color: #c084b8;
}
.otp-phone-line strong {
    color: #f9a8d4;
    direction: ltr;
    display: inline-block;
}
