﻿:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --header-bg: #f6f6f6;
  --card-bg: #fff;
  --button-bg: #eee;
  --sidebar-bg: #f8f8f8;
  --button-border: #ccc;
  --profile-accent: #6366f1;
  --profile-highlight: #22d3ee;
  --profile-text: var(--text-color);
  --profile-muted: #64748b;
}

body.dark {
  --bg-color: #121212;
  --text-color: #eeeeee;
  --header-bg: #1a1a1a;
  --card-bg: #222;
  --button-bg: #333;
  --sidebar-bg: #1a1a1a;
  --profile-text: #e2e8f0;
  --profile-muted: #94a3b8;
}

body.light {
  --bg-color: #eee6db;
  --text-color: #1f2937;
  --header-bg: #e9dfd2;
  --card-bg: #f4eee6;
  --button-bg: #e7dccf;
  --sidebar-bg: #efe6da;
  --button-border: #d6c9ba;
  --profile-text: #1f2937;
  --profile-muted: #6d6256;
}

body.theme-idforia {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --header-bg: #121a2f;
  --card-bg: rgba(15, 23, 42, 0.92);
  --button-bg: #1f2a44;
  --sidebar-bg: #121a2f;
  --button-border: #2c3a5d;
  --profile-text: #e2e8f0;
  --profile-muted: #94a3b8;
}

body.theme-news {
  --bg-color: #0b1220;
  --text-color: #e2e8f0;
  --header-bg: rgba(17, 24, 39, 0.95);
  --card-bg: rgba(15, 23, 42, 0.92);
  --button-bg: #1f2937;
  --sidebar-bg: rgba(17, 24, 39, 0.92);
  --button-border: #334155;
  --profile-text: #e2e8f0;
  --profile-muted: #94a3b8;
}

body.theme-aurora {
  --bg-color: #050916;
  --text-color: #e2e8f0;
  --header-bg: rgba(6, 10, 22, 0.92);
  --card-bg: rgba(7, 11, 23, 0.9);
  --button-bg: rgba(15, 23, 42, 0.82);
  --sidebar-bg: rgba(8, 13, 24, 0.92);
  --button-border: rgba(148, 163, 184, 0.3);
  --profile-text: #e2e8f0;
  --profile-muted: #94a3b8;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Segoe UI', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global audio player styling */
audio,
.post-audio {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #0f172a;
  box-shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.45);
  display: block;
}

body.theme-news audio,
body.theme-news .post-audio {
  border-color: rgba(59, 130, 246, 0.32);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 22px 44px -28px rgba(2, 6, 23, 0.72);
}

/* Global song player */
.song-player {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.song-player--feed {
  padding: 12px 14px;
}

body.dark .song-player,
body.theme-news .song-player,
body.theme-idforia .song-player {
  background: rgba(79, 70, 229, 0.16);
  border-color: rgba(99, 102, 241, 0.38);
}

.song-player.is-playing {
  box-shadow: 0 18px 32px -22px rgba(99, 102, 241, 0.55);
  border-color: rgba(99, 102, 241, 0.52);
}

.song-player__header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.song-player__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-player__title {
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-player__subtitle {
  font-size: 0.85rem;
  color: var(--profile-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-player__subtitle.is-empty {
  display: none;
}

.song-player__wave {
  --progress: 0%;
  position: relative;
  height: 44px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  overflow: hidden;
  pointer-events: none;
}

.song-player__wave-track,
.song-player__wave-progress {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(2px, 1fr);
  gap: 4px;
  align-items: center;
  padding: 6px 10px;
}

.song-player__wave-track {
  color: rgba(99, 102, 241, 0.45);
  z-index: 1;
}

.song-player__wave-progress {
  inset: 0 auto 0 0;
  width: 0%;
  max-width: 100%;
  overflow: hidden;
  color: rgba(79, 70, 229, 0.95);
  transition: width 0.12s linear;
  z-index: 2;
}

.song-player__wave-bar {
  width: 100%;
  height: var(--bar-height, 50%);
  background: currentColor;
  border-radius: 999px;
  opacity: 0.9;
}

.song-player--feed .song-player__wave {
  height: 36px;
  border-radius: 12px;
}

body.dark .song-player__wave,
body.theme-news .song-player__wave,
body.theme-idforia .song-player__wave {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(99, 102, 241, 0.32);
}

body.dark .song-player__wave-track,
body.theme-news .song-player__wave-track,
body.theme-idforia .song-player__wave-track {
  color: rgba(148, 163, 184, 0.6);
}

body.dark .song-player__wave-progress,
body.theme-news .song-player__wave-progress,
body.theme-idforia .song-player__wave-progress {
  color: rgba(129, 140, 248, 0.95);
}

.song-player__play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--profile-accent), var(--profile-highlight));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.song-player__play span[aria-hidden="true"] {
  font-size: 1.2rem;
}

.song-player__play.is-playing {
  box-shadow: 0 16px 30px -18px rgba(79, 70, 229, 0.8);
}

.song-player__play:hover {
  transform: translateY(-1px);
}

.song-player__play:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.45);
  outline-offset: 3px;
}

.song-player__timeline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.song-player__elapsed,
.song-player__remaining {
  font-size: 0.78rem;
  color: var(--profile-muted);
  font-variant-numeric: tabular-nums;
}

.song-player__slider {
  position: relative;
  width: 100%;
}

.song-player__seek {
  width: 100%;
  appearance: none;
  background: linear-gradient(90deg, var(--profile-accent) 0, var(--profile-accent) var(--progress), rgba(148, 163, 184, 0.32) var(--progress), rgba(148, 163, 184, 0.32) 100%);
  height: 6px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.song-player__seek:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 3px;
}

.song-player__seek::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--profile-accent);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

.song-player__seek::-webkit-slider-thumb:hover {
  transform: scale(1.05);
}

.song-player__seek::-webkit-slider-thumb:active {
  transform: scale(1.12);
}

.song-player__seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
}

.song-player__seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--profile-accent);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

.song-player__seek::-moz-range-thumb:hover {
  transform: scale(1.05);
}

.song-player__seek::-moz-range-thumb:active {
  transform: scale(1.12);
}

.song-player__seek::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
}

.song-player__seek:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.song-player__seek:disabled::-webkit-slider-thumb,
.song-player__seek:disabled::-moz-range-thumb {
  background: rgba(226, 232, 240, 0.6);
}

.song-player--error {
  border-color: rgba(239, 68, 68, 0.5);
}

.song-player--error .song-player__remaining {
  color: rgba(239, 68, 68, 0.85);
}

.song-player.is-scrubbing .song-player__seek::-webkit-slider-thumb,
.song-player.is-scrubbing .song-player__seek::-moz-range-thumb {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .song-player__timeline {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }

  .song-player__elapsed {
    order: 1;
  }

  .song-player__slider {
    order: 2;
  }

  .song-player__remaining {
    order: 3;
    justify-self: end;
  }
}

/* --------------------------------------------------
   Global navbar (used across journal/calendar pages)
--------------------------------------------------- */
#navbar {
  position: relative;
  z-index: 250;
}

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 250;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--header-bg) 92%, transparent 8%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

body.dark .site-navbar {
  background: var(--header-bg);
  background: color-mix(in srgb, var(--header-bg) 82%, rgba(15, 23, 42, 0.55));
  border-bottom-color: rgba(15, 23, 42, 0.45);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
}

.site-navbar .navbar-container {
  width: min(1160px, 100% - 32px);
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.site-logo {
  font-weight: 800;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.navbar-links .id-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text-color) 78%, rgba(248, 250, 252, 0.9));
  text-decoration: none;
  transition: background-color 0.15s ease-out, color 0.15s ease-out,
    opacity 0.15s ease-out, box-shadow 0.2s ease-out;
  min-width: 0;
}

.id-nav-link-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(248, 250, 252, 0.9);
  fill: currentColor;
  opacity: 0.75;
  transition: opacity 0.15s ease-out, transform 0.2s ease-out;
}

.nav-label {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.15s ease-out, color 0.15s ease-out;
}

.navbar-links .id-nav-link:hover,
.navbar-links .id-nav-link:focus-visible {
  background: rgba(148, 163, 184, 0.12);
  cursor: pointer;
  outline: none;
}

.navbar-links .id-nav-link:hover .nav-icon,
.navbar-links .id-nav-link:focus-visible .nav-icon,
.navbar-links .id-nav-link:hover .nav-label,
.navbar-links .id-nav-link:focus-visible .nav-label {
  opacity: 1;
}

.navbar-links .id-nav-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(168, 85, 247, 0.55));
  opacity: 0;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  transform: translateY(4px);
}

.navbar-links .id-nav-link.active,
.navbar-links .id-nav-link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(99, 102, 241, 0.9));
  color: #f8fafc;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.28);
}

.navbar-links .id-nav-link.active .nav-icon,
.navbar-links .id-nav-link[aria-current="page"] .nav-icon {
  color: #f8fafc;
  opacity: 1;
}

.navbar-links .id-nav-link.active .nav-label,
.navbar-links .id-nav-link[aria-current="page"] .nav-label {
  opacity: 1;
  color: #f8fafc;
}

.navbar-links .id-nav-link.active::after,
.navbar-links .id-nav-link[aria-current="page"]::after {
  opacity: 1;
  height: 2px;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .navbar-links {
    gap: 10px;
  }

  .navbar-links .id-nav-link {
    padding: 8px 14px;
  }
}

@media (max-width: 720px) {
  .navbar-links {
    gap: 8px;
  }

  .navbar-links .id-nav-link {
    padding: 7px 12px;
  }

  .nav-label {
    font-size: 0.9rem;
  }
}

@media (max-width: 560px) {
  .nav-label {
    font-size: 0.84rem;
  }
}

.search-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-navbar .search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-bg);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  border: 1px solid rgba(148, 163, 184, 0.24);
  min-width: clamp(220px, 28vw, 320px);
}

body.dark .site-navbar .search {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(51, 65, 85, 0.65);
}

.site-navbar .search input {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 100%;
  min-width: 0;
}

.site-navbar .search input:focus {
  outline: none;
}

.site-navbar .search button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 16px;
}

.navbar-auth {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar-login,
.navbar-signup {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-login:hover,
.navbar-login:focus-visible {
  background: rgba(148, 163, 184, 0.16);
  outline: none;
}

.navbar-signup {
  background: rgba(59, 130, 246, 0.16);
  color: #3b82f6;
  color: color-mix(in srgb, #3b82f6 75%, var(--text-color));
}

.navbar-signup:hover,
.navbar-signup:focus-visible {
  background: rgba(59, 130, 246, 0.28);
  outline: none;
}

@media (max-width: 860px) {
  .site-navbar .navbar-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 12px;
  }

  .navbar-left {
    justify-content: center;
  }

  .search-bar {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .site-navbar .search {
    width: min(100%, 420px);
  }

  .navbar-right {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

button {
  background-color: var(--button-bg);
  color: var(--text-color);
  border: 1px solid var(--button-border);
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--button-border);
}

/*nav profile*/
.hidden{display:none}
.navbar{display:flex;align-items:center;gap:12px}

.nav-right{position:relative;display:flex;align-items:center;gap:8px;margin-left:12px}
.avatar-btn{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding:4px;border-radius:999px}
#navAvatar{width:36px;height:36px;border-radius:50%;object-fit:cover}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-actions__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--text-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-actions__btn:hover,
.header-actions__btn:focus-visible {
  background: var(--button-border);
  outline: none;
}

.header-actions__icon {
  font-size: 16px;
  line-height: 1;
}

.header-actions__label {
  line-height: 1;
}


.dropdown{position:absolute;right:0;top:calc(100% + 8px);min-width:220px;background:#111;border:1px solid #333;border-radius:12px;padding:6px;box-shadow:0 12px 32px rgba(0,0,0,.35);z-index:1000}
.menu-item{display:block;width:100%;text-align:left;padding:10px 12px;color:#fff;text-decoration:none;border:none;background:transparent;cursor:pointer;border-radius:8px}
.menu-item:hover{background:#1a1a1a}
.menu-sep{border:none;border-top:1px solid #2a2a2a;margin:6px 0}
.menu-item.danger{color:#ff6b6b}

/*vote style*/
.vote-actions { display:inline-flex; align-items:center; gap:8px; }
.vote-btn { background: none; border: 1px solid var(--stroke); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.vote-btn.voted { background: var(--brand); color: #fff; border-color: transparent; }
.vote-count { min-width: 24px; text-align: center; font-weight: 600; }
.vote-btn__label { display: none; font-size: 0.85rem; font-weight: 600; }
.vote-actions.review-votes .vote-btn { display: inline-flex; align-items: center; gap: 6px; }
.vote-actions.review-votes .vote-btn__label { display: inline; }
.vote-actions.review-votes .vote-count { font-weight: 700; }

.book-review { margin: 8px 0; padding: 12px; border-radius: 10px; border-left: 3px solid var(--brand, #f59e0b); background: var(--surface-raised, #f8f8f8); display: flex; flex-direction: column; gap: 8px; }
.book-review__rating { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-strong, #222); }
.book-review__stars { font-size: 16px; letter-spacing: 1px; color: #f59e0b; }
.book-review__star { font-size: 16px; }
.book-review__rating-label { font-size: 0.9rem; color: var(--text-muted, #555); }
.book-review__body { color: var(--text, #1f1f1f); line-height: 1.6; }
body.dark .book-review { background: rgba(255, 255, 255, 0.04); border-left-color: #fbbf24; }
body.dark .book-review__rating { color: #f8fafc; }
body.dark .book-review__rating-label { color: rgba(248, 250, 252, 0.7); }
body.dark .book-review__body { color: #e2e8f0; }


/* Navbar must create a stacking context and stay above content */
.navbar {
  position: sticky;          /* or fixed if you prefer */
  top: 0;
  z-index: 200;              /* ensure it sits above the feed */
}

/* Right section layout */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Bell button look & anchor */
.icon-btn {
  position: relative;        /* <-- anchor for absolute badge */
  width: 36px;
  height: 36px;
  border: 1px solid #222642;
  border-radius: 9999px;
  background: transparent;
  color: #eaf0ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

/* Badge: crisp, readable, not clipped */
.icon-btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 0 2px #0f1220;  /* halo against dark nav */
  z-index: 1;
}

/* Donâ€™t let parent clip it */
.topbar, .navbar { overflow: visible; }


/* Anchor the dropdown near the bell */
.nav-right { position: relative; }

/* Popover panel */

.notif-popover {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 400;
  color: #eaf0ff;
}

.notif-popover.hidden { display: none; }

.notif-panel {
  width: 100%;
  max-height: 70vh;
  border-radius: 18px;
  background: #15182a;
  border: 1px solid #222642;
  box-shadow: 0 32px 80px rgba(5, 8, 20, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(120deg, rgba(79, 70, 229, 0.18), rgba(14, 165, 233, 0.12));
}

.notif-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fbff;
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-settings-btn,
.notif-mark-all,
.notif-load-more,
.notif-open-page {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  color: #eaf0ff;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.notif-settings-btn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-settings-btn:hover,
.notif-mark-all:hover,
.notif-load-more:hover,
.notif-open-page:hover {
  border-color: rgba(99, 102, 241, 0.7);
  background: rgba(79, 70, 229, 0.18);
  transform: translateY(-1px);
}

.notif-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: #13162b;
}

.notif-tabs button {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.85);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.notif-tabs button.active {
  background: linear-gradient(120deg, #6366f1, #0ea5e9);
  color: #0f1220;
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-footer {
  padding: 12px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #13162b;
}

.notif-footer .notif-open-page {
  flex: 1;
  text-align: center;
}

.notif-empty {
  text-align: center;
  color: rgba(226, 232, 240, 0.65);
  padding: 20px 8px;
  font-size: 0.9rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(19, 22, 43, 0.7);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.notif-item:hover {
  transform: translateY(-1px);
  background: rgba(30, 34, 62, 0.9);
}

.notif-item.notif-unread {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.4);
}

.notif-item.notif-highlight {
  animation: notifPulse 1.2s ease-out;
}

@keyframes notifPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.notif-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.notif-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: #0f172a;
}

.notif-type-icon {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.7);
  background: #0f1220;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notif-main-line {
  font-size: 0.95rem;
  color: #f8fafc;
  line-height: 1.4;
}

.notif-main-line strong {
  font-weight: 700;
  color: #fff;
}

.notif-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.7);
}

.notif-context {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-status {
  display: flex;
  align-items: center;
  padding-left: 6px;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(120deg, #60a5fa, #a855f7);
  display: block;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.notif-item:not(.notif-unread) .notif-dot {
  opacity: 0;
}

@media (max-width: 540px) {
  .notif-panel {
    border-radius: 12px;
  }

  .notif-tabs {
    padding: 10px;
  }

  .notif-list {
    padding: 10px;
  }

  .notif-avatar {
    width: 36px;
    height: 36px;
  }
}

/* clickable mentions & hashtags */
.mention,
.hashtag,
.mention-link,
.hashtag-link,
.tag-link,
.ml,
.hl {
  color: var(--brand, #3b82f6);
  text-decoration: none;
}
.mention:hover,
.hashtag:hover,
.mention-link:hover,
.hashtag-link:hover,
.tag-link:hover,
.ml:hover,
.hl:hover {
  text-decoration: underline;
}


.post-embed {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  display: block;
  background: #000;
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji",
    sans-serif;
}

.post-body p {
  margin: 0;
}

.share-caption {
  margin: 0 0 10px;
  color: var(--text-dim, rgba(148, 163, 184, 0.85));
}

.share-caption p {
  margin: 0;
}


body.light audio,
body.light .post-audio {
  background: #f3ebe1;
  border-color: rgba(160, 142, 122, 0.24);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.save-folder-menu {
  position: absolute;
  z-index: 10050;
  min-width: 220px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  color: #e2e8f0;
}

.save-folder-menu__header {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 8px;
}

.save-folder-menu__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.save-folder-menu__empty {
  font-size: 0.85rem;
  color: #94a3b8;
}

.save-folder-menu__chip {
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.14);
  color: #e0e7ff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.save-folder-menu__chip:hover,
.save-folder-menu__chip:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.save-folder-menu__new {
  width: 100%;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: transparent;
  color: #c7d2fe;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}

.save-folder-menu__new:hover,
.save-folder-menu__new:focus {
  border-color: rgba(99, 102, 241, 0.6);
  color: #eef2ff;
}

.save-folder-menu__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.save-folder-menu__input {
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.save-folder-menu__input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.save-folder-menu__submit {
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #f8fafc;
  font-weight: 700;
  cursor: pointer;
}

.save-folder-menu__submit:hover,
.save-folder-menu__submit:focus {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
}
