/* Ensure dock and its buttons are always interactive, even if inside .rate-limit-blur */
.rate-limit-blur .dock, .rate-limit-blur .dock * {
  pointer-events: auto !important;
}
/* Subtle blur for compose inputs when on rate limit */
.rate-limit-blur input,
.rate-limit-blur textarea,
.rate-limit-blur select,
.rate-limit-blur button,
.rate-limit-blur .custom-file-label,
.rate-limit-blur #bodyCounter,
.rate-limit-blur #lyricsCounter,
.rate-limit-blur #captchaBox {
  filter: blur(2px) brightness(0.95) grayscale(0.1);
  pointer-events: none;
  transition: filter 0.2s;
}

/* Optionally, keep captcha input interactive (remove pointer-events/blur for it) */
/* Lyrics panel fade-in/fade-out animation */
.lyrics-box.fade-in {
  animation: fadeInLyrics 0.18s;
  opacity: 1;
}
.lyrics-box.fade-out {
  animation: fadeOutLyrics 0.18s;
  opacity: 0;
}
/* Improved lyrics panel styling */
/* Centered lyrics style */
.lyrics-box {
  background: rgba(20, 24, 32, 0.72);
  border-radius: 14px;
  border: 1.5px solid #23272a;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  padding: 18px 18px 14px 18px;
  margin-top: 10px;
  color: #d6ffe7;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  font-size: 1.08em;
  line-height: 1.6;
  white-space: pre-line;
  max-height: 320px;
  overflow-y: auto;
  backdrop-filter: blur(10px) saturate(140%) contrast(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(140%) contrast(1.08);
  transition: background 0.22s, box-shadow 0.22s;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
@keyframes fadeInLyrics {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOutLyrics {
  from { opacity: 1; }
  to { opacity: 0; }
}
/* Extra force: Hide a.tag-sort-link.active::after with max specificity */
a.tag-sort-link.active::after,
a.tag-sort-link:active::after,
a.tag-sort-link:focus::after,
a.tag-sort-link:hover::after {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  content: none !important;
  box-shadow: none !important;
  border: none !important;
}
/* Force hide the a.tag-sort-link active underline */
a.tag-sort-link:active::after {
  display: none !important;
  opacity: 0 !important;
}
/* Force hide the tag-sort-link active underline */
.tag-sort-link:active::after {
  display: none !important;
  opacity: 0 !important;
}
/* Force hide the tag-sort-link hover/focus/active underline */
.tag-sort-link:hover::after {
  display: none !important;
  opacity: 0 !important;
}
/* Custom file input for post upload */

.custom-file-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.custom-file-input {
  opacity: 0;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.custom-file-label {
  display: inline-block;
  background: #181a1b;
  color: #bfc7d5;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 0.98em;
  font-weight: 400;
  border: 1px solid #23272a;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border 0.15s;
  box-shadow: none;
}
.custom-file-label:hover, .custom-file-label:focus {
  background: #23272a;
  color: #fff;
  border-color: #2a7fff;
}
/* Remove glowing border on file input focus */
.custom-file-input:focus + .custom-file-label {
  outline: none;
}
/* Hide any pseudo-element arrows on tag sort links (fix for unwanted up/down arrows) */
/* Hide any pseudo-element arrows on tag sort links (fix for unwanted up/down arrows) */
.tag-sort-link::before,
.tag-sort-link::after {
  display: none !important;
}
/* Hide all spin buttons globally (fix for unwanted spinner artifacts) */
*::-webkit-inner-spin-button,
*::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}
/* Hide any number input spinner arrows or overlays in tag sort UI (fix for unwanted spin buttons) */
.tag-sort-ui *::-webkit-inner-spin-button,
.tag-sort-ui *::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}
.tag-sort-ui *::-moz-inner-spin-button,
.tag-sort-ui *::-moz-outer-spin-button {
  -moz-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}
@media (max-width: 600px) {
  /* Center posts and add horizontal padding for narrow screens */
  .post {
    max-width: 475px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 7px;
    padding-right: 7px;
    width: 97vw;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .post .meta,
  .post .post-tags {
    flex-wrap: wrap !important;
    gap: 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .post .actions {
  flex-direction: column;
  gap: 7px;
  width: 100%;
  align-items: stretch;
  overflow-y: hidden;
  }
  .post .actions > * {
    width: auto !important;
    min-width: 85px !important;
    max-width: 97vw;
    margin-bottom: 2px;
    box-sizing: border-box;
  }
  #mobile-notification-dot {
    display: inline-block !important;
  margin: 0px auto 0 auto !important;
    opacity: 0.35 !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    animation: notif-dot-pulse 1.8s ease-in-out infinite;
  }
  @keyframes notif-dot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(108, 207, 255, 0.18); transform: scale(1); }
    50% { box-shadow: 0 0 0 6px rgba(108, 207, 255, 0.10); transform: scale(1.08); }
    100% { box-shadow: 0 0 0 0 rgba(108, 207, 255, 0.18); transform: scale(1); }
  }
}
/* Always hide on desktop */
@media (min-width: 601px) {
  #mobile-notification-dot {
    display: none !important;
  }
  #mobile-notification-dot + .notification-popup-panel {
    display: none !important;
  }
}
/* Only prevent the popup links from breaking, not the whole line */
.popup-onboarding .popup-nowrap {
  white-space: nowrap !important;
}
/* Comment delete confirm popup */
.delete-post-confirm {
  background: rgba(20, 24, 32, 0.55);
  color: #fff;
  border: 1.5px solid #222;
  border-radius: 14px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  padding: 8px 14px 7px 14px;
  font-size: 0.98em;
  min-width: 180px;
  max-width: 96vw;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadein 0.18s;
  transition: background 0.3s, box-shadow 0.3s, opacity 0.18s;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
}
.comment-delete-confirm {
  position: absolute;
  background: rgba(20, 24, 32, 0.55);
  color: #fff;
  border: 1.5px solid #222;
  border-radius: 14px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  padding: 8px 14px 7px 14px;
  font-size: 0.98em;
  min-width: 180px;
  max-width: 96vw;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadein 0.18s;
  transition: background 0.3s, box-shadow 0.3s, opacity 0.18s;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
}
.comment-delete-confirm.fadeout {
  animation: fadeout 0.18s;
  opacity: 0;
}
.comment-delete-confirm .confirm-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-delete-confirm .btn {
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 0.95em;
}
.comment-delete-confirm .btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
}
/* Notification dot indicator */
  .notification-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff5252 60%, #ff1744 100%);
    border-radius: 50%;
    position: static;
    margin-left: 8px;
    vertical-align: middle;
    border: 2px solid #222e3a;
    box-shadow: 0 0 6px 2px #ff174455, 0 1px 4px #0008;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
  }
.notification-dot-blink {
  animation: notification-dot-pulse 1.2s infinite cubic-bezier(.4,0,.2,1);
}

@keyframes notification-dot-pulse {
  0% { box-shadow: 0 0 6px 2px #ff174455, 0 1px 4px #0008; }
  50% { box-shadow: 0 0 16px 6px #ff1744aa, 0 1px 8px #000a; }
  100% { box-shadow: 0 0 6px 2px #ff174455, 0 1px 4px #0008; }
}
/* Overlay for leaderboard */
#leaderboard-overlay.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#leaderboard-overlay .overlay-inner {
  background: rgba(20, 24, 32, 0.55);
  border-radius: 18px;
  padding: 32px 32px 24px 32px;
  min-width: 320px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  color: #fff;
  position: relative;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  border: 1.5px solid #222;
  transition: background 0.3s, box-shadow 0.3s;
}
#leaderboard-overlay .btn {
  margin-bottom: 12px;
}

.leaderboard-box {
  margin: 18px 0;
  padding: 18px 16px;
  background: rgba(20, 24, 32, 0.55);
  border-radius: 18px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  color: #fff;
  font-family: inherit;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  border: 1.5px solid #222;
  box-sizing: border-box;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  transition: background 0.3s, box-shadow 0.3s;
}
.leaderboard-box h2 {
  margin: 0 0 10px 0;
  font-size: 1.1em;
  color: #ffd700;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: none;
}
.leaderboard-list {
  margin: 0 0 14px 0;
  padding: 0;
  list-style: none;
}
.leaderboard-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 1em;
  background: none;
  border-radius: 0;
  padding: 0 0 0 0;
  box-shadow: none;
  border: none;
}
.leaderboard-list li:hover {
  background: #20242b;
}
.lb-username {
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-right: 4px;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  font-size: 0.98em;
  font-weight: 600;
  border-radius: 50%;
  margin-right: 2px;
  background: #23262e;
  color: #ffd700;
  border: 1.5px solid #ffd700;
}
.rank-1 { background: #23262e; color: #ffd700; border-color: #ffd700; }
.rank-2 { background: #23262e; color: #c0c0c0; border-color: #c0c0c0; }
.rank-3 { background: #23262e; color: #cd7f32; border-color: #cd7f32; }
.avatar.avatar-fallback {
  background: #23262e;
  color: #ffd700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line, #444);
  margin-right: 6px;
}
.leaderboard-list .muted {
  font-size: 0.98em;
  margin-left: 2px;
}
.enhanced-leaderboard {
  animation: fadeInProfile 0.22s cubic-bezier(0.4,0.2,0.2,1) both;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
}
@media (max-width: 600px) {
  .leaderboard-box {
    padding: 4vw 2vw 2vw 2vw;
    max-width: 98vw;
    font-size: 0.97em;
  }
  .enhanced-leaderboard {
    max-width: 100vw;
    font-size: 0.97em;
  }
}
#aboutBox #aboutSocials {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#aboutBox #aboutSocials::-webkit-scrollbar {
  display: none;
}
#aboutBox #aboutSocials > * {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  overflow: visible !important;
}
/* Fix: Prevent global input/button style from breaking topbar buttons */
.topbar .btn, .topbar .pill {
  width: auto !important;
  max-width: none !important;
  padding: 5px 14px !important;
  font-size: 1rem !important;
  overflow: visible !important;
  resize: none !important;
}
.post-header-twolines {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1px;
}
.post-title-twolines {
  font-weight: 800;
  font-size: 1.22em;
  margin-bottom: 0px;
  letter-spacing: 0.01em;
}
.post-artist-twolines {
  font-size: 1em;
  margin-left: 6px;
  color: var(--fg2, #b0b0b0);
  font-style: italic;
}
.meta-twolines {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  color: var(--fg3, #888);
  font-size: 0.98em;
  margin-top: 1px;
  width: 100%;
}
.meta-twolines > *:not(.post-tags-twolines) {
  flex-shrink: 0;
  min-width: max-content;
}
.meta-twolines .avatar-sm {
  width: 20px;
  height: 20px;
}
.post-tags-twolines {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  font-size: 0.97em;
  margin-left: 2px;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
  flex-shrink: 1;
}
.post-tags-twolines::-webkit-scrollbar {
  display: none;
}
.post-tags-twolines .tag {
  background: var(--bg2, #181a1b);
  border-radius: 7px;
  padding: 0.13em 0.7em;
  font-family: 'Fira Mono', monospace;
  font-size: 0.97em;
  font-weight: 500;
  box-shadow: none;
  color: #bfc7d5;
  border: 1px solid var(--line, #333);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.post-tags-twolines .tag:hover {
  background: #2a7fff;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px 0 rgba(42,127,255,0.13);
}
.post-header-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.post-title-inline {
  font-weight: 700;
  font-size: 1.13em;
  margin-right: 4px;
}
.post-artist-inline {
  font-size: 1em;
  margin-right: 8px;
}
.meta-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-tags-inline {
  display: inline;
  font-size: 0.97em;
  gap: 4px;
}
/* Unify topbar pill, search, and button sizing/alignment */
.topbar .pill,
.topbar #search,
.topbar .btn {
  height: 38px;
  min-width: 90px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1.2;
}
.topbar #search {
  padding-top: 0;
  padding-bottom: 0;
}
/* Improved topbar pill and button appearance */
.topbar .pill {
  border-radius: 6px !important;
  border: 1.5px solid var(--line2, #444) !important;
  padding: 5px 14px !important;
  background: var(--bg2, #181a20);
  font-weight: 500;
  color: var(--fg, #eaeaea);
  letter-spacing: 0.01em;
  transition: background 0.18s, border-color 0.18s;
}
.topbar .pill:hover, .topbar .pill:focus {
  background: var(--bg3, #23262e);
  border-color: var(--acc, #2a7fff);
  outline: none;
}
.topbar .btn {
  border-radius: 6px;
  border: 1.5px solid var(--line2, #444);
  background: var(--bg2, #181a20);
  color: var(--fg, #eaeaea);
  font-weight: 500;
  padding: 5px 18px;
  margin-left: 12px;
  letter-spacing: 0.01em;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  box-shadow: none;
}
.topbar .btn:hover, .topbar .btn:focus {
  background: var(--bg3, #23262e);
  border-color: var(--acc, #2a7fff);
  color: var(--acc, #2a7fff);
  outline: none;
}
/* Remove pill effect from topbar pills */
.topbar .pill {
  border-radius: 6px !important;
  border: 1px solid var(--line) !important;
}
.topbar-posts .pill::-webkit-inner-spin-button,
.topbar-posts .pill::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
  display: none !important;
}
.topbar-posts .pill {
  appearance: textfield;
  -moz-appearance: textfield;
}
/* --- Improved topbar layout for desktop (JS class version) --- */
.topbar-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: nowrap;
}
.topbar-posts {
  flex: 0 0 auto;
}
.topbar-search {
  flex: 1 1 0%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 120px;
}
.topbar-search #search {
  width: 120px;
  min-width: 0;
  max-width: 320px;
  transition: width 0.32s cubic-bezier(0.4,0.2,0.2,1), box-shadow 0.18s;
  box-shadow: none;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 1em;
  color: var(--fg);
  outline: none;
}
.topbar-search #search:focus {
  width: 320px;
  box-shadow: 0 2px 12px #0002;
  background: var(--bg3);
}
.user-actions-container {
  margin-left: 0.5em;
}
@media (max-width: 900px) {
  .topbar-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .topbar-search {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
  }
  .topbar-search #search {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }
}
/* --- Improved topbar layout for desktop --- */
.topbar .toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: nowrap;
}
.topbar .toolbar > * {
  flex: 0 0 auto;
}
.topbar .pill {
  margin-right: 0;
}
.topbar .user-actions-container {
  margin-left: 0em;
}
.topbar #search {
  width: 120px;
  min-width: 0;
  max-width: 320px;
  transition: width 0.32s cubic-bezier(0.4,0.2,0.2,1), box-shadow 0.18s;
  box-shadow: none;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 1em;
  color: var(--fg);
  outline: none;
}
.topbar #search:focus {
  width: 320px;
  box-shadow: 0 2px 12px #0002;
  background: var(--bg3);
}
@media (max-width: 900px) {
  .topbar .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .topbar #search {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }
}
/* Force hide any up/down arrow overlays or spinners that may appear over user pill */
.user-pill::-webkit-inner-spin-button,
.user-pill::-webkit-outer-spin-button,
.user-pill::-webkit-scrollbar,
.user-pill::-webkit-scrollbar-button,
.user-pill::-webkit-scrollbar-thumb,
.user-pill::-webkit-scrollbar-track,
.user-pill::-webkit-scrollbar-corner,
.user-pill::after,
.user-pill::before,
.user-pill .arrow,
.user-pill .up,
.user-pill .down,
.user-pill .spinner,
.user-pill .custom-scrollbar,
.user-pill .scrollbar,
.user-pill .scroll-arrow,
.user-pill .scroll-up,
.user-pill .scroll-down {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: -1 !important;
}
/* Remove number input spinner arrows for user pill and everywhere */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
/* --- User actions slide-out modern animation --- */
.user-actions-container {
  display: flex;
  align-items: center;
  position: relative;
  gap: 0;
}
.user-action-buttons {
  display: flex;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-24px) scale(0.95);
  transition: opacity 0.32s cubic-bezier(0.4,0.2,0.2,1), transform 0.32s cubic-bezier(0.4,0.2,0.2,1);
  will-change: opacity, transform;
}
.user-actions-container.open .user-action-buttons {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}
.user-pill {
  cursor: pointer;
  outline: none;
  transition: box-shadow 0.18s;
  border-radius: 8px;
  margin-right: 0.5em;
}
.user-pill:focus {
  box-shadow: 0 0 0 2px var(--acc, #2a7fff);
}
@media (max-width: 600px) {
  .user-pill:focus {
    box-shadow: none !important;
  }
}
@media (max-width: 600px) {
  .user-pill {
    width: 95vw !important;
    min-width: 0 !important;
    max-width: 95vw !important;
    font-size: 1.05em !important;
    padding: 12px 0 !important;
    border-radius: 8px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    left: 0;
    position: relative;
    text-align: center !important;
    background: none;
  }
}
@media (max-width: 600px) {
  .user-actions-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0;
    position: relative;
  }
  .user-action-buttons {
    flex-direction: column;
    gap: 12px;
    transform: translateY(-10px) scale(0.93);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    display: flex;
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0;
    position: relative;
    transition: max-height 0.32s cubic-bezier(0.4,0.2,0.2,1), opacity 0.32s cubic-bezier(0.4,0.2,0.2,1), transform 0.32s cubic-bezier(0.4,0.2,0.2,1);
  }
  .user-action-buttons .btn,
  .user-action-buttons .btn-ghost {
    width: 95vw !important;
    min-width: 0 !important;
    max-width: 85vw !important;
    font-size: 1.05em;
    padding: 12px 0 !important;
    border-radius: 8px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .user-actions-container.open .user-action-buttons {
    transform: translateY(0) scale(1);
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
  }
  .user-actions-container:not(.open) .user-action-buttons {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    transform: translateY(-12px) scale(0.95);
  }
}
/* Compose textarea char counter in corner */
#postForm > div[style*="position:relative"] {
  position: relative;
}
#bodyCounter {
  position: absolute !important;
  bottom: 6px;
  right: 10px;
  pointer-events: none;
  z-index: 2;
  background: transparent;
}
/* Center profile box content */
#aboutBox {
  text-align: center;
}
#aboutBox .muted.small {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
  display: block;
  margin-bottom: 1em;
}
#aboutBox #aboutText,
#aboutBox #aboutSocials,
#aboutBox #editAboutBtn {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
/* Fade in/out for comment and edit post sections */
.fade-out {
  animation: fadeOutProfile 0.18s cubic-bezier(0.4,0.2,0.2,1) forwards;
}
.fade-in {
  animation: fadeInProfile 0.18s cubic-bezier(0.4,0.2,0.2,1) forwards;
}
@keyframes fadeOutProfile {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}
@keyframes fadeInProfile {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Fade in/out for profile edit section */
.fade-out {
  animation: fadeOutProfile 0.18s cubic-bezier(0.4,0.2,0.2,1) forwards;
}
.fade-in {
  animation: fadeInProfile 0.18s cubic-bezier(0.4,0.2,0.2,1) forwards;
}
@keyframes fadeOutProfile {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}
@keyframes fadeInProfile {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ASCII banner mobile styles (moved from index.html) */
/* Removed #ascii-banner-mobile rules to avoid conflicts. Use .ascii-banner class for all ASCII banners. */
@media (max-width: 600px) {
  .feed-header-bar {
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    text-align: center;
  }
  .feed-header-bar .hstack {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
  }
  .feed-header-bar .sort-icons {
    margin-left: 0;
    margin-top: 4px;
    justify-content: center;
    width: 100%;
  }
}
/* Responsive fix for narrow desktop windows (up to 1100px) */
@media (max-width: 1100px) {
  .box,
  .post {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  input,
  textarea,
  button,
  select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #postForm,
  form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}
/* =========================================
   components.css
   - Cards/posts, actions
   - Avatars, tag cloud, sort icons
   - Player, comments, overlay
   - Misc UI components
   ========================================= */

/* Generic “box” container */
.box {
  border: 1.5px solid #23272a;
  padding: 18px 18px 14px 18px;
  background: rgba(20, 22, 28, 0.88);
  border-radius: 8px;
  box-shadow: none;
  width: 96%;
  box-sizing: border-box;
  max-width: 100%;
  transition: box-shadow 0.18s, background 0.18s;
  margin-bottom: 22px;
}
.box:last-child {
  margin-bottom: 0;
}


/* Liquid glass look for overlays (profile/about, modals, etc.) */
.overlay .box, #profile .box {
  background: rgba(20, 22, 28, 0.88) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  border-radius: 8px !important;
  transition: background 0.18s, box-shadow 0.18s;
  border: 1.5px solid #23272a !important;
}

/* Post/Card */
.post {
  border: 1.5px solid #23272a;
  box-shadow: none;
  padding: 18px 18px 14px 18px;
  margin: 22px auto 28px auto;
  background: rgba(20, 22, 28, 0.88);
  border-radius: 8px;
  transition: box-shadow 0.18s, background 0.18s;
  width: 100%;
  box-sizing: border-box;
  max-width: 700px;
}
.post .post-title {
  font-weight: 700;
  font-size: 1.18em;
  margin-bottom: 2px;
}
.post .post-artist {
  font-size: 1em;
  margin-bottom: 6px;
}
.post:hover {
  box-shadow: none;
  background: rgba(28, 32, 40, 0.92);
}
.post .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  color: #bfc7d5;
  font-size: 0.99em;
}
.post .meta .dot { opacity: .5; }
.post .post-tags {
  margin: 2px 0 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.97em;
}


/* Density toggles */
:root[data-density="compact"] .post { padding: 10px; }
:root[data-density="compact"] .box { padding: 10px; }
:root[data-density="compact"] .actions .btn { padding: 1px 6px; }

/* Actions bar (always horizontal) */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
  overflow-y: hidden;
}
.actions > * {
  flex: 1 1 auto;
  min-width: 80px;
  margin: 0;
  max-width: 100%;
  box-sizing: border-box;
}
  .actions .btn { font-size: 12px; padding: 2px 8px; border-radius: 4px; }

/* Subtle click effect for feed buttons */
.actions .btn:active,
.user-action-buttons .btn:active,
.user-action-buttons .btn-ghost:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px #0003;
  filter: brightness(0.97);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}

@media (max-width: 600px) {
  .actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: stretch;
  }
  .actions > * {
    min-width: 90px;
    font-size: 1.1em;
    padding: 12px 0;
    flex: 1 1 100%;
    border-radius: 8px;
    margin-bottom: 2px;
  }
  input, textarea, button, select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    font-size: 1.1em;
    padding: 12px 10px;
    border-radius: 4px;
  }
  .post {
    padding: var(--space-3);
    margin-bottom: 18px;
    max-width: 100vw;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 2px 10px 0 rgba(0,0,0,0.13);
  }
  .box {
    padding: var(--space-3);
    margin-bottom: 18px;
    max-width: 100vw;
    box-sizing: border-box;
    border-radius: 18px;
    background: rgba(20, 24, 32, 0.55);
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
    backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
    transition: background 0.3s, box-shadow 0.3s;
  }
}

/* Likes micro-animation */
.like-on { color: var(--like); }
.like-animate { animation: likePop 0.18s cubic-bezier(0.4,0.2,0.2,1); }
@keyframes likePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Sort icon buttons */
.sort-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 12px;
}
.sort-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  outline: none;
}
.sort-btn.active, .sort-btn:hover {
  background: none !important;
  box-shadow: 0 1px 4px #0002;
}
.sort-btn:focus { outline: none; }
.icon-sort-newest::before {
  content: '\23F3'; /* Unicode for hourglass ⏳ */
  font-size: 1.2em;
  color: var(--accent, #2a7fff);
  background: none !important;
  border-radius: 0;
}
.icon-sort-likes::before {
  content: '\2665';
  font-size: 1.2em;
  color: #e25555;
}
.icon-sort-comments::before {
  content: '\1F4AC';
  font-size: 1.2em;
  color: #888;
  background: none !important;
  border-radius: 0;
}

.avatar.avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line, #444);
  background: #222;
  margin-right: 8px;
  display: block;
  overflow: hidden;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.10);
}
.profile-avatar {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line, #444);
  background: #222;
  margin-bottom: 8px;
  box-shadow: 0 2px 16px #0004;
}
.profile-avatar-small {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line, #444);
  background: #222;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px #0002;
}
.profile-post-list { max-width: 420px; word-break: break-word; }
.tag-label { white-space: nowrap; }

/* Custom file input for profile */

.custom-file-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}
.custom-file-input {
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}
.custom-file-input:focus + label {
  outline: 2px solid var(--acc, #2a7fff);
}
/* Make avatar upload button as wide as about textarea */
/* Make avatar upload button as wide as about textarea and center text */
/* Make avatar upload button slightly wider than textarea */
#avatarFileLabel {
  width: 100%;
  min-width: 100%;
  max-width: none;
  box-sizing: border-box;
  display: inline-block;
  text-align: center;
}
#avatarFileName {
  flex: 0 0 auto;
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}

/* Tag Cloud (one-line, scrollable) */
.tag-cloud {
  touch-action: pan-x;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  align-items: center;
  box-sizing: border-box;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  max-width: 100vw !important;
  overflow-x: auto !important;
}
.tag-cloud.post-tags-twolines {
  padding: 0;
  gap: 4px;
  margin-left: 2px;
  max-width: 100%;
}

.tag-cloud, .tag-cloud * {
  max-width: none !important;
  overflow-x: visible;
}
.tag-cloud::-webkit-scrollbar { display: none; }
.tag-cloud .tag {
  display: inline-block;
  padding: 0.18em 0.6em;
  border-radius: 1em;
  background: #23272f;
  color: #fff;
  font-family: 'Fira Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  /* transition removed to eliminate any ease/smoothing during drag */
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  cursor: pointer;
}
/* Removed tag frequency-based sizing: all tags same size */
.tag-cloud .tag:hover { background: #3a3f4b; color: #ff7b7b; }
/* Show grabbing cursor when dragging tag cloud */
.tag-cloud.dragging {
  cursor: grabbing !important;
  user-select: none;
}
@media (max-width: 600px) {
  .tag-cloud .tag { font-size: 0.75rem; padding: 0.14em 0.4em; }
}

/* Media/player */
.player {
  margin-top: 6px;
  display: none;
  background: rgba(20, 24, 32, 0.55);
  padding: 6px;
  border: 1.5px solid #222;
  border-radius: 14px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  transition: background 0.3s, box-shadow 0.3s;
}
.player.active { display: block; }
iframe { border: 0; }
iframe[loading=lazy] { contain: content; }
.yt { width: 100%; aspect-ratio: 16/9; }
.sp { width: 100%; height: 152px; display: block; min-height: 120px; }
.player .sp { display: block !important; height: 152px !important; min-height: 120px !important; }
.bc iframe { width: 100% !important; }
.audio { width: 100%; }

/* Spotify note styling used by providers.js markup */
.spotify-note {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.spotify-note-logo {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 0;
}
.spotify-note-body {
  flex: 1 1 auto;
  min-width: 0;
}
.spotify-note-text {
  overflow-wrap: anywhere;
}
.spotify-note-actions .spotify-open {
  display: inline-block;
}
@media (max-width: 600px) {
  .spotify-note {
    flex-direction: column;
    align-items: center;
  }
  .spotify-note-actions .spotify-open {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .spotify-note-body { width: 100%; }
  .spotify-note-text { text-align: center; }
}

@media (max-width: 600px) {
  .player {
    padding-bottom: 38px;
    min-height: 120px;
  }
  .yt {
    min-height: 120px !important;
    padding-bottom: 38px !important;
    aspect-ratio: unset !important;
    height: 200px !important;
    box-sizing: border-box;
  }
  .player iframe.yt {
    min-height: 120px !important;
    padding-bottom: 38px !important;
    aspect-ratio: unset !important;
    height: 200px !important;
    box-sizing: border-box;
  }
}

/* Comments */
.comment-box {
  display: none;
  margin-top: 6px;
}
.comment-box.active {
  display: block;
}
.comment {
  padding: 8px 0 8px 0;
  border-top: 1px solid #23272a;
  background: rgba(20, 24, 32, 0.38);
  border-radius: 10px;
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Pills/outline */
.pill { border: 1px dashed var(--line); padding: 3px 8px; border-radius: 999px; }
.highlight { outline: 2px dotted var(--acc); outline-offset: 2px; }

/* Storage meter */
.meter { height: 6px; background: #0e1116; border: 1px dashed var(--line); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--acc); width: 0; }

/* Overlay (help) */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0,0,0,.6);
  overflow: hidden;
  padding: 2vw;
}
.overlay.active { display: flex; }
.overlay .sheet {
  width: 100%;
  max-width: 520px;
  background: rgba(20, 24, 32, 0.55);
  border: 1.5px solid #222;
  border-radius: 18px;
  padding: 28px 20px 24px 20px;
  box-sizing: border-box;
  margin: 0 auto;
  overflow-y: auto;
  max-height: 90vh;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 #222;
  font-size: 1.08em;
  color: var(--fg);
  transition: background 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%) contrast(1.1);
}
@media (max-width: 600px) {
  .overlay .sheet {
    max-width: 93vw;
    width: 97vw;
    min-width: 0;
    padding: 7px;
    font-size: 0.95em;
    border-radius: 10px;
  }
  .overlay { padding: 0; }
}
.post-thumbnail-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.post-thumbnail {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px #0003;
  background: #181a20;
  border: 1.5px solid var(--line, #444);
  display: block;
}