/* SIDIME — v14 Premium Rounded Design */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Syne:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

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

/* ===== COLOR TOKENS — LIGHT ===== */
:root {
  --font-mono:    'Figtree', system-ui, sans-serif;
  --font-display: 'Syne', 'Outfit', sans-serif;
  --font-body:    'Figtree', 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --nav-h: 60px;

  /* Border radius tokens */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-full: 9999px;

  /* Light palette — monochromatic */
  --bg:            #f2f2f2;
  --bg-card:       #ffffff;
  --bg-input:      #ebebeb;
  --bg-hover:      #e3e3e3;
  --border:        #d0d0d0;
  --border-strong: #0a0a0a;
  --text:          #0a0a0a;
  --text-muted:    #606060;
  --text-faint:    #a0a0a0;
  --accent:        #0a0a0a;
  --accent2:       #333333;
  --accent-fg:     #ffffff;
  --shadow:        0 1px 8px rgba(0,0,0,0.07);
  --shadow-lg:     0 6px 24px rgba(0,0,0,0.11);
  --glow:          0 0 0 2px rgba(0,0,0,0.10);
}

/* ===== COLOR TOKENS — DARK ===== */
body.dark {
  --bg:            #0a0a0a;
  --bg-card:       #111111;
  --bg-input:      #1a1a1a;
  --bg-hover:      #1f1f1f;
  --border:        #2a2a2a;
  --border-strong: #e0e0e0;
  --text:          #e8e8e8;
  --text-muted:    #888888;
  --text-faint:    #444444;
  --accent:        #e8e8e8;
  --accent2:       #aaaaaa;
  --accent-fg:     #0a0a0a;
  --shadow:        0 2px 12px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.7);
  --glow:          0 0 0 2px rgba(255,255,255,0.08);
}

/* Smooth transitions */
*, *::before, *::after {
  transition:
    background-color 0.25s cubic-bezier(0.4,0,0.2,1),
    border-color 0.25s cubic-bezier(0.4,0,0.2,1),
    color 0.25s cubic-bezier(0.4,0,0.2,1),
    box-shadow 0.25s cubic-bezier(0.4,0,0.2,1),
    transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
/* Never transition these — breaks rendering and image display */
img,
audio,
video,
input[type="file"],
.toggle-slider::after { transition: none !important; }
.toggle-slider { transition: background-color 0.2s !important; }

/* ===== BASE ===== */
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  /* Prevent text selection globally */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.05em; }
a { color: var(--text); text-decoration: none; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 5px; color: var(--text-muted); }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-gray { color: var(--text-muted); }
.text-sm { font-size: 11px; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tag.red { border-color: var(--text-muted); color: var(--text); }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 2;
}
.hidden { display: none !important; }

/* ===== INPUTS ===== */
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  outline: none;
  border-radius: var(--r-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
textarea { resize: vertical; min-height: 80px; }

.avatar-preview {
  width: 72px; height: 72px;
  border: 2px solid var(--border);
  object-fit: cover;
  display: block;
  margin-top: 8px;
  background: var(--bg-hover);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 4px;
  box-shadow: none;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); opacity: 1; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: none;
}
.btn-outline:hover { background: var(--accent); color: var(--accent-fg); opacity: 1; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); opacity: 1; }
.btn-danger {
  background: #e53e3e;
  color: #fff;
  box-shadow: none;
}
.btn-danger:hover { background: #c53030; opacity: 1; }
.btn-sm { padding: 6px 14px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; }

/* ===== WELCOME MODAL ===== */
.welcome-overlay {
  position: fixed; inset: 0;
  background: var(--accent);
  color: var(--accent-fg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  cursor: pointer;
}
.welcome-logo { font-family: var(--font-display); font-size: 80px; letter-spacing: 8px; margin-bottom: 12px; }
.welcome-subtitle { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; opacity: 0.6; margin-bottom: 40px; }
.welcome-hint { font-size: 10px; letter-spacing: 2px; opacity: 0.4; margin-top: 24px; }

/* ===== AUTH ===== */
#auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}
#auth-screen .logo { font-size: 56px; margin-bottom: 8px; color: var(--text); }
.auth-tagline {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.auth-box {
  width: 100%; max-width: 380px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-tabs { display: flex; border-bottom: 2px solid var(--border-strong); }
.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: none;
  background: var(--bg-hover);
  color: var(--text-muted);
}
.auth-tab:first-child { border-right: 1px solid var(--border); }
.auth-tab.active { background: var(--accent); color: var(--accent-fg); }
.auth-form { padding: 24px; display: none; }
.auth-form.active { display: block; }

/* ===== APP SHELL ===== */
#app { display: none; flex-direction: column; height: 100vh; }
#app.visible { display: flex; }

.top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 100;
}
.top-bar .logo { font-size: 26px; color: var(--text); }
#top-user-info { display: flex; align-items: center; gap: 8px; }

#main-content {
  margin-top: 52px; margin-bottom: var(--nav-h);
  max-width: 640px; width: 100%;
  margin-left: auto; margin-right: auto;
  overflow-y: auto; flex: 1;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-card);
  border-top: 2px solid var(--border-strong);
  display: flex; z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-faint);
  font-size: 9px; letter-spacing: 0.4px; text-transform: uppercase;
  gap: 3px; position: relative; border: none; background: none;
  font-family: var(--font-mono);
}
.nav-item i { font-size: 18px; }
.nav-item.active { color: var(--text); }
.nav-item.active::after {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%;
  height: 2px; background: var(--accent);
}
.nav-badge {
  position: absolute; top: 6px; right: 14px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 9px; font-weight: 700; padding: 1px 5px; min-width: 16px; text-align: center;
}

/* ===== SECTIONS ===== */
.section { display: none; padding: 16px; }
.section.active { display: block; }
.section-header {
  font-family: var(--font-display); font-size: 28px; letter-spacing: 2px;
  margin-bottom: 16px; border-bottom: 2px solid var(--border-strong);
  padding-bottom: 8px; color: var(--text);
}

/* ===== FEED ===== */
.feed-tabs {
  display: flex; margin-bottom: 16px;
  border: 2px solid var(--border-strong);
}
.feed-tab {
  flex: 1; padding: 8px; font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; border: none; background: var(--bg-card); color: var(--text-muted);
}
.feed-tab:first-child { border-right: 1px solid var(--border-strong); }
.feed-tab.active { background: var(--accent); color: var(--accent-fg); }

/* POST CREATE */
.post-create {
  border: 2px solid var(--border-strong);
  padding: 12px; margin-bottom: 16px;
  background: var(--bg-card);
  overflow: hidden;
}
.post-create textarea {
  border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text);
  margin-bottom: 8px; font-size: 13px;
}
.post-create-footer { display: flex; justify-content: space-between; align-items: center; }
.char-count { font-size: 11px; color: var(--text-faint); }

/* POST IMAGE (create form preview) */
.post-image-preview-wrap {
  position: relative; display: block;
  margin-top: 8px; max-width: 100%; overflow: hidden;
}
.post-image-preview {
  display: block; max-width: 100%; max-height: 160px;
  width: auto; height: auto; object-fit: contain;
  border: 2px solid var(--border);
}
.post-image-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: var(--accent); color: var(--accent-fg);
  border: none; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* POST CARD */
.post-card {
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
@keyframes cardSlideUp { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.post-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.post-avatar {
  width: 36px; height: 36px; border: 2px solid var(--border-strong);
  object-fit: cover; background: var(--bg-hover); flex-shrink: 0; cursor: pointer;
  border-radius: 50%;
}
.post-username {
  font-weight: 600; font-size: 13px; letter-spacing: 0px;
  cursor: pointer; color: var(--text);
}
.post-username:hover { text-decoration: underline; }
.verified-badge { font-size: 12px; color: var(--text-muted); }
.post-time { font-size: 10px; color: var(--text-faint); margin-left: auto; }
.post-body { padding: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--text); }

/* Post image in feed */
.post-image-wrap {
  overflow: hidden; width: 100%;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
}
.post-image {
  display: block; width: 100%; max-height: 400px;
  object-fit: contain; cursor: pointer;
}
.post-image:hover { opacity: 0.9; }

.post-delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-size: 12px;
  padding: 2px 6px; margin-left: 4px;
  font-family: var(--font-mono);
}
.post-delete-btn:hover { color: var(--text); }

/* Reactions */
.post-reactions {
  display: flex; gap: 6px; padding: 8px 12px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.reaction-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 10px; border: 1.5px solid var(--border);
  background: var(--bg-card); cursor: pointer;
  font-size: 15px; font-family: var(--font-body);
  color: var(--text);
  border-radius: var(--r-full);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), background 0.15s, border-color 0.15s;
}
.reaction-btn:hover { border-color: var(--accent); transform: scale(1.08); }
.reaction-btn.active { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.reaction-btn.just-reacted { animation: popReact 0.35s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes popReact { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.reaction-count { font-size: 11px; font-weight: 600; }

/* Comments toggle button */
.post-comments-toggle {
  padding: 7px 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; font-size: 11px; color: var(--text-muted);
  font-family: var(--font-mono); background: none;
  border-left: none; border-right: none; border-bottom: none;
  width: 100%; text-align: left;
}
.post-comments-toggle:hover { background: var(--bg-hover); color: var(--text); }
.post-comments-toggle i { font-size: 12px; }

/* Comments section */
.post-comments-section {
  border-top: 2px solid var(--border);
  background: var(--bg-hover); display: none;
}
.post-comments-section.open { display: block; }

.comments-list { max-height: 320px; overflow-y: auto; padding: 6px 0; }

.comment-item {
  padding: 8px 12px; display: flex; gap: 8px;
  align-items: flex-start; animation: fadeIn 0.15s ease;
}
.comment-item:not(:last-child) { border-bottom: 1px solid var(--border); }

.comment-avatar {
  width: 26px; height: 26px; border: 1.5px solid var(--border-strong);
  object-fit: cover; background: var(--bg-hover);
  flex-shrink: 0; cursor: pointer;
}
.comment-body { flex: 1; min-width: 0; }
.comment-author {
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text); letter-spacing: 0.3px;
}
.comment-author:hover { text-decoration: underline; }
.comment-text {
  font-size: 13px; line-height: 1.55; color: var(--text-muted);
  word-break: break-word; white-space: pre-wrap; margin-top: 2px;
}
.comment-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.comment-time { font-size: 9px; color: var(--text-faint); }
.comment-delete-btn {
  background: none; border: none; color: var(--text-faint);
  font-size: 10px; cursor: pointer; padding: 0;
  font-family: var(--font-mono); display: none;
}
.comment-item:hover .comment-delete-btn { display: inline; }
.comment-delete-btn:hover { color: var(--text); }

.comments-loading { text-align: center; padding: 12px; font-size: 11px; color: var(--text-faint); }

.comment-form {
  display: flex; gap: 6px; padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-card); align-items: flex-end;
}
.comment-form textarea {
  flex: 1; resize: none; min-height: 32px; max-height: 80px;
  padding: 6px 8px; font-size: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-input); color: var(--text);
}
.comment-form button { padding: 6px 12px; font-size: 10px; flex-shrink: 0; }

/* ===== SEARCH ===== */
.search-box { display: flex; gap: 8px; margin-bottom: 16px; }
.search-box input { flex: 1; }

.user-card {
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  padding: 12px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.user-card-avatar {
  width: 48px; height: 48px; border: 2px solid var(--border-strong);
  object-fit: cover; background: var(--bg-hover); flex-shrink: 0;
  border-radius: 50%;
}
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { font-weight: 500; font-size: 13px; color: var(--text); }
.user-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== MESSAGES ===== */
#messages-section { padding: 0; }
.messages-layout { display: flex; height: calc(100vh - 52px - var(--nav-h)); }

.chat-list {
  width: 240px; border-right: 2px solid var(--border-strong);
  overflow-y: auto; flex-shrink: 0; background: var(--bg-card);
}
.chat-list-header {
  padding: 12px; border-bottom: 2px solid var(--border-strong);
  font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; color: var(--text);
}
.chat-item {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  cursor: pointer; display: flex; gap: 10px; align-items: center;
}
.chat-item:hover, .chat-item.active { background: var(--bg-hover); }
/* Frame wrap inside chat-item must not baseline-shift */
.chat-item .av-frame-wrap.chat-avatar-frame-wrap {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.chat-avatar {
  width: 36px; height: 36px; border: 2px solid var(--border-strong);
  object-fit: cover; background: var(--bg-hover); flex-shrink: 0;
  border-radius: 50%;
}
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.chat-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-time { font-size: 10px; color: var(--text-faint); }
.chat-unread {
  background: var(--accent); color: var(--accent-fg);
  font-size: 9px; padding: 1px 5px; min-width: 16px; text-align: center; font-weight: 700;
}

.chat-window {
  flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg);
}
.chat-header {
  padding: 10px 14px; border-bottom: 2px solid var(--border-strong);
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); flex-shrink: 0;
}
.chat-header-name { font-weight: 500; font-size: 14px; color: var(--text); }
.chat-header-actions { margin-left: auto; display: flex; gap: 6px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: 12px; text-align: center; gap: 12px;
}
.chat-empty-icon { font-size: 48px; opacity: 0.3; }

.message-wrap { display: flex; flex-direction: column; max-width: 75%; }
.message-wrap.mine { align-self: flex-end; align-items: flex-end; }
.message-wrap.theirs { align-self: flex-start; align-items: flex-start; }

.message-bubble {
  padding: 8px 12px; border: 2px solid var(--border-strong);
  background: var(--bg-card); word-break: break-word; position: relative; cursor: pointer;
}
.message-wrap.mine .message-bubble { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.message-text { font-size: 14px; line-height: 1.55; }
.message-time { font-size: 9px; color: var(--text-faint); margin-top: 3px; }
.message-photo { max-width: 200px; display: block; border: 2px solid var(--border-strong); cursor: pointer; }
.message-voice { display: flex; align-items: center; gap: 8px; }
.message-voice audio { max-width: 180px; }

.message-reactions-display { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.msg-reaction-pill {
  font-size: 12px; padding: 2px 6px;
  border: 1px solid var(--border); background: var(--bg-card); cursor: pointer;
}
.reaction-picker {
  position: fixed; background: var(--bg-card); border: 2px solid var(--border-strong);
  padding: 8px; display: flex; gap: 6px; z-index: 999; box-shadow: var(--shadow);
}
.reaction-picker button { font-size: 20px; background: none; border: none; cursor: pointer; padding: 4px; }
.reaction-picker button:hover { transform: scale(1.3); }

/* Blocked banner */
.blocked-banner {
  padding: 10px 14px; background: var(--bg-hover);
  border-top: 2px solid var(--border-strong);
  font-size: 11px; color: var(--text-muted); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}

.voice-timer { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.chat-input-area { border-top: 2px solid var(--border-strong); background: var(--bg-card); flex-shrink: 0; }
.chat-input-toolbar { display: flex; gap: 4px; padding: 6px 10px 0; }
.toolbar-btn {
  padding: 5px 8px; border: 1px solid var(--border);
  background: var(--bg-card); cursor: pointer; font-size: 13px; color: var(--text-muted);
}
.toolbar-btn:hover { border-color: var(--accent); color: var(--text); }
.toolbar-btn.recording { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.emoji-picker {
  display: none; padding: 8px; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 4px; max-height: 100px; overflow-y: auto;
  background: var(--bg-card);
}
.emoji-picker.open { display: flex; }
.emoji-btn { font-size: 18px; background: none; border: none; cursor: pointer; padding: 2px; }
.emoji-btn:hover { background: var(--bg-hover); }

.chat-input-row { display: flex; gap: 8px; padding: 8px 10px; }
.chat-input-row textarea {
  flex: 1; resize: none; min-height: 36px; max-height: 100px;
  padding: 8px 10px; font-size: 13px;
  background: var(--bg-input); color: var(--text); border: 1.5px solid var(--border);
}

/* ===== SETTINGS CARDS ===== */
.settings-card {
  border: 2px solid var(--border-strong); background: var(--bg-card); margin-bottom: 12px;
}
.settings-title {
  padding: 10px 14px; font-family: var(--font-display); font-size: 18px;
  letter-spacing: 1px; border-bottom: 1px solid var(--border); color: var(--text);
}
.settings-item {
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); gap: 12px;
}
.settings-item:last-child { border-bottom: none; }
.settings-item label { font-size: 13px; color: var(--text-muted); }

/* Toggle switch */
.toggle { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border);
  cursor: pointer; border: 1.5px solid var(--border-strong);
}
.toggle-slider::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; background: var(--bg-card);
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::after { transform: translateX(16px); background: var(--accent-fg); }

/* Theme toggle special styling */
.theme-toggle-item {
  background: var(--bg-hover);
  border-radius: 0;
}
.theme-toggle-item label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px !important; font-weight: 500; color: var(--text) !important;
}
.theme-icon { font-size: 16px; }

/* ===== NOTIFICATIONS ===== */
.notif-item {
  border: 2px solid var(--border-strong); background: var(--bg-card);
  padding: 12px 14px; margin-bottom: 10px;
  display: flex; gap: 10px; align-items: flex-start;
}
.notif-item.unread { border-left: 4px solid var(--accent); }
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; line-height: 1.55; color: var(--text); }
.notif-time { font-size: 10px; color: var(--text-faint); margin-top: 3px; }

/* ===== ADMIN ===== */
.admin-search-wrap {
  padding: 10px 0 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.admin-search-wrap input {
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 12px;
  padding: 9px 12px;
}
.admin-search-wrap input:focus { border-color: var(--accent); }
.admin-tabs { display: flex; border: 2px solid var(--border-strong); margin-bottom: 16px; }
.admin-tab {
  flex: 1; padding: 8px; font-family: var(--font-mono); font-size: 11px;
  font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; border: none; background: var(--bg-card); color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.admin-tab:first-child { border-right: 1px solid var(--border); }
.admin-tab.active { background: var(--bg-hover); color: var(--text); border-bottom-color: var(--accent); }
.admin-panel-body > div { display: none; }
.admin-panel-body > div.active { display: block; }

.admin-user-row {
  border: 1px solid var(--border); padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  background: var(--bg-card); flex-wrap: wrap;
}
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name { font-weight: 500; font-size: 12px; color: var(--text); }
.admin-user-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.admin-pw-reveal { border-radius: 0; letter-spacing: 0.5px; }

.verify-request-card {
  border: 2px solid var(--border-strong); background: var(--bg-card);
  padding: 12px; margin-bottom: 12px;
}
.vr-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vr-username { font-weight: 500; font-size: 13px; flex: 1; color: var(--text); }
.vr-reason {
  font-size: 13px; line-height: 1.55; color: var(--text-muted);
  background: var(--bg-hover); border-left: 3px solid var(--border);
  padding: 8px 12px; margin-bottom: 10px;
}
.vr-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 20px;
  animation: fadeInOverlay 0.2s ease;
}
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
body.dark .modal-overlay { background: rgba(0,0,0,0.75); }
.modal {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  animation: modalPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalPop { from { opacity: 0; transform: scale(0.88) translateY(20px); } to { opacity: 1; transform: none; } }
.modal-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.5px; margin-bottom: 18px; color: var(--text); }
.modal-footer { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; cursor: pointer;
}
#lightbox img { max-width: 95%; max-height: 95%; object-fit: contain; }

/* ===== TOAST ===== */
#toast-container {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 9000; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-full);
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  animation: toastSlide 0.35s cubic-bezier(0.34,1.56,0.64,1), fadeOut 0.4s ease 3s forwards;
  white-space: nowrap;
}
.toast.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 20px rgba(239,68,68,0.4);
}
@keyframes toastSlide { from { opacity:0; transform:translateY(20px) scale(0.85); } to { opacity:1; transform:none; } }
@keyframes slideUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes fadeOut { from { opacity:1; } to { opacity:0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .chat-list { width: 180px; }
}
@media (max-width: 480px) {
  /* On mobile the messages layout stacks: list fills screen, window hidden until chat opened */
  .messages-layout {
    position: relative;
  }
  .chat-list {
    /* Default on mobile: visible, full width */
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    inset: 0;
    z-index: 2;
    border-right: none;
  }
  /* When user opens a specific chat, list hides */
  .chat-list.mobile-hide {
    display: none;
  }
  .chat-window {
    width: 100%;
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
  }
  /* When chat is open, window shows on top */
  .chat-window.mobile-show {
    display: flex;
    z-index: 3;
  }
}

/* ===== TELEGRAM VERIFIED BADGE ===== */
.tg-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 3px;
}
.tg-verified svg { display: block; width: 100%; height: 100%; }
/* Larger variant */
.tg-verified.lg { width: 26px; height: 26px; }
.tg-verified.xl { width: 34px; height: 34px; }

/* ===== PROFILE COVER ===== */
.profile-cover-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  background: var(--bg-hover);
  border-bottom: 2px solid var(--border-strong);
  overflow: hidden;
}
.profile-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.profile-cover-canvas {
  width: 100%; height: 100%;
  display: block;
}
.profile-cover-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 11px; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.profile-cover-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 6px;
}
.profile-cover-btn {
  width: 30px; height: 30px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.profile-cover-btn:hover { background: rgba(0,0,0,0.8); }

/* ===== PROFILE HERO (with cover) ===== */
.profile-hero {
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  margin-bottom: 16px;
  padding: 0;
  display: block !important;
  text-align: left;
}
.profile-hero-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: -28px;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 72px; height: 72px;
  border: 3px solid var(--bg-card);
  object-fit: cover;
  background: var(--bg-hover);
  display: block;
}
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  background: var(--accent); color: var(--accent-fg);
  border: none; width: 22px; height: 22px; cursor: pointer;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.profile-name-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.profile-username {
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: 1.5px; color: var(--text);
  line-height: 1;
}
.profile-stats {
  display: flex; gap: 20px; margin-top: 4px;
}
.profile-stat {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
}
.profile-stat-num { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.2; }
.profile-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.profile-hero-actions { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; margin-top: 4px; }

/* Follow button states */
.btn-follow { }
.btn-follow.following {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

/* ===== CANVAS DRAW MODAL ===== */
.draw-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.82);
  z-index: 600; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 12px;
}
.draw-modal {
  background: var(--bg-card); border: 2px solid var(--border-strong);
  width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 0;
  max-height: 95vh;
}
.draw-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 2px solid var(--border-strong);
}
.draw-modal-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; color: var(--text); }
.draw-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
  background: var(--bg-hover);
}
.draw-tool-btn {
  width: 32px; height: 32px; border: 2px solid var(--border);
  background: var(--bg-card); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text);
}
.draw-tool-btn.active { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.draw-size-wrap { display: flex; align-items: center; gap: 6px; }
.draw-size-wrap label { font-size: 11px; color: var(--text-muted); }
.draw-size-wrap input[type="range"] { width: 70px; }
.draw-colors { display: flex; gap: 4px; flex-wrap: wrap; }
.draw-color-btn {
  width: 24px; height: 24px; border: 2px solid transparent; cursor: pointer;
}
.draw-color-btn.active { border-color: var(--border-strong); transform: scale(1.15); }
.draw-color-custom { width: 24px; height: 24px; padding: 0; border: 2px solid var(--border); cursor: pointer; }
.draw-canvas-wrap {
  position: relative; overflow: hidden;
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
}
body.dark .draw-canvas-wrap {
  background: repeating-conic-gradient(#222 0% 25%, #1a1a1a 0% 50%) 0 0 / 16px 16px;
}
.draw-canvas { display: block; cursor: crosshair; touch-action: none; width: 100% !important; }
.draw-modal-footer {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 2px solid var(--border-strong); justify-content: flex-end;
}

/* ===== FULL-PAGE USER PROFILE MODAL ===== */
.profile-modal-overlay {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 300;
  animation: slideInUp 0.22s cubic-bezier(0.22,1,0.36,1);
  overflow-y: auto;
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.profile-modal-topbar {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--bg-card);
  border-bottom: 2px solid var(--border-strong); z-index: 10;
}
.profile-modal-inner { max-width: 640px; margin: 0 auto; padding: 0 0 40px; }

/* ===== ANIMATIONS ===== */
/* Page section transitions */
.section { animation: none; }
.section.active { animation: sectionFadeIn 0.18s ease; }
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Message send animation */
@keyframes messagePop {
  0%   { opacity: 0; transform: scale(0.88) translateY(8px); }
  70%  { transform: scale(1.02); }
  100% { opacity: 1; transform: none; }
}
.message-wrap.new-msg { animation: messagePop 0.22s cubic-bezier(0.22,1,0.36,1); }

/* Post appear */
@keyframes postSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.post-card.new-post { animation: postSlideIn 0.2s ease; }

/* Comment appear */
@keyframes commentPop {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}
.comment-item.new-comment { animation: commentPop 0.18s ease; }

/* Toast slide-up */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast { animation: toastIn 0.2s ease, fadeOut 0.4s ease 3s forwards; }
@keyframes fadeOut { from { opacity:1; } to { opacity:0; pointer-events:none; } }

/* Nav item tap */
.nav-item { transition: color 0.12s; }
.nav-item:active { transform: scale(0.9); transition: transform 0.08s; }

/* Button press */
.btn:active { transform: scale(0.96); }

/* Reaction pop */
@keyframes reactionBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.reaction-btn.just-reacted { animation: reactionBounce 0.25s ease; }

/* Chat item hover */
.chat-item { transition: background 0.12s; }

/* Follow button */
.btn-follow { transition: all 0.18s ease; }

/* Feed tab */
.feed-tab { transition: background 0.15s, color 0.15s; }


/* ===== S-COINS ===== */
.s-coins-chip {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  gap: 2px;
}
.profile-coins-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 0;
}
.quests-coins-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

/* ===== QUEST CARDS ===== */
.quest-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  padding: 14px;
  margin-bottom: 10px;
  animation: cardIn 0.2s ease both;
}
.quest-card.quest-locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.quest-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.quest-body { flex: 1; min-width: 0; }
.quest-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.quest-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.quest-lock-badge { font-size: 10px; background: var(--bg-hover); border: 1px solid var(--border); padding: 2px 6px; color: var(--text-faint); }
.quest-progress-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quest-progress-bar { flex: 1; height: 6px; background: var(--bg-hover); border: 1px solid var(--border); overflow: hidden; }
.quest-progress-fill { height: 100%; background: var(--accent); transition: width 0.4s ease; }
.quest-progress-label { font-size: 11px; color: var(--text-muted); min-width: 36px; text-align: right; }
.quest-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quest-reward { font-size: 12px; color: var(--text-muted); }
.quest-claim-btn { padding: 5px 12px !important; font-size: 11px !important;  }
@keyframes pulse { 0%,100% { box-shadow: none; } 50% { box-shadow: none; } }
.quest-claimed-badge { font-size: 11px; color: var(--text-faint); }

/* ===== PROFILE BIO ===== */
.profile-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 6px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== POST PINNED ===== */
.post-pinned { border-color: #f5c518 !important; }
.post-pinned-bar {
  background: #f5c518;
  color: #222;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  letter-spacing: 0.3px;
}
body.dark .post-pinned-bar { background: #b8940a; color: #fff; }
.post-pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 12px;
  padding: 2px 4px;
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.post-pin-btn:hover { opacity: 1; color: #f5c518; }

/* ===== @MENTION AUTOCOMPLETE ===== */
.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  z-index: 200;
  min-width: 180px;
  max-height: 160px;
  overflow-y: auto;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
}
.mention-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  transition: background 0.1s;
}
.mention-item:hover { background: var(--bg-hover); }

/* ===== NOTIFICATION LINK ===== */
.notif-link {
  font-size: 11px;
  color: var(--accent);
  margin-top: 3px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.post-highlight {
  animation: postGlow 2s ease;
}
@keyframes postGlow {
  0%,100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 3px #f5c518; }
}

/* ===== AVATAR FRAME ===== */
.avatar-with-frame {
  position: relative;
  display: inline-block;
}
.avatar-frame-img {
  position: absolute;
  top: -4px;
  left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
}
@keyframes rainbow-border {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.avatar-frame-rainbow {
  animation: rainbow-border 2s linear infinite;
}

/* ===== MORE ANIMATIONS ===== */
/* Feed section entrance stagger */
.post-card:nth-child(1) { animation-delay: 0.02s; }
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.08s; }
.post-card:nth-child(4) { animation-delay: 0.11s; }
.post-card:nth-child(5) { animation-delay: 0.14s; }

/* Quest card stagger */
.quest-card:nth-child(1) { animation-delay: 0.04s; }
.quest-card:nth-child(2) { animation-delay: 0.09s; }

/* Notification item entrance */
.notif-item {
  animation: fadeUp 0.18s ease both;
}

/* Coins chip pop on change */
@keyframes coinsPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25) rotate(-8deg); }
  100% { transform: scale(1); }
}
.s-coins-chip.pop { animation: coinsPop 0.35s ease; }

/* Settings card entrance */
.settings-card {
  animation: fadeUp 0.15s ease both;
}

/* Chat message send spring */
@keyframes sendSpring {
  0%   { opacity:0; transform: scale(0.8) translateX(20px); }
  70%  { transform: scale(1.03); }
  100% { opacity:1; transform: none; }
}
.message-wrap.mine.new-msg { animation: sendSpring 0.25s cubic-bezier(0.22,1,0.36,1) both; }

/* Reaction button spin on active */
.reaction-btn.just-reacted { animation: reactionBounce 0.3s ease; }

/* Nav item active bounce */
.nav-item.active { animation: navPop 0.2s ease; }
@keyframes navPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15) translateY(-2px); }
  100% { transform: scale(1); }
}

/* ===== VERIFIED BADGE TOOLTIP ===== */
.tg-verified {
  position: relative;
  cursor: pointer;
}
.badge-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 999;
  pointer-events: none;
  animation: tooltipPop 0.15s ease;
}
.badge-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a1a1a;
}
.tg-verified:hover .badge-tooltip,
.tg-verified.show-tooltip .badge-tooltip { display: block; }
body.dark .badge-tooltip { background: #e0e0e0; color: #111; }
body.dark .badge-tooltip::after { border-top-color: #e0e0e0; }
@keyframes tooltipPop {
  from { opacity:0; transform: translateX(-50%) translateY(4px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ===== RICH BADGE ===== */
.rich-badge {
  font-size: 18px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
  cursor: help;
}
@keyframes float {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-4px) rotate(3deg); }
}

/* ===== NAV QUESTS COIN ICON ===== */
#nav-quests svg { fill: currentColor; transition: transform 0.2s; }
#nav-quests:hover svg, #nav-quests.active svg { transform: rotate(15deg) scale(1.1); }

/* ===== MUCH MORE ANIMATIONS ===== */

/* Entry animations with stagger */
@keyframes slideInLeft {
  from { opacity:0; transform: translateX(-20px); }
  to   { opacity:1; transform: none; }
}
@keyframes slideInRight {
  from { opacity:0; transform: translateX(20px); }
  to   { opacity:1; transform: none; }
}
@keyframes zoomIn {
  from { opacity:0; transform: scale(0.85); }
  to   { opacity:1; transform: scale(1); }
}
@keyframes bounceIn {
  0%   { opacity:0; transform: scale(0.7); }
  60%  { opacity:1; transform: scale(1.08); }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}
@keyframes wiggle {
  0%,100% { transform: rotate(0); }
  25%      { transform: rotate(-4deg); }
  75%      { transform: rotate(4deg); }
}
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

/* Post cards with stagger */
.post-card { animation: slideInUp 0.22s cubic-bezier(0.22,1,0.36,1) both; }
.post-card:nth-child(1)  { animation-delay: 0.02s; }
.post-card:nth-child(2)  { animation-delay: 0.05s; }
.post-card:nth-child(3)  { animation-delay: 0.08s; }
.post-card:nth-child(4)  { animation-delay: 0.11s; }
.post-card:nth-child(5)  { animation-delay: 0.14s; }
.post-card:nth-child(6)  { animation-delay: 0.17s; }
.post-card:nth-child(7)  { animation-delay: 0.20s; }

/* Post pinned gold shimmer */
.post-pinned .post-pinned-bar {
  background: linear-gradient(90deg, #f5c518 0%, #ffe680 40%, #f5c518 60%, #e0a800 100%);
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
}

/* Avatar with frame - correct positioning */
.av-frame-wrap { display: inline-block; position: relative; }
.av-frame-wrap img.profile-avatar,
.av-frame-wrap img.post-avatar {
  display: block;
}
.av-frame-overlay {
  position: absolute;
  top: -4px; left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  pointer-events: none;
  z-index: 3;
  object-fit: contain;
  border-radius: 0;
}
.av-frame-rainbow { animation: rainbow-border 2s linear infinite; }

/* Chat items slide in */
.chat-item { animation: slideInLeft 0.18s ease both; }
.chat-item:nth-child(1) { animation-delay: 0.02s; }
.chat-item:nth-child(2) { animation-delay: 0.05s; }
.chat-item:nth-child(3) { animation-delay: 0.08s; }

/* Notification items */
.notif-item { animation: slideInRight 0.2s ease both; }
.notif-item:nth-child(1) { animation-delay: 0.03s; }
.notif-item:nth-child(2) { animation-delay: 0.07s; }
.notif-item:nth-child(3) { animation-delay: 0.11s; }
.notif-item:nth-child(4) { animation-delay: 0.15s; }

/* Profile modal slide up */
.profile-modal-overlay { animation: slideInUp 0.25s cubic-bezier(0.22,1,0.36,1) both; }

/* Quest cards bounce in */
.quest-card { animation: bounceIn 0.3s ease both; }
.quest-card:nth-child(1) { animation-delay: 0.05s; }
.quest-card:nth-child(2) { animation-delay: 0.12s; }
.quest-progress-fill { transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* Settings cards fade in stagger */
.settings-card { animation: fadeUp 0.2s ease both; }
.settings-card:nth-child(1) { animation-delay: 0.04s; }
.settings-card:nth-child(2) { animation-delay: 0.09s; }
.settings-card:nth-child(3) { animation-delay: 0.14s; }
.settings-card:nth-child(4) { animation-delay: 0.19s; }

/* Section active transition */
.section.active { animation: sectionFadeIn 0.2s cubic-bezier(0.22,1,0.36,1) both; }

/* Message send/receive */
.message-wrap.mine.new-msg   { animation: sendSpring 0.28s cubic-bezier(0.22,1,0.36,1) both; }
.message-wrap.theirs.new-msg { animation: slideInLeft 0.22s ease both; }

/* Reaction bounce */
@keyframes reactionBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4) rotate(-5deg); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.reaction-btn.just-reacted { animation: reactionBounce 0.35s ease; }

/* Btn hover lift */
.btn { transition: transform 0.12s, opacity 0.12s, background 0.15s, border-color 0.15s; }
.btn:hover:not(:disabled) { transform: none; }
.btn:active { transform: scale(0.96) !important; }

/* Nav item tap */
.nav-item:active { animation: wiggle 0.2s ease; }
.nav-item { transition: color 0.15s; }

/* Search result items */
.user-card { animation: zoomIn 0.18s ease both; }
.user-card:nth-child(1) { animation-delay: 0.03s; }
.user-card:nth-child(2) { animation-delay: 0.07s; }
.user-card:nth-child(3) { animation-delay: 0.11s; }

/* Comment items */
.comment-item { animation: slideInLeft 0.18s ease both; }

/* Post video */
.post-video-wrap {
  overflow: hidden;
  background: #000;
  margin: 0;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-video {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

/* Coins chip animate on award */
@keyframes coinAward {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4) rotate(10deg); color: #f5c518; }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.s-coins-chip.award { animation: coinAward 0.5s ease; }

/* Profile hero animated entrance */
.profile-hero { animation: fadeUp 0.2s ease both; }
.profile-hero-body { animation: fadeUp 0.25s ease both; animation-delay: 0.05s; }

/* Modal scale in */
.modal { animation: bounceIn 0.25s ease both; }

/* Toast bounce */
.toast { animation: slideInUp 0.2s ease, fadeOut 0.4s ease 3s forwards; }

/* Follow btn transition */
.btn-follow { transition: all 0.2s cubic-bezier(0.22,1,0.36,1); }
.btn-follow.following { transform: none; }

/* Pinned post entrance */
.post-pinned { animation: bounceIn 0.3s ease both; }

/* ===== QUESTS TABS ===== */
.quests-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-strong);
  margin-bottom: 0;
  overflow-x: auto;
}
.quests-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.quests-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.quests-tab-panel { padding: 0; }

/* ===== FRAME SHOP ===== */
.frame-shop-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 12px 14px 6px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.frame-shop-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  animation: fadeUp 0.2s ease both;
  transition: background 0.15s;
}
.frame-shop-card:hover { background: var(--bg-hover); }
.frame-preview-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.frame-preview-wrap svg {
  position: absolute;
  top: -5px; left: -5px;
  width: 90px; height: 90px;
  pointer-events: none;
}
.frame-preview-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.frame-preview-center div {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}
.frame-shop-info { flex: 1; min-width: 0; }
.frame-shop-name { font-weight: 700; font-size: 13px; color: var(--text); }
.frame-rarity    { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin: 2px 0; }
.frame-shop-desc { font-size: 11px; color: var(--text-muted); margin: 3px 0 6px; line-height: 1.4; }
.frame-shop-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.frame-owned-badge { font-size: 11px; color: var(--text-faint); }
.frame-owned-actions { display: flex; align-items: center; gap: 6px; }
.frame-publish-card {
  padding: 12px;
  background: var(--bg-hover);
  border-top: 1px solid var(--border);
}

/* ===== FRAME STARS ===== */
.frame-stars { display: flex; align-items: center; gap: 2px; margin: 4px 0; }
.star-btn {
  background: none;
  border: none;
  color: var(--border-strong);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  transition: color 0.1s, transform 0.1s;
}
.star-btn.active { color: #f5c518; }
.star-btn:hover  { color: #f5c518; transform: scale(1.2); }
.star-total { font-size: 11px; color: var(--text-faint); margin-left: 4px; }

/* ===== QUEST EXTRAS ===== */
.quest-admin-badge {
  font-size: 10px;
  background: linear-gradient(90deg, #ff8c00, #ff0066);
  color: white;
  padding: 1px 5px;
  margin-left: 6px;
  font-weight: 700;
}
.quest-expires { font-size: 10px; color: var(--text-faint); margin-left: 6px; }

/* ===== ONLINE STATUS ===== */
.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 5px;
  animation: onlinePulse 2s ease-in-out infinite;
}
@keyframes onlinePulse {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: none; }
}
.online-label { font-size: 11px; font-weight: 500; color: #22c55e; }
.online-label.was-online { color: var(--text-faint); font-weight: 400; }
.profile-online-row { margin: 3px 0 6px; display: flex; align-items: center; }

/* ===== POST MENTIONS & HASHTAGS ===== */
.post-mention {
  color: #2AABEE;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.1s;
}
.post-mention:hover { opacity: 0.7; text-decoration: underline; }
.post-hashtag {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.1s;
}
.post-hashtag:hover { opacity: 0.7; }

/* ===== ANIMATIONS: EXTRA ===== */
@keyframes frameShine {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.3) saturate(1.5); }
  100% { filter: brightness(1); }
}
.frame-shop-card .frame-preview-wrap:hover {
  animation: frameShine 1s ease;
}

@keyframes cardIn {
  from { opacity:0; transform: scale(0.92) translateY(10px); }
  to   { opacity:1; transform: none; }
}
.frame-shop-card:nth-child(1) { animation-delay: 0.03s; }
.frame-shop-card:nth-child(2) { animation-delay: 0.07s; }
.frame-shop-card:nth-child(3) { animation-delay: 0.11s; }
.frame-shop-card:nth-child(4) { animation-delay: 0.15s; }
.frame-shop-card:nth-child(5) { animation-delay: 0.19s; }

/* ===== NO TEXT SELECTION ===== */
* { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
.post-body, .message-text, .notif-text { -webkit-user-select: text; user-select: text; }

/* ===== ROUND AVATARS EVERYWHERE ===== */
.profile-avatar { border-radius: 50% !important; }
.av-frame-wrap img { border-radius: 50%; }
img[class*="avatar"] { border-radius: 50%; }

/* ===== CHAT ONLINE INDICATOR ===== */
.chat-avatar-wrap { position: relative; display: inline-block; flex-shrink: 0; }
/* Ensure chat-avatar inside wrap keeps its border and circular shape */
.chat-avatar-wrap .chat-avatar {
  display: block;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  object-fit: cover;
}
.chat-online-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  z-index: 5;
}
.chat-online-dot.online  { background: #22c55e; }
.chat-online-dot.offline { background: #ef4444; }

/* ===== MESSAGE CONTEXT MENU ===== */
.msg-ctx-menu {
  position: fixed;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  z-index: 1000;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: bounceIn 0.15s ease;
}
.msg-ctx-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}
.msg-ctx-item:hover { background: var(--bg-hover); }
.msg-ctx-item.danger { color: #ef4444; }
.msg-ctx-item i { width: 16px; text-align: center; color: var(--text-muted); }

/* ===== PAID REACTION ANIMATION ===== */
@keyframes paidReactFly {
  0%   { transform: scale(0) translateY(0); opacity: 1; }
  60%  { transform: scale(1.5) translateY(-40px); opacity: 1; }
  100% { transform: scale(1) translateY(-80px); opacity: 0; }
}
.paid-react-particle {
  position: fixed;
  font-size: 32px;
  pointer-events: none;
  z-index: 9999;
  animation: paidReactFly 1.5s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* ===== !LOVE ANIMATION ===== */
.love-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes heartFloat {
  0%   { transform: translateY(0) scale(0) rotate(-10deg); opacity: 0; }
  20%  { opacity: 1; transform: translateY(-20px) scale(1.2) rotate(5deg); }
  80%  { opacity: 0.8; transform: translateY(-120px) scale(1) rotate(-5deg); }
  100% { opacity: 0; transform: translateY(-200px) scale(0.5) rotate(10deg); }
}
.love-heart {
  position: absolute;
  font-size: 40px;
  animation: heartFloat 2s ease both;
  pointer-events: none;
}

/* ===== CANDLE SCRATCH REVEAL ===== */
.candle-wrap {
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  border: 2px solid var(--border-strong);
}
.candle-image { display: block; width: 100%; }
.candle-overlay {
  position: absolute;
  inset: 0;
  background: #111;
  pointer-events: none;
}
.candle-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  color: #888;
  font-size: 13px;
}
.candle-hint i { font-size: 28px; }

/* ===== EVOLVING CHANNEL ===== */
.channel-hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--bg-card) 100%);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.channel-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.02) 10px, rgba(255,255,255,0.02) 20px);
}
.channel-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.3);
  color: #fff;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.channel-name-big { font-size: 22px; font-weight: 800; color: #fff; margin: 4px 0; }
.channel-dna { font-size: 11px; color: rgba(255,255,255,0.6); font-family: monospace; }
.channel-energy-bar-wrap { margin-top: 10px; }
.channel-energy-bar {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.channel-energy-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #86efac);
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.channel-stats-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 12px 0 0;
}
.channel-stat { text-align: center; }
.channel-stat-num { font-size: 18px; font-weight: 800; color: #fff; display: block; }
.channel-stat-label { font-size: 10px; color: rgba(255,255,255,0.6); }
.channel-post-compose {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.channel-post-card {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  animation: fadeUp 0.2s ease both;
}
.channel-post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.channel-post-body { font-size: 14px; line-height: 1.6; color: var(--text); }
.channel-levels {
  padding: 12px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.channel-level-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.channel-level-item:last-child { border: none; }
.channel-level-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.channel-level-num.unlocked { background: var(--accent); color: var(--accent-fg); }
.channel-level-num.locked   { background: var(--bg-hover); color: var(--text-faint); }
.channel-level-desc { flex: 1; font-size: 12px; color: var(--text-muted); }
.channel-level-desc b { color: var(--text); }
.channels-list { padding: 0; }
.channel-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  animation: slideInLeft 0.18s ease both;
}
.channel-list-item:hover { background: var(--bg-hover); }
.channel-list-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-fg);
  flex-shrink: 0;
}
.channel-list-meta { flex: 1; min-width: 0; }
.channel-list-name { font-weight: 700; font-size: 13px; color: var(--text); }
.channel-list-sub  { font-size: 11px; color: var(--text-muted); }

/* ===== SOCIAL LINK BADGES ===== */
.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 4px;
  margin-left: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.15s, opacity 0.15s;
  flex-shrink: 0;
}
.social-badge:hover { transform: scale(1.2); opacity: 0.8; }
.social-badge.tiktok { background: #010101; color: #fff; }
.social-badge.youtube { background: #ff0000; color: #fff; }

/* ===== REPORT BUTTON ===== */
.report-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  opacity: 0.6;
  transition: opacity 0.15s, color 0.15s;
}
.report-btn:hover { opacity: 1; color: #ef4444; }

/* ===== MORE ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: none; } }

@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb,0,0,0), 0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(var(--accent-rgb,0,0,0), 0); }
}
.section.active .post-card:first-child { animation: bounceIn 0.3s ease both; }

/* Smooth nav transitions */
.section { transition: opacity 0.15s; }
.section.active { animation: sectionIn 0.18s ease both; }
@keyframes sectionIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: none; } }

/* Smooth message appear */
.message-wrap { animation: msgIn 0.2s cubic-bezier(0.22,1,0.36,1) both; }
.message-wrap.mine   { animation: msgInRight 0.2s cubic-bezier(0.22,1,0.36,1) both; }
.message-wrap.theirs { animation: msgInLeft 0.2s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes msgInRight { from { opacity:0; transform: translateX(16px) scale(0.95); } to { opacity:1; transform: none; } }
@keyframes msgInLeft  { from { opacity:0; transform: translateX(-16px) scale(0.95); } to { opacity:1; transform: none; } }

/* Remove flicker from existing message-wrap new-msg class */
.message-wrap.new-msg { animation: none; }

/* Ban indicator in post create */
.post-banned-notice {
  background: #3a1111;
  border: 1px solid #7a2222;
  color: #ff8888;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
  animation: fadeUp 0.2s ease;
}

/* ===== PAID REACTION BUTTON ===== */
.paid-react-btn {
  background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
  border: none !important;
  color: #000 !important;
  font-size: 13px !important;
  padding: 4px 8px !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s !important;
  font-weight: 700;
}
.paid-react-btn:hover { transform: scale(1.1) !important; box-shadow: 0 2px 8px rgba(255,200,0,0.4) !important; }

/* ===== ADMIN REPORT CARD ===== */
.admin-report-card {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  animation: slideInRight 0.2s ease;
}

/* ===== REPLY PREVIEW ===== */
.reply-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-hover);
  border-left: 3px solid var(--accent);
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== MSG ANIM ===== */
.msg-anim { animation: msgInNew 0.25s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes msgInNew {
  from { opacity:0; transform: translateY(10px) scale(0.96); }
  to   { opacity:1; transform: none; }
}
.message-wrap.mine .msg-anim   { animation-name: msgInRight; }
.message-wrap.theirs .msg-anim { animation-name: msgInLeft; }

/* ===== CANDLE SCRATCH CANVAS CURSOR ===== */
#candle-canvas { cursor: crosshair; touch-action: none; }

/* ===== CHANNEL SUBSCRIBE BTN ===== */
.channel-sub-btn { min-width: 90px; }

/* ===== SMOOTH ALL TRANSITIONS ===== */
.post-card, .quest-card, .chat-list-item, .notif-item, .frame-shop-card {
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.post-card:active, .quest-card:active { transform: scale(0.99); }

/* ===== SETTINGS SECTION ===== */
.social-links-btn { margin-top: 8px; }

/* ===== HIDE ONLINE STATUS TOGGLE ===== */
.privacy-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text);
}

/* ===== MSG REPLY PREVIEW (in bubble) ===== */
.msg-reply-preview {
  font-size: 11px;
  color: var(--text-faint);
  border-left: 2px solid var(--accent);
  padding: 2px 6px;
  margin-bottom: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ===== ADMIN REPORT CARD ===== */
.admin-report-card {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  animation: fadeUp 0.2s ease both;
}

/* ===== QUEST COINS BAR ===== */
.quests-coins-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

/* ===== VIDEO CIRCLES ===== */
.post-video-circle-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
.post-video-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(0,0,0,0.22);
  cursor: pointer;
}
.msg-video-circle-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.msg-video-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 14px rgba(0,0,0,0.20);
  cursor: pointer;
}

/* ===== PAID REACTIONS DISPLAY ===== */
.paid-reactions-display {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 14px 2px;
}
.paid-react-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #f5c518 0%, #ff9500 100%);
  color: #000;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(245,197,24,0.4);
  animation: paidReactIn 0.3s ease;
}
@keyframes paidReactIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===== GIFTS ===== */
.gift-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.gift-card:hover { background: var(--bg-hover); }
.gift-emoji {
  font-size: 40px;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.gift-info { flex: 1; min-width: 0; }
.gift-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.gift-rarity {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.7;
}
.gift-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 6px;
}
.gift-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gift-price {
  font-weight: 700;
  font-size: 13px;
  color: #f5c518;
}

/* ===== CHANNEL IMPROVEMENTS ===== */
.channel-pinned {
  border-left: 3px solid var(--accent) !important;
  background: var(--bg-hover) !important;
}
.ch-lvl-badge {
  font-size: 11px;
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text-muted);
}
.channel-level-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.channel-level-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.channel-level-item.level-unlocked { opacity: 1; }
.channel-level-item.level-locked { opacity: 0.55; }
.channel-level-item.current-level {
  background: rgba(0,0,0,0.07);
  border-left: 3px solid var(--accent);
}
.channel-level-num {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  line-height: 1;
}
.channel-level-desc { flex: 1; font-size: 12px; }
.channel-energy-fill { transition: width 0.6s ease; }

/* ===== RARITY BADGE COLORS ===== */
.gift-card[data-rarity="legendary"] .gift-emoji { filter: drop-shadow(0 2px 12px gold); }

/* ===== IN-APP NOTIFICATIONS (bottom right) ===== */
.inapp-notif {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 9999;
  max-width: 320px;
  min-width: 240px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  cursor: pointer;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  animation: none;
}
.inapp-notif.show { transform: translateX(0); }
.inapp-notif-icon { font-size: 22px; flex-shrink: 0; }
.inapp-notif-body {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.inapp-notif-close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
}
.inapp-notif-close:hover { color: var(--text); }

/* ===== READ RECEIPTS ===== */
.msg-read-tick { font-size: 10px; opacity: 0.5; }
.msg-read-tick.read { color: var(--accent); opacity: 0.9; }

/* ===== CIRCLE FULLSCREEN ===== */
#circle-fullscreen-overlay {
  animation: fadeIn 0.15s ease;
}

/* ===== MOBILE QUESTS FIX ===== */
@media (max-width: 480px) {
  .quests-coins-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .quests-coins-bar > div:last-child {
    flex-wrap: wrap;
    gap: 4px;
  }
  .quests-coins-bar .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
  }
  .quests-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .quests-tab {
    padding: 8px 10px;
    font-size: 11px;
  }
  .quest-card {
    padding: 10px 12px;
  }
  .quest-title {
    font-size: 13px;
  }
  .quest-desc {
    font-size: 11px;
  }
}

/* ===== CHANNEL VERIFIED BADGE ===== */
.channel-verified-badge {
  display: inline-block;
  color: #22c55e;
  font-size: 14px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ===== CHANNEL LEVEL PERKS LOCKED/UNLOCKED ===== */
.level-locked-btn {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ===== GLOBAL BEAUTIFUL CHECKMARKS ===== */
/* Custom checkbox using CSS */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transform: scale(1.1);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2.5px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
input[type="checkbox"]:hover { border-color: var(--accent); transform: scale(1.05); }

/* ===== BEAUTIFUL SVG CHECKMARK COMPONENT ===== */
.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
  flex-shrink: 0;
  animation: checkPop 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
.check-icon svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.5; fill: none; }
@keyframes checkPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== POST VIEWS ===== */
.post-views {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-faint);
  padding: 4px 12px 6px;
}
.post-views svg { opacity: 0.5; }

/* ===== VOICE UNDER POST ===== */
.post-voice-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: var(--bg-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text-muted);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.post-voice-btn:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.post-voice-btn.recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; border-color: transparent;
  animation: pulseMic 1s ease infinite;
}
@keyframes pulseMic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ===== HOLD TO RECORD VOICE ===== */
#voice-btn.hold-recording {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border-color: transparent !important;
  animation: pulseMic 0.8s ease infinite;
  transform: scale(1.15);
}
#voice-btn { touch-action: none; }

/* ===== PINNED MESSAGE COST ===== */
.msg-pin-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; color: var(--accent);
  background: rgba(0,0,0,0.07);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-weight: 700;
}

/* ===== HASHTAG TRENDING ===== */
.trending-hashtags {
  padding: 14px 16px;
}
.trending-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.hashtag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  background: var(--bg-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  margin: 4px;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  animation: chipIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
.hashtag-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px) scale(1.05); }
.hashtag-chip .chip-count { font-size: 10px; opacity: 0.7; }
@keyframes chipIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* ===== CAPTCHA ===== */
.captcha-box {
  background: var(--bg-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.captcha-problem {
  font-size: 18px; font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 10px;
  font-family: var(--font-display);
  letter-spacing: 1px;
}

/* ===== WHAT'S NEW BUTTON ===== */
.whats-new-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: var(--r-full);
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  animation: glowPulse 2.5s ease infinite;
  border: none;
  letter-spacing: 0.2px;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,0,0,0.22); }
  50% { box-shadow: 0 0 16px rgba(0,0,0,0.40); }
}

/* ===== LOGO AREA ===== */
.logo {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.logo-wrap { display: flex; align-items: center; gap: 0; }

/* ===== CHANGELOG MODAL ===== */
.changelog-entry {
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--bg-hover);
  animation: fadeIn 0.3s ease both;
}
.changelog-version {
  font-size: 11px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 4px;
}
.changelog-date { font-size: 10px; color: var(--text-faint); float: right; }
.changelog-item { font-size: 12px; color: var(--text-muted); display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; }
.changelog-item::before { content: '✦'; color: var(--accent); font-size: 10px; flex-shrink: 0; margin-top: 1px; }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
  display: flex; gap: 4px;
}
.lang-btn {
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: none;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-color: transparent;
}

/* ===== SETTINGS LEGAL LINKS ===== */
.settings-legal-links {
  display: flex; gap: 8px; padding: 16px 0;
  flex-wrap: wrap; justify-content: center;
}
.settings-legal-btn {
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: none;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.settings-legal-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== PRIVACY EXTENDED SETTINGS ===== */
.privacy-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.privacy-row:last-child { border-bottom: none; }
.privacy-label { font-size: 13px; color: var(--text); font-weight: 500; }
.privacy-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ===== NOTIFICATION POPUP IMPROVED ===== */
.inapp-notif {
  border-radius: var(--r-lg) !important;
  border: 1.5px solid var(--border) !important;
  backdrop-filter: blur(12px);
}
body.dark .inapp-notif {
  background: rgba(22,22,42,0.95) !important;
}

/* ===== NAV BAR ROUNDED ===== */
.nav-bar {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
}

/* ===== TOP BAR ===== */
.top-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
}

/* ===== CARDS ROUNDED ===== */
.user-card { border-radius: var(--r-lg); overflow: hidden; border-color: var(--border); }
.settings-card { border-radius: var(--r-lg) !important; }
.notif-item { border-radius: var(--r-md); }
.channel-card { border-radius: var(--r-lg); }
.frame-shop-card { border-radius: var(--r-lg); overflow: hidden; }

/* ===== MESSAGE BUBBLES ROUNDED ===== */
.message-bubble {
  border-radius: var(--r-lg) !important;
}
.message-item.mine .message-bubble {
  border-radius: var(--r-lg) var(--r-sm) var(--r-lg) var(--r-lg) !important;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
}
.message-item:not(.mine) .message-bubble {
  border-radius: var(--r-sm) var(--r-lg) var(--r-lg) var(--r-lg) !important;
  background: var(--bg-card) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

/* ===== MSG READ TICKS BEAUTIFUL ===== */
.msg-read-tick {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex; align-items: center;
}
.msg-read-tick.read {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== COMMENT AVATAR ROUNDED ===== */
.comment-avatar { border-radius: 50%; }

/* ===== SEARCH INPUT ROUNDED ===== */
.search-box input { border-radius: var(--r-full); }

/* ===== IOS EMOJI STYLE ===== */
img.emoji {
  height: 1.2em;
  width: 1.2em;
  vertical-align: middle;
  display: inline-block;
  margin: 0 1px;
}

/* ===== VOICE WAVEFORM ===== */
.voice-wave {
  display: flex; align-items: center; gap: 2px; height: 28px;
}
.voice-bar {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  animation: waveAnim var(--d, 0.8s) ease infinite alternate;
}
@keyframes waveAnim { from { height: 4px; } to { height: var(--h, 20px); } }

/* ===== TOGGLE SLIDER ROUNDED ===== */
.toggle-slider { border-radius: var(--r-full) !important; }
.toggle-slider::after { border-radius: 50% !important; }
.toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
}

/* ===== AUTH TABS ROUNDED ===== */
.auth-tab { border-radius: var(--r-md); }
.auth-tab.active { background: var(--accent) !important; color: var(--accent-fg) !important; }

/* ===== QUESTS TAB ROUNDED ===== */
.quests-tab.active { color: var(--accent) !important; border-bottom-color: var(--accent) !important; }

/* ===== DISABLE COPY GLOBALLY, ALLOW ONLY USERNAME ===== */
.copyable-username {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* ═══════════════════════════════════════════════
   SIDIME v14 — PREMIUM DESIGN OVERHAUL
   ═══════════════════════════════════════════════ */

/* ── GLOBAL ROUNDNESS & SMOOTHNESS ── */
:root {
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-full: 9999px;
  --transition: 0.22s cubic-bezier(0.34,1.02,0.64,1);
  --shadow-soft: 0 2px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lift: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  --glow: 0 0 0 3px rgba(0,0,0,0.12);
}

/* Smooth everything */
*, *::before, *::after {
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
button, a, label { transition: var(--transition) !important; }

/* Button hover lift */
.btn:hover { opacity: 0.85; transform: none; box-shadow: none !important; }
.btn:active { transform: translateY(0px) scale(0.98); }

/* Card entrance animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.post-card { animation: slideUp 0.28s cubic-bezier(0.34,1.02,0.64,1) both; }
.message-wrap { animation: slideUp 0.22s ease both; }
.notif-item { animation: slideUp 0.2s ease both; }
.modal { animation: popIn 0.25s cubic-bezier(0.34,1.2,0.64,1) both; }

/* Staggered card animations */
.post-card:nth-child(1) { animation-delay: 0.02s; }
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.08s; }
.post-card:nth-child(4) { animation-delay: 0.11s; }
.post-card:nth-child(5) { animation-delay: 0.14s; }

/* Post cards more rounded */
.post-card {
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-soft) !important;
  overflow: hidden;
  border: none !important;
  margin: 8px 0 !important;
}
.post-card:hover { box-shadow: var(--shadow-lift) !important; transform: translateY(-1px); }

/* Message bubbles ultra-rounded */
.message-item.mine .message-bubble {
  border-radius: 20px 4px 20px 20px !important;
}
.message-item:not(.mine) .message-bubble {
  border-radius: 4px 20px 20px 20px !important;
}

/* Input fields rounded */
input[type="text"], input[type="password"], input[type="number"], input[type="email"], textarea, select {
  border-radius: var(--r-md) !important;
  transition: box-shadow 0.18s ease, border-color 0.18s ease !important;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  box-shadow: var(--glow) !important;
  outline: none !important;
}

/* Modals rounder */
.modal {
  border-radius: var(--r-xl) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.15) !important;
}

/* Nav items more polished */
.nav-item { border-radius: var(--r-md) !important; }
.nav-item.active { 
  background: linear-gradient(135deg, rgba(0,0,0,0.10), rgba(0,0,0,0.07)) !important;
}

/* Notification badges polished */
.notif-badge {
  border-radius: var(--r-full) !important;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  animation: popIn 0.2s ease;
}

/* ── BEAUTIFUL CUSTOM CHECKMARKS EVERYWHERE ── */
/* Replaces plain ✓ text with styled versions */
.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
  flex-shrink: 0;
}
.check-icon svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; fill: none; }

/* Checkbox-style toggle */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.custom-checkbox input { display: none; }
.custom-checkbox .cb-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s cubic-bezier(0.34,1.2,0.64,1);
  flex-shrink: 0;
}
.custom-checkbox input:checked + .cb-box {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
  transform: scale(1.08);
}
.custom-checkbox input:checked + .cb-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* Settings toggles beautiful */
.toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.20) !important;
}

/* Read receipts beautiful SVG */
.msg-read-tick {
  display: inline-flex;
  align-items: center;
  margin-left: 3px;
  opacity: 0.6;
}
.msg-read-tick svg { width: 16px; height: 10px; }
.msg-read-tick.read svg { filter: drop-shadow(0 0 2px rgba(0,0,0,0.28)); }

/* Quest claim buttons beautiful */
.quest-claim-btn {
  border-radius: 4px !important;
  background: var(--accent) !important;
  color: var(--accent-fg) !important;
  box-shadow: none !important;
  animation: popIn 0.3s ease;
}

/* ── USERNAME COPY BUTTON ── */
.username-copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.copy-username-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--bg-hover);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
}
.copy-username-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.copy-username-btn.copied {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

/* ── ADVANCED PRIVACY SETTINGS ── */
.privacy-setting-group {
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--bg-card);
}
.privacy-setting-group label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.privacy-select {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}

/* ── LIVE FEED PULSE ── */
.new-posts-banner {
  position: sticky;
  top: 6px;
  z-index: 10;
  margin: 0 12px 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--r-full);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.20);
  animation: popIn 0.3s cubic-bezier(0.34,1.2,0.64,1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.new-posts-banner:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.28); transform: translateY(-1px); }

/* ── DRAWING TOOLS IMPROVED ── */
.draw-cursor-dot {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  transform: translate(-50%, -50%);
  transition: width 0.08s ease, height 0.08s ease;
}
.draw-stabilizer-label {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* ── HASHTAG CHIPS BEAUTIFUL ── */
.trending-hashtags {
  padding: 12px 0;
}
.trending-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 12px 10px;
}
.hashtag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--bg-hover);
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  margin: 4px;
  transition: var(--transition);
}
.hashtag-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transform: translateY(-1px) scale(1.03);
}
.hashtag-chip .ht-count { font-size: 10px; opacity: 0.7; font-weight: 400; }

/* ── POST VOICE BEAUTIFUL ── */
.post-voice-btn {
  border-radius: var(--r-full) !important;
  background: var(--bg-hover) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-muted) !important;
  font-size: 11px !important;
  padding: 4px 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.post-voice-btn.hold-recording {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.2), 0 4px 16px rgba(239,68,68,0.3) !important;
  animation: pulse-rec 1s ease-in-out infinite !important;
}

/* ── LOGO & WHAT'S NEW BUTTON ── */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.whats-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.02em;
  
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
  50%       { box-shadow: 0 0 12px rgba(0,0,0,0.20); }
}
.whats-new-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

/* ── LANG SWITCHER BEAUTIFUL ── */
.lang-switcher {
  display: inline-flex;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: var(--bg-hover);
}
.lang-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0;
  letter-spacing: 0.05em;
  transition: all 0.18s ease !important;
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full) !important;
}
.lang-btn:hover:not(.active) { background: var(--bg-card); color: var(--text); }

/* ── CHANNEL POST COMPOSE BEAUTIFUL ── */
.channel-post-compose {
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  padding: 12px;
  margin: 8px 12px;
  box-shadow: var(--shadow-soft);
}

/* ── SETTINGS LEGAL BUTTONS ── */
.settings-legal-btn {
  border-radius: var(--r-md) !important;
  padding: 12px 16px !important;
  text-align: left !important;
  border: 1.5px solid var(--border) !important;
  background: var(--bg-card) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  margin-bottom: 8px !important;
}
.settings-legal-btn:hover {
  border-color: var(--accent) !important;
  background: rgba(0,0,0,0.04) !important;
  transform: translateX(4px) !important;
}

/* ── SCROLL BAR BEAUTIFUL ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-full); opacity: 0.5; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── MOBILE IMPROVEMENTS ── */
@media (max-width: 480px) {
  .post-card { border-radius: var(--r-md) !important; margin: 6px 0 !important; }
  .modal { border-radius: var(--r-lg) !important; }
  .whats-new-btn { display: none; } /* hide on very small screens */
}

/* ── SKELETON LOADING ── */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-card) 50%, var(--bg-hover) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

/* ── MISSING KEYFRAMES ── */
@keyframes pulse-rec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4), 0 4px 16px rgba(239,68,68,0.3); }
  50%       { box-shadow: 0 0 0 8px rgba(239,68,68,0), 0 4px 16px rgba(239,68,68,0.5); }
}

/* ── IMPROVED TOAST NOTIFICATIONS ── */
.toast {
  border-radius: var(--r-lg) !important;
  padding: 12px 18px !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.1) !important;
  backdrop-filter: blur(8px) !important;
  animation: slideUp 0.3s cubic-bezier(0.34,1.2,0.64,1) !important;
}

/* ── PROFILE USERNAME COPY ── */
.profile-username {
  flex-wrap: wrap;
  gap: 8px;
}
.copyable-username { 
  -webkit-user-select: all !important; 
  user-select: all !important;
  font-weight: 700;
}

/* ── SETTINGS PRIVACY SELECT ── */
.privacy-select {
  border-radius: var(--r-md) !important;
  padding: 8px 12px !important;
  background: var(--bg-input) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
  cursor: pointer;
  font-size: 12px !important;
  transition: border-color 0.18s ease !important;
}
.privacy-select:focus { border-color: var(--accent) !important; outline: none !important; }

/* ── NEW POSTS BANNER ── */
.new-posts-banner {
  position: sticky;
  top: 4px;
  z-index: 50;
  margin: 0 8px 10px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--r-full);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  animation: popIn 0.3s cubic-bezier(0.34,1.2,0.64,1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.new-posts-banner:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.32);
  transform: translateY(-1px);
}

/* ── FEED SKELETON LOADING ── */
.post-skeleton {
  border-radius: var(--r-lg);
  padding: 16px;
  background: var(--bg-card);
  margin: 8px 0;
  box-shadow: var(--shadow-soft);
}
.skel-row {
  border-radius: var(--r-md);
  height: 12px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-card) 50%, var(--bg-hover) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skel-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skel-name { width: 120px; height: 12px; }
.skel-text { width: 100%; }
.skel-text-short { width: 60%; }

/* ── CHANNEL VERIFIED BADGE ── */
.channel-name-row .verified-badge-channel {
  color: #22c55e;
  font-size: 16px;
  margin-left: 4px;
}

/* ══════════════════════════════════════════════
   SIDIME v14.1 — MOBILE PERFORMANCE & FIXES
   ══════════════════════════════════════════════ */

/* ── WHAT'S NEW: hidden on mobile ── */
@media (max-width: 768px) {
  .whats-new-btn { display: none !important; }
}

/* ── DISABLE HEAVY ANIMATIONS ON MOBILE ── */
@media (max-width: 768px) {
  /* Kill animations that cause lag on mobile */
  .post-card { animation: none !important; }
  .message-wrap { animation: none !important; }
  .notif-item { animation: none !important; }
  
  /* Reduce transitions */
  * { transition-duration: 0.1s !important; }
  .btn:hover { transform: none !important; } /* no lift on mobile — causes repaints */
  .post-card:hover { transform: none !important; box-shadow: var(--shadow-soft) !important; }
  
  /* Disable blur effects that kill mobile GPU */
  .toast { backdrop-filter: none !important; }
  .modal-overlay { backdrop-filter: none !important; }
  
  /* Contain paint areas */
  .post-card { contain: layout style; }
  .message-item { contain: layout style; }
  .chat-messages-container { will-change: scroll-position; }
  
  /* No glow pulse on mobile */
  .whats-new-btn { animation: none !important; }
  @keyframes glow-pulse { 0%, 100% { box-shadow: none; } }
  
  /* Disable skeleton shimmer on mobile */
  .skeleton, .skel-row { animation: none !important; background: var(--bg-hover) !important; }
}

/* ── MOBILE LAYOUT ── */
@media (max-width: 768px) {
  body { font-size: 14px; }
  
  /* Top bar compact */
  .top-bar { padding: 0 10px !important; height: 52px !important; gap: 6px !important; }
  .logo { font-size: 20px !important; }
  .logo-wrap { gap: 6px !important; }
  
  /* Nav compact */
  .bottom-nav, .nav { height: 56px !important; }
  .nav-item { padding: 6px 4px !important; min-width: 0 !important; }
  .nav-label { font-size: 9px !important; }
  
  /* Posts compact */
  .post-card { margin: 6px 0 !important; border-radius: 12px !important; }
  .post-content { padding: 10px !important; }
  .post-header { gap: 8px !important; }
  
  /* Feed container */
  #feed-posts { padding: 0 !important; }
  
  /* Search section */
  .search-box input { font-size: 14px !important; }
  
  /* Main content area no extra padding */
  #main-content { padding: 0 !important; }
  
  /* Profile section */
  .profile-cover { height: 120px !important; }
  .profile-avatar { width: 70px !important; height: 70px !important; }
  
  /* Settings compact */
  .settings-card { margin: 8px !important; padding: 12px !important; }
  
  /* Modal full-screen on mobile */
  .modal-overlay { padding: 8px !important; align-items: flex-end !important; }
  .modal { border-radius: 20px 20px 0 0 !important; max-height: 92vh !important; width: 100% !important; max-width: 100% !important; overflow-y: auto; }
  
  /* Message input area */
  .msg-input-area { padding: 6px !important; }
  
  /* Reaction buttons compact */
  .reaction-btn { padding: 3px 7px !important; font-size: 13px !important; }
  
  /* Post actions */
  .post-actions { gap: 4px !important; flex-wrap: wrap !important; }
  .post-actions button { font-size: 11px !important; padding: 4px 8px !important; }
  
  /* Reduce avatar sizes in feed */
  .post-avatar { width: 36px !important; height: 36px !important; }
  
  /* Chat */
  .message-bubble { max-width: 85% !important; }
  
  /* Hashtag chips scroll horizontally */
  .trending-hashtags .chips-wrap { overflow-x: auto; white-space: nowrap; display: block; padding-bottom: 4px; }
  .hashtag-chip { display: inline-flex !important; }
}

@media (max-width: 480px) {
  /* Ultra-compact for small phones */
  .top-bar { height: 48px !important; padding: 0 8px !important; }
  .logo { font-size: 18px !important; }
  .bottom-nav, .nav { height: 54px !important; }
  .nav-label { display: none; } /* icon only on tiny phones */
  .section-header { font-size: 15px !important; padding: 10px 12px !important; }
  
  /* Auth screen */
  .auth-box { border-radius: 16px !important; padding: 16px !important; margin: 0 8px !important; }
  
  /* Lang switcher tiny */
  .lang-btn { padding: 3px 7px !important; font-size: 10px !important; }
  
  /* Post voice button */
  .post-voice-btn { font-size: 10px !important; padding: 3px 8px !important; }
  
  /* Comments */
  .comment-item { padding: 6px 8px !important; }
  
  /* Profile username copy button */
  .copy-username-btn { font-size: 10px !important; padding: 2px 7px !important; }
}

/* ── TOUCH IMPROVEMENTS ── */
@media (hover: none) and (pointer: coarse) {
  /* Bigger tap targets */
  .btn { min-height: 40px; }
  .nav-item { min-height: 48px; }
  .post-actions button { min-height: 36px; padding: 6px 10px !important; }
  
  /* No hover states on touch */
  .btn:hover { transform: none !important; box-shadow: inherit !important; }
  .hashtag-chip:hover { transform: none !important; }
  
  /* Active states for feedback */
  .btn:active { opacity: 0.8; }
  .post-card:active { opacity: 0.95; }
  .nav-item:active { opacity: 0.7; }
}

/* ── PERFORMANCE: Reduce paint areas ── */
.chat-messages-container { overflow-anchor: auto; }
.feed-container { overflow-anchor: auto; }
img { loading: lazy; } /* hint for browsers */

/* ── 2FA CODE INPUT ── */
#twofa-code-input, #twofa-setup-code {
  font-size: 24px !important;
  letter-spacing: 0.4em !important;
  font-weight: 800 !important;
  text-align: center !important;
  padding: 14px !important;
  border-radius: 14px !important;
}

/* ── BAN SCREEN ── */
#ban-screen { font-family: var(--font-body); }

/* ── MODAL BOTTOM SHEET ON MOBILE ── */
@media (max-width: 600px) {
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal {
    border-radius: 24px 24px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    margin: 0 !important;
    overflow-y: auto;
  }
  /* Exception: full-screen modals (like drawing) */
  .modal.fullscreen { border-radius: 0 !important; max-height: 100vh !important; }
}

/* ── REDUCE STAGGERED ANIMATION DELAY ON MOBILE ── */
@media (max-width: 768px) {
  .post-card:nth-child(n) { animation-delay: 0s !important; }
}

/* ══ MOBILE PERFORMANCE FIX v14.1 ══ */
@media (max-width: 768px) {
  /* Nuclear option: disable ALL transitions/animations except critical ones */
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
  }
  /* Keep only needed transitions */
  .toggle-slider { transition: background 0.15s ease !important; }
  .toggle-slider::after { transition: transform 0.15s ease !important; }
  .modal { transition: opacity 0.15s ease !important; }
  .modal-overlay { transition: opacity 0.15s ease !important; }
  
  /* No backdrop-filter on mobile (huge GPU cost) */
  * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  
  /* Disable box-shadow on cards (GPU compositing) */
  .post-card, .message-item, .chat-list-item {
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
  }
  
  /* Disable gradient backgrounds where possible */
  .btn { background: var(--accent) !important; color: var(--accent-fg) !important; }
  .btn.btn-ghost { background: transparent !important; }
  .btn.btn-outline { background: transparent !important; color: var(--accent) !important; }
  
  /* Touch-optimized tap targets */
  .nav-item { min-height: 44px; }
  button, .btn, a { -webkit-tap-highlight-color: rgba(0,0,0,0.1); }
  
  /* Disable font-smoothing that causes repaints */
  body { -webkit-font-smoothing: auto !important; }
  
  /* No contain (can cause issues) */
  .post-card { contain: none !important; }
  
  /* Reduce scroll momentum lag */
  .chat-messages-container, #feed-posts, #notifs-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* Hide heavy visual elements */
  .whats-new-btn, .lang-switcher { display: none !important; }
}

/* ══ WHAT'S NEW BUTTON: HIDE ON ALL MOBILE ══ */
@media (max-width: 600px) {
  .whats-new-btn { display: none !important; }
  .lang-switcher { display: none !important; }
}

/* ══ CLICKABLE AVATARS ══ */
.clickable-avatar {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.clickable-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ══ MONOCHROME THEME: BUTTON CONTRAST GUARANTEES ══ */
/* Dark mode: white buttons need black text always */
body.dark .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger) {
  background: #ffffff;
  color: #0a0a0a;
}
body.dark .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger):hover {
  background: #e0e0e0;
  opacity: 1;
}
body.dark .btn-outline {
  border-color: #ffffff;
  color: #ffffff;
  background: transparent;
}
body.dark .btn-outline:hover {
  background: #ffffff;
  color: #0a0a0a;
  opacity: 1;
}

/* ══ MOBILE TYPOGRAPHY & READABILITY ══ */
@media (max-width: 600px) {
  /* Comfortable reading sizes */
  body { font-size: 14px; }
  .post-text { font-size: 14px !important; line-height: 1.65 !important; }
  .chat-bubble { font-size: 14px !important; line-height: 1.6 !important; }
  
  /* Larger tap targets */
  .btn { min-height: 44px; padding: 11px 20px; font-size: 13px; }
  .btn-sm { min-height: 36px; padding: 8px 14px; font-size: 12px; }
  
  /* Nav labels readable */
  .nav-label { font-size: 10px !important; }
  
  /* Cards — full width, no side margin bleeding */
  .post-card { border-radius: var(--r-md) !important; }
  
  /* Input comfort */
  input[type="text"], input[type="password"], textarea, select {
    font-size: 16px !important; /* prevent iOS zoom */
    padding: 13px 14px !important;
  }
}


/* ═══════════════════════════════════════════════════════
   SIDIME — ELEGANT MONOCHROME REFINEMENT
   Rectangular buttons, no glow, pure black elegance
   ═══════════════════════════════════════════════════════ */

/* ── RECTANGULAR BUTTONS — NO EXCEPTIONS ── */
.btn,
.btn-sm,
.btn-outline,
.btn-ghost,
.btn-danger,
.btn-full,
.btn-follow,
.quest-claim-btn,
.whats-new-btn,
button[class*="btn"],
.post-comments-toggle {
  border-radius: 4px !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Crisp hover: no lift, just subtle opacity shift */
.btn:hover:not(:disabled) {
  transform: none !important;
  opacity: 0.82 !important;
  box-shadow: none !important;
}
.btn:active:not(:disabled) {
  transform: scale(0.98) !important;
  opacity: 1 !important;
}

/* ── BUTTON TEXT ALWAYS READABLE ── */
/* Light mode: black button, white text */
.btn {
  background: var(--accent);
  color: var(--accent-fg);
}
/* Ensure accent-fg contrasts in both themes */
:root .btn { color: #ffffff; }
body.dark .btn { color: #0a0a0a; }

/* Outline variant */
.btn-outline {
  background: transparent !important;
  color: var(--accent) !important;
  border: 1.5px solid var(--accent) !important;
}
.btn-outline:hover {
  background: var(--accent) !important;
  color: var(--accent-fg) !important;
}

/* Ghost variant readable */
.btn-ghost {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1.5px solid var(--border) !important;
}
.btn-ghost:hover {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
}

/* ── KILL ALL GLOW PULSES ── */
@keyframes pulse { 0%, 100% { box-shadow: none; } }
@keyframes glow-pulse { 0%, 100% { box-shadow: none; } }
@keyframes glowPulse { 0%, 100% { box-shadow: none; } }
@keyframes pulseMic { 0%, 50%, 100% { box-shadow: none; transform: none; } }
@keyframes pulse-rec { 0%, 50%, 100% { box-shadow: none; } }

/* ── REACTION BUTTONS: pill shape OK (emoji reactions) ── */
.reaction-btn {
  border-radius: var(--r-full) !important;
}

/* ── POST CARDS: minimal shadow, sharp ── */
.post-card {
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
.post-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.10) !important;
  transform: none !important;
}

/* ── MODALS: sharp corners ── */
.modal {
  border-radius: 8px !important;
}

/* ── NAV: no rounded items ── */
.nav-item {
  border-radius: 4px !important;
}

/* ── INPUTS: minimal rounding ── */
input[type="text"], input[type="password"], input[type="number"],
input[type="email"], textarea, select {
  border-radius: 4px !important;
}
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 2px var(--border-strong) !important;
  outline: none !important;
}

/* ── DARK MODE: ensure btn text visible ── */
body.dark .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger) {
  background: #e8e8e8 !important;
  color: #0a0a0a !important;
  border-color: transparent !important;
}

/* ── LIGHT MODE: ensure btn text visible ── */
:root:not(body.dark) .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger),
body:not(.dark) .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger) {
  background: #0a0a0a !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* ── TYPOGRAPHY: tighter tracking for elegance ── */
.btn {
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 600;
}

/* ── AUTH SCREEN: sharp card ── */
.auth-card {
  border-radius: 8px !important;
}

/* ── TOAST: sharp ── */
.toast, .post-comments-toggle {
  border-radius: 4px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.20) !important;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  opacity: 0.3;
  border-radius: 0 !important;
}
::-webkit-scrollbar-track { background: transparent; }

/* ═══════════════════════════════════════════════════════
   ADMIN EXCLUSIVE FRAME — Elegant Monochrome
   ═══════════════════════════════════════════════════════ */

.frame-admin-section {
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  padding: 16px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

/* Subtle corner accent lines */
.frame-admin-section::before,
.frame-admin-section::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--border-strong);
  border-style: solid;
}
.frame-admin-section::before {
  top: 0; left: 0;
  border-width: 2px 0 0 2px;
}
.frame-admin-section::after {
  bottom: 0; right: 0;
  border-width: 0 2px 2px 0;
}

.frame-admin-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.frame-admin-icon {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 1px;
}

.frame-admin-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: var(--text);
  text-transform: uppercase;
}

.frame-admin-subtext {
  text-align: center;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

/* Admin frame card: full-width, horizontal layout */
.frame-admin-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  padding: 12px !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  width: 100%;
}

.frame-admin-preview {
  border: 1.5px solid var(--border-strong) !important;
  flex-shrink: 0;
  background: #0a0a0a !important;
  width: 70px !important;
  height: 70px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-admin-preview svg {
  width: 60px !important;
  height: 60px !important;
}

.frame-admin-name {
  font-family: var(--font-display) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2em !important;
  color: var(--text) !important;
}

.frame-admin-rarity {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.25em !important;
  color: var(--text-muted) !important;
  text-transform: uppercase;
  margin: 2px 0 !important;
}

.frame-admin-owned {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.frame-admin-buy {
  letter-spacing: 0.06em !important;
  font-weight: 700 !important;
}

/* Dark mode: admin section gets a very subtle tint */
body.dark .frame-admin-section {
  background: #111111;
}
body.dark .frame-admin-preview {
  background: #080808 !important;
}
body.dark .frame-admin-card {
  background: #0d0d0d !important;
}



/* ══════════════════════════════════════════════════════
   CUSTOMIZATION UI
══════════════════════════════════════════════════════ */

/* pill groups */
.custom-theme-pills,
.custom-radius-pills,
.custom-size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.theme-pill, .radius-pill {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.theme-pill.active, .radius-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-hover);
}
.theme-pill:hover, .radius-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.size-pill {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 700;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.size-pill:nth-child(1) { font-size: 12px; }
.size-pill:nth-child(2) { font-size: 16px; }
.size-pill:nth-child(3) { font-size: 20px; }
.size-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-hover);
}
.size-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Compact mode */
body.compact-mode .post-card { padding: 10px 12px !important; }
body.compact-mode .profile-hero { padding: 12px !important; }
body.compact-mode .section-header { padding: 8px 12px !important; font-size: 14px !important; }
body.compact-mode .settings-card { padding: 10px 12px !important; }
body.compact-mode .settings-item { padding: 6px 0 !important; }
body.compact-mode .nav-item { height: 52px !important; }
body.compact-mode .nav-label, body.compact-mode .nav-item span { font-size: 9px !important; }


/* ══════════════════════════════════════════════════════════
   ANIMATED STICKER REACTIONS
══════════════════════════════════════════════════════════ */
.post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.sticker-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  min-width: 44px;
}
.sticker-btn:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: scale(1.08);
}
.sticker-btn.sticker-btn-active {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.sticker-btn.sticker-just-reacted {
  animation: sticker-pop 0.35s ease;
}
@keyframes sticker-pop {
  0%  { transform: scale(1); }
  50% { transform: scale(1.3); }
  100%{ transform: scale(1); }
}

.sticker-svg {
  width: 32px;
  height: 32px;
  display: block;
}
.sticker-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-height: 14px;
  line-height: 1;
}
.sticker-btn-active .sticker-count {
  color: var(--accent);
}

/* ── Message reaction picker ── */
.msg-reaction-picker {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: picker-appear 0.15s ease;
}
@keyframes picker-appear {
  from { opacity:0; transform: scale(0.8) translateY(4px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.msg-react-em-btn {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s, transform 0.1s;
}
.msg-react-em-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.2);
}

/* ── Comment reply ── */
.comment-reply-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 11px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.1s;
}
.comment-reply-btn:hover { color: var(--accent); }

.comment-reply-ref {
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 2px;
  padding: 2px 6px;
  background: var(--bg-hover);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
}

.comment-reply-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-hover);
  border-left: 2px solid var(--accent);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
}
.cancel-comment-reply {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  margin-left: auto;
}

/* ── Notification link ── */
.notif-link {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
}
.notif-item[style*="cursor"] .notif-body {
  text-decoration: none;
}
/* ══════════════════════════════════════════════════════
   MODERATOR EXCLUSIVE FRAME SECTION
══════════════════════════════════════════════════════ */
.frame-moder-section {
  border: 1px solid rgba(59,130,246,0.35);
  background: var(--bg-card);
  padding: 16px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.frame-moder-section::before,
.frame-moder-section::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(59,130,246,0.4);
  border-style: solid;
}
.frame-moder-section::before {
  top: 0; left: 0;
  border-width: 2px 0 0 2px;
}
.frame-moder-section::after {
  bottom: 0; right: 0;
  border-width: 0 2px 2px 0;
}

.frame-moder-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.frame-moder-icon {
  font-size: 10px;
  color: #3b82f6;
  letter-spacing: 1px;
  opacity: 0.7;
}

.frame-moder-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 30%, #93c5fd 50%, #3b82f6 70%, #1d4ed8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: moder-label-shimmer 2s linear infinite;
}

@keyframes moder-label-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.frame-moder-subtext {
  text-align: center;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.frame-moder-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px;
  background: var(--bg) !important;
  border: 1px solid rgba(59,130,246,0.25) !important;
  padding: 12px !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  width: 100%;
}

.frame-moder-preview {
  border: 1.5px solid rgba(59,130,246,0.4) !important;
  flex-shrink: 0;
  background: #060c1a !important;
  width: 70px !important;
  height: 70px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-moder-preview svg {
  width: 60px !important;
  height: 60px !important;
}

.frame-moder-name {
  font-family: var(--font-display) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2em !important;
  background: linear-gradient(90deg, #3b82f6, #93c5fd, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
}

.frame-moder-rarity {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.25em !important;
  color: #3b82f6 !important;
  text-transform: uppercase;
  margin: 2px 0 !important;
}

.frame-moder-owned {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #60a5fa;
  text-transform: uppercase;
}

.frame-moder-buy {
  letter-spacing: 0.06em !important;
  font-weight: 700 !important;
  border-color: rgba(59,130,246,0.5) !important;
  color: #60a5fa !important;
}
.frame-moder-buy:hover {
  background: rgba(59,130,246,0.12) !important;
}

body.dark .frame-moder-section {
  background: #080d1a;
}
body.dark .frame-moder-preview {
  background: #040810 !important;
}
body.dark .frame-moder-card {
  background: #07101f !important;
}


/* ══ TOPBAR ICON BUTTONS (notifications + settings) ══ */
.topbar-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.topbar-icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.topbar-icon-btn .nav-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  background: #e53e3e;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--bg-card);
}

/* ══ PROFILE: posts list inside profile section ══ */
#profile-posts-list .post-card {
  margin: 0 0 2px;
}

/* ══ SETTINGS: standalone section ══ */
#settings-section .settings-card {
  margin: 0 0 2px;
}

/* ── ADMIN QUEST BANNER (in daily quests tab) ── */
.admin-quest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}

/* Corner decorations */
.admin-quest-banner::before,
.admin-quest-banner::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--text-faint);
  border-style: solid;
}
.admin-quest-banner::before { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.admin-quest-banner::after  { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

.admin-quest-banner-left {
  flex: 1;
  min-width: 0;
}

.admin-quest-banner-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.admin-quest-banner-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 3px;
}

.admin-quest-banner-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-quest-banner-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Fix: avatar edit button must be above frame overlay */
.profile-avatar-edit {
  z-index: 10 !important;
  pointer-events: auto !important;
}

/* Fix: frame overlay must not block clicks on edit button */
.av-frame-overlay {
  z-index: 3 !important;
  pointer-events: none !important;
}

/* ── ADMIN ROLE BADGE — animated red shimmer ── */
.admin-role-badge {
  display: inline-block;
  font-family: var(--font-display) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  border: 1px solid rgba(220, 38, 38, 0.6) !important;
  background-color: rgba(220, 38, 38, 0.1) !important;
  background-image: linear-gradient(
    90deg,
    #cc0000 0%,
    #ff3333 15%,
    #ff6666 30%,
    #ffffff 45%,
    #ff3333 60%,
    #cc0000 75%,
    #ff1a1a 90%,
    #cc0000 100%
  ) !important;
  background-size: 250% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: admin-shimmer 1.8s linear infinite !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.3);
}

@keyframes admin-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

/* ── MODERATOR ROLE BADGE — animated blue shimmer ── */
.moder-role-badge {
  display: inline-block;
  font-family: var(--font-display) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  border: 1px solid rgba(37, 99, 235, 0.6) !important;
  background-color: rgba(37, 99, 235, 0.1) !important;
  background-image: linear-gradient(
    90deg,
    #1d4ed8 0%,
    #3b82f6 15%,
    #93c5fd 30%,
    #ffffff 45%,
    #3b82f6 60%,
    #1d4ed8 75%,
    #60a5fa 90%,
    #1d4ed8 100%
  ) !important;
  background-size: 250% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: moder-shimmer 1.8s linear infinite !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.3);
}

@keyframes moder-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

/* ── TECH ADMIN ROLE BADGE — animated yellow-orange shimmer ── */
.tech-admin-role-badge {
  display: inline-block;
  font-family: var(--font-display) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  border: 1px solid rgba(234, 120, 20, 0.6) !important;
  background-color: rgba(234, 120, 20, 0.1) !important;
  background-image: linear-gradient(
    90deg,
    #b45309 0%,
    #d97706 12%,
    #f59e0b 25%,
    #fbbf24 37%,
    #fde68a 50%,
    #fbbf24 62%,
    #f59e0b 75%,
    #d97706 87%,
    #b45309 100%
  ) !important;
  background-size: 250% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: tech-admin-shimmer 1.6s linear infinite !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(234, 120, 20, 0.35);
}

@keyframes tech-admin-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

/* ── ADMIN POST CARD — red animated border ── */
.post-card--admin {
  border: 1.5px solid transparent !important;
  border-image: linear-gradient(
    90deg,
    rgba(220,38,38,0.8), rgba(255,100,100,0.9), rgba(220,38,38,0.8)
  ) 1 !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.18), var(--shadow) !important;
  animation-name: post-card-admin-border !important;
  background-image: linear-gradient(var(--bg-card), var(--bg-card)),
    linear-gradient(90deg, rgba(220,38,38,0.6) 0%, rgba(255,80,80,0.8) 50%, rgba(220,38,38,0.6) 100%) !important;
  background-origin: border-box !important;
  border-radius: 12px !important;
}

/* ── MODERATOR POST CARD — blue animated border ── */
.post-card--moder {
  border: 1.5px solid transparent !important;
  border-image: linear-gradient(
    90deg,
    rgba(37,99,235,0.8), rgba(96,165,250,0.9), rgba(37,99,235,0.8)
  ) 1 !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.18), var(--shadow) !important;
  background-image: linear-gradient(var(--bg-card), var(--bg-card)),
    linear-gradient(90deg, rgba(37,99,235,0.6) 0%, rgba(96,165,250,0.8) 50%, rgba(37,99,235,0.6) 100%) !important;
  background-origin: border-box !important;
  border-radius: 12px !important;
}

/* ===== LEADERBOARD ===== */
.lb-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.lb-tab {
  flex: 1;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  background: var(--bg-hover);
  color: var(--text-muted);
  transition: all 0.12s;
}
.lb-tab.active {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
  border-bottom: 1px solid var(--bg-card);
  margin-bottom: -1px;
  z-index: 1;
  position: relative;
}

/* Podium */
.lb-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px 0;
}
.lb-podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  max-width: 100px;
}
.lb-pod-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.lb-pod-val {
  font-size: 10px;
  color: var(--text-muted);
}
.lb-pod-bar {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  margin-top: 6px;
}

/* List rows */
.lb-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.lb-row:hover { background: var(--bg-hover); }
.lb-row.lb-me {
  background: rgba(42,171,238,0.06);
  border-left: 3px solid #2aabee;
}
.lb-rank {
  width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lb-av { flex-shrink: 0; }
.lb-info { flex: 1; min-width: 0; }
.lb-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}
.lb-val {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* My position separator */
.lb-my-pos {
  border-top: 2px dashed var(--border);
  margin-top: 4px;
}
.lb-sep-label {
  text-align: center;
  font-size: 10px;
  color: var(--text-faint);
  padding: 5px 0 2px;
}

/* Total count */
.lb-total {
  text-align: center;
  font-size: 10px;
  color: var(--text-faint);
  padding: 10px;
}

/* ═══════════════════════════════════════════════════════════
   STICKER REACTIONS
═══════════════════════════════════════════════════════════ */
.post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.sticker-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 3px 8px 3px 5px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1;
}
.sticker-btn:active { transform: scale(0.93); }
.sticker-btn:hover  { border-color: var(--accent); background: var(--bg-hover); color: var(--text); }
.sticker-btn.sticker-btn-active { border-color: var(--accent); background: var(--bg-hover); color: var(--accent); }
.sticker-btn.sticker-just-reacted { animation: sticker-pop 0.35s ease; }
@keyframes sticker-pop {
  0%  { transform: scale(1); }
  45% { transform: scale(1.3) rotate(-5deg); }
  100%{ transform: scale(1); }
}

.sticker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.sticker-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
}
.sticker-count {
  font-size: 11px;
  font-weight: 700;
  min-width: 6px;
  color: inherit;
}

/* ── Message reactions real-time ── */
.msg-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 15px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 6px;
  cursor: default;
  margin: 2px 2px 0 0;
}
.msg-react-cnt {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.msg-reaction-new { animation: reaction-pop 0.3s ease; }
@keyframes reaction-pop {
  0%  { transform: scale(0.5); opacity:0; }
  70% { transform: scale(1.2); }
  100%{ transform: scale(1); opacity:1; }
}

/* ── Read tick animation ── */
.msg-read-tick { display:inline-flex; vertical-align:middle; }
.msg-read-tick svg { width:22px; height:10px; }
.msg-read-tick.read { color: #6366f1; }
.msg-read-tick.read-anim { animation: tick-read 0.5s ease; }
@keyframes tick-read {
  0%  { transform: scale(1); }
  40% { transform: scale(1.4); }
  100%{ transform: scale(1); }
}

/* ── Reply preview in chat input ── */
.reply-preview {
  display: flex;
  align-items: stretch;
  background: var(--bg-hover);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.reply-preview-bar {
  width: 3px;
  background: var(--accent);
  flex-shrink: 0;
}
.reply-preview-content {
  flex: 1;
  padding: 6px 8px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.reply-preview-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reply-preview-text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reply-preview-close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 15px;
  padding: 0 10px;
  flex-shrink: 0;
}
.reply-preview-close:hover { color: var(--text); }

/* ── Sent message reply quote ── */
.msg-reply-preview {
  font-size: 11px;
  color: var(--text-faint);
  border-left: 2px solid var(--accent);
  padding: 3px 8px;
  margin-bottom: 5px;
  border-radius: 0 4px 4px 0;
  background: rgba(0,0,0,0.06);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark .msg-reply-preview { background: rgba(255,255,255,0.05); }

/* ── Comment reply ── */
.comment-reply-btn {
  background: none; border: none;
  color: var(--text-faint); font-size: 11px;
  cursor: pointer; padding: 0 4px;
  transition: color 0.1s;
}
.comment-reply-btn:hover { color: var(--accent); }
.comment-reply-ref {
  font-size: 11px; color: var(--accent);
  margin-bottom: 3px; padding: 2px 6px;
  background: var(--bg-hover);
  border-left: 2px solid var(--accent);
  border-radius: 0 3px 3px 0;
}
.comment-reply-indicator {
  display: flex; align-items: center;
  padding: 4px 8px;
  background: var(--bg-hover);
  border-left: 2px solid var(--accent);
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
}
.cancel-comment-reply {
  background:none; border:none;
  color:var(--text-faint); cursor:pointer;
  font-size:13px; padding:0; margin-left:auto;
}
.cancel-comment-reply:hover { color: var(--text); }

/* ── Topbar icon buttons ── */
.topbar-icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.topbar-icon-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.topbar-icon-btn .nav-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  background: #e53e3e; color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--bg-card);
}

/* ── Customization pills ── */
.custom-theme-pills, .custom-radius-pills, .custom-size-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px;
}
.theme-pill, .radius-pill {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px; font-weight: 600;
  border-radius: var(--r-full, 9999px);
  cursor: pointer; transition: all 0.15s;
}
.theme-pill.active, .radius-pill.active,
.theme-pill:hover, .radius-pill:hover {
  border-color: var(--accent); color: var(--accent); background: var(--bg-hover);
}
.size-pill {
  width:36px; height:36px;
  border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text-muted);
  font-weight:700; border-radius:4px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.size-pill:nth-child(1){font-size:12px}
.size-pill:nth-child(2){font-size:16px}
.size-pill:nth-child(3){font-size:20px}
.size-pill.active, .size-pill:hover { border-color:var(--accent); color:var(--accent); background:var(--bg-hover); }

/* ── Compact mode ── */
body.compact-mode .post-card { padding: 10px 12px !important; }
body.compact-mode .settings-card { padding: 10px 12px !important; }
body.compact-mode .settings-item { padding: 6px 0 !important; }

/* ── Moder frame section ── */
.frame-moder-section {
  border: 1px solid rgba(59,130,246,0.35);
  background: var(--bg-card);
  padding: 16px; margin-bottom: 4px;
  position: relative; overflow: hidden;
}
.frame-moder-section::before, .frame-moder-section::after {
  content:''; position:absolute; width:24px; height:24px;
  border-color:rgba(59,130,246,0.4); border-style:solid;
}
.frame-moder-section::before { top:0;left:0; border-width:2px 0 0 2px; }
.frame-moder-section::after  { bottom:0;right:0; border-width:0 2px 2px 0; }
.frame-moder-header { display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:4px; }
.frame-moder-icon  { font-size:10px; color:#3b82f6; opacity:.7; }
.frame-moder-label {
  font-size:11px; font-weight:800; letter-spacing:.35em; text-transform:uppercase;
  background: linear-gradient(90deg,#1d4ed8,#3b82f6,#93c5fd,#3b82f6,#1d4ed8);
  background-size:200% auto;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  animation: moder-label-shimmer 2s linear infinite;
}
@keyframes moder-label-shimmer { 0%{background-position:0%}100%{background-position:200%} }
.frame-moder-subtext { text-align:center; font-size:10px; color:var(--text-faint); margin-bottom:14px; }
.frame-moder-card {
  display:flex !important; flex-direction:row !important; align-items:center !important;
  gap:16px; background:var(--bg) !important;
  border:1px solid rgba(59,130,246,0.25) !important;
  padding:12px !important; border-radius:4px !important; width:100%;
}
.frame-moder-preview { border:1.5px solid rgba(59,130,246,0.4) !important; flex-shrink:0; background:#060c1a !important; width:70px !important; height:70px !important; display:flex; align-items:center; justify-content:center; }
.frame-moder-preview svg { width:60px !important; height:60px !important; }
.frame-moder-name {
  font-size:15px !important; font-weight:800 !important; letter-spacing:.2em !important;
  background:linear-gradient(90deg,#3b82f6,#93c5fd,#3b82f6);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.frame-moder-rarity { font-size:10px !important; font-weight:700 !important; letter-spacing:.25em !important; color:#3b82f6 !important; }
.frame-moder-owned  { font-size:10px; font-weight:700; letter-spacing:.1em; color:#60a5fa; }
.frame-moder-buy    { letter-spacing:.06em !important; font-weight:700 !important; border-color:rgba(59,130,246,.5) !important; color:#60a5fa !important; }
.frame-moder-buy:hover { background:rgba(59,130,246,.12) !important; }
body.dark .frame-moder-section { background:#080d1a; }
body.dark .frame-moder-preview { background:#040810 !important; }
body.dark .frame-moder-card    { background:#07101f !important; }

/* ═══════════════════════════════════════════
   VIDEO FEED
═══════════════════════════════════════════ */
#video-feed-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#video-feed-overlay.active { display: flex; }

.vf-player-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.vf-slides {
  display: flex;
  flex-direction: column;
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
}
.vf-slide {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
}
.vf-slide video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* top bar */
.vf-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  pointer-events: none;
}
.vf-topbar > * { pointer-events: all; }
.vf-btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.18s, opacity 0.3s;
}
.vf-btn-icon:hover { background: rgba(255,255,255,0.22); }
.vf-autopay-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s;
  letter-spacing: 0.03em;
}
.vf-autopay-btn.on { background: rgba(255,200,0,0.35); color: #ffe066; }
.vf-autopay-btn:hover { background: rgba(255,255,255,0.22); }

/* right sidebar */
.vf-sidebar {
  position: absolute;
  right: 12px;
  bottom: 120px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  transition: opacity 0.3s;
}
.vf-sidebar.hidden { opacity: 0; pointer-events: none; }
.vf-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
}
.vf-action-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.15s;
}
.vf-action-btn:active { transform: scale(0.88); }
.vf-action-btn.liked { background: rgba(255,60,100,0.35); color: #ff4466; }
.vf-action-count { font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

/* bottom info */
.vf-bottom {
  position: absolute;
  left: 0; right: 70px; bottom: 0;
  z-index: 10;
  padding: 16px 16px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  transition: opacity 0.3s;
}
.vf-bottom.hidden { opacity: 0; pointer-events: none; }
.vf-username { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.vf-caption { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.4; }

/* hide-ui toggle (invisible but tappable) */
.vf-hide-toggle {
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  z-index: 11;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Comments sheet */
.vf-comments-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70%;
  background: rgba(18,18,18,0.97);
  border-radius: 20px 20px 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
}
.vf-comments-sheet.open { transform: translateY(0); }
.vf-sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.vf-sheet-title {
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.vf-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vf-comment {
  display: flex;
  gap: 10px;
}
.vf-comment-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #333;
}
.vf-comment-body { flex: 1; min-width: 0; }
.vf-comment-username { font-size: 13px; font-weight: 700; color: #fff; }
.vf-comment-text { font-size: 13px; color: rgba(255,255,255,0.8); margin: 2px 0 6px; line-height: 1.4; }
.vf-comment-actions { display: flex; gap: 12px; align-items: center; }
.vf-comment-action-btn {
  background: none; border: none; color: rgba(255,255,255,0.45);
  font-size: 12px; cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 4px;
  transition: color 0.15s;
}
.vf-comment-action-btn:hover { color: #fff; }
.vf-comment-action-btn.liked { color: #ff4466; }
.vf-replies { margin-top: 8px; padding-left: 4px; display: flex; flex-direction: column; gap: 10px; }
.vf-replies.collapsed { display: none; }
.vf-show-replies-btn {
  background: none; border: none;
  color: rgba(100,180,255,0.85); font-size: 12px;
  cursor: pointer; padding: 2px 0; text-align: left;
}
.vf-comment-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  align-items: center;
}
.vf-comment-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  outline: none;
}
.vf-comment-input::placeholder { color: rgba(255,255,255,0.35); }
.vf-comment-send-btn {
  background: #fff; border: none; border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 14px; cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.vf-comment-send-btn:active { transform: scale(0.88); }

/* Upload bar above video feed button */
.vf-upload-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vf-upload-bar label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
}
.vf-upload-bar label i { font-size: 18px; }
.vf-upload-btn {
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Enter video feed button */
.vf-enter-btn {
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}
.vf-enter-btn:active { transform: scale(0.98); }
.vf-enter-btn i { font-size: 20px; color: #ff4466; }

/* Loading spinner */
.vf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 5;
}
.vf-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vf-spin 0.8s linear infinite;
}
@keyframes vf-spin { to { transform: rotate(360deg); } }
@keyframes vf-pp-fade {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.4); }
}

/* ===== SIDIME PRIME ===== */
:root {
  --prime-gold:   #d4a43a;
  --prime-gold2:  #f0c060;
  --prime-dark:   #1a1608;
  --prime-border: rgba(212,164,58,0.25);
}

/* Prime nav icon glow when active */
#nav-prime.active .prime-nav-icon { color: var(--prime-gold); }
#nav-prime.active { color: var(--prime-gold); }
#nav-prime.active::after { background: var(--prime-gold); }

/* Prime page layout */
.prime-page { padding: 0 0 32px; max-width: 480px; margin: 0 auto; }

.prime-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--prime-border);
  padding: 32px 20px 24px;
  text-align: center;
}
.prime-crown-wrap {
  width: 72px; height: 72px; margin: 0 auto 14px;
  background: var(--prime-dark);
  border: 1.5px solid var(--prime-border);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
}
.prime-hero-title {
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: 2px;
  color: var(--text); margin-bottom: 6px;
}
.prime-hero-title span { color: var(--prime-gold); }
.prime-hero-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.prime-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--prime-dark);
  border: 1px solid var(--prime-border);
  color: var(--prime-gold);
}
.prime-status-badge.inactive { color: var(--text-muted); border-color: var(--border); background: var(--bg-card); }

/* Features list */
.prime-features { padding: 20px 16px 0; }
.prime-features-title {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 12px; padding: 0 4px;
}
.prime-feat {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.prime-feat:last-child { border-bottom: none; }
.prime-feat-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.prime-feat-icon svg { color: var(--prime-gold); }
.prime-feat-body { flex: 1; }
.prime-feat-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.prime-feat-desc { font-size: 12px; color: var(--text-muted); }
.prime-feat-check { color: var(--prime-gold); font-size: 15px; flex-shrink: 0; }

/* Price card */
.prime-price-card {
  margin: 20px 16px 0;
  background: var(--prime-dark);
  border: 1px solid var(--prime-border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.prime-price-amt { font-size: 26px; font-weight: 800; color: var(--prime-gold); line-height: 1; }
.prime-price-unit { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.prime-price-note { font-size: 12px; color: var(--text-muted); text-align: right; line-height: 1.5; }

/* Subscribe button */
.prime-subscribe-btn {
  display: block; width: calc(100% - 32px);
  margin: 16px 16px 0;
  background: var(--prime-gold);
  color: #0e0e0e;
  border: none; border-radius: 14px;
  padding: 15px 20px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: var(--font-mono);
  letter-spacing: 0.5px;
  transition: opacity 0.15s;
}
.prime-subscribe-btn:hover { opacity: 0.88; }
.prime-subscribe-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.prime-subscribe-btn.active-plan {
  background: var(--bg-card);
  color: var(--prime-gold);
  border: 1.5px solid var(--prime-border);
}

/* Until date label */
.prime-until {
  text-align: center; margin-top: 10px;
  font-size: 12px; color: var(--text-muted);
}

/* Crown badge on avatars */
.prime-crown-avatar {
  position: relative; display: inline-block;
}
.prime-crown-avatar::before {
  content: '';
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17l3-8 4 5 2-7 4 5 3-5v10H3z' fill='%23d4a43a' stroke='%23b8882a' stroke-width='1'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
  z-index: 2;
}

/* Verification checkmark gold for prime */
.prime-verify-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: var(--prime-gold);
  border-radius: 50%;
  margin-left: 3px;
  vertical-align: middle;
  font-size: 9px; color: #0e0e0e; font-weight: 900;
  flex-shrink: 0;
}

/* ── CAT MODE ANIMATION ── */
@keyframes catFall {
  0%   { transform: translateY(0)      translateX(0)                     rotate(0deg);   opacity: 1; }
  15%  { transform: translateY(15vh)   translateX(var(--cat-sway, 20px))  rotate(calc(var(--cat-spin, 180deg) * 0.15)); opacity: 1; }
  50%  { transform: translateY(55vh)   translateX(0)                     rotate(calc(var(--cat-spin, 180deg) * 0.5));  opacity: 1; }
  85%  { transform: translateY(85vh)   translateX(var(--cat-sway, 20px))  rotate(calc(var(--cat-spin, 180deg) * 0.85)); opacity: 0.9; }
  100% { transform: translateY(110vh)  translateX(0)                     rotate(var(--cat-spin, 180deg));              opacity: 0; }
}

#cat-mode-container img {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}
