/* ============================================
   CampusConfessions — Complete Stylesheet v3
   Plus Jakarta Sans + JetBrains Mono
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ────────────────────────────────────────────
   RESET
──────────────────────────────────────────── */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
button, a, [onclick] {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Subtle press feedback on interactive elements — NOT inside modals/overlays */
button:not(.modal button):not(.overlay button):not(.conf-overlay button):active,
a:not(.modal a):not(.overlay a):active {
  opacity: 0.82;
  transform: scale(0.97);
}

/* REMOVED: pop/bounce on confession modal and story share buttons (user request) */
.modal button:active,
.modal a:active,
.overlay button:active,
.overlay a:active,
.conf-overlay button:active,
#voice-options button:active,
#recorder-ui button:active {
  opacity: 1 !important;
  transform: none !important;
}

/* ────────────────────────────────────────────
   CSS VARIABLES
──────────────────────────────────────────── */
:root {
  --bg: #F5F3F0;
  --bg2: #FFFFFF;
  --bg3: #EEEBE6;
  --bg4: #E5E1D8;
  --border: #E0DBD3;
  --border2: #C8C2B8;
  --text1: #1A1714;
  --text2: #6B6560;
  --text3: #A8A29A;
  --highlight: #C84B31;
  --highlight2: #A83A22;
  --hl-glow: rgba(200,75,49,0.08);
  --hl-glow2: rgba(200,75,49,0.15);
  --green: #2E7D52;
  --red: #C0392B;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Plus Jakarta Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.10);
  --nav-height: 72px;
}

[data-theme="dark"] {
  --bg: #0D0C0B;
  --bg2: #171512;
  --bg3: #201E1A;
  --bg4: #2A2720;
  --border: #2A2620;
  --border2: #3A3630;
  --text1: #F0EDE8;
  --text2: #A8A29A;
  --text3: #6B6560;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 16px 40px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ────────────────────────────────────────────
   HEADER
──────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,243,240,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 0.5px solid var(--border);
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="dark"] .header {
  background: rgba(13,12,11,0.92);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text1);
  flex-shrink: 0;
}
.logo img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
}
.logo-name {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text1);
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-family: var(--font);
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
}
.hbtn:hover { background: var(--bg4); color: var(--text1); border-color: var(--border2); }
.hbtn.icon { width: 36px; padding: 0; justify-content: center; }
.hbtn svg {
  width: 16px;
  height: 16px;
  stroke: var(--text2);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.hbtn:hover svg { stroke: var(--text1); }
.hbtn.login-btn { width: auto; padding: 0 14px; font-size: .78rem; font-weight: 700; }

/* Notification bell */
.notif-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--highlight);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
  animation: notif-pulse 2s infinite;
}
@keyframes notif-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .7; }
}

/* User pill */
.user-pill {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  flex-shrink: 0;
}
.user-pill:hover { border-color: var(--border2); }
.user-pill .uid {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--highlight);
  font-weight: 600;
}
.user-pill svg {
  width: 14px;
  height: 14px;
  stroke: var(--text3);
  stroke-width: 2;
  fill: none;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 190px;
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 200;
}
.user-dropdown.open { display: block; }
.dd-item {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .8rem;
  cursor: pointer;
  transition: background .1s;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  text-decoration: none;
  font-weight: 500;
}
.dd-item:hover { background: var(--bg3); color: var(--text1); }
.dd-item.danger { color: var(--red); }
.dd-item.danger:hover { background: rgba(192,57,43,.08); }
.dd-sep { height: 0.5px; background: var(--border); margin: 4px 0; }

/* ────────────────────────────────────────────
   BOTTOM NAV — floating pill style (single definition)
──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  height: 64px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 24px;
  display: none; /* shown via media query */
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 99;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
[data-theme="dark"] .bottom-nav {
  background: rgba(23,21,18,0.96);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  min-width: 48px;
  padding: 8px 4px;
  background: none;
  border: none;
  text-decoration: none;
  border-radius: 14px;
  transition: background .15s;
}
.nav-tab:hover { background: var(--bg3); }
.nav-tab svg {
  width: 22px;
  height: 22px;
  stroke: var(--text3);
  stroke-width: 1.8;
  fill: none;
  transition: stroke .15s, transform .2s;
}
.nav-tab.active svg { stroke: var(--highlight); transform: scale(1.1); }
.nav-tab-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--font);
  transition: color .15s;
}
.nav-tab.active .nav-tab-label { color: var(--highlight); }
.nav-tab:active svg { transform: scale(0.88) !important; }
.nav-tab:active .nav-tab-label { opacity: 0.7; }

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  margin-top: -20px;
  background: none;
  border: none;
  text-decoration: none;
}
.nav-plus {
  width: 54px;
  height: 54px;
  background: var(--highlight);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(200,75,49,0.5), 0 2px 8px rgba(200,75,49,0.3);
  transition: transform .2s, box-shadow .2s;
  border: 3px solid var(--bg2);
}
.nav-plus:active {
  transform: scale(0.92);
  box-shadow: 0 2px 10px rgba(200,75,49,0.4);
}
.nav-plus svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2.5;
  fill: none;
}
.nav-center-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--font);
}

/* ────────────────────────────────────────────
   LAYOUT
──────────────────────────────────────────── */
.layout {
  max-width: 1020px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.feed-col { flex: 1; min-width: 0; }
.sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 72px; }
.page { max-width: 680px; margin: 0 auto; padding: 24px 16px 80px; }

body.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
}
.container { width: 100%; max-width: 380px; }

/* ────────────────────────────────────────────
   TAG BAR
──────────────────────────────────────────── */
.tag-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.tag-bar:active { cursor: grabbing; }
.tag-bar::-webkit-scrollbar { display: none; }

.tag-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  color: var(--text3);
  font-size: .72rem;
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font);
}
.tag-pill:hover { border-color: var(--border2); color: var(--text2); }
.tag-pill.active {
  background: var(--hl-glow);
  border-color: var(--highlight);
  color: var(--highlight);
  animation: tag-select .2s ease;
}

/* ────────────────────────────────────────────
   SORT BAR
──────────────────────────────────────────── */
.sort-random-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 12px;
  gap: 8px;
}
.sort-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: 0.5px solid var(--border);
  color: var(--text3);
  font-family: var(--font);
  font-size: .74rem;
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
  white-space: nowrap;
}
.sort-btn:hover { color: var(--text2); border-color: var(--border2); }
.sort-btn.active { background: var(--bg2); border-color: var(--border2); color: var(--text1); }
.random-pill {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-size: .72rem;
  font-family: var(--font);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.random-pill svg { width: 13px; height: 13px; stroke: var(--text2); stroke-width: 2; fill: none; }
.random-pill:hover { border-color: var(--highlight); color: var(--highlight); }
.random-pill:hover svg { stroke: var(--highlight); }

/* ────────────────────────────────────────────
   CARDS
──────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 10px;
  margin-bottom: 10px;
  overflow: visible !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  animation: fadeUp .25s ease both;
}
.card:hover { border-color: var(--border2); box-shadow: var(--shadow); transform: translateY(-2px); }

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

/* SKELETON & OPTIMISTIC LOADER */
.skeleton {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 10px;
  animation: skel-pulse 1.5s infinite ease-in-out;
}
.skel-line { height: 12px; background: var(--bg3); border-radius: 4px; margin-bottom: 8px; }
.skel-line.s { width: 40%; }
.skel-line.m { width: 70%; }
@keyframes skel-pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

.optimistic-loading {
  opacity: 0.6;
  pointer-events: none;
  animation: skel-pulse 1.5s infinite ease-in-out;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  overflow: visible;
}
.anon-badge {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg3);
  color: var(--text3);
  font-size: .62rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.conf-num {
  font-size: .62rem;
  font-family: var(--mono);
  color: var(--text3);
  padding: 3px 7px;
  background: var(--bg3);
  border-radius: 5px;
  font-weight: 500;
  flex-shrink: 0;
}
.card-time {
  font-size: .65rem;
  color: var(--text3);
  font-family: var(--mono);
  flex-shrink: 0;
}
.card-tag {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--hl-glow);
  color: var(--highlight);
  font-size: .62rem;
  font-family: var(--mono);
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-tag:hover { background: var(--highlight); color: #fff; }
.card-content {
  font-size: .93rem;
  line-height: 1.72;
  color: var(--text1);
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 400;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 0px;
  padding: 6px 0 8px;
  border-top: 0.5px solid var(--border);
  margin-top: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.card-actions::-webkit-scrollbar { display: none; }
.actions-divider {
  width: 0.5px;
  height: 18px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}
.react-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.react-btn:hover { background: var(--bg3); }
.react-btn.active { background: var(--hl-glow); color: var(--highlight); }
.react-count { font-size: .65rem; font-family: var(--mono); font-weight: 600; }
.act-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 7px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-family: var(--font);
  font-size: .74rem;
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
  flex-shrink: 0;
}
.act-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--text3);
  stroke-width: 2;
  fill: none;
  transition: stroke .15s;
}
.act-btn:hover { color: var(--text1); background: var(--bg3); }
.act-btn:hover svg { stroke: var(--text1); }
.act-btn.report:hover { background: rgba(192,57,43,.08); color: var(--red); }
.act-btn.report:hover svg { stroke: var(--red); }
.act-btn.reported { color: var(--red); }
.act-btn.reported svg { stroke: var(--red); }

.wa-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}
.wa-share-btn:hover {
  background: rgba(37, 211, 102, 0.12);
  transform: scale(1.1);
}
/* ────────────────────────────────────────────
   COMMENTS
──────────────────────────────────────────── */
.comments-section {
  margin-top: 12px;
  border-top: 0.5px solid var(--border);
  padding-top: 12px;
  padding-bottom: 12px;
  display: none;
  overflow: visible;
  position: relative;
  z-index: 2;
}
.comments-section.open { display: block; }
.comments-section.preloaded { display: block; }

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg4);
  border: 0.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  color: var(--text2);
  font-weight: 700;
  font-family: var(--mono);
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.comment-meta { font-size: .62rem; color: var(--text3); font-family: var(--mono); font-weight: 600; }
.comment-time { font-size: .6rem; color: var(--text3); font-family: var(--mono); }
.comment-text { font-size: .82rem; line-height: 1.55; color: var(--text1); word-break: break-word; }
.see-more-comments {
  background: none;
  border: none;
  color: var(--highlight);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  padding: 4px 0;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity .12s;
}
.see-more-comments:hover { opacity: .75; }
.comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  overflow: visible;
  position: relative;
  z-index: 2;
  padding-bottom: 4px;
}
.comment-input {
  flex: 1;
  padding: 9px 14px;
  border-radius: 99px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .8rem;
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.comment-input:focus { border-color: var(--border2); }
.comment-input::placeholder { color: var(--text3); }
.comment-submit {
  padding: 9px 16px;
  border-radius: 99px;
  background: var(--highlight);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.comment-submit:hover { background: var(--highlight2); }
@keyframes comment-sent {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.comment-submit:active { animation: comment-sent .2s ease; }

/* ────────────────────────────────────────────
   SIDEBAR
──────────────────────────────────────────── */
.sb-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.sb-title {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.sb-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .78rem;
  outline: none;
  transition: border-color .15s;
}
.sb-search:focus { border-color: var(--border2); }
.sb-search::placeholder { color: var(--text3); }
.sb-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.sb-tag {
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text3);
  font-size: .68rem;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--mono);
  font-weight: 500;
}
.sb-tag:hover { border-color: var(--border2); color: var(--text2); }
.sb-tag.active { background: var(--hl-glow); border-color: var(--highlight); color: var(--highlight); }
.sb-pop-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 7px 8px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text2);
  font-family: var(--font);
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
  font-weight: 500;
}
.sb-pop-tag:hover { background: var(--bg3); color: var(--highlight); }
.sb-pop-tag span {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 700;
  background: var(--hl-glow);
  color: var(--highlight);
  font-family: var(--mono);
}

/* ────────────────────────────────────────────
   STATS BAR
──────────────────────────────────────────── */
#statsBar {
  font-size: .72rem;
  color: var(--text3);
  font-family: var(--mono);
  padding: 2px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.online-indicator { display: inline-flex; align-items: center; gap: 4px; color: var(--green); white-space: nowrap; padding-right: 185px; }
.online-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ────────────────────────────────────────────
   MOBILE SEARCH
──────────────────────────────────────────── */
.mobile-search-wrap {
  display: none;
  position: relative;
  padding: 8px 0 4px;
}
.mobile-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .15s;
}
.mobile-search-inner:focus-within { border-color: var(--border2); }
.mobile-search-inner svg {
  width: 15px;
  height: 15px;
  stroke: var(--text3);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.mobile-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text1);
  font-family: var(--font);
  font-size: .85rem;
  padding: 11px 0;
}
.mobile-search-input::placeholder { color: var(--text3); }
.msearch-clear {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: .8rem;
  padding: 4px;
  display: flex;
  align-items: center;
}
.mobile-search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 4px;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-tag-result {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-size: .75rem;
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all .15s;
}
.mobile-tag-result:hover { border-color: var(--highlight); color: var(--highlight); }
.msearch-empty { font-size: .75rem; color: var(--text3); padding: 4px 0; }

/* ────────────────────────────────────────────
   MODALS
──────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,24,20,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  box-sizing: border-box;
}
.overlay.open { opacity: 1; pointer-events: all; }
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-title { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.modal-x {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.modal-x:hover { background: var(--bg4); color: var(--text1); }

.modal-notice {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--hl-glow);
  border: 0.5px solid var(--highlight);
  color: var(--highlight);
  font-size: .76rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.conf-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .9rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
.conf-textarea:focus { border-color: var(--border2); }
.conf-textarea::placeholder { color: var(--text3); }
.char-ct {
  text-align: right;
  font-size: .68rem;
  font-family: var(--mono);
  color: var(--text3);
  margin-top: 4px;
  margin-bottom: 12px;
}
.char-ct.warn { color: var(--red); }
.tag-sec-label {
  font-size: .68rem;
  color: var(--text3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 7px;
}
.tag-opts { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.tag-opt {
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text3);
  font-size: .72rem;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
  font-weight: 600;
}
.tag-opt:hover { border-color: var(--border2); color: var(--text2); }
.tag-opt.sel { background: var(--hl-glow); border-color: var(--highlight); color: var(--highlight); }
.modal-submit {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: var(--highlight);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  letter-spacing: -.01em;
}
.modal-submit:hover { background: var(--highlight2); }
.modal-submit:disabled { opacity: .4; cursor: not-allowed; }

.login-prompt { text-align: center; padding: 16px 0; }
.login-prompt p { color: var(--text2); font-size: .85rem; margin-bottom: 14px; }
.login-prompt a {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  background: var(--highlight);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  transition: background .15s;
}
.login-prompt a:hover { background: var(--highlight2); }

.pw-field { margin-bottom: 12px; }
.pw-field label {
  display: block;
  font-size: .68rem;
  color: var(--text3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
  font-weight: 600;
}
.pw-field input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .85rem;
  outline: none;
  transition: border-color .15s;
}
.pw-field input:focus { border-color: var(--border2); }
.pw-err { color: var(--red); font-size: .75rem; margin-top: 8px; display: none; }
.pw-err.show { display: block; }

.conf-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(26,24,20,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.conf-overlay.open { opacity: 1; pointer-events: all; }
.conf-box {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-md);
  transform: scale(.96);
  transition: transform .2s;
}
.conf-overlay.open .conf-box { transform: scale(1); }
.conf-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.conf-text { font-size: .82rem; color: var(--text2); margin-bottom: 20px; line-height: 1.55; }
.conf-actions { display: flex; gap: 8px; justify-content: flex-end; }
.conf-cancel {
  padding: 9px 18px;
  border-radius: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.conf-del {
  padding: 9px 18px;
  border-radius: 10px;
  background: rgba(192,57,43,.1);
  border: 0.5px solid var(--red);
  color: var(--red);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.conf-del:hover { background: var(--red); color: #fff; }

/* Story overlay — no transform animation */
#storyOverlay .modal {
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* ────────────────────────────────────────────
   RANDOM MODAL
──────────────────────────────────────────── */
.rand-card {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
}
.rand-num { font-size: .65rem; font-family: var(--mono); color: var(--text3); margin-bottom: 8px; font-weight: 500; }
.rand-content { font-size: .9rem; line-height: 1.68; color: var(--text1); }
.rand-tags { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.rand-tag {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--hl-glow);
  color: var(--highlight);
  font-size: .65rem;
  font-family: var(--mono);
  font-weight: 600;
}
.find-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  margin-top: 8px;
}
.find-btn:hover { background: var(--highlight); color: #fff; border-color: var(--highlight); }
.rand-actions { display: flex; gap: 8px; margin-top: 8px; }
.rand-act {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.rand-act:hover { background: var(--bg4); color: var(--text1); }
.dl-btn {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.dl-btn:hover { opacity: .9; }

/* ────────────────────────────────────────────
   TOAST
──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg2);
  border: 0.5px solid var(--border);
  color: var(--text1);
  padding: 10px 20px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 500;
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  font-family: var(--font);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }

/* ────────────────────────────────────────────
   SKELETON
──────────────────────────────────────────── */
.skeleton {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 10px;
}
.skel-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 10px;
}
.skel-line.s { width: 35%; }
.skel-line.m { width: 65%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 60px 20px; color: var(--text3); font-size: .88rem; }
.empty-icon { font-size: 2rem; margin-bottom: 10px; }
.load-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.load-more:hover { background: var(--bg3); border-color: var(--border2); color: var(--text1); }

/* ────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────── */
.site-footer {
  background: var(--bg2);
  border-top: 0.5px solid var(--border);
  padding: 24px 24px 20px;
  text-align: center;
}
.f-contact { font-size: .85rem; color: var(--text2); margin-bottom: 6px; }
.f-contact a { color: var(--highlight); text-decoration: none; }
.f-copy { font-size: .72rem; color: var(--text3); margin-bottom: 16px; font-family: var(--mono); }
.f-page-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.f-page-link {
  font-size: .72rem;
  color: var(--text3);
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
  font-weight: 600;
}
.f-page-link:hover { color: var(--highlight); border-color: var(--highlight); }
.f-disclaimer {
  font-size: .72rem;
  color: var(--text3);
  line-height: 1.7;
  font-family: var(--mono);
  max-width: 500px;
  margin: 0 auto;
}

/* ────────────────────────────────────────────
   CONFESSION OF THE DAY
──────────────────────────────────────────── */
.cotd-card {
  background: linear-gradient(135deg, #C84B31 0%, #7A1F00 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  color: #fff;
  position: relative;
  overflow: hidden;
  animation: fadeUp .3s ease both;
}
.cotd-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  animation: cotd-shimmer 4s ease infinite;
}
.cotd-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
@keyframes cotd-shimmer {
  0%, 100% { opacity: 0.06; transform: scale(1); }
  50% { opacity: 0.12; transform: scale(1.1); }
}
.cotd-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cotd-content {
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 500;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  z-index: 1;
}
.cotd-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.cotd-tag {
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(255,255,255,0.18);
  font-size: .65rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .03em;
}
.cotd-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.cotd-stat { font-size: .75rem; opacity: .85; font-family: var(--mono); }
.cotd-share {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255,255,255,0.2);
  border: 0.5px solid rgba(255,255,255,0.35);
  color: #fff;
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.cotd-share:hover { background: rgba(255,255,255,0.32); }

/* ────────────────────────────────────────────
   PINNED CONFESSION
──────────────────────────────────────────── */
.pinned-section {
  background: linear-gradient(135deg, #1a1200, #2a1f00);
  border: 1.5px solid var(--highlight);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 12px 0;
  animation: fadeUp .3s ease both, border-pulse 3s ease 1s infinite;
}
@keyframes border-pulse {
  0%, 100% { border-color: var(--highlight); }
  50% { border-color: rgba(200,75,49,0.4); }
}
.pinned-label {
  background: var(--highlight);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pinned-body { padding: 16px; cursor: pointer; }
.pinned-body .card-content { font-size: .92rem; line-height: 1.7; color: #f0ede8; margin-bottom: 0; }
.pinned-stats {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: .74rem;
  color: #a8a29a;
  font-family: var(--mono);
}

/* ────────────────────────────────────────────
   FLOATING BUBBLES
──────────────────────────────────────────── */
#pinnedBubble {
  position: fixed;
  top: 82px;
  right: 62px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--highlight);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 97;
  box-shadow: 0 2px 12px rgba(200,75,49,0.35);
  transition: transform .2s;
}
#pinnedBubble:hover { transform: scale(1.08); }
#pinnedBox {
  position: fixed;
  top: 122px;
  right: 24px;
  width: 260px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  z-index: 96;
  display: none;
  overflow: hidden;
}
#pinnedBox.open { display: block; }
/* ── Chat Coming Soon Bubble ── */

@media (max-width: 800px) {
  #chatComingBubble { top: 105px; right: 68px; width: 34px; height: 34px; font-size: .85rem; border-radius: 10px; }
  #chatComingBox    { top: 100px; right: 12px; width: calc(100vw - 24px); max-width: 300px; }
}
#pinnedHeader {
  padding: 12px 14px;
  background: var(--highlight);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: .85rem;
}
#pinnedHeader button { background: none; border: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: .8; }
#pinnedBody {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.connect-icon { font-size: 1.8rem; }
.connect-title { font-size: .9rem; font-weight: 700; color: var(--text1); }
.connect-msg { font-size: .78rem; color: var(--text2); line-height: 1.5; }
.connect-divider { height: 0.5px; background: var(--border); width: 100%; }
.connect-scroll { font-size: .75rem; color: var(--text3); font-family: var(--mono); }

/* ────────────────────────────────────────────
   QUERYCHAT WIDGET
──────────────────────────────────────────── */
#chatBubble {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--highlight);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: 0 4px 20px rgba(200,75,49,0.4);
  transition: transform .2s;
}
#chatBubble:hover { transform: scale(1.08); }
#chatBox {
  position: fixed;
  bottom: 148px;
  right: 20px;
  width: 320px;
  max-height: 420px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  z-index: 98;
  overflow: hidden;
}
#chatBox.open { display: flex; }
#chatHeader {
  padding: 14px 16px;
  background: var(--highlight);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: .85rem;
}
#chatHeader button { background: none; border: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: .8; }
#chatHeader button:hover { opacity: 1; }
#chatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
}
.bot-msg {
  background: var(--bg3);
  border-radius: 10px 10px 10px 2px;
  padding: 10px 12px;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text1);
  max-width: 85%;
}
.user-msg {
  background: var(--highlight);
  border-radius: 10px 10px 2px 10px;
  padding: 10px 12px;
  font-size: .8rem;
  line-height: 1.55;
  color: #fff;
  max-width: 85%;
  align-self: flex-end;
}
.typing-msg {
  background: var(--bg3);
  border-radius: 10px 10px 10px 2px;
  padding: 10px 12px;
  font-size: .8rem;
  color: var(--text3);
}
#chatInput {
  padding: 10px;
  border-top: 0.5px solid var(--border);
  display: flex;
  gap: 8px;
}
#chatInput input {
  flex: 1;
  padding: 9px 14px;
  border-radius: 99px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .8rem;
  outline: none;
  min-width: 0;
}
#chatInput input:focus { border-color: var(--border2); }
#chatInput button {
  padding: 9px 14px;
  border-radius: 99px;
  background: var(--highlight);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
#chatInput button:hover { background: var(--highlight2); }

/* ────────────────────────────────────────────
   LOGIN PAGE
──────────────────────────────────────────── */
.logo-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; }
.logo-title b { color: var(--highlight); }
.logo-sub { font-size: .72rem; color: var(--text3); font-family: var(--mono); margin-top: 4px; }
.tabs {
  display: flex;
  gap: 3px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}
.tab {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  color: var(--text3);
  background: transparent;
}
.tab.active { background: var(--bg2); color: var(--text1); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.form { display: none; }
.form.active { display: block; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  color: var(--text3);
  margin-bottom: 5px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text1);
  font-family: var(--font);
  font-size: .88rem;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--border2); }
.field input::placeholder { color: var(--text3); }
.info-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--hl-glow);
  border: 0.5px solid var(--highlight);
  font-size: .74rem;
  color: var(--highlight);
  font-family: var(--mono);
  margin-bottom: 14px;
  line-height: 1.55;
  font-weight: 500;
}
.success-box {
  padding: 18px;
  border-radius: 12px;
  background: rgba(46,125,82,.08);
  border: 0.5px solid var(--green);
  margin-bottom: 14px;
  text-align: center;
  display: none;
}
.success-box.show { display: block; }
.suc-label {
  font-size: .65rem;
  color: var(--text3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}
.suc-id {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--green);
  letter-spacing: .1em;
}
.suc-note { font-size: .72rem; color: var(--text2); margin-top: 8px; }
.submit-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: var(--highlight);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
  letter-spacing: -.01em;
}
.submit-btn:hover { background: var(--highlight2); }
.submit-btn:disabled { opacity: .4; cursor: not-allowed; }
.goto-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: var(--green);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  margin-top: 10px;
  display: none;
}
.goto-btn.show { display: block; }
.err-msg {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(192,57,43,.08);
  border: 0.5px solid var(--red);
  color: var(--red);
  font-size: .78rem;
  margin-top: 10px;
  display: none;
}
.err-msg.show { display: block; }
.footer-note {
  text-align: center;
  font-size: .72rem;
  color: var(--text3);
  font-family: var(--mono);
  margin-top: 16px;
}

/* ────────────────────────────────────────────
   PROFILE PAGE
──────────────────────────────────────────── */
.profile-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.pid-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--hl-glow);
  border: 1.5px solid var(--highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--highlight);
  font-family: var(--mono);
  flex-shrink: 0;
}
.pid { font-size: 1.4rem; font-weight: 800; font-family: var(--mono); color: var(--highlight); letter-spacing: .05em; }
.pjoined { font-size: .72rem; color: var(--text3); font-family: var(--mono); margin-top: 3px; }
.pstats { display: flex; gap: 24px; padding-top: 14px; border-top: 0.5px solid var(--border); flex-wrap: wrap; }
.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text1);
  font-family: var(--mono);
  animation: count-up .4s ease both;
}
.pstats > div:nth-child(2) .stat-num { animation-delay: .1s; }
.pstats > div:nth-child(3) .stat-num { animation-delay: .2s; }
@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-label {
  font-size: .65rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
  font-family: var(--mono);
}
.sec-title {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.you-badge {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--hl-glow);
  color: var(--highlight);
  font-size: .62rem;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
}
.card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 0.5px solid var(--border);
  font-size: .74rem;
  color: var(--text3);
  font-family: var(--mono);
  flex-wrap: wrap;
}
.delete-btn {
  margin-left: auto;
  background: transparent;
  border: 0.5px solid var(--red);
  color: var(--red);
  font-size: .72rem;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  transition: all .15s;
}
.delete-btn:hover { background: var(--red); color: #fff; animation: shake .4s ease; }
.delete-btn:disabled { opacity: .4; cursor: not-allowed; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 3px;
  margin: 0 16px 16px;
}
.profile-tab {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  color: var(--text3);
  background: transparent;
}
.profile-tab.active { background: var(--bg2); color: var(--text1); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.saved-empty { text-align: center; padding: 48px 20px; color: var(--text3); }
.saved-empty-icon { font-size: 2rem; margin-bottom: 10px; }
.saved-empty-text { font-size: .85rem; }

/* ── Team CC Admin Badge ── */
.team-cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a0a00, #2d1200);
  border: 1px solid #C84B31;
  color: #ff7043;
  font-size: .58rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .05em;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(200,75,49,0.3);
  animation: teamcc-glow 2.5s ease-in-out infinite;
}
.team-cc-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(200,75,49,0.12), transparent);
  animation: teamcc-shine 2.5s ease-in-out infinite;
}
.team-cc-badge .cc-crown {
  font-size: .65rem;
  line-height: 1;
  filter: drop-shadow(0 0 3px rgba(200,75,49,0.8));
}
.team-cc-badge .cc-check {
  width: 10px;
  height: 10px;
  background: #C84B31;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-style: normal;
}
.team-cc-badge .cc-check::after {
  content: '✓';
  font-size: .45rem;
  color: #fff;
  font-weight: 900;
  line-height: 1;
}
@keyframes teamcc-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(200,75,49,0.3); border-color: rgba(200,75,49,0.7); }
  50%       { box-shadow: 0 0 14px rgba(200,75,49,0.6); border-color: #C84B31; }
}
@keyframes teamcc-shine {
  0%   { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

/* ── Comment Delete Button ── */
.comment-delete-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 2px 4px;
  margin-left: auto;
  line-height: 1;
  border-radius: 4px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  opacity: 0.5;
}
.comment-delete-btn:hover { 
  color: var(--red); 
  opacity: 1;
  background: rgba(192,57,43,.08);
}

/* ── Admin Profile Hero ── */
.admin-hero-wrap {
  position: relative;
  padding: 0 0 24px;
  overflow: hidden;
  text-align: center;
  border-radius: 8px;
}
.admin-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(200,75,49,0.12) 0%, transparent 100%);
  pointer-events: none;
}
.admin-hero-bg::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(200,75,49,0.18) 0%, transparent 70%);
  animation: admin-pulse 4s ease-in-out infinite;
}
@keyframes admin-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.1); }
}
.admin-avatar-ring {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 24px auto 0;
  display: inline-block;
}
.admin-avatar-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 28px;
  background: linear-gradient(135deg, #C84B31, #ff7043, #C84B31);
  background-size: 200% 200%;
  animation: admin-ring-spin 3s linear infinite;
  z-index: 0;
}
@keyframes admin-ring-spin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.admin-avatar-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  background: linear-gradient(135deg, #1a0800, #2d1200);
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  overflow: hidden;
}
.admin-crown-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(200,75,49,0.8));
  animation: crown-float 2s ease-in-out infinite;
}
@keyframes crown-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-3px); }
}
.admin-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text1);
  letter-spacing: -.03em;
  margin-top: 16px;
}
.admin-name span { color: var(--highlight); }
.admin-tag-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 14px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(200,75,49,0.12), rgba(200,75,49,0.06));
  border: 1px solid rgba(200,75,49,0.4);
  font-size: .72rem;
  font-family: var(--mono);
  color: #ff7043;
  font-weight: 700;
  letter-spacing: .06em;
}
.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 16px 16px 0;
}
.admin-stat-box {
  background: linear-gradient(135deg, rgba(200,75,49,0.08), rgba(200,75,49,0.03));
  border: 1px solid rgba(200,75,49,0.2);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
}
.admin-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--highlight);
  font-family: var(--mono);
}
.admin-stat-lbl {
  font-size: .62rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--mono);
  margin-top: 3px;
}

/* ── Comment Delete Button ── */
.comment-delete-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: .75rem;
  padding: 0 2px;
  margin-left: auto;
  line-height: 1;
  transition: color .15s;
  display: inline-flex;
  align-items: center;
}
.comment-delete-btn:hover { color: var(--red); }
/* ────────────────────────────────────────────
   TRENDING PAGE
──────────────────────────────────────────── */
.trending-header { padding: 20px 16px 0; max-width: 680px; margin: 0 auto; }
.trending-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; }
.trending-title span { color: var(--highlight); }
.trending-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.trending-tabs::-webkit-scrollbar { display: none; }
.trending-tab {
  padding: 7px 16px;
  border-radius: 99px;
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text3);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.trending-tab:hover { color: var(--text2); border-color: var(--border2); }
.trending-tab.active { background: var(--highlight); border-color: var(--highlight); color: #fff; }
.trending-feed { max-width: 680px; margin: 0 auto; padding: 0 16px 100px; }

/* ────────────────────────────────────────────
   CHAT / UNDER CONSTRUCTION PAGE
──────────────────────────────────────────── */
.chat-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.chat-page-icon {
  width: 80px;
  height: 80px;
  background: var(--hl-glow);
  border: 1.5px solid var(--highlight);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.chat-page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--text1); }
.chat-page-sub { font-size: .9rem; color: var(--text2); line-height: 1.6; max-width: 320px; }
.chat-page-badge {
  padding: 6px 16px;
  border-radius: 99px;
  background: var(--hl-glow);
  border: 0.5px solid var(--highlight);
  color: var(--highlight);
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chat-page-insta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 99px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
  margin-top: 8px;
}
.chat-page-insta:hover { opacity: .88; }

/* ────────────────────────────────────────────
   CARD MEDIA — image & image viewer
──────────────────────────────────────────── */
.card-img-wrap {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid var(--border);
  max-height: 320px;
}
.card-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: opacity .2s;
  background: var(--bg3);
}
.card-img[src=""], .card-img:not([src]) {
    display: none;
}
.card-img:hover { opacity: .92; }
#imgViewOverlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#imgViewOverlay.open { opacity: 1; pointer-events: all; }
#imgViewEl {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.img-view-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.img-view-close:hover { background: rgba(255,255,255,0.25); }

/* ────────────────────────────────────────────
   MODAL ATTACH — image upload row
──────────────────────────────────────────── */
.img-attach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.img-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text2);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.img-attach-btn:hover { border-color: var(--border2); color: var(--text1); }
#imgPreviewWrap { display: flex; align-items: center; gap: 8px; }
.img-remove-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg4);
  border: 0.5px solid var(--border);
  color: var(--text3);
  font-size: .72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.img-remove-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ────────────────────────────────────────────
   POST TYPE TOGGLE
──────────────────────────────────────────── */
.post-type-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.post-type-btn {
  flex: 1;
  padding: 9px 6px;
  border-radius: 10px;
  border: 0.5px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-align: center;
}
.post-type-btn:hover { color: var(--text1); border-color: var(--border2); }
.post-type-btn.active { background: var(--hl-glow); border-color: var(--highlight); color: var(--highlight); }

/* ────────────────────────────────────────────
   POLL
──────────────────────────────────────────── */
.poll-badge {
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(55,138,221,.1);
  color: #378add;
  font-size: .62rem;
  font-family: var(--mono);
  font-weight: 700;
  border: 0.5px solid rgba(55,138,221,.25);
  flex-shrink: 0;
}
.poll-wrap { margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.poll-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg3);
  color: var(--text1);
  font-family: var(--font);
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
}
.poll-opt-btn:hover { border-color: var(--highlight); background: var(--hl-glow); transform: translateY(-1px); }
.poll-opt-label {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bg4);
  border: 0.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text2);
  flex-shrink: 0;
}
.poll-opt-text { flex: 1; font-weight: 600; }
.poll-total { font-size: .68rem; color: var(--text3); font-family: var(--mono); text-align: center; padding: 2px 0; }
.poll-result {
  position: relative;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.poll-result.winner { border-color: var(--highlight); }
.poll-result-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--hl-glow);
  transition: width .6s cubic-bezier(.34,1.56,.64,1);
  z-index: 0;
}
.poll-result.winner .poll-result-bar { background: rgba(200,75,49,0.15); }
.poll-result-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.poll-pct { margin-left: auto; font-size: .78rem; font-weight: 800; font-family: var(--mono); color: var(--text2); }
.poll-result.winner .poll-pct { color: var(--highlight); }
.poll-voted-check { font-size: .78rem; color: var(--highlight); font-weight: 800; }

/* ────────────────────────────────────────────
   SAVE / BOOKMARK
──────────────────────────────────────────── */
.save-btn svg { stroke: var(--text3); fill: none; transition: stroke .15s, fill .15s; }
.save-btn.active svg { stroke: var(--highlight); fill: var(--highlight); }
.save-btn:hover svg { stroke: var(--highlight); }

/* ────────────────────────────────────────────
   VOICE OVERLAYS
──────────────────────────────────────────── */
#voice-options, #recorder-ui {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
.voice-option-card, .recorder-card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 20px 20px 12px 12px;
  padding: 24px 20px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  color: #fff;
}
.voice-option-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.voice-option-card p { font-size: 12px; color: #666; margin-bottom: 8px; }
.voice-opt-btn {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  color: #fff;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.voice-opt-btn:active { background: #252525; }
.voice-close-btn {
  background: transparent;
  border: none;
  color: #444;
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
}
.rec-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
  padding: 8px;
}
.rec-dot { width: 8px; height: 8px; background: #555; border-radius: 50%; }
.rec-dot.recording { background: #e84040; animation: recblink 1s infinite; }
@keyframes recblink { 0%,100% { opacity:1; } 50% { opacity:0.2; } }
#waveform { border-radius: 8px; background: #0e0e0e; border: 1px solid #1e1e1e; width: 100%; }
.rec-timer { font-size: 28px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.rec-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rec-main-btn {
  background: #e84040;
  border: none;
  color: #fff;
  border-radius: 99px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(232,64,64,0.3);
}
.rec-stop-btn {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #fff;
  border-radius: 99px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.preview-actions { display: flex; gap: 10px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.btn-primary {
  background: #e84040;
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #aaa;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
}
.voice-note { font-size: 11px; color: #444; line-height: 1.6; }

/* ────────────────────────────────────────────
   AUDIO PLAYER
──────────────────────────────────────────── */
.audio-player-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
}
.play-btn {
  width: 34px;
  height: 34px;
  background: var(--highlight);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
}
.play-btn:hover { background: var(--highlight2); transform: scale(1.08); }
.progress-track {
  flex: 1;
  height: 4px;
  background: var(--bg4);
  border-radius: 99px;
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
}
.progress-fill { height: 100%; background: var(--highlight); width: 0%; border-radius: 99px; transition: width 0.1s; }
.duration { font-size: 11px; color: var(--text3); flex-shrink: 0; font-family: var(--mono); }
.voice-badge {
  background: rgba(232,64,64,0.1);
  border: 1px solid rgba(232,64,64,0.2);
  color: #e84040;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────
   ANIMATIONS
──────────────────────────────────────────── */
@keyframes react-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
@keyframes react-deselect {
  0% { transform: scale(1); }
  30% { transform: scale(0.85); }
  100% { transform: scale(1); }
}
.react-btn.pop { animation: react-pop .35s cubic-bezier(.36,.07,.19,.97) both; }
.react-btn.depop { animation: react-deselect .25s ease both; }

@keyframes float-up {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.4); }
}
.emoji-float {
  position: fixed;
  pointer-events: none;
  font-size: 1.4rem;
  animation: float-up .7s ease-out forwards;
  z-index: 9999;
}

@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(200,75,49,0.25);
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  animation: ripple .6s linear;
  pointer-events: none;
}

@keyframes tag-select {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.tag-opt.sel { animation: tag-select .2s ease; }

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ────────────────────────────────────────────
   RESPONSIVE — 800px (tablet + mobile)
──────────────────────────────────────────── */
@media (max-width: 800px) {
  /* Show floating bottom nav */
  .bottom-nav { display: flex; }

  /* Safe bottom padding for floating nav */
  .layout        { padding: 10px 0 100px; }
  .page          { padding: 14px 12px 100px; }
  .trending-feed { padding: 0 10px 100px; }

  /* Toast above nav */
  .toast { bottom: calc(64px + 32px); }

  /* Chat bubble & box above nav */
  #chatBubble { bottom: calc(64px + 32px); right: 14px; width: 44px; height: 44px; }
  #chatBox    { bottom: calc(64px + 88px); right: 12px; width: calc(100vw - 24px); max-height: 360px; }

  /* Pinned bubbles */
  #pinnedBubble { top: 105px; right: 25px; width: 34px; height: 34px; font-size: .85rem; border-radius: 10px; }
  #pinnedBox    { top: 100px; right: 12px; width: calc(100vw - 24px); max-width: 300px; }

  /* Mobile search */
  .mobile-search-wrap { display: block; padding: 8px 10px 4px; }

  /* Hide desktop sidebar */
  .sidebar { display: none !important; }

  /* Hide header confess button & user pill & login btn */
  .confess-btn-header { display: none !important; }
  .user-pill          { display: none !important; }
  #loginBtnHeader     { display: none !important; }

  /* Header */
  .header      { padding: 0 12px; height: 52px; }
  .logo img    { width: 28px; height: 28px; }
  .logo-name   { font-size: .88rem; }
  .header-right { gap: 4px; }
  .hbtn        { width: 34px; height: 34px; border-radius: 9px; }

  /* Cards */
  .card        { margin: 0 10px 10px; padding: 14px 14px 10px; border-radius: 14px; }
  .card-content { font-size: .9rem; }
  .card-meta   { flex-wrap: wrap; }

  /* COTD & Pinned */
  .cotd-card       { margin: 0 10px 10px; padding: 16px 14px; border-radius: 14px; }
  .pinned-section  { margin: 0 10px 10px; }

  /* Tag bar */
  .tag-bar { padding: 8px 10px; margin-bottom: 6px; }

  /* Sort row */
  .sort-random-row { padding: 4px 10px 8px; }
  .sort-btn        { font-size: .68rem; padding: 5px 9px; }
  .random-pill     { font-size: .68rem; padding: 5px 10px; }

  /* Stats */
  #statsBar { padding: 2px 10px 8px; font-size: .68rem; }

  /* Load more */
  .load-more { margin: 4px 10px 10px; width: calc(100% - 20px); }

  /* Modals */
  .overlay      { padding: 10px; align-items: flex-end; }
  .modal        {
    max-width: 100%;
    border-radius: 24px 24px 16px 16px;
    padding: 20px 16px 24px;
    max-height: 94vh;
  }
  .conf-textarea { min-height: 100px; font-size: .88rem; }
  .post-type-btn { font-size: .72rem; padding: 8px 4px; }
  .tag-opts      { gap: 4px; }
  .tag-opt       { font-size: .68rem; padding: 4px 10px; }

  /* Trending */
  .trending-header { padding: 14px 10px 0; }
  .trending-title  { font-size: 1.2rem; }

  /* Profile */
  .profile-card  { padding: 16px; }
  .pid           { font-size: 1.1rem; }
  .stat-num      { font-size: 1.2rem; }
  .profile-tabs  { margin:10px 12px; }

  /* Login */
  body.login-page { padding: 12px; }
  .container      { max-width: 100%; }

  /* Poll on mobile */
  .poll-opt-btn { font-size: .82rem; padding: 10px 12px; }
  .poll-result-inner { padding: 10px 12px; }
}

/* ────────────────────────────────────────────
   RESPONSIVE — 480px (standard phones)
──────────────────────────────────────────── */
@media (max-width: 480px) {
  .bottom-nav { width: calc(100% - 24px); border-radius: 20px; }

  /* Slightly smaller react buttons */
  .react-btn { padding: 5px 7px; font-size: .78rem; }
  .act-btn   { padding: 5px 7px; }

  /* Audio player */
  .audio-player-wrap { padding: 8px 10px; gap: 8px; }
  .play-btn  { width: 30px; height: 30px; }
  .duration  { font-size: 10px; }

  /* Card image */
  .card-img-wrap { max-height: 240px; }
  .card-img      { max-height: 240px; }

  /* Comment input */
  .comment-input  { font-size: .78rem; padding: 8px 12px; }
  .comment-submit { padding: 8px 12px; font-size: .74rem; }

  /* COTD smaller font */
  .cotd-content { font-size: .9rem; }

  /* Overlay modal full width */
  .modal { padding: 18px 14px 20px; }
  .modal-title { font-size: .92rem; }
}

/* ────────────────────────────────────────────
   RESPONSIVE — 375px (iPhone SE / small phones)
──────────────────────────────────────────── */
@media (max-width: 375px) {
  /* Hide logo name on very small screens */
  .logo-name { display: none; }
  .header-right { gap: 3px; }
  .hbtn { width: 32px; height: 32px; }

  /* Bottom nav smaller */
  .bottom-nav { width: calc(100% - 16px); border-radius: 18px; height: 60px; }
  .nav-plus   { width: 48px; height: 48px; }
  .nav-tab-label, .nav-center-label { font-size: 8px; }

  /* Cards tighter */
  .card        { margin: 0 8px 8px; padding: 12px 12px 4px; }
  .cotd-card   { margin: 0 8px 8px; padding: 14px 12px; }
  .pinned-section { margin: 0 8px 8px; }
  .load-more   { margin: 4px 8px 8px; width: calc(100% - 16px); }
  .tag-bar     { padding: 6px 8px; }
  .sort-random-row { padding: 4px 8px 8px; }
  #statsBar    { padding: 2px 8px 6px; }

  /* Post type row — stack if needed */
  .post-type-row { gap: 4px; }
  .post-type-btn { font-size: .68rem; padding: 7px 3px; }

  /* Trending */
  .trending-header { padding: 12px 8px 0; }
  .trending-title  { font-size: 1.1rem; }

  /* Profile */
  .profile-tabs { margin: 0 8px 10px; }

  /* Sort buttons */
  .sort-btn    { font-size: .64rem; padding: 5px 7px; }
  .random-pill { font-size: .64rem; padding: 5px 8px; }

  /* Recorder card smaller */
  .recorder-card, .voice-option-card { padding: 18px 14px; }
  .rec-timer { font-size: 22px; }

  /* Chat box */
  #chatBox { width: calc(100vw - 16px); right: 8px; }
}

/* ────────────────────────────────────────────
   SAFE AREA (iPhone notch / home bar)
──────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 800px) {
    .bottom-nav {
      bottom: max(16px, env(safe-area-inset-bottom));
    }
    .layout, .page, .trending-feed {
      padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
    .toast {
      bottom: calc(64px + 32px + env(safe-area-inset-bottom));
    }
    #chatBubble {
      bottom: calc(64px + 32px + env(safe-area-inset-bottom));
    }
    #chatBox {
      bottom: calc(64px + 88px + env(safe-area-inset-bottom));
    }
  }
}

/* ────────────────────────────────────────────
   INSTALL BANNER
──────────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 8px;
  animation: slideUp 1s ease-in-out;
  z-index: 9999;
}

.install-banner a {
  color: #fff;
  text-decoration: underline;
}

.install-banner a:hover {
  text-decoration: none;
}

/* ────────────────────────────────────────────
   ADSENSE INFRASTRUCTURE & SPONSOR CARDS
──────────────────────────────────────────── */
.ad-placeholder {
  width: 100%;
  background: var(--bg3);
  border: 0.5px dashed var(--border2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 10px;
  overflow: hidden;
}
.ad-placeholder.feed-ad {
  min-height: 120px; /* Zero-CLS guarantee */
}
.ad-placeholder.detail-ad {
  min-height: 250px;
}

/* Mobile Sticky Ad Banner */
.mobile-sticky-ad {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 50px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  z-index: 98;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
@media (min-width: 800px) {
  .mobile-sticky-ad { display: none; }
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius);
  z-index: 9999;
  max-width: 320px;
  box-shadow: var(--shadow-md);
  font-family: var(--font);
  animation: fadeUp .3s ease both;
}
.cookie-banner p {
  font-size: 0.75rem;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.5;
}
.cookie-banner button {
  background: var(--highlight);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
.cookie-banner a {
  color: var(--highlight);
  text-decoration: none;
}

/* Sponsor Card styling (Matches .card perfectly) */
.sponsor-card {
  border-color: var(--border2);
  background: var(--bg2);
  position: relative;
}
.sponsor-card .sponsor-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg3);
  color: var(--text3);
  font-family: var(--mono);
  font-size: 0.55rem;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

