/* AnonMsg — Production Stylesheet */
/* Fonts: Syne (headings) + DM Sans (body) */

:root {
  --bg:        #0b0b14;
  --surface:   #13131f;
  --surface2:  #1c1c2e;
  --border:    #2a2a40;
  --text:      #e8e8f0;
  --muted:     #7070a0;
  --accent:    #7B5EFF;
  --accent2:   #FF6B6B;
  --green:     #25D366;
  --wa-dark:   #075E54;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,.45);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .85; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #7B5EFF, #5B3FCC); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }
.btn-xl { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: #FF4444; color: #fff; }
.btn-whatsapp-solid { background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; }
.btn-story-dl { background: var(--surface2); border: 1.5px solid var(--accent); color: var(--accent); border-radius: 100px; }
.btn-copy { background: var(--surface2); border: 1.5px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 16px; }
.btn-copy:hover { border-color: var(--accent); }
.btn-inline-copy { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; padding: 0; }

/* Share buttons row */
.btn-share { background: var(--surface2); border: 1.5px solid var(--border); color: var(--text); border-radius: 100px; padding: 9px 18px; }
.btn-share:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp { color: var(--green) !important; border-color: var(--green) !important; }
.btn-whatsapp:hover { background: rgba(37,211,102,.1); }
.btn-story { color: var(--accent2) !important; border-color: var(--accent2) !important; }
.btn-story:hover { background: rgba(255,107,107,.1); }

/* ==================== NAV ==================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(11,11,20,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text); }
.nav-brand span { background: linear-gradient(135deg, #7B5EFF, #FF6B6B); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 12px; }

/* ==================== LANDING ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.orb1 { width: 500px; height: 500px; background: #7B5EFF; top: -100px; left: -100px; animation: floatOrb 8s ease-in-out infinite; }
.orb2 { width: 400px; height: 400px; background: #FF6B6B; bottom: -100px; right: -50px; animation: floatOrb 10s ease-in-out infinite reverse; }
.orb3 { width: 300px; height: 300px; background: #25D366; top: 50%; left: 50%; transform: translate(-50%,-50%); animation: floatOrb 12s ease-in-out infinite 2s; }

@keyframes floatOrb {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(30px,-30px); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(123,94,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,94,255,.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 780px;
  padding: 40px 24px;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(123,94,255,.15);
  border: 1px solid rgba(123,94,255,.4);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #a78fff;
  margin-bottom: 24px;
  letter-spacing: .5px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #7B5EFF, #FF6B6B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 18px; color: var(--muted); line-height: 1.6; max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 48px; }
.hero-cta-note { font-size: 13px; color: var(--muted); }

/* Floating message previews */
.hero-preview { display: flex; flex-direction: column; gap: 12px; max-width: 400px; margin: 0 auto; }
.msg-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: left;
  font-size: 15px;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideIn .6s ease forwards;
}
.msg-preview.msg-1 { animation-delay: 0.3s; }
.msg-preview.msg-2 { animation-delay: 0.6s; }
.msg-preview.msg-3 { animation-delay: 0.9s; }
@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}
.ghost-icon { font-size: 20px; flex-shrink: 0; }

/* Features */
.features { padding: 80px 24px; }
.container { max-width: 1100px; margin: 0 auto; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h3 { font-family: var(--font-head); font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }

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

/* ==================== AUTH ==================== */
.auth-split { display: flex; min-height: 100vh; }
.auth-left {
  flex: 1;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
@media(max-width:768px) { .auth-left { display: none; } }
.auth-logo { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text); z-index: 1; position: relative; }
.auth-art { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.auth-art .orb1 { width: 400px; height: 400px; }
.auth-art .orb2 { width: 300px; height: 300px; }
.auth-art-text { position: relative; z-index: 1; }
.auth-art-text h2 { font-family: var(--font-head); font-size: 28px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.auth-art-text p { color: var(--muted); font-size: 15px; }

.auth-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}
@media(max-width:768px) { .auth-right { width: 100%; } }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-family: var(--font-head); font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.auth-sub { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.auth-notice {
  background: rgba(123,94,255,.1);
  border: 1px solid rgba(123,94,255,.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-switch { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-terms { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.form-group input, textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus, textarea:focus { border-color: var(--accent); }
.form-error { background: rgba(255,68,68,.1); border: 1px solid rgba(255,68,68,.3); color: #ff6b6b; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.hidden { display: none !important; }

/* ==================== APP LAYOUT ==================== */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .25s;
}
@media(max-width:900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .app-layout > main, .app-layout > .share-main, .app-layout > .settings-main { margin-left: 0 !important; }
}
.sidebar-header { padding: 24px 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); }
.sidebar-nav { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  position: relative;
}
.nav-item:hover, .nav-item.active { background: rgba(123,94,255,.12); color: var(--accent); }
.nav-item svg { flex-shrink: 0; }
.badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  margin-left: auto;
}
.sidebar-profile {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.sidebar-info { flex: 1; min-width: 0; }
.sidebar-info strong { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-info span { font-size: 12px; color: var(--muted); }
.logout-btn { color: var(--muted); font-size: 18px; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.logout-btn:hover { color: #ff4444; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }
@media(max-width:900px) { .sidebar-toggle { display: block; } }

/* ==================== CHAT / INBOX ==================== */
.chat-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
@media(max-width:900px) { .chat-main { margin-left: 0; } }
.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-info h2 { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.poll-status { font-size: 12px; color: var(--green); }
.chat-header-actions { display: flex; gap: 8px; align-items: center; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
/* WhatsApp-style message bubbles */
.msg-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: msgIn .3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.msg-content { flex: 1; min-width: 0; }
.msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sender-anon { font-size: 13px; font-weight: 600; color: var(--muted); }
.sender-link { font-size: 13px; font-weight: 600; text-decoration: none; }
.msg-time { font-size: 11px; color: var(--muted); }
.msg-bubble {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px 18px 18px 18px;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  max-width: 600px;
}
.msg-reply {
  margin-top: 8px;
  padding: 8px 14px;
  background: rgba(123,94,255,.1);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--muted);
}
.msg-reply span { color: var(--accent); font-weight: 600; margin-right: 6px; }
.btn-reply {
  margin-top: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  transition: all .15s;
}
.btn-reply:hover { background: rgba(123,94,255,.1); }

.empty-state { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty-ghost { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-head); font-size: 22px; color: var(--text); margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; }

.chat-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 12px 20px; flex-shrink: 0; }
.your-link-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.your-link-bar span { color: var(--muted); }
.your-link-bar a { color: var(--accent); }

/* ==================== PROFILE PAGE ==================== */
.profile-page { background: var(--tpl-bg, var(--bg)); }
.profile-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.profile-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Template-specific card styles */
.template-neon .profile-card { border-color: rgba(123,94,255,.4); box-shadow: 0 0 60px rgba(123,94,255,.2); }
.template-minimal .profile-card { border-color: rgba(255,255,255,.15); }
.template-gradient .profile-card { background: rgba(0,0,0,.2); }
.template-whatsapp .profile-card { border-color: rgba(37,211,102,.3); }
.template-cyber .profile-card { border-color: rgba(255,228,0,.3); box-shadow: 0 0 60px rgba(255,45,120,.2); }

.profile-header {
  padding: 40px 32px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(var(--tpl-accent-rgb),.15), transparent);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  box-shadow: 0 0 30px currentColor;
}
.profile-name { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--tpl-text, #fff); margin-bottom: 8px; }
.profile-tagline { font-size: 14px; color: rgba(255,255,255,.7); }

.message-form { padding: 24px 28px; }
.message-form textarea {
  width: 100%;
  background: rgba(0,0,0,.3);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  min-height: 120px;
}
.message-form textarea:focus { border-color: var(--tpl-accent, var(--accent)); }
.char-counter { text-align: right; font-size: 12px; color: rgba(255,255,255,.4); margin: 6px 0 14px; }
.auth-prompt {
  background: rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-bottom: 14px;
}
.auth-prompt a { color: var(--tpl-accent, var(--accent)); }
.btn-send { background: linear-gradient(135deg, var(--tpl-accent, #7B5EFF), rgba(0,0,0,.3)); border: 1.5px solid var(--tpl-accent, var(--accent)); }
.send-result { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.send-result.success { background: rgba(37,211,102,.1); color: #25D366; border: 1px solid rgba(37,211,102,.3); }
.send-result.error { background: rgba(255,68,68,.1); color: #ff6b6b; border: 1px solid rgba(255,68,68,.3); }

.own-profile-notice {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(123,94,255,.1);
  border-bottom: 1px solid rgba(123,94,255,.2);
  font-size: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.share-section { padding: 20px 28px 28px; border-top: 1px solid rgba(255,255,255,.08); }
.share-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.4); margin-bottom: 12px; }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.link-display {
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  word-break: break-all;
}

/* ==================== SHARE PAGE ==================== */
.share-main { flex: 1; margin-left: 260px; overflow-y: auto; }
@media(max-width:900px) { .share-main { margin-left: 0; } }
.share-content { max-width: 1000px; margin: 0 auto; padding: 40px 24px; }
.share-content h1 { font-family: var(--font-head); font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.page-sub { color: var(--muted); margin-bottom: 36px; }

.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media(max-width:700px) { .share-grid { grid-template-columns: 1fr; } }

.template-section h3 { font-family: var(--font-head); font-size: 18px; margin-bottom: 16px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 8px; }
.template-hint { font-size: 12px; color: var(--muted); }

.template-card {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color .2s, transform .15s;
}
.template-card:hover { border-color: var(--accent); transform: scale(1.02); }
.template-card.selected { border-color: var(--accent); box-shadow: 0 0 20px rgba(123,94,255,.4); }

.template-thumb {
  aspect-ratio: 9/14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--t-bg);
  padding: 12px 8px;
}
.template-neon .template-thumb, .template-thumb.template-neon { background: #0D0D1A; }
.template-minimal .template-thumb, .template-thumb.template-minimal { background: #111; }
.template-gradient .template-thumb, .template-thumb.template-gradient { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.template-whatsapp .template-thumb, .template-thumb.template-whatsapp { background: #075E54; }
.template-cyber .template-thumb, .template-thumb.template-cyber { background: #0A0A0A; }

.t-ghost { font-size: 22px; }
.t-name { font-family: var(--font-head); font-size: 11px; font-weight: 700; color: var(--t-accent, #7B5EFF); }
.t-prompt { font-size: 9px; color: var(--t-text, #fff); opacity: .7; text-align: center; }
.template-label { padding: 8px; font-size: 12px; font-weight: 600; background: var(--surface); text-align: center; }

/* Story card preview */
.story-preview-card { margin-bottom: 20px; }
.story-card-preview {
  aspect-ratio: 9/16;
  max-height: 380px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: var(--t-bg, #0D0D1A);
  overflow: hidden;
  position: relative;
}
.story-card-preview.template-neon { background: #0D0D1A; border: 2px solid rgba(123,94,255,.4); box-shadow: 0 0 40px rgba(123,94,255,.3); }
.story-card-preview.template-gradient { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.story-card-preview.template-whatsapp { background: #075E54; }
.story-card-preview.template-cyber { background: #0A0A0A; border: 2px solid rgba(255,228,0,.4); }
.story-card-preview.template-minimal { background: #111; border: 2px solid rgba(255,255,255,.15); }

.sc-ghost { font-size: 48px; }
.sc-name { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--t-accent, #7B5EFF); }
.sc-prompt { font-size: 14px; color: var(--t-text, #fff); text-align: center; opacity: .9; }
.sc-link { font-size: 11px; color: var(--t-accent, #7B5EFF); margin-top: 8px; }

.link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  align-items: center;
}
.link-value { flex: 1; font-size: 13px; color: var(--muted); word-break: break-all; }

.share-buttons-big { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.share-steps {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.share-steps h4 { font-family: var(--font-head); margin-bottom: 12px; font-size: 14px; }
.share-steps ol { padding-left: 20px; }
.share-steps li { font-size: 14px; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }
.share-steps li strong { color: var(--text); }

/* ==================== SETTINGS ==================== */
.settings-main { flex: 1; margin-left: 260px; overflow-y: auto; }
@media(max-width:900px) { .settings-main { margin-left: 0; } }
.settings-content { max-width: 680px; margin: 0 auto; padding: 40px 24px; }
.settings-content h1 { font-family: var(--font-head); font-size: 32px; font-weight: 800; margin-bottom: 28px; }
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.settings-card h3 { font-family: var(--font-head); font-size: 18px; margin-bottom: 20px; }
.profile-info-row { display: flex; gap: 16px; align-items: center; }
.settings-avatar { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.settings-name { font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.settings-email { color: var(--muted); font-size: 14px; margin: 4px 0; }
.settings-link a { color: var(--accent); font-size: 13px; }
.danger-zone { border-color: rgba(255,68,68,.3); }
.danger-zone h3 { color: #ff4444; }
.danger-zone p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* Toggle */
.toggle-label { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 20px; }
.toggle-label input { display: none; }
.toggle { width: 44px; height: 24px; background: var(--border); border-radius: 100px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ''; width: 18px; height: 18px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform .2s; }
.toggle-label input:checked + .toggle { background: var(--accent); }
.toggle-label input:checked + .toggle::after { transform: translateX(20px); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.alert-success { background: rgba(37,211,102,.1); color: #25D366; border: 1px solid rgba(37,211,102,.3); }
.alert-error { background: rgba(255,68,68,.1); color: #ff6b6b; border: 1px solid rgba(255,68,68,.3); }

/* ==================== MODALS ==================== */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  z-index: 1;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-box h3 { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-box p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-box textarea {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  outline: none;
  margin-bottom: 4px;
}
.modal-box textarea:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.reply-original {
  background: var(--surface2);
  border-left: 3px solid var(--muted);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  word-break: break-word;
}
.story-preview-wrap { text-align: center; margin: 16px 0; }

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ==================== RESPONSIVE ==================== */
@media(max-width:640px) {
  .nav { padding: 14px 18px; }
  .hero-title { letter-spacing: -1px; }
  .message-form, .share-section, .profile-header { padding-left: 20px; padding-right: 20px; }
  .share-buttons { gap: 6px; }
  .btn-xl { padding: 12px 20px; font-size: 15px; }
  .chat-header { padding: 12px 16px; }
  .chat-messages { padding: 16px; }
}
