/* ==========================================
   0. FORCE DARK GLASS IDENTITY REGARDLESS OF SITE THEME
   ========================================== */
:root,
body {
  color-scheme: dark;
}

body {
  background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460) fixed !important;
  background-size: 400% 400%;
  color: #ffffff !important;
}

/* ==========================================
   1. ANIMATED BACKGROUND
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
  body {
    animation: gradientBG 15s ease infinite;
  }
}

/* ==========================================
   2. CUSTOM SCROLLBARS (WebKit + Firefox Parity)
   ========================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* ==========================================
   3. DESKTOP MULTI-COLUMN LAYOUT (>768px) & GLASS CONTAINERS
   ========================================== */
.column,
.navigation-panel,
.columns-area__panels__pane__inner,
.compose-panel,
.getting-started {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.column:hover,
.navigation-panel:hover,
.columns-area__panels__pane__inner:hover,
.compose-panel:hover,
.getting-started:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@media screen and (min-width: 769px) {
  .columns-area {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
  }

  .drawer {
    order: 1 !important;
    flex: 0 0 280px;
    max-width: 280px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .navigation-panel,
  .columns-area__panels__pane__inner {
    flex: 0 0 280px;
    max-width: 280px;
  }

  .column-timeline,
  .column-direct,
  .column {
    order: 2 !important;
    flex: 1 1 380px;
    max-width: 420px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .column-notifications {
    order: 3 !important;
    flex: 1 1 340px;
    max-width: 360px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .column, .drawer, .navigation-panel, .columns-area__panels__pane__inner, .compose-panel, .getting-started {
    background: rgba(15, 23, 42, 0.95) !important;
  }
}

/* ==========================================
   4. TIMELINE POSTS
   ========================================== */
.status {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px;
  margin: 6px 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.status:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   5. NOTIFICATIONS: SLIDE, SPARK & AUTO-CLEAR
   ========================================== */
.badge,
.notification-badge,
.unread-indicator,
.column-header__badge,
.tab-bar__badge,
.icon-button__counter,
.icon-with-badge__badge {
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.4s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@media (prefers-reduced-motion: no-preference) {
  .badge,
  .notification-badge,
  .unread-indicator,
  .column-header__badge,
  .tab-bar__badge,
  .icon-button__counter,
  .icon-with-badge__badge {
    animation: badgeSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               badgeGlowPulse 1.5s ease-out 0.35s 1;
  }
}

.badge:hover,
.notification-badge:hover,
.unread-indicator:hover,
.column-header__badge:hover,
.tab-bar__badge:hover,
.icon-button__counter:hover,
.icon-with-badge__badge:hover {
  opacity: 1 !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.5),
              inset 0 0 6px rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.06);
}

.badge::after,
.notification-badge::after,
.unread-indicator::after,
.column-header__badge::after,
.tab-bar__badge::after,
.icon-button__counter::after,
.icon-with-badge__badge::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(circle at 20% 90%, #ffffff 0, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 75% 85%, #ffffff 0, #ffffff 1.2px, transparent 2.5px),
    radial-gradient(circle at 45% 95%, #ffffff 0, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 80% 70%, #ffffff 0, #ffffff 0.8px, transparent 1.8px);
  background-size: 100% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .badge::after,
  .notification-badge::after,
  .unread-indicator::after,
  .column-header__badge::after,
  .tab-bar__badge::after,
  .icon-button__counter::after,
  .icon-with-badge__badge::after {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    animation: containedSparks 3.5s ease-out 0.35s infinite;
  }
}

.notification {
  position: relative;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px;
  margin: 8px 0;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: no-preference) {
  .notification {
    animation: notificationCardSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .notification:not(:first-child) {
    animation: fadeAndVanish 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 20s;
  }
}

.notification:not(:first-child):hover,
.notification:not(:first-child):focus-within {
  animation: none !important;
  opacity: 1 !important;
  max-height: 300px !important;
  margin: 8px 0 !important;
  padding: 12px !important;
  pointer-events: auto !important;
}

.show-older-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.show-older-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 12px;
  padding: 6px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.show-older-toggle-label::before {
  content: '↺';
}

.show-older-toggle-label:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.show-older-toggle:focus-visible + .show-older-toggle-label {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.show-older-toggle:checked ~ .notification:not(:first-child) {
  animation: none !important;
  opacity: 1 !important;
  max-height: 300px !important;
  margin: 8px 0 !important;
  padding: 12px !important;
  pointer-events: auto !important;
}

.show-older-toggle:checked + .show-older-toggle-label::before {
  content: '✓';
}

/* ==========================================
   5b. NAVIGATION PANEL LINKS
   ========================================== */
.column-link {
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.column-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.column-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ==========================================
   6. INTERACTIVE ACTION BAR CONTROLS
   ========================================== */
.status__action-bar button,
.status__action-bar .icon-button {
  color: rgba(255, 255, 255, 0.7) !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              color 0.15s ease,
              filter 0.15s ease;
}

.status__action-bar button:hover,
.status__action-bar .icon-button:hover {
  transform: scale(1.18);
  color: #ffffff !important;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.status__action-bar button:active,
.status__action-bar .icon-button:active {
  transform: scale(0.92);
}

.status__action-bar .icon-button.active {
  color: #ffffff !important;
}

.status__action-bar .icon-button.icon-button--with-counter.active,
.status__action-bar .icon-button[title*="Boost"].active,
.status__action-bar .icon-button[title*="Reblog"].active {
  color: #7fd6ff !important;
  filter: drop-shadow(0 0 6px rgba(127, 214, 255, 0.6));
}

.status__action-bar .icon-button[title*="Favourite"].active,
.status__action-bar .icon-button[title*="Favorite"].active {
  color: #ffd76f !important;
  filter: drop-shadow(0 0 6px rgba(255, 215, 111, 0.6));
}

.status__action-bar .icon-button[title*="Bookmark"].active {
  color: #b39dff !important;
  filter: drop-shadow(0 0 6px rgba(179, 157, 255, 0.6));
}

/* ==========================================
   7. TEXT & READABILITY FIXES
   ========================================== */
.status__content,
.display-name,
.account__display-name,
.navigation-panel,
.notification__message {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.status__relative-time,
.account__discreet {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* ==========================================
   8. TYPING / REPLYING INDICATOR
   ========================================== */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 6px 0 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
}

.typing-indicator__bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.typing-indicator__bars span {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

@media (prefers-reduced-motion: no-preference) {
  .typing-indicator__bars span {
    animation: typingLine 1.1s ease-in-out infinite;
  }
  .typing-indicator__bars span:nth-child(1) { animation-delay: 0s; }
  .typing-indicator__bars span:nth-child(2) { animation-delay: 0.12s; }
  .typing-indicator__bars span:nth-child(3) { animation-delay: 0.24s; }
  .typing-indicator__bars span:nth-child(4) { animation-delay: 0.36s; }
  .typing-indicator__bars span:nth-child(5) { animation-delay: 0.48s; }
}

/* ==========================================
   9. KEYFRAME ANIMATIONS
   ========================================== */
@keyframes badgeSlideIn {
  0% {
    transform: translateX(20px) scale(0.6);
    opacity: 0;
  }
  70% {
    transform: translateX(-2px) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes badgeGlowPulse {
  0% {
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.7) !important;
  }
  100% {
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  }
}

@keyframes fadeAndVanish {
  0% {
    opacity: 1;
    max-height: 300px;
    transform: translateY(0) scale(1);
  }
  80% {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  100% {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
    overflow: hidden;
  }
}

@keyframes containedSparks {
  0% {
    transform: translate3d(0, 25%, 0);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    transform: translate3d(0, -25%, 0);
    opacity: 0;
  }
}

@keyframes notificationCardSlide {
  0% {
    transform: translateY(-14px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes typingLine {
  0%, 60%, 100% {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    transform: scaleY(0.5);
  }
  25% {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
    transform: scaleY(1);
  }
}

@keyframes gradientBG {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sparkPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.6;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.7), 0 0 10px rgba(127, 214, 255, 0.5);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 12px rgba(255, 255, 255, 1), 0 0 20px rgba(127, 214, 255, 0.9);
  }
}

/* ==========================================
   10b. AVATAR GLOWING SPARK PULSE EFFECT
   ========================================== */
.status__display-name,
.permalink {
  overflow: visible !important;
}

.status__avatar {
  position: relative !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

.status__avatar::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(200,235,255,0.7) 60%, rgba(127,214,255,0.2) 100%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 14px rgba(127, 214, 255, 0.6);
  pointer-events: none;
  z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
  .status__avatar::after {
    animation: sparkPulse 2.5s ease-in-out infinite;
  }
}

/* ==========================================
   11. FOOTER CLEANUP (Custom Copyright & Get App Link)
   ========================================== */
._ui_components_link_footer__wrapper > section:first-of-type {
  display: none !important;
}

._ui_components_link_footer__wrapper > section:last-of-type > h2 {
  display: none !important;
}

._ui_components_link_footer__wrapper a[href="https://joinmastodon.org"],
._ui_components_link_footer__wrapper a[href="/keyboard-shortcuts"],
._ui_components_link_footer__wrapper a[href="https://github.com/glitch-soc/mastodon"] {
  display: none !important;
}

._ui_components_link_footer__version {
  display: none !important;
}

._ui_components_link_footer__wrapper {
  padding-top: 10px;
}

._ui_components_link_footer__wrapper a[href="https://joinmastodon.org/apps"] {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 12px;
}

._ui_components_link_footer__wrapper a[href="https://joinmastodon.org/apps"]:hover {
  color: #ffffff !important;
}

._ui_components_link_footer__wrapper::before {
  content: "© 2026 badgoats.v6.rocks. All rights reserved.";
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
}

/* ==========================================
   12. HIDE SEPARATORS
   ========================================== */
li[role="separator"],
[role="separator"] {
  display: none !important;
}

/* ==========================================
   13. EMPTY COLUMN INDICATOR BOOSTED GLOW (BOX ONLY)
   ========================================== */
.empty-column-indicator {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.22), inset 0 0 15px rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  text-align: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.empty-column-indicator:hover {
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.35), inset 0 0 22px rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.empty-column-indicator span {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* ==========================================
   14. MOBILE ENHANCEMENTS (<768px)
   ========================================== */
@media screen and (max-width: 768px) {
  .columns-area {
    display: block;
    flex-direction: column;
    padding: 10px;
  }

  .column,
  .drawer,
  .navigation-panel,
  .columns-area__panels__pane__inner,
  .compose-panel {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 10px !important;
    border-radius: 12px;
  }

  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    border: none;
    backdrop-filter: none;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  .status__action-bar {
    margin-top: 8px;
    margin-bottom: 4px;
  }

  .status__action-bar button,
  .status__action-bar .icon-button {
    padding: 8px 12px !important;
    transition: color 0.15s ease;
    transform: none !important;
  }

  .status__content {
    font-size: 14px;
    line-height: 1.5;
  }

  .display-name,
  .column-header__title {
    font-size: 16px;
  }
}

