html {
    background: var(--color-background);
}

/* Ensure consistent viewport handling across browsers */
html, body {
    /* Fallback for browsers that don't support dvh */
    height: 100vh;
    /* Use dynamic viewport height where supported */
}

/* CSS custom property for dynamic viewport height - can be updated via JS */
:root {
    --vh: 1vh;
    --dvh: 1dvh;
    --font-size-scale: 1.0; /* Font size scaling factor */
    
    /* Scaled font sizes using the scale factor */
    --font-size-base: calc(16px * var(--font-size-scale, 1.0));
    --font-size-0-7: calc(0.7rem * var(--font-size-scale, 1.0));
    --font-size-0-75: calc(0.75rem * var(--font-size-scale, 1.0));
    --font-size-0-8: calc(0.8rem * var(--font-size-scale, 1.0));
    --font-size-0-85: calc(0.85rem * var(--font-size-scale, 1.0));
    --font-size-0-875: calc(0.875rem * var(--font-size-scale, 1.0));
    --font-size-0-9: calc(0.9rem * var(--font-size-scale, 1.0));
    --font-size-0-95: calc(0.95rem * var(--font-size-scale, 1.0));
    --font-size-1: calc(1rem * var(--font-size-scale, 1.0));
    --font-size-1-1: calc(1.1rem * var(--font-size-scale, 1.0));
    --font-size-1-2: calc(1.2rem * var(--font-size-scale, 1.0));
    --font-size-1-25: calc(1.25rem * var(--font-size-scale, 1.0));
    --font-size-1-4: calc(1.4rem * var(--font-size-scale, 1.0));
    --font-size-1-5: calc(1.5rem * var(--font-size-scale, 1.0));
    --font-size-1-6: calc(1.6rem * var(--font-size-scale, 1.0));
    --font-size-2: calc(2rem * var(--font-size-scale, 1.0));
    --font-size-3: calc(3rem * var(--font-size-scale, 1.0));
    
    /* Animation timing variables (speed multipliers) */
    --animation-overall: 1.0;
    --animation-card-advance: 1.0;
    --animation-card-stack-entrance: 1.0;
    --animation-corner-elements: 1.0;
    --animation-card-flip: 1.0;
    --animation-modals: 1.0;
    --animation-page-transitions: 1.0;
    --animation-thread-transitions: 1.0;
    --animation-fullscreen-transitions: 1.0;
    --animation-ui-transitions: 1.0;
}

/* Chrome on iOS specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    body {
        height: calc(var(--vh, 1vh) * 100);
    }
}

/* Hide scrollbar on html element when settings page is active */
html.settings-active {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

html.settings-active::-webkit-scrollbar {
    display: none;
}

/* Ensure scrollbar is hidden immediately on html element regardless of class state */
html {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none !important;
}

/* Ensure scrollbar is always hidden during initial load */
html, body {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Global scrollbar hiding for all elements during page load */
* {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Prevent any scrollbars during initial page render */
html, body, #root, .settings-page {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
#root::-webkit-scrollbar,
.settings-page::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

body {
    font-family: adobe-jenson-pro, serif;
    background: var(--color-background);
    color: var(--color-text);
    margin: 0;
    line-height: 1.4;
    overflow-x: hidden; /* Prevent horizontal scrollbars */
    overflow: hidden;
    display: flex;
    justify-content: center;
    height: 100vh;
    width: 100%;
    box-sizing: border-box;
    /* Hide scrollbar by default */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
    /* Apply font size scaling */
    font-size: var(--font-size-base);
}

/* Hide scrollbar for webkit browsers on body */
body::-webkit-scrollbar {
    display: none !important;
}

/* Additional safety for root container */
#root {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

#root::-webkit-scrollbar {
    display: none !important;
}

/* Allow scrolling when on settings page */
body.settings-scrollable {
    overflow: auto !important;
    overflow-x: hidden !important; /* Prevent horizontal scrolling */
    position: static !important;
    height: auto !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for better mobile browser support */
    /* Ensure full width for scroll area */
    width: 100% !important;
    /* Hide scrollbar */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
body.settings-scrollable::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Hide scrollbar only on the settings page container */
.settings-page {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.settings-page::-webkit-scrollbar {
    display: none;
}

#root {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    position: relative;
    padding: 0;
    overflow: visible;
    opacity: 0;
    animation: appInitialLoad 0.8s ease-out 0.1s forwards;
}

/* Override centering for settings page */
#root.settings-layout {
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important; /* Dynamic viewport height for better mobile browser support */
    /* Ensure full width is available for scroll detection */
    width: 100% !important;
    max-width: none !important;
    /* Hide scrollbar */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers on root */
#root.settings-layout::-webkit-scrollbar {
    display: none;
}

#app {
    width: 100%;
    height: 100%;
    display: contents;
}

/* Page transition animations */
.page-entering {
    opacity: 0;
    animation: pageEnter var(--duration-page-transitions) ease-out forwards;
}

.page-exiting {
    opacity: 1;
    animation: pageExit var(--duration-page-transitions) ease-out forwards;
}

/* Home redirect page transitions */
.home-redirect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000; /* Above other content */
    background: var(--color-background);
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-redirect.page-entering {
    opacity: 0;
    animation: pageEnter var(--duration-page-transitions) ease-out forwards;
}

.home-redirect.page-exiting {
    opacity: 1;
    animation: pageExit var(--duration-page-transitions) ease-out forwards;
}

.home-redirect-message {
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    text-align: center;
    opacity: 0.8;
    animation: redirectPulse 1.5s ease-in-out infinite;
}

@keyframes redirectPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

/* Auth timeout error UI */
.auth-timeout-container {
    max-width: 500px;
    padding: 2rem;
    text-align: center;
}

.auth-timeout-message {
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-5);
    font-weight: 700;
    margin-bottom: 1rem;
}

.auth-timeout-description {
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-size: var(--font-size-0-95);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-timeout-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.auth-timeout-actions .cancel-btn,
.auth-timeout-actions .save-btn {
    flex: 1;
    max-width: 150px;
}

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

/* Fix page transitions for settings-style layout pages */
body.settings-scrollable .page-entering {
    animation: pageEnterNoTransform var(--duration-page-transitions) ease-out forwards;
}

body.settings-scrollable .page-exiting {
    animation: pageExitNoTransform var(--duration-page-transitions) ease-out forwards;
}

@keyframes pageEnterNoTransform {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pageExitNoTransform {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* Initial app load animation */
@keyframes appInitialLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.stamina-level-bar {
    /* Hidden - replaced by dynamic corner elements */
    display: none !important;
}

.anisota-footer {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0rem 1.5rem max(1rem, env(safe-area-inset-bottom)) 1.5rem;
    font-size: var(--font-size-1-5);
    font-family: adobe-jenson-pro, serif;
    box-sizing: border-box;
    z-index: 999;
    isolation: isolate;
    border: none !important;
    outline: none !important;
}


.anisota-footer .brand,
.anisota-footer .back,
.anisota-footer .refresh,
.anisota-footer .touch {
    font-size: var(--font-size-1-5);
    font-family: adobe-jenson-pro, serif;
    font-style: normal;
}

.anisota-footer .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-title {
    font-size: var(--font-size-1-5);
    font-family: adobe-jenson-pro, serif;
    font-style: normal;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: var(--font-size-0-85);
    font-family: adobe-jenson-pro, serif;
    font-style: italic;
    color: var(--color-text-muted);
    opacity: 0.8;
    line-height: 1;
    margin-top: -0.1rem;
}

.footer-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Ensure proper centering for the non-authenticated footer */
.anisota-footer:has(a[href="/login"]) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    align-items: flex-end;
}

.anisota-footer:has(a[href="/login"]) .footer-controls {
    justify-self: center;
}

.anisota-footer:has(a[href="/login"]) a[href="/login"] {
    justify-self: end;
}

.anisota-footer:has(a[href="/login"]) > div:first-child {
    justify-self: start;
}

/* Feed header container to prevent layout shifts */
.feed-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem; /* Reserve consistent space for either feed-switcher or feed-subtitle */
    width: 100%;
    z-index: 16;
}

.feed-subtitle {
    color: var(--color-text-muted);
    opacity: 0;
    font-size: var(--font-size-0-9);
    text-align: center;
    user-select: none;
    pointer-events: none;
    transition: opacity calc(var(--duration-ui-transitions) * 0.3) ease-in-out;
    transition-delay: calc(var(--duration-ui-transitions) * 0.6);
}

.entrance-complete .feed-subtitle,
.cache-restore-complete .feed-subtitle {
    opacity: 0.6;
}

/* Alert animations for feed subtitle */
.feed-subtitle.alert-stamina {
    animation: staminaAlert 0.3s ease-out;
    color: #ff6b6b;
    opacity: 1 !important;
}

.feed-subtitle.alert-levelup {
    animation: levelUpAlert 0.5s ease-out;
    color: #4ecdc4;
    opacity: 1 !important;
}

.feed-subtitle.alert-stamina-fade-out,
.feed-subtitle.alert-levelup-fade-out {
    animation: alertFadeOut 0.4s ease-out forwards;
}

.feed-subtitle.title-fade-in {
    animation: titleFadeIn 0.4s ease-out forwards;
}

/* Subtitle visibility control for PostListViewPage */
.feed-container.subtitle-hidden .feed-subtitle {
    opacity: 0 !important;
    transition: opacity calc(var(--duration-ui-transitions) * 0.3) ease-in-out;
    transition-delay: 0s;
}

.feed-container.subtitle-visible .feed-subtitle {
    opacity: 0.6;
    transition: opacity calc(var(--duration-ui-transitions) * 0.3) ease-in-out;
    transition-delay: calc(0.2s / var(--animation-ui-transitions, 1));
}

.feed-container.subtitle-visible.entrance-complete .feed-subtitle,
.feed-container.subtitle-visible.cache-restore-complete .feed-subtitle {
    opacity: 0.6;
}

@keyframes staminaAlert {
    0% {
        transform: scale(1) translateY(0);
        color: var(--color-text);
    }
    50% {
        transform: scale(1.1) translateY(-2px);
        color: #ff6b6b;
    }
    100% {
        transform: scale(1) translateY(0);
        color: #ff6b6b;
    }
}

@keyframes levelUpAlert {
    0% {
        transform: scale(1) translateY(0);
        color: var(--color-text);
    }
    25% {
        transform: scale(1.2) translateY(-4px);
        color: #4ecdc4;
    }
    50% {
        transform: scale(1.1) translateY(-2px);
        color: #4ecdc4;
    }
    75% {
        transform: scale(1.15) translateY(-3px);
        color: #4ecdc4;
    }
    100% {
        transform: scale(1) translateY(0);
        color: #4ecdc4;
    }
}

@keyframes alertFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(2px);
    }
}

@keyframes titleFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.05) translateY(-2px);
    }
    100% {
        opacity: 0.6;
        transform: scale(1) translateY(0);
    }
}

/* Feed Switcher Styles */
.feed-switcher,
.controls-row {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity calc(0.3s / var(--animation-ui-transitions, 1)) ease-out calc(0.3s / var(--animation-ui-transitions, 1)), transform calc(0.3s / var(--animation-ui-transitions, 1)) ease-out calc(0.3s / var(--animation-ui-transitions, 1));
    pointer-events: none;
    z-index: 16;
}

/* Dynamic z-index based on animation state */
.feed-switcher.animations-active,
.card-stack-container:not(.entrance-complete) ~ .controls-row {
    z-index: 15; /* Low z-index during animations - hidden behind cards */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.feed-switcher.animations-complete,
.card-stack-container.entrance-complete ~ .controls-row,
.card-stack-container.cache-restore-complete ~ .controls-row {
    z-index: 1500; /* High z-index after animations - can appear above cards */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.feed-switcher-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--color-border-light);
    color: var(--color-text-muted);
    font-size: var(--font-size-0-85);
    font-weight: 400;
    font-family: adobe-jenson-pro, serif;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: var(--color-card-background);
}

.feed-switcher-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    color: var(--color-text-secondary);
}

.feed-switcher-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feed-switcher-name {
    font-size: var(--font-size-0-85);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-switcher-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.feed-switcher-arrow.open {
    transform: rotate(180deg);
}

.feed-switcher-dropdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border-light);
    box-shadow: 0 4px 24px var(--color-shadow-dark);
    min-width: 200px;
    max-width: 280px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1500;
    animation: feedDropdownSlideIn 0.15s ease-out;
}

.feed-switcher-dropdown {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.feed-switcher-dropdown::-webkit-scrollbar {
    display: none; /* WebKit */
}

@keyframes feedDropdownSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.feed-switcher-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
    text-align: left;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--color-border);
}

.feed-switcher-option:last-child {
    border-bottom: none;
}

.feed-switcher-option:hover:not(:disabled) {
    background: var(--color-button-hover);
    color: var(--color-text);
}

.feed-switcher-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feed-switcher-option.active {
    background: var(--color-button-hover);
    color: var(--color-text);
}

.feed-option-content {
    flex: 1;
    min-width: 0;
}

.feed-option-name {
    font-size: var(--font-size-0-9);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-option-check {
  flex-shrink: 0;
  color: #4ade80;
  margin-left: 0.5rem;
}

/* Feed Switcher Modal Styles */
.feed-switcher-modal {
  padding: 0;
}

.feed-switcher-modal .loading-message {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

.feed-switcher-modal .empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

.feed-switcher-modal .feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feed-switcher-modal .feed-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
  text-align: left;
  padding: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid var(--color-border);
}

.feed-switcher-modal .feed-option:last-child {
  border-bottom: none;
}

/* Feature Lock Message Styles */
.feature-lock-message {
  padding: 2rem;
  text-align: center;
}

/* Free User Feed Section Styles */
.free-user-feed-section {
  margin-bottom: 1rem;
}

.free-user-feed-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
}

.free-user-feed-section .feed-list {
  margin: 0;
}

.feature-lock-content h4 {
  color: var(--color-text);
  margin-top: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.feature-lock-content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.feature-lock-content ul {
  text-align: left;
  margin: 1rem auto 1.5rem auto;
  max-width: 300px;
  color: var(--color-text-secondary);
}

.feature-lock-content li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.upgrade-button {
  background: var(--color-button-background, #3b82f6);
  color: var(--color-button-text, white);
  border: 1px solid var(--color-border, #374151);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
  border-radius: 0;
}

.upgrade-button:hover {
  background: var(--color-button-hover, #2563eb);
  border-color: var(--color-border-light, #4b5563);
}

.upgrade-button:active {
  background: var(--color-button-active, #1d4ed8);
}

.feed-switcher-modal .feed-option:hover:not(:disabled) {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.feed-switcher-modal .feed-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}



.feed-switcher-modal .feed-option-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-transform: lowercase;
}

.feed-switcher-modal .feed-option-name {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-switcher-modal .feed-option-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-switcher-modal .feed-option-check {
  flex-shrink: 0;
  color: #4ade80;
  margin-left: 0.5rem;
}

/* Pinned feed styling with golden glow border */
.feed-switcher-modal .feed-option.pinned {
  border: 2px solid rgba(255, 149, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
  position: relative;
  background: rgba(255, 149, 0, 0.05);
}

.feed-switcher-modal .feed-option.pinned:hover:not(:disabled) {
  border-color: rgba(255, 149, 0, 0.7);
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.4);
  background: rgba(255, 149, 0, 0.08);
}

.feed-switcher-modal .feed-option.pinned.active {
  border-color: rgba(255, 149, 0, 0.8);
  box-shadow: 0 0 25px rgba(255, 149, 0, 0.5);
  background: rgba(255, 149, 0, 0.1);
}

/* Active state for non-pinned feeds should have green border like pinned feeds have golden */
.feed-switcher-modal .feed-option.active:not(.pinned) {
  border: 2px solid #4ade80;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.05);
  color: var(--color-text);
}

/* Recent Posts Modal Styles */
.recent-posts-modal {
  max-width: 600px;
  width: 90vw;
  overflow-y: auto;
}

.recent-posts-modal .modal-body {
  height: 70dvh;
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
}

.recent-posts-modal .loading-state,
.recent-posts-modal .error-state,
.recent-posts-modal .empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.recent-posts-modal .empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--color-text-muted);
}

.recent-posts-modal .empty-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.recent-posts-modal .empty-subtext {
  font-size: 0.9rem;
  line-height: 1.4;
}

.recent-posts-modal .retry-button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-button-primary);
  color: var(--color-button-text);
  border: none;
  cursor: pointer;
  font-family: adobe-jenson-pro, serif;
  transition: background-color 0.15s ease;
}

.recent-posts-modal .retry-button:hover {
  background: var(--color-button-primary-hover);
}

.recent-posts-modal .recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.recent-posts-modal .recent-post-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}



.recent-posts-modal .recent-post-item:hover {
  background: var(--color-button-hover);
}

.recent-posts-modal .recent-post-item.is-reply {
  border-left: 3px solid var(--color-accent);
  background: var(--color-border-dark);
}

.recent-posts-modal .recent-post-item.is-reply:hover {
  background: var(--color-accent-dark) !important;
}

.recent-posts-modal .recent-post-item.is-root {
  border-left: 3px solid var(--color-glow-anisota);
  background: var(--color-glow-anisota-dark);
}

.recent-posts-modal .recent-post-item.is-root:hover {
    background: var(--color-glow-anisota-hover) !important;
  }

.recent-posts-modal .recent-post-content {
  flex: 1;
}

.recent-posts-modal .recent-post-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-family: adobe-jenson-pro, serif;
}

.recent-posts-modal .recent-post-type {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recent-posts-modal .recent-post-item.is-reply .recent-post-type {
  color: #4ade80;
}

.recent-posts-modal .recent-post-item.is-root .recent-post-type {
  color: #999;
}

.recent-posts-modal .recent-post-embed-indicator {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  margin-top: 0.5rem;
}

.recent-posts-modal .recent-post-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.recent-posts-modal .recent-post-item.is-reply .recent-post-type {
    color: var(--color-text-muted);
}

.recent-posts-modal .recent-post-item.is-root .recent-post-type {
  color: var(--color-glow-anisota)
}

.recent-posts-modal .recent-post-text {
  margin-bottom: 0;
  line-height: 1.4;
}

.recent-posts-modal .recent-post-time {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.5rem;
}

/* Reply context styling - appears above text input, styled like quote embed but with dashed border */
.embedded-reply {
  border: 1px solid var(--color-border);
  background: var(--color-card-background);
  padding: 1rem;
  border-bottom: 1px dashed var(--color-border);
  margin-bottom: 1rem;
}

/* Nested reply styling - shows both top and bottom dashed borders to indicate it's a reply to a reply */
.embedded-reply.nested-reply {
  border-top: 1px dashed var(--color-border);
}

.embedded-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.embedded-reply-author {
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}

.embedded-reply-remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-border-light);
  background: var(--color-background);
  color: var(--color-text-muted);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  font-family: inherit;
  padding: 0;
}

.embedded-reply-remove:hover {
  background: var(--color-background-secondary);
  color: var(--color-text);
  border-color: var(--color-border);
}

.embedded-reply-remove:active {
  transform: scale(0.95);
}

.embedded-reply-text {
  color: var(--color-text);
  line-height: 1.4;
}

/* Reply embed animation classes */
.embedded-reply.reply-embed-fade-in {
  opacity: 0;
  animation: embedFadeIn calc(0.3s / var(--animation-overall, 1)) ease-out forwards;
}

.embedded-reply.reply-embed-visible {
  opacity: 1;
}

.embedded-reply.reply-embed-fade-out {
  opacity: 1;
  animation: embedFadeOut calc(0.3s / var(--animation-overall, 1)) ease-out forwards;
}

@keyframes embedFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}





.card-stack-container {
    position: relative;
    width: calc(100% - 3rem);
    height: 60dvh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    box-sizing: border-box;
    transform: translateY(0);
    /* Ensure proper stacking context isolation for glow effects */
    isolation: isolate;
    perspective: 1000px; /* Add perspective for 3D transforms */
}

/* Responsive height for card stack container */
@media (min-width: 768px) {
    .card-stack-container {
        height: 70dvh;
    }
}
.post-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-card-background);
    border: 2px solid var(--color-border);
    border-radius: 0;
    box-shadow: 0 4px 24px var(--color-shadow);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    padding: 0;
    font-size: 16px;
    transition: none; /* Remove default transitions */
    z-index: 1;
    cursor: pointer;
    user-select: none;
    pointer-events: none;
    box-sizing: border-box;
    transform-origin: center center;
    /* OPTIMIZATION: Hardware acceleration */
    will-change: transform, opacity;
    transform: translateZ(0); /* Force GPU layer */
    backface-visibility: hidden; /* Prevent flickering */
}

/* Thread post styling with simple dashed borders */
.post-card.post-composer .thread-post {
    border: 1px dashed var(--color-border-light);
}

/* Override for cards with flip structure - apply thread styling to card inner */
.post-card.post-composer .thread-post:has(.card-inner) {
    border: none;
}

.post-card.post-composer .thread-post:has(.card-inner) .card-front,
.post-card.post-composer .thread-post:has(.card-inner) .card-back {
    border: 1px dashed var(--color-border);
}

/* Advanced thread post border styling */
.post-card.post-composer .thread-post:has(.card-inner) .card-front,
.post-card.post-composer .thread-post:has(.card-inner) .card-back {
    /* Default: solid top/bottom, dashed left/right */
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
    border-left: 1px dashed var(--color-border);
    border-right: 1px dashed var(--color-border);
}

/* First child in thread: solid right border */
.post-card.thread-post[data-thread-position="0"]:has(.card-inner) .card-front,
.post-card.thread-post[data-thread-position="0"]:has(.card-inner) .card-back {
    border-right: 2px solid var(--color-border);
}

/* Last child in thread: solid left border */
.post-card.thread-post[data-thread-last="true"]:has(.card-inner) .card-front,
.post-card.thread-post[data-thread-last="true"]:has(.card-inner) .card-back {
    border-left: 2px solid var(--color-border);
}

/* Thread mode visual connection styling - overrides same-author chain styling */
/* In thread mode, cards with visual connections to adjacent cards use dashed borders */
/* Cards without visual connections (first/last in thread) use solid borders */
/* Note: Right border connects to PREVIOUS card, Left border connects to NEXT card */

/* Card with no visual connection to next (last in thread): solid LEFT border */
body.thread-page-active .post-card.thread-post[data-thread-has-next="false"]:has(.card-inner) .card-front,
body.thread-page-active .post-card.thread-post[data-thread-has-next="false"]:has(.card-inner) .card-back {
    border-left: 2px solid var(--color-border);
}

/* Card with no visual connection to prev (first in thread): solid RIGHT border */
body.thread-page-active .post-card.thread-post[data-thread-has-prev="false"]:has(.card-inner) .card-front,
body.thread-page-active .post-card.thread-post[data-thread-has-prev="false"]:has(.card-inner) .card-back {
    border-right: 2px solid var(--color-border);
}

/* Card with visual connection to next: dashed LEFT border */
body.thread-page-active .post-card.thread-post[data-thread-has-next="true"]:has(.card-inner) .card-front,
body.thread-page-active .post-card.thread-post[data-thread-has-next="true"]:has(.card-inner) .card-back {
    border-left: 1px dashed var(--color-border);
}

/* Card with visual connection to prev: dashed RIGHT border */
body.thread-page-active .post-card.thread-post[data-thread-has-prev="true"]:has(.card-inner) .card-front,
body.thread-page-active .post-card.thread-post[data-thread-has-prev="true"]:has(.card-inner) .card-back {
    border-right: 1px dashed var(--color-border);
}

/* Flipped cards in thread mode - borders swap sides when flipped */
body.thread-page-active .post-card.thread-post[data-thread-has-next="false"].flipped .card-back {
    border-right: 2px solid var(--color-border) !important;
    border-left: 1px dashed var(--color-border) !important;
}

body.thread-page-active .post-card.thread-post[data-thread-has-prev="false"].flipped .card-back {
    border-right: 1px dashed var(--color-border) !important;
    border-left: 2px solid var(--color-border) !important;
}

body.thread-page-active .post-card.thread-post[data-thread-has-next="true"].flipped .card-back {
    border-right: 1px dashed var(--color-border) !important;
}

body.thread-page-active .post-card.thread-post[data-thread-has-prev="true"].flipped .card-back {
    border-left: 1px dashed var(--color-border) !important;
}


/* For thread posts without flip structure */
.post-card.post-composer .thread-post:not(:has(.card-inner)) {
    /* Default: solid top/bottom, dashed left/right */
    border-left: 1px solid var(--color-border-light);
    border-right: 1px solid var(--color-border-light);
    border-top: 1px dashed var(--color-border-light);
    border-bottom: 1px dashed var(--color-border-light);
}

/* First child in thread: solid right border (no flip structure) */
.post-card.thread-post[data-thread-position="0"]:not(:has(.card-inner)) {
    border-right: 2px solid var(--color-border-light);
}

/* Last child in thread: solid left border (no flip structure) */
.post-card.thread-post[data-thread-last="true"]:not(:has(.card-inner)) {
    border-left: 2px solid var(--color-border-light);
}

/* Flipped card backs need reversed left/right borders */
/* First child in thread: when flipped, back should have solid left, dashed right */
.post-card.thread-post[data-thread-position="0"].flipped .card-back {
    border-left: 2px solid var(--color-border) !important;
    border-right: 1px dashed var(--color-border) !important;
}

/* Last child in thread: when flipped, back should have dashed left, solid right */
.post-card.thread-post[data-thread-last="true"].flipped .card-back {
    border-left: 1px dashed var(--color-border) !important;
    border-right: 2px solid var(--color-border) !important;
}

/* Override for cards with flip structure - remove double styling only during animations */
.post-card.flipping-to-back:has(.card-inner),
.post-card.flipping-to-front:has(.card-inner) {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Add smooth box-shadow transition for all cards with card-inner */
.post-card:has(.card-inner) {
    transition: box-shadow 0.3s ease-out;
}

/* Ensure only interactive (top) cards with card-inner have shadows when not flipping */
.post-card.interactive:has(.card-inner):not(.flipping-to-back):not(.flipping-to-front) {
    box-shadow: 0 4px 24px var(--color-shadow);
}

/* CRITICAL: Initial state for entrance animation - must be off-screen */
.post-card.entrance {
    opacity: 0;
    transform: translate3d(0, -100vh, 0) scale(0.8);
    pointer-events: none;
    position: absolute;
    animation: none;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Animation state - keep cards off-screen until animation starts */
.post-card.entrance.animate-entrance {
    /* Start animation from off-screen position */
    animation: 
        cardEntranceMain calc(var(--duration-card-stack-entrance) * 0.67) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
        cardEntranceSettle calc(var(--duration-card-stack-entrance) * 0.33) cubic-bezier(.2,1,.3,1) calc(var(--duration-card-stack-entrance) * 0.67) forwards;
    pointer-events: auto;
    /* Force animation to always trigger */
    animation-fill-mode: forwards;
    position: absolute;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Main dramatic entrance animation */
@keyframes cardEntranceMain {
    0% {
        opacity: 0.8;
        transform: translate3d(0, -100vh, 0) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, -8vh, 0) scale(0.9);
    }
}

/* Final settling animation with no easing */
@keyframes cardEntranceSettle {
    0% {
        opacity: 1;
        transform: translate3d(0, -8vh, 0) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Liked post glow effect */
.post-card .card-front,
.post-card .card-back {
    transition: 
        box-shadow 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card.liked .card-front,
.post-card.liked .card-back {
    /* OPTIMIZATION: Simplified glow - single shadow instead of multiple */
    box-shadow: 0 0 25px var(--color-glow-like);
    border: 2px solid var(--color-notification-like);
    /* OPTIMIZATION: Remove expensive filter effects on mobile */
    animation: likedPulseOptimized 3s ease-in-out infinite;
    will-change: box-shadow; /* Only animate shadow */
}

/* Reposted post glow effect */
.post-card.reposted .card-front,
.post-card.reposted .card-back {
    /* Green glow for reposts */
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.75);
    border: 2px solid rgba(34, 197, 94, 0.75);
    animation: repostedPulseOptimized 3s ease-in-out infinite;
    will-change: box-shadow; /* Only animate shadow */
}

/* Hide glow on liked cards when they are not interactive (not on top) */
.post-card.liked:not(.interactive) .card-front,
.post-card.liked:not(.interactive) .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
    animation: none;
}

.post-card.unliking .card-front,
.post-card.unliking .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
}

/* Hide glow on reposted cards when they are not interactive (not on top) */
.post-card.reposted:not(.interactive) .card-front,
.post-card.reposted:not(.interactive) .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
    animation: none;
}

.post-card.unreposting .card-front,
.post-card.unreposting .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
}

/* Delete animation */
.post-card.deleting {
    animation: deleteCard 0.3s ease-in-out forwards;
    pointer-events: none;
}

@keyframes deleteCard {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    100% { 
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Optimized pulse animation - no filter changes */
@keyframes likedPulseOptimized {
    0% {
        box-shadow: 0 0 10px rgba(255, 68, 191, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 68, 191, 0.9);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 68, 191, 0.6);
    }
}

/* Optimized pulse animation for reposts - green glow */
@keyframes repostedPulseOptimized {
    0% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(34, 197, 94, 0.9);
    }
    100% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    }
}

/* Optimized pulse animation for anisota posts - orange glow */
@keyframes anisotaPulseOptimized {
    0% {
        box-shadow: 0 0 10px rgba(255, 149, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 149, 0, 0.9);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 149, 0, 0.6);
    }
}

/* Uncollected game card glow effect */
.post-card.game-card.uncollected .card-front,
.post-card.game-card.uncollected .card-back {
    /* Gold/yellow glow for uncollected game cards */
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.75);
    border: 2px solid rgba(255, 193, 7, 0.75);
    animation: uncollectedPulseOptimized 3s ease-in-out infinite;
    will-change: box-shadow; /* Only animate shadow */
}

/* Hide glow on uncollected game cards when they are not interactive (not on top) */
.post-card.game-card.uncollected:not(.interactive) .card-front,
.post-card.game-card.uncollected:not(.interactive) .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
    animation: none;
}


/* Fade out animation when collecting/picking up */
.post-card.game-card.collecting .card-front,
.post-card.game-card.collecting .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
    animation: gameCardGlowFadeOut 0.8s ease-out forwards;
}

/* Loading animation when processing pickup/collect (for collected cards or non-uncollected) */
.post-card.game-card.game-card-loading:not(.uncollected) .card-front,
.post-card.game-card.game-card-loading:not(.uncollected) .card-back {
    border: 2px solid #ff9500;
    animation: gameCardLoadingPulse 1.5s ease-in-out infinite;
}

/* Preserve uncollected glow during loading - highest specificity and importance */
.post-card.game-card.uncollected.game-card-loading .card-front,
.post-card.game-card.uncollected.game-card-loading .card-back {
    /* Preserve the original uncollected glow with loading indication */
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.75) !important;
    border: 2px solid rgba(255, 193, 7, 0.75) !important;
    animation: uncollectedPulseOptimized 3s ease-in-out infinite !important;
    will-change: box-shadow !important;
}

/* Game card loading content (inline replacement) */
.game-card-loading-content {
    display: flex;

/* Harvest card styles */
.post-card.harvest-card .card-front,
.post-card.harvest-card .card-back {
    background: linear-gradient(135deg, var(--color-card-background) 0%, var(--color-background-alt, #f8fafc) 100%);
}

.harvest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.harvest-card-year {
    font-size: var(--font-size-0-9);
    font-weight: 600;
    color: var(--color-glow-anisota);
}

.harvest-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.harvest-card-content {
    width: 100%;
}

.harvest-card-title {
    font-size: var(--font-size-1-6);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.harvest-card-subtitle {
    font-size: var(--font-size-1);
    color: var(--color-text-muted);
    line-height: 1.5;
}

.harvest-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.harvest-card-label {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    font-weight: 500;
}
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    text-align: center;
    padding: 1rem;
}

.game-card-loading-text {
    font-size: var(--font-size-1);
    color: var(--color-text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Optimized pulse animation for uncollected game cards - gold/yellow glow */
@keyframes uncollectedPulseOptimized {
    0% {
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 193, 7, 0.9);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
    }
}

/* Fade out animation for collected game cards */
@keyframes gameCardGlowFadeOut {
    0% {
        box-shadow: 0 0 25px rgba(255, 193, 7, 0.75);
        border: 2px solid rgba(255, 193, 7, 0.75);
    }
    100% {
        box-shadow: 0 4px 24px var(--color-shadow);
        border: 2px solid var(--color-border);
    }
}

/* Loading pulse animation for game cards */
@keyframes gameCardLoadingPulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 149, 0, 0.6);
        opacity: 0.9;
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
        opacity: 1;
    }
}



/* Loading dots animation */
.loading-dots {
    font-family: adobe-jenson-pro, serif; /* Match app's font */
    min-width: 1.5em; /* Reserve space for 3 dots to prevent layout shifts */
}

.loading-dots::after {
    content: '.';
    animation: loadingDotsContent 1.2s infinite;
}

@keyframes loadingDotsContent {
    0% {
        content: '.';
    }
    33% {
        content: '..';
    }
    66% {
        content: '...';
    }
    100% {
        content: '.';
    }
}

/* Smooth fade-in animation for embed previews and loading states */
@keyframes embedFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth fade-out animation for removing embeds */
@keyframes embedFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* Fade-out class for smooth removal */
.embed-fade-out {
    animation: embedFadeOut calc(0.2s / var(--animation-overall, 1)) ease-in forwards;
}

/* Special styling for liked thread posts - maintain border logic */
.post-card.liked.thread-post .card-front,
.post-card.liked.thread-post .card-back {
    border-top: 2px solid var(--color-notification-like) !important;
    border-bottom: 2px solid var(--color-notification-like) !important;
    border-left: 1px dashed var(--color-notification-like) !important;
    border-right: 1px dashed var(--color-notification-like) !important;
    box-shadow: 0 0 25px var(--color-glow-like) !important;
    animation: likedPulseOptimized 3s ease-in-out infinite !important;
}

/* First child in liked thread: solid right border */
.post-card.liked.thread-post[data-thread-position="0"] .card-front,
.post-card.liked.thread-post[data-thread-position="0"] .card-back {
    border-right: 2px solid var(--color-notification-like) !important;
    border-top: 2px solid var(--color-notification-like) !important;
    border-bottom: 2px solid var(--color-notification-like) !important;
    box-shadow: 0 0 25px var(--color-glow-like) !important;
    animation: likedPulseOptimized 3s ease-in-out infinite !important;
}

/* Last child in liked thread: solid left border */
.post-card.liked.thread-post[data-thread-last="true"] .card-front,
.post-card.liked.thread-post[data-thread-last="true"] .card-back {
    border-left: 2px solid var(--color-notification-like) !important;
    border-top: 2px solid var(--color-notification-like) !important;
    border-bottom: 2px solid var(--color-notification-like) !important;
    box-shadow: 0 0 25px var(--color-glow-like) !important;
    animation: likedPulseOptimized 3s ease-in-out infinite !important;
}

/* Special styling for liked thread posts without flip structure */
.post-card.liked.post-composer .thread-post:not(:has(.card-inner)) {
    border-top: 2px solid var(--color-notification-like) !important;
    border-bottom: 2px solid var(--color-notification-like) !important;
    border-left: 1px dashed var(--color-notification-like) !important;
    border-right: 1px dashed var(--color-notification-like) !important;
    box-shadow: 0 0 25px var(--color-glow-like);
}

/* First child in liked thread: solid right border (no flip structure) */
.post-card.liked.thread-post[data-thread-position="0"]:not(:has(.card-inner)) {
    border-right: 2px solid var(--color-notification-like) !important;
}

/* Last child in liked thread: solid left border (no flip structure) */
.post-card.liked.thread-post[data-thread-last="true"]:not(:has(.card-inner)) {
    border-left: 2px solid var(--color-notification-like) !important;
}

/* Special styling for reposted thread posts - maintain border logic */
.post-card.reposted.thread-post .card-front,
.post-card.reposted.thread-post .card-back {
    border-top: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-bottom: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-left: 1px dashed rgba(34, 197, 94, 0.8) !important;
    border-right: 1px dashed rgba(34, 197, 94, 0.8) !important;
    box-shadow: 0 0 25px var(--color-glow-repost) !important;
    animation: repostedPulseOptimized 3s ease-in-out infinite !important;
}

/* First child in reposted thread: solid right border */
.post-card.reposted.thread-post[data-thread-position="0"] .card-front,
.post-card.reposted.thread-post[data-thread-position="0"] .card-back {
    border-right: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-top: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-bottom: 2px solid rgba(34, 197, 94, 0.8) !important;
    box-shadow: 0 0 25px var(--color-glow-repost) !important;
    animation: repostedPulseOptimized 3s ease-in-out infinite !important;
}

/* Last child in reposted thread: solid left border */
.post-card.reposted.thread-post[data-thread-last="true"] .card-front,
.post-card.reposted.thread-post[data-thread-last="true"] .card-back {
    border-left: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-top: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-bottom: 2px solid rgba(34, 197, 94, 0.8) !important; 
    box-shadow: 0 0 25px var(--color-glow-repost) !important;
    animation: repostedPulseOptimized 3s ease-in-out infinite !important;
}

/* Special styling for reposted thread posts without flip structure */
.post-card.reposted.post-composer .thread-post:not(:has(.card-inner)) {
    border-top: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-bottom: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-left: 1px dashed rgba(34, 197, 94, 0.8) !important;
    border-right: 1px dashed rgba(34, 197, 94, 0.8) !important;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.75);
}

/* First child in reposted thread: solid right border (no flip structure) */
.post-card.reposted.thread-post[data-thread-position="0"]:not(:has(.card-inner)) {
    border-right: 2px solid rgba(34, 197, 94, 0.8) !important;
}

/* Last child in reposted thread: solid left border (no flip structure) */
.post-card.reposted.thread-post[data-thread-last="true"]:not(:has(.card-inner)) {
    border-left: 2px solid rgba(34, 197, 94, 0.8) !important;
}

/* Flipped liked thread posts need reversed left/right borders */
/* First child in liked thread: when flipped, back should have solid left, dashed right */
.post-card.liked.thread-post[data-thread-position="0"].flipped .card-back {
    border-left: 2px solid var(--color-notification-like) !important;
    border-right: 1px dashed var(--color-notification-like) !important;
}

/* Last child in liked thread: when flipped, back should have dashed left, solid right */
.post-card.liked.thread-post[data-thread-last="true"].flipped .card-back {
    border-left: 1px dashed var(--color-notification-like) !important;
    border-right: 2px solid var(--color-notification-like) !important;
}

/* Flipped reposted thread posts need reversed left/right borders */
/* First child in reposted thread: when flipped, back should have solid left, dashed right */
.post-card.reposted.thread-post[data-thread-position="0"].flipped .card-back {
    border-left: 2px solid rgba(34, 197, 94, 0.8) !important;
    border-right: 1px dashed rgba(34, 197, 94, 0.8) !important;
}

/* Last child in reposted thread: when flipped, back should have dashed left, solid right */
.post-card.reposted.thread-post[data-thread-last="true"].flipped .card-back {
    border-left: 1px dashed rgba(34, 197, 94, 0.8) !important;
    border-right: 2px solid rgba(34, 197, 94, 0.8) !important;
}

/* Hide glow on liked thread posts when they are not interactive (not on top) */
.post-card.liked.thread-post:not(.interactive) .card-front,
.post-card.liked.thread-post:not(.interactive) .card-back {
    box-shadow: 0 4px 24px var(--color-shadow) !important;
    border-top: 2px solid var(--color-border) !important;
    border-bottom: 2px solid var(--color-border) !important;
    border-left: 1px dashed var(--color-border) !important;
    border-right: 1px dashed var(--color-border) !important;
    animation: none !important;
}

/* Hide glow on liked thread posts (first position) when not interactive */
.post-card.liked.thread-post[data-thread-position="0"]:not(.interactive) .card-front,
.post-card.liked.thread-post[data-thread-position="0"]:not(.interactive) .card-back {
    border-right: 2px solid var(--color-border) !important;
}

/* Hide glow on liked thread posts (last position) when not interactive */
.post-card.liked.thread-post[data-thread-last="true"]:not(.interactive) .card-front,
.post-card.liked.thread-post[data-thread-last="true"]:not(.interactive) .card-back {
    border-left: 2px solid var(--color-border) !important;
}

/* Hide glow on reposted thread posts when they are not interactive (not on top) */
.post-card.reposted.thread-post:not(.interactive) .card-front,
.post-card.reposted.thread-post:not(.interactive) .card-back {
    box-shadow: 0 4px 24px var(--color-shadow) !important;
    border-top: 2px solid var(--color-border) !important;
    border-bottom: 2px solid var(--color-border) !important;
    border-left: 1px dashed var(--color-border) !important;
    border-right: 1px dashed var(--color-border) !important;
    animation: none !important;
}

/* Hide glow on reposted thread posts (first position) when not interactive */
.post-card.reposted.thread-post[data-thread-position="0"]:not(.interactive) .card-front,
.post-card.reposted.thread-post[data-thread-position="0"]:not(.interactive) .card-back {
    border-right: 2px solid var(--color-border) !important;
}

/* Hide glow on reposted thread posts (last position) when not interactive */
.post-card.reposted.thread-post[data-thread-last="true"]:not(.interactive) .card-front,
.post-card.reposted.thread-post[data-thread-last="true"]:not(.interactive) .card-back {
    border-left: 2px solid var(--color-border) !important;
}


/* Main reverse card entrance animation - linear movement */
@keyframes cardEntranceReverseMain {
    0% {
        opacity: 0;
        transform: translateX(120vw) rotate(5deg) scale(0.95) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateX(5vw) rotate(2deg) scale(1.02) translateZ(0);
    }
}

/* Final reverse card entrance settling - eased movement */
@keyframes cardEntranceReverseSettle {
    0% {
        opacity: 1;
        transform: translateX(5vw) rotate(2deg) scale(1.02) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0) scale(1) translateZ(0);
        will-change: auto;
    }
}

/* Usage Limit Card Styles */
.post-card.system-card {
    background: linear-gradient(135deg, var(--color-card-background) 0%, var(--color-background-alt, #f8fafc) 100%);
    border: 2px solid var(--color-border-accent, var(--color-border));
}

.post-card.usage-limit-card {
    pointer-events: auto;
    cursor: default;
}

.usage-limit-card .limit-reached-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
}

.usage-limit-card .limit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.3);
}

.usage-limit-card .crown-icon {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.usage-limit-card .limit-message h3 {
    margin: 0 0 0.75rem 0;
    font-size: var(--font-size-1-5);
    font-weight: 700;
    color: var(--color-text);
}

.usage-limit-card .limit-message p {
    margin: 0;
    font-size: var(--font-size-1);
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-width: 400px;
}

.usage-limit-card .usage-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-background-alt, #f1f5f9);
    border-radius: 8px;
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
}

.usage-limit-card .upgrade-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.usage-limit-card .upgrade-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: var(--font-size-1);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.usage-limit-card .upgrade-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.usage-limit-card .upgrade-button:active {
    transform: translateY(0);
}

.usage-limit-card .upgrade-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
}

.usage-limit-card .benefit {
    font-size: var(--font-size-0-875);
    color: var(--color-text-secondary);
    text-align: left;
}

.usage-warning-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.usage-warning-content .warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.usage-warning-content .clock-icon {
    color: white;
    width: 20px;
    height: 20px;
}

.usage-warning-content .warning-message {
    flex: 1;
}

.usage-warning-content .warning-message h4 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-1-1);
    font-weight: 600;
    color: var(--color-text);
}

.usage-warning-content .warning-message p {
    margin: 0;
    font-size: var(--font-size-0-9);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.usage-warning-content .warning-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.usage-warning-content .upgrade-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--color-accent, #6366f1);
    border: 1px solid var(--color-accent, #6366f1);
    border-radius: 6px;
    font-size: var(--font-size-0-875);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.usage-warning-content .upgrade-link:hover {
    background: var(--color-accent, #6366f1);
    color: white;
}

/* Responsive adjustments for usage limit cards */
@media (max-width: 480px) {
    .usage-limit-card .limit-reached-content {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .usage-limit-card .limit-icon {
        width: 64px;
        height: 64px;
    }
    
    .usage-limit-card .crown-icon {
        width: 32px;
        height: 32px;
    }
    
    .usage-limit-card .limit-message h3 {
        font-size: var(--font-size-1-25);
    }
    
    .usage-limit-card .upgrade-benefits {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .usage-warning-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .usage-warning-content .warning-actions {
        align-items: center;
    }
}

/* Main card exit animation - linear movement */
@keyframes cardExitMain {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0) scale(1) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateX(5vw) rotate(2deg) scale(1.02) translateZ(0);
    }
}

/* Final card exit settling - eased movement */
@keyframes cardExitSettle {
    0% {
        opacity: 1;
        transform: translateX(5vw) rotate(2deg) scale(1.02) translateZ(0);
    }
    100% {
        opacity: 0;
        transform: translateX(120vw) rotate(5deg) scale(0.95) translateZ(0);
        will-change: auto;
    }
}

/* Main reverse card exit animation - linear movement */
@keyframes cardExitReverseMain {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0) scale(1) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateX(-5vw) rotate(-2deg) scale(1.02) translateZ(0);
    }
}

/* Final reverse card exit settling - eased movement */
@keyframes cardExitReverseSettle {
    0% {
        opacity: 1;
        transform: translateX(-5vw) rotate(-2deg) scale(1.02) translateZ(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-120vw) rotate(-5deg) scale(0.95) translateZ(0);
        will-change: auto;
    }
}

/* Animation for realistic card flip with elevation */
@keyframes realisticCardFlip {
    0% {
        transform: translateZ(0px) rotateY(0deg) scale(1);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
    20% {
        transform: translateZ(25px) rotateY(15deg) scale(1.01);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    }
    45% {
        transform: translateZ(65px) rotateY(75deg) scale(1.06);
        box-shadow: 0 35px 65px rgba(0, 0, 0, 0.2);
    }
    55% {
        transform: translateZ(70px) rotateY(105deg) scale(1.07);
        box-shadow: 0 40px 70px rgba(0, 0, 0, 0.18);
    }
    75% {
        transform: translateZ(50px) rotateY(165deg) scale(1.04);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.28);
    }
    90% {
        transform: translateZ(15px) rotateY(180deg) scale(1.01);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }
    100% {
        transform: translateZ(0px) rotateY(180deg) scale(1);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
}

/* Show card edge during flip animation */
.post-card.flipping-to-back .card-inner::after {
    animation: showCardEdge var(--duration-card-flip) cubic-bezier(0.23, 1, 0.32, 1);
}

/* Animation for flipping back to front */
@keyframes realisticCardFlipBack {
    0% {
        transform: translateZ(0px) rotateY(180deg) scale(1);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
    20% {
        transform: translateZ(25px) rotateY(165deg) scale(1.01);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    }
    45% {
        transform: translateZ(65px) rotateY(105deg) scale(1.06);
        box-shadow: 0 35px 65px rgba(0, 0, 0, 0.2);
    }
    55% {
        transform: translateZ(70px) rotateY(75deg) scale(1.07);
        box-shadow: 0 40px 70px rgba(0, 0, 0, 0.18);
    }
    75% {
        transform: translateZ(50px) rotateY(15deg) scale(1.04);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.28);
    }
    90% {
        transform: translateZ(15px) rotateY(0deg) scale(1.01);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }
    100% {
        transform: translateZ(0px) rotateY(0deg) scale(1);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
}

/* Show card edge during reverse flip animation */
.post-card.flipping-to-front .card-inner::after {
    animation: showCardEdge var(--duration-card-flip) cubic-bezier(0.23, 1, 0.32, 1);
}

/* Animation for card edge visibility - only visible at perpendicular moment */
@keyframes showCardEdge {
    0% {
        opacity: 0;
    }
    45% {
        opacity: 0;
    }
    48% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    52% {
        opacity: 0.6;
    }
    55% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* Animation for next card becoming active */
@keyframes cardActivate {
    0% {
        transform: translateY(0) scale(0.97) translateZ(0);
        opacity: 0.95;
        z-index: inherit;
    }
    50% {
        transform: translateY(-0.5vh) scale(0.985) translateZ(0);
        opacity: 0.97;
    }
    100% {
        transform: translateY(0) scale(1) translateZ(0);
        opacity: 1;
        will-change: auto;
    }
}

/* REMOVED - Conflicting rule that was overriding entrance animation 
   All entrance animation logic is now handled by .post-card.entrance.animate-entrance above */

/* REMOVED - Interactive entrance animation now handled by main entrance rule */

/* Cache restoration animation - subtle fade-in for restored content */
.card-stack-container.cache-restore {
    opacity: 0;
    transform: translateY(5px);
}

.card-stack-container.cache-restore.animate-cache-restore {
    animation: cacheRestoreFadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes cacheRestoreFadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion version for cache restoration */
@media (prefers-reduced-motion: reduce) {
    .card-stack-container.cache-restore.animate-cache-restore {
        animation: cacheRestoreReducedMotion 0.6s ease-out forwards;
    }
    
    @keyframes cacheRestoreReducedMotion {
        0% {
            opacity: 0;
        }
        100% {
            opacity: 1;
        }
    }
}

.post-card.animate-entrance-reverse {
    animation: 
        cardEntranceReverseMain calc(var(--duration-card-advance) * 0.67) linear forwards,
        cardEntranceReverseSettle calc(var(--duration-card-advance) * 0.33) cubic-bezier(.2,1,.3,1) calc(var(--duration-card-advance) * 0.67) forwards;
    pointer-events: auto;
}

/* Stagger the entrance animations - now handled programmatically in JavaScript */

.post-card.animate-exit {
    animation: 
        cardExitMain calc(var(--duration-card-advance) * 0.33) linear forwards,
        cardExitSettle calc(var(--duration-card-advance) * 0.67) cubic-bezier(.2,1,.3,1) calc(var(--duration-card-advance) * 0.33) forwards;
    pointer-events: auto; /* Allow rapid clicking during exit animation */
}

.post-card.animate-exit-reverse {
    animation: 
        cardExitReverseMain calc(var(--duration-card-advance) * 0.33) linear forwards,
        cardExitReverseSettle calc(var(--duration-card-advance) * 0.67) cubic-bezier(.2,1,.3,1) calc(var(--duration-card-advance) * 0.33) forwards;
    pointer-events: auto; /* Allow rapid clicking during exit animation */
}

.post-card.animate-activate {
    animation: cardActivate 0.6s cubic-bezier(.2,1,.3,1) forwards;
}

/* Thread train animations - slide cards to the right by one card width */
.post-card.animate-thread-slide {
    animation: threadSlide var(--duration-thread-transitions) ease-out forwards;
    pointer-events: auto; /* Allow rapid clicking during thread slide animation */
}

.post-card.animate-thread-slide-back {
    animation: threadSlideBack var(--duration-thread-transitions) ease-out forwards;
    pointer-events: auto; /* Allow rapid clicking during thread slide back animation */
}

.post-card.animate-thread-exit {
    animation: 
        threadExitMain calc(var(--duration-thread-transitions) * 0.4) linear forwards,
        threadExitSettle calc(var(--duration-thread-transitions) * 0.6) ease-out calc(var(--duration-thread-transitions) * 0.4) forwards;
    pointer-events: auto; /* Allow rapid clicking during thread exit animation */
}

.post-card.animate-thread-entrance {
    animation: 
        threadEntranceMain calc(var(--duration-thread-transitions) * 0.4) linear forwards,
        threadEntranceSettle calc(var(--duration-thread-transitions) * 0.6) ease-out calc(var(--duration-thread-transitions) * 0.4) forwards;
    pointer-events: auto; /* Allow rapid clicking during thread entrance animation */
}

/* Animation for thread posts sliding to the right (train effect) */
@keyframes threadSlide {
    0% {
        transform: translateX(0) translateY(0) translateZ(0);
        opacity: 1;
    }
    100% {
        transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
        opacity: 0.6;
        will-change: auto;
    }
}

/* Animation for thread posts sliding back from train to main deck (reverse of threadSlide) */
@keyframes threadSlideBack {
    0% {
        transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
        opacity: 0.6;
    }
    100% {
        transform: translateX(0) translateY(0) translateZ(0);
        opacity: 1;
        will-change: auto;
    }
}

/* Main thread train exit animation - linear movement */
@keyframes threadExitMain {
    0% {
        transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
    }
    100% {
        transform: translateX(calc(var(--train-position, 100%) + 10vw)) translateY(-1vh) translateZ(0);
    }
}

/* Final thread train exit settling - eased movement */
@keyframes threadExitSettle {
    0% {
        transform: translateX(calc(var(--train-position, 100%) + 10vw)) translateY(-1vh) translateZ(0);
    }
    100% {
        transform: translateX(calc(var(--train-position, 100%) + 120vw)) translateY(0) translateZ(0);
        will-change: auto;
    }
}

/* Main thread train entrance animation - linear movement */
@keyframes threadEntranceMain {
    0% {
        transform: translateX(calc(var(--train-position, 100%) + 120vw)) translateY(0) translateZ(0);
    }
    100% {
        transform: translateX(calc(var(--train-position, 100%) + 10vw)) translateY(-1vh) translateZ(0);
    }
}

/* Final thread train entrance settling - eased movement */
@keyframes threadEntranceSettle {
    0% {
        transform: translateX(calc(var(--train-position, 100%) + 10vw)) translateY(-1vh) translateZ(0);
    }
    100% {
        transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
        will-change: auto;
    }
}
/* Shuffle animation - container-level pile shake */
@keyframes containerShuffle {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
    8% {
        transform: translateX(3px) translateY(-2px) rotate(0.8deg) scale(1);
    }
    16% {
        transform: translateX(-4px) translateY(3px) rotate(-1.2deg) scale(1);
    }
    24% {
        transform: translateX(5px) translateY(-3px) rotate(1.5deg) scale(1);
    }
    32% {
        transform: translateX(-3px) translateY(4px) rotate(-1.8deg) scale(1);
    }
    40% {
        transform: translateX(4px) translateY(-2px) rotate(1.2deg) scale(1);
    }
    48% {
        transform: translateX(-5px) translateY(3px) rotate(-1.5deg) scale(1);
    }
    56% {
        transform: translateX(3px) translateY(-4px) rotate(1.8deg) scale(1);
    }
    64% {
        transform: translateX(-2px) translateY(2px) rotate(-1deg) scale(1);
    }
    72% {
        transform: translateX(2px) translateY(-1px) rotate(0.5deg) scale(1);
    }
    80% {
        transform: translateX(-1px) translateY(1px) rotate(-0.3deg) scale(1);
    }
    88% {
        transform: translateX(1px) translateY(-0.5px) rotate(0.2deg) scale(1);
    }
    96% {
        transform: translateX(-0.3px) translateY(0.3px) rotate(-0.1deg) scale(1);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
}

/* Individual card shake animation - more subtle movement without opacity/blur changes */
@keyframes cardShuffle {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1) translateZ(0);
    }
    12% {
        transform: translateX(calc(var(--card-shake-x, 0) * 0.8px)) translateY(calc(var(--card-shake-y, 0) * 0.8px)) rotate(calc(var(--card-shake-r, 0) * 0.15deg)) scale(1) translateZ(0);
    }
    25% {
        transform: translateX(calc(var(--card-shake-x, 0) * -1.2px)) translateY(calc(var(--card-shake-y, 0) * 1px)) rotate(calc(var(--card-shake-r, 0) * -0.2deg)) scale(1) translateZ(0);
    }
    37% {
        transform: translateX(calc(var(--card-shake-x, 0) * 1px)) translateY(calc(var(--card-shake-y, 0) * -1.2px)) rotate(calc(var(--card-shake-r, 0) * 0.25deg)) scale(1) translateZ(0);
    }
    50% {
        transform: translateX(calc(var(--card-shake-x, 0) * -0.8px)) translateY(calc(var(--card-shake-y, 0) * 0.8px)) rotate(calc(var(--card-shake-r, 0) * -0.15deg)) scale(1) translateZ(0);
    }
    62% {
        transform: translateX(calc(var(--card-shake-x, 0) * 0.6px)) translateY(calc(var(--card-shake-y, 0) * -0.6px)) rotate(calc(var(--card-shake-r, 0) * 0.2deg)) scale(1) translateZ(0);
    }
    75% {
        transform: translateX(calc(var(--card-shake-x, 0) * -0.4px)) translateY(calc(var(--card-shake-y, 0) * 0.5px)) rotate(calc(var(--card-shake-r, 0) * -0.08deg)) scale(1) translateZ(0);
    }
    87% {
        transform: translateX(calc(var(--card-shake-x, 0) * 0.2px)) translateY(calc(var(--card-shake-y, 0) * -0.2px)) rotate(calc(var(--card-shake-r, 0) * 0.03deg)) scale(1) translateZ(0);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1) translateZ(0);
    }
}

.card-stack-container.animate-shuffle {
    animation: containerShuffle 0.8s ease-in-out;
    will-change: transform;
}

/* Prevent post-card transitions during shuffle (but keep shuffle animations) */
body.shuffling .post-card:not(.animate-shuffle) {
    transition: none !important;
}

.post-card.animate-shuffle {
    animation: cardShuffle 0.3s ease-in-out;
    will-change: transform;
    --card-shake-x: var(--random-x, 0);
    --card-shake-y: var(--random-y, 0);
    --card-shake-r: var(--random-r, 0);
    /* Disable base opacity/scale transitions during shuffle to prevent fade effect */
    transition: none !important;
    /* Ensure cards stay fully visible during shuffle */
    opacity: 1 !important;
    pointer-events: auto; /* Allow rapid clicking during shuffle animation */
}

.post-card.interactive {
    pointer-events: auto;
    /* z-index is managed via inline styles for smoother transitions */
}

/* Card flip styles */
.card-stack-container {
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    /* OPTIMIZATION: Hardware acceleration */
    will-change: transform;
}

.post-card.flipping-to-back {
    z-index: 1600 !important; /* Ensure flipping cards are above everything, including controls */
    pointer-events: auto; /* Allow rapid clicking during flip animation */
}

.post-card.flipping-to-back .card-inner {
    animation: realisticCardFlip 0.3s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    /* OPTIMIZATION: Ensure GPU layer during flip */
    will-change: transform;
}

.post-card.flipping-to-front {
    z-index: 1600 !important; /* Ensure flipping cards are above everything, including controls */
    pointer-events: auto; /* Allow rapid clicking during flip animation */
}

.post-card.flipping-to-front .card-inner {
    animation: realisticCardFlipBack 0.3s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    /* OPTIMIZATION: Ensure GPU layer during flip */
    will-change: transform;
}

.post-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    -webkit-backface-visibility: hidden; /* Safari support */
    background: var(--color-card-background);
    border: 2px solid var(--color-border);
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
    /* Ensure cards above block the glow from cards below */
    isolation: isolate;
}

/* Keep card-back with same overflow as card-front */

/* Card edge - visible during flip */
.card-inner::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    width: 1.5px;
    height: calc(100% - 4px);
    background: linear-gradient(to right, 
        transparent 0%,
        #2a2a2a 30%,
        #3a3a3a 50%,
        #2a2a2a 70%,
        transparent 100%
    );
    transform: translateX(-50%) rotateY(90deg);
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.05s ease;
    pointer-events: none;
    z-index: 10;
}

.card-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
    z-index: 1;
}

/* When card is flipped, swap z-index values so the visible side has higher z-index for scrolling */
.post-card.flipped .card-front {
    z-index: 1;
}

.post-card.flipped .card-back {
    z-index: 2;
}

/* JSON content styling is now handled by .post-card-text with inline styles */

.post-card .post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-card-background);
    min-height: 2rem;
    padding-top: 1.5rem;
}

/* Game Card Styles */
.game-card {
    /* Game cards inherit all base post-card styles */
}

.game-card .game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 1.5rem 0.8rem 1.5rem;
}

.game-card-type {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.game-card-category {
    font-size: var(--font-size-0-85);
    color: var(--color-text-secondary);
    font-style: italic;
}

.game-card .game-card-body {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.game-card-content {
    width: 100%;
}

.game-card-collection-name {
    font-size: var(--font-size-0-8);
    font-weight: 500;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.4rem 0;
}

.game-card-name {
    font-size: var(--font-size-1-4);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.8rem 0;
    line-height: 1.3;
}

.game-card-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin: 0;
}

.game-card .game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-card-button {
    padding: 0.6rem 1.2rem;
    font-size: var(--font-size-0-9);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
}

.game-card-button:hover {
    background: var(--color-button-primary-hover);
    transform: translateY(-1px);
}

.game-card-button:active {
    transform: translateY(0);
}

.game-card-button.disabled,
.game-card-button:disabled {
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
    border-color: var(--color-border);
}

.game-card-button.disabled:hover,
.game-card-button:disabled:hover {
    background: var(--color-bg-secondary);
    transform: none;
}

/* Game card type-specific styling */

/* Game card rarity glow effects */
.game-card.interactive .card-front {
    transition: box-shadow 0.2s ease;
}

.game-card.interactive.uncollected:hover .card-front {
    box-shadow: 0 0 20px rgba(var(--color-accent-primary-rgb), 0.3);
}

.game-card-specimen.interactive.uncollected:hover .card-front {
    box-shadow: 0 0 20px rgba(var(--color-accent-secondary-rgb), 0.3);
}

/* Pack opening cards */
.game-card-pack .card-front {
    background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
    color: white;
}

.game-card-pack.interactive:hover .card-front {
    box-shadow: 0 0 15px #6B73FF;
}

/* Pack item cards (items from opened packs) */
.game-card-item .card-front {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
}

.game-card-item.interactive.uncollected:hover .card-front {
    box-shadow: 0 0 15px #FFD700;
}

/* Collection Page Hierarchical Navigation Styles */
.collection-page {
    /* Collection page specific styles */
}

/* Collection Statistics */
.collection-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: var(--font-size-1-5);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-0-875);
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    font-weight: 500;
}

.collection-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-0-9);
    min-height: 40px; /* Fixed height to prevent layout shift */
}

.breadcrumb-navigation {
    display: flex;
    gap: 0.5rem;
    min-width: 80px; /* Fixed width to prevent layout shift */
}

.navigation-button {
    background: var(--color-button-secondary);
    color: var(--color-button-text-secondary);
    border: 1px solid var(--color-border);
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; /* Fixed button width */
    height: 32px; /* Fixed button height */
}

.navigation-button:hover {
    background: var(--color-button-secondary-hover);
    transform: translateY(-1px);
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.breadcrumb-item {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    white-space: nowrap; /* Prevent wrapping */
}

.breadcrumb-item:hover {
    color: var(--color-text);
}

.breadcrumb-item.current {
    color: var(--color-text);
    cursor: default;
    text-decoration: none;
}

.breadcrumb-separator {
    color: var(--color-text-secondary);
    font-weight: bold;
    margin: 0 0.2rem;
}

.collection-item:hover {
    background: var(--color-card-background-hover);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px var(--item-color, var(--color-border-light));
    z-index: 1;
}

.collection-item:active {
    transform: translateY(0);
    background: var(--color-card-background-active);
}



.collection-item-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Species abbreviation styling */
.collection-item-name.species-abbreviation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    line-height: 1.1;
}

.genus-abbrev {
    font-size: var(--font-size-0-85);
    font-weight: 400;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.species-abbrev {
    font-size: var(--font-size-1);
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collection-item-subtitle {
    font-size: var(--font-size-0-75);
    color: var(--color-text-secondary);
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.collection-item-count {
    position: absolute;
    top: 0rem;
    right: 0rem;
    background: var(--item-color, var(--color-accent));
    color: white;
    font-size: var(--font-size-0-7);
    font-weight: bold;
    min-width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Modal updates for quantity display */
.species-quantity-badge {
    background: var(--color-accent-secondary);
    color: white;
    padding: 0.3rem 0.6rem;
    font-size: var(--font-size-0-8);
    font-weight: 500;
}

.detail-item {
    margin-bottom: 0.8rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

/* Responsive Collection Layout */
@media (max-width: 768px) {
    .collection-breadcrumb {
        padding: 0.5rem 0;
        font-size: var(--font-size-0-8);
        min-height: 36px;
    }
    
    .breadcrumb-navigation {
        min-width: 70px;
    }
    
    .navigation-button {
        min-width: 28px;
        height: 28px;
        padding: 0.3rem;
    }
    
}

/* Profile card header specific layout */
.profile-card .post-card-header {
    display: flex;
    justify-content: space-between;
    padding: 1.3rem 1.5rem;
    padding-top: 1.5rem;
}

.card-back .profile-card .post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center !important;
    padding: 1rem;
}

.profile-card .post-card-user-info {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex: 1;
}

.profile-card .post-card-user-info > div:first-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
}

.profile-name-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.profile-card .post-card-at {
    flex-shrink: 0 !important;
    margin-left: auto !important;
}

/* Profile JSON header styling */
.profile-json-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.profile-json-header .post-card-did {
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
}

.profile-json-header {
    font-size: var(--font-size-0-8);
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
}

.post-card-username {
    font-size: var(--font-size-1-6);
    font-weight: 600;
    font-family: adobe-jenson-pro, serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
    padding-top: 0.2rem;
}

.post-card-username.clickable-username {
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-card-username.clickable-username:hover {
    text-decoration: underline;
}

.post-card-username-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.post-card-repost-indicator {
    font-size: var(--font-size-0-7);
    color: var(--color-text-muted);
    font-weight: 400;
    font-style: italic;
    padding-top: 0.2rem;
}

.post-card-pin-indicator-text {
    font-size: var(--font-size-0-85);
    color: var(--color-text-secondary);
    font-weight: 400;
}

.post-card-did {
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.post-card-at {
    width: 1.5em;
    height: 1.5em;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.8;
}

.post-card-at svg {
    width: 100%;
    height: 100%;
    fill: var(--color-text-muted);
}

/* Ensure at icon on card back uses muted color even when inside a link */
.card-back .post-card-at svg,
.card-back a .post-card-at svg {
    color: var(--color-text-muted) !important;
}

.post-card-at:hover {
    text-decoration: none;
    opacity: 1;
}
.post-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.5rem;
    overflow-y: auto;
    min-height: 0;
    background: var(--color-card-background);
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* Improved handling for dynamic content like images */
    overflow-x: hidden;
    position: relative;
    /* Ensure smooth scrolling when content loads */
    scroll-behavior: smooth;
}

/* Ensure scrolling works in liked/reposted cards */
.post-card.liked .post-card-body,
.post-card.reposted .post-card-body {
    pointer-events: auto !important;
    touch-action: pan-y !important;
    overflow-y: auto !important;
}

.post-card-body::-webkit-scrollbar {
    display: none; /* WebKit browsers */
}

/* Card-back now uses same structure as card-front, no special handling needed */

.post-card-text {
    font-size: var(--font-size-1-2);
    line-height: 1.4;
    font-family: adobe-jenson-pro, serif;
    /* Container-based responsive font sizing */
    container-type: inline-size;
}

/* Responsive font sizing based on card container width */
@container (max-width: 300px) {
    .post-card-text {
        font-size: var(--font-size-1);
    }
}

@container (max-width: 250px) {
    .post-card-text {
        font-size: var(--font-size-0-9);
    }
}

/* Fallback for browsers that don't support container queries */
@media (max-width: 400px) {
    .post-card-text {
        font-size: var(--font-size-1);
    }
}

@media (max-width: 350px) {
    .post-card-text {
        font-size: var(--font-size-0-9);
    }
}

/* JavaScript-controlled responsive font size classes for post cards */
.post-card-text.card-text-small {
    font-size: var(--font-size-1) !important;
}

.post-card-text.card-text-tiny {
    font-size: var(--font-size-0-9) !important;
}

/* JavaScript-controlled responsive font size classes for post card headers */
.post-card-username.card-header-small,
.profile-display-name.card-header-small {
    font-size: var(--font-size-1-4) !important;
}

.post-card-username.card-header-tiny,
.profile-display-name.card-header-tiny {
    font-size: var(--font-size-1-2) !important;
}

.profile-handle.card-header-small {
    font-size: var(--font-size-0-85) !important;
}

.profile-handle.card-header-tiny {
    font-size: var(--font-size-0-8) !important;
}

.post-card-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    margin: 0;
    /* Allow text selection within post content */
    user-select: text;
    cursor: text;
    /* Add hardware acceleration to prevent flickering */
    will-change: contents;
    backface-visibility: hidden;
}

/* Rich content styles */
.rich-content {
    font-size: var(--font-size-1-2);
    line-height: 1.4;
    font-family: adobe-jenson-pro, serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    margin: 0;
    user-select: text;
    cursor: text;
}

.rich-content a {
    color: var(--color-link);
    text-decoration: underline;
    pointer-events: auto;
    -webkit-touch-callout: default;
}

.rich-content a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* Facet hover effects for profile descriptions */
.facet-link:hover,
.facet-mention:hover,
.facet-tag:hover {
    opacity: 0.7 !important;
}

.facet-link,
.facet-mention,
.facet-tag {
    transition: opacity 0.2s ease !important;
}

/* Post image styles */
.post-images {
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Ensure images container doesn't break layout */
    min-height: 0;
    overflow: visible;
}

.post-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    -webkit-touch-callout: default;
    /* Ensure proper loading and rendering */
    display: block;
    object-fit: contain;
    /* Prevent images from being cut off - maintain aspect ratio */
    max-height: none;
    min-height: 0;
    /* Smooth transitions for loading */
    transition: opacity 0.3s ease-in-out;
    /* Ensure images load properly and don't cause layout shifts */
    vertical-align: top;
    /* Prevent broken image icon from affecting layout */
    line-height: 0;
    /* Ensure image is fully rendered */
    image-rendering: auto;
    /* Prevent partial loading on slow connections */
    will-change: opacity;
}

/* Loading state for images - removed opacity-based shimmer to fix caching issues */

/* Video embed styles */
.post-video {
    margin: 8px 0;
}

/* Add styles for inline player */
.video-player {
    width: 100%;
    height: auto;
    background: #000;
}

.video-preview {
    position: relative;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}



.video-preview {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.video-preview:hover {
    opacity: 0.9;
}

.video-thumbnail {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 400px; /* Limit height for very tall videos */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    -webkit-touch-callout: default;
    /* Ensure video thumbnails load completely */
    display: block;
    object-fit: cover; /* Auto-crop to maintain aspect ratio */
    min-height: 0;
    image-rendering: auto;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1;
}

.video-play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 2px; /* Slight offset to center the triangle visually */
}

.video-preview:hover .video-play-button {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-preview:active .video-play-button {
    transform: translate(-50%, -50%) scale(0.95);
}

.video-message {
    padding: 20px;
    text-align: center;
    background-color: var(--color-card-background-hover);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-style: italic;
    margin: 8px 0;
}

/* Video Player Modal Styles */
.video-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn calc(0.3s / var(--animation-modals, 1)) cubic-bezier(0.2, 1, 0.3, 1) forwards;
    padding: 20px;
    box-sizing: border-box;
}

.video-modal-backdrop.closing {
    animation: modalFadeOut calc(0.3s / var(--animation-modals, 1)) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.video-modal-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--color-modal-background);
    border: 2px solid var(--color-border);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text);
}

.video-modal-container.closing {
    animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-card-background);
    border-bottom: 1px solid var(--color-border);
}

.video-modal-title {
    flex: 1;
    display: flex;
    align-items: center;
}

.video-modal-author {
    font-family: adobe-jenson-pro, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.video-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    background: var(--color-card-background-hover);
    color: var(--color-text);
}

.video-modal-content {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 200px;
    overflow: hidden;
}

.video-modal-player {
    width: 100%;
    height: auto;
    max-height: calc(90vh - 120px); /* Account for header and caption */
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.video-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 16px;
    padding: 40px;
}

.video-modal-thumbnail-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-thumbnail {
    width: 100%;
    height: auto;
    max-height: calc(90vh - 120px); /* Account for header and caption */
    object-fit: contain;
    display: block;
}

.video-modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 16px;
}

.video-modal-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 16px;
    padding: 40px;
    text-align: center;
}

.video-modal-error button {
    background: #ff9500;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.video-modal-error button:hover {
    background: #ffaa33;
}

.video-modal-caption {
    padding: 12px 16px;
    background: var(--color-card-background);
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.4;
    border-top: 1px solid var(--color-border);
}

/* Mobile optimizations for video modal */
@media (max-width: 768px) {
    .video-modal-backdrop {
        padding: 10px;
    }
    
    .video-modal-container {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .video-modal-player {
        max-height: calc(95vh - 100px);
    }
    
    .video-modal-thumbnail {
        max-height: calc(95vh - 100px);
    }
    
    .video-modal-header {
        padding: 8px 12px;
    }
    
    .video-modal-author {
        font-size: 14px;
    }
    
    .video-modal-caption {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Smaller max-height for video thumbnails on mobile */
    .video-thumbnail {
        max-height: 300px;
    }
}

/* Image Modal Styles */
.image-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: modalFadeIn calc(0.3s / var(--animation-modals, 1)) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.image-modal-backdrop.closing {
    animation: modalFadeOut calc(0.3s / var(--animation-modals, 1)) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.image-modal-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    touch-action: none; /* Prevent default touch behaviors for pinch-to-zoom */
}

.image-modal-container.closing {
    animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-card-background);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.image-modal-title {
    flex: 1;
    display: flex;
    align-items: center;
}

.image-modal-author {
    font-family: adobe-jenson-pro, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.image-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.image-modal-close:hover {
    background: var(--color-card-background-hover);
    color: var(--color-text);
}

.image-modal-content {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    min-height: 300px;
}

.image-modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transform-origin: center center;
}

.image-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-modal-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.image-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.image-modal-error button {
    background: #ff9500;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    margin-top: 12px;
}

.image-modal-error button:hover {
    background: #ffaa33;
}

.image-modal-caption {
    padding: 12px 16px;
    background: var(--color-card-background);
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.4;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.image-modal-zoom-info {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 1;
}

.image-modal-reset-zoom {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.image-modal-reset-zoom:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Mobile optimizations for image modal */
@media (max-width: 768px) {
    .image-modal-backdrop {
        padding: 10px;
    }
    
    .image-modal-container {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .image-modal-header {
        padding: 8px 12px;
    }
    
    .image-modal-author {
        font-size: 14px;
    }
    
    .image-modal-caption {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .image-modal-zoom-info {
        bottom: 12px;
        right: 12px;
    }
    
    .image-modal-reset-zoom {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Link card styles */
.linkCard {
    border: 1px solid var(--color-border);
    padding: 12px;
    margin: 8px 0;
    background-color: var(--color-card-background-hover);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: background-color 0.2s ease;
    pointer-events: auto;
    -webkit-touch-callout: default;
}

.linkCard:hover {
    background-color: var(--color-card-background-active);
}

.linkCard img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 8px;
}

.linkCard-description {
    color: var(--color-text-muted);
}

.linkCard-url {
    color: var(--color-text-muted);
}

/* Remove underlines from all text within link cards */
.linkCard,
.linkCard *,
.linkCard:hover,
.linkCard:hover *,
.linkCard:visited,
.linkCard:visited *,
.linkCard:active,
.linkCard:active * {
    text-decoration: none !important;
}

.leaflet-link-author img {
  margin-bottom: 0px;
}

/* Link embed preview in composer */
.link-embed-preview {
    position: relative;
    margin: 8px 0;
    /* Smooth fade-in animation for link previews */
    opacity: 0;
    animation: embedFadeIn calc(0.3s / var(--animation-overall, 1)) ease-out forwards;
}

.composer-link-card {
    border: 1px solid var(--color-border);
    padding: 12px;
    background-color: var(--color-card-background-hover);
    cursor: default;
    pointer-events: none;
    color: inherit;
    display: block;
    transition: none;
}

.composer-link-card:hover {
    background-color: var(--color-card-background-hover);
}

/* Dynamic link card border based on publish target */
.post-composer.publish-target-bluesky .composer-link-card {
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.post-composer.publish-target-anisota .composer-link-card {
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.linkCard-internal-indicator {
    font-size: 0.8em;
    color: var(--color-text-muted);
    margin-top: 8px;
    padding: 4px 8px;
    background-color: var(--color-background-subtle);
    display: inline-block;
}

/* Embedded quote styles */
.embedded-quote-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: inherit !important;
    text-decoration: none !important;
}

.embedded-quote-link:hover .embedded-quote {
    background-color: var(--color-card-background-active);
}

.embedded-quote-author {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

.embedded-quote {
    border: 1px solid var(--color-border);
    padding: 12px;
    margin: 8px 0;
    background-color: var(--color-card-background-hover);
    font-size: 0.95em;
    pointer-events: auto;
    -webkit-touch-callout: default;
}

.embedded-quote .quote-author {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

.embedded-quote .quote-text {
    color: var(--color-text);
    line-height: 1.3;
    padding-top: 0.5rem;
}

/* Deleted post styling */
.embedded-quote.deleted-post {
    background-color: var(--color-card-background);
    border-style: dashed;
    border-color: var(--color-text-muted);
    color: var(--color-text-secondary);
}

.deleted-post-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--color-text-secondary);
}

.deleted-post-icon {
    margin-right: 8px;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.deleted-post-text {
    font-style: italic;
    color: var(--color-text-secondary);
}

/* Detached quote styling */
.embedded-quote.detached-quote {
    background-color: var(--color-card-background);
    border-style: dashed;
    border-color: var(--color-text-muted);
    color: var(--color-text-secondary);
}

.detached-quote-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--color-text-secondary);
}

.detached-quote-icon {
    margin-right: 8px;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.detached-quote-text {
    font-style: italic;
    color: var(--color-text-secondary);
}

/* Feed generator styling */
.embedded-quote.feed-generator {
    background-color: var(--color-card-background-hover);
    border-left: 3px solid var(--color-accent);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
    cursor: pointer;
    display: block;
    clear: both;
    margin-top: 16px !important;
}

.embedded-quote.feed-generator:hover {
    background-color: var(--color-card-background-active);
}

.feed-generator-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

.feed-generator-icon {
    margin-right: 8px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.feed-generator-title {
    color: var(--color-text);
}

.feed-generator-description {
    color: var(--color-text-secondary);
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.feed-generator-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: var(--color-text-muted);
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-card-background);
    min-height: 1.4rem;
    padding: 1.3rem 1.5rem;
    padding-top: 1.4rem;
}

.post-card-time {
    font-size: 1em;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
}

.post-card-time-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text-muted) !important;
}

.post-card-time-link:hover {
    color: var(--color-text);
}

.post-card-delta {
    font-size: 1em;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1;
}

.post-read-indicator {
    /* Inherit color and font-size from parent post-card-delta */
    color: inherit;
    font-size: inherit;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    height: 1em;
    line-height: 1;
}

/* Post count indicator styling */
.post-count-indicator {
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 1em;
}

/* Rarity indicator styling */
.rarity-indicator {
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    height: 1em;
    line-height: 1;
}

.rarity-indicator:hover {
    opacity: 1;
}

/* Rarity level specific colors */
.rarity-indicator.rarity-veryCommon {
    color: #888;
}

.rarity-indicator.rarity-common {
    color: #4a90e2;
}

.rarity-indicator.rarity-uncommon {
    color: #9b59b6;
}

.rarity-indicator.rarity-rare {
    color: #f39c12;
}

.rarity-indicator.rarity-veryRare {
    color: #e74c3c;
}

/* Rarity indicator glow effects to match post like/repost states */
.rarity-indicator.rarity-glow-liked {
    color: var(--color-notification-like);
    filter: drop-shadow(0 0 6px var(--color-glow-like));
    animation: rarityGlowLiked 3s ease-in-out infinite;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rarity-indicator.rarity-glow-reposted {
    color: rgba(34, 197, 94, 0.9);
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.75));
    animation: rarityGlowReposted 3s ease-in-out infinite;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rarity-indicator.rarity-glow-unliking {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation: none;
    filter: none;
}

.rarity-indicator.rarity-glow-unreposting {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation: none;
    filter: none;
}

/* Rarity glow animations - match the post card pulse animations */
@keyframes rarityGlowLiked {
    0% {
        filter: drop-shadow(0 0 3px var(--color-glow-like));
    }
    50% {
        filter: drop-shadow(0 0 10px var(--color-glow-like));
    }
    100% {
        filter: drop-shadow(0 0 3px var(--color-glow-like));
    }
}

@keyframes rarityGlowReposted {
    0% {
        filter: drop-shadow(0 0 3px rgba(34, 197, 94, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.9));
    }
    100% {
        filter: drop-shadow(0 0 3px rgba(34, 197, 94, 0.6));
    }
}


/* Feed container that holds card stack and controls in column layout */
.feed-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

/* Controls row containing navigation buttons and post counter */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    z-index: 2;
    width: calc(100% - 3rem);
    flex-wrap: wrap; /* Allow wrapping when buttons don't fit */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    transition-delay: 0.6s;
    margin-top: 0.3rem;
    position: relative; /* Enable absolute positioning for child elements */
}

.feed-container:not(.entrance-complete) .controls-row {
  pointer-events: none;
}

.feed-container.entrance-complete .controls-row,
.feed-container.cache-restore-complete .controls-row {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1500;
}

/* Adjust spacing on narrower screens */
@media (max-width: 600px) {
    .controls-row {
        gap: 0.4rem;
    }
}

/* Expandable control buttons */
.nav-control-expandable {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-control-options {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
    transform-origin: bottom center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-control-expandable.expanding .nav-control-options {
    animation: expandUpward 0.2s ease-out forwards;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-control-expandable.collapsing .nav-control-options {
    animation: collapseDownward 0.2s ease-out forwards;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.nav-control-expandable.expanded .nav-control-options {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.nav-control-option {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}

.nav-control-option:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.nav-control-option:active:not(:disabled) {
    transform: translateY(0);
}

@keyframes expandUpward {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes collapseDownward {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.9);
    }
}

/* Composer-specific expandable actions styling */
.composer-actions-expandable {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.composer-actions-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.5rem;
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.composer-actions-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.composer-actions-button:active:not(:disabled) {
    transform: translateY(0);
}

.composer-actions-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Standalone tags button - matches other action buttons */
.composer-tags-standalone {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.5rem;
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.composer-tags-standalone:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.composer-tags-standalone:active:not(:disabled) {
    transform: translateY(0);
}

.composer-tags-standalone:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.composer-actions-options {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
    transform-origin: bottom center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.composer-actions-expandable.expanding .composer-actions-options {
    animation: expandUpward 0.2s ease-out forwards;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.composer-actions-expandable.collapsing .composer-actions-options {
    animation: collapseDownward 0.2s ease-out forwards;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.composer-actions-expandable.expanded .composer-actions-options {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* Composer-specific expandable option styling - same size as composer action buttons */
.composer-actions-options .nav-control-option {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.5rem;
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation control buttons */
.nav-control {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    width: 32px;
    height: 32px;
    min-width: 32px; /* Prevent shrinking */
    min-height: 32px; /* Prevent shrinking */
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Standardized font size */
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
    line-height: 1; /* Consistent line height */
    text-align: center;
    flex-shrink: 0; /* Prevent flexbox from shrinking buttons */
}

.nav-control:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.nav-control:active:not(:disabled) {
    transform: translateY(0);
}

/* Tutorial button highlight with pulsing orange glow */
@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 0 0 8px 2px rgba(255, 140, 0, 0.6),
                    0 0 16px 4px rgba(255, 140, 0, 0.3),
                    inset 0 0 12px rgba(255, 140, 0, 0.2);
        border-color: rgba(255, 140, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 16px 4px rgba(255, 140, 0, 0.8),
                    0 0 24px 8px rgba(255, 140, 0, 0.4),
                    inset 0 0 16px rgba(255, 140, 0, 0.3);
        border-color: rgba(255, 140, 0, 1);
    }
}

.nav-control.tutorial-highlight {
    animation: tutorialPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 10;
}

.nav-control.tutorial-highlight:hover:not(:disabled) {
    animation: tutorialPulse 1.5s ease-in-out infinite;
}

/* Tutorial timestamp highlight with pulsing orange glow */
@keyframes tutorialTimestampPulse {
    0%, 100% {
        text-shadow: 0 0 6px rgba(255, 140, 0, 0.6),
                     0 0 12px rgba(255, 140, 0, 0.3);
        color: rgba(255, 140, 0, 0.95);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 140, 0, 0.8),
                     0 0 18px rgba(255, 140, 0, 0.5);
        color: rgba(255, 140, 0, 1);
    }
}

.tutorial-highlight-timestamp {
    animation: tutorialTimestampPulse 2s ease-in-out infinite;
    cursor: pointer;
    font-weight: 500;
}

/* Loading state for controls row */
.controls-row.loading {
    opacity: 1;
}

.controls-row.loading .nav-control {
    background: var(--color-button-background-disabled, #2a2a2a);
    color: var(--color-button-text-disabled, #666);
    border-color: var(--color-border-disabled, #444);
    cursor: not-allowed;
}

@keyframes expandUpward {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}


.post-counter {
    font-size: var(--font-size-0-9);
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    text-align: center;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}



/* Thread post styling */

h1 {
    text-align: center;
    margin-bottom: 5px;
    font-size: calc(2em * var(--font-size-scale, 1.0));
}

.tagline {
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
    color: #666;
}

.navigation {
    text-align: center;
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.navigation a {
    margin: 0 15px;
    text-decoration: none;
    color: #0066cc;
    font-weight: normal;
}

.navigation a:hover {
    text-decoration: underline;
}

.navigation a.active {
    font-weight: bold;
    color: black;
}

.post-card.login-section {
    position: absolute;
    height: 100%;
    background: var(--color-card-background);
    border: 2px solid var(--color-border);
    border-radius: 0;
    box-shadow: 0 4px 24px var(--color-shadow);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    padding: 0;
    font-size: 16px;
    transition: transform 0.5s cubic-bezier(.2,1,.3,1), 
                opacity 0.5s cubic-bezier(.2,1,.3,1),
                scale 0.5s cubic-bezier(.2,1,.3,1);
    z-index: 1;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    box-sizing: border-box;
    overflow: hidden;
}
.login-card-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-card-background);
}

.login-card-subtitle {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    font-weight: 300;
}

.login-card-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    width: 100%;
    flex: 1 1 auto;
    overflow-y: auto;
    background: var(--color-card-background);
}

.login-card-body-centered {
    justify-content: center;
}

.login-card-label {
    font-size: var(--font-size-0-9);
    color: var(--color-text);
    font-family: var(--font-family);
    align-self: flex-start;
    width: 100%;
    max-width: 300px;
    text-align: center;
}

.login-card-input {
    width: 100%;
    max-width: 300px;
    padding: 1rem;
    border: 1px solid var(--color-input-border);
    background: var(--color-input-background);
    color: var(--color-input-text);
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    outline: none;
    box-sizing: border-box;
    text-align: center;
}

.login-card-input::placeholder {
    text-align: center;
    color: var(--color-input-placeholder);
    font-size: var(--font-size-1-2);
}

.login-card-info {
    width: 100%;
    max-width: 300px;
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    padding: 0.5rem;
    background: var(--color-glow-anisota-dark);
    border: 1px solid rgba(255, 149, 0, 0.2);
    box-sizing: border-box;
    text-align: center;
  }

.login-page .card-stack-container {
    height: 80dvh;
    margin-bottom: 1.5rem;
  }

.login-card-error {
    text-align: center;
    width: 100%;
    max-width: 300px;
    color: var(--color-error);
}

.login-card-footer {
    justify-content: center;
    text-align: center;
    width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-card-background);
}

.login-card-body .post-card-button {
    max-width: 100%;
    width: 100%;
    margin-top: 0;
}

.login-card-signup-link {
    text-align: center;
    width: 100%;
    max-width: 300px;
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.login-card-signup-link a {
    color: var(--color-link);
    text-decoration: underline;
}

.login-card-signup-link a:hover {
    color: var(--color-link-hover);
}

.login-card-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-9);
}

.login-card-divider::before,
.login-card-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.login-card-divider span {
    padding: 0 1rem;
}

.login-card-button-secondary {
    background: var(--color-accent) !important;
    color: #ffffff !important;
    border: 1px solid var(--color-text-muted) !important;
}

.login-card-button-secondary:hover {
    background: var(--color-accent-hover) !important;
    border-color: var(--color-accent-hover) !important;
}

.login-card-button-back {
    background: var(--color-card-background);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.login-card-button-back:hover {
    background: var(--color-card-background-hover);
    color: var(--color-text);
}

.login-card-content {
    transition: opacity 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.login-card-content.fade-in {
    opacity: 1;
}

.login-card-content.fade-out {
    opacity: 0;
    pointer-events: none;
}

.login-card-content .login-card-input {
    width: 100%;
    box-sizing: border-box;
}

/* Login stored accounts list */
.login-stored-accounts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding-top: 0.5rem;
}

.login-stored-account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s;
}

.login-stored-account-item:hover {
    background: var(--color-card-background);
    border-color: var(--color-border-hover);
}

.login-stored-account-icon {
    color: var(--color-glow-anisota);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-stored-accounts-divider {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    margin: 0.5rem 0;
    position: relative;
}

.login-stored-accounts-divider::before,
.login-stored-accounts-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 1.5rem);
    height: 1px;
    background: var(--color-border);
}

.login-stored-accounts-divider::before {
    left: 0;
}

.login-stored-accounts-divider::after {
    right: 0;
}

/* Post composer styles */
.post-card.post-composer {
    pointer-events: auto;
    background: var(--color-modal-background);
}

.post-card.post-composer .post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-modal-background);
}

.post-card.post-composer .post-card-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-card.post-composer .post-card-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 400;
    font-family: adobe-jenson-pro, serif;
}

.post-card.post-composer .post-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
    font-weight: 400;
    opacity: 0.8;
}

.post-card.post-composer .post-card-subtitle.fade-in {
    animation: fadeInOpacityOnly 0.4s ease-out forwards;
}

@keyframes fadeInOpacityOnly {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.8;
    }
}

.post-card.post-composer .post-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    background: var(--color-modal-background);
    /* Remove overflow-y: auto since the inner container will handle scrolling */
    overflow-y: visible;
}


.post-composer {
    height: 100%;
}

.post-composer-textarea {
    width: 100%;
    /* Remove flex: 1 to allow natural sizing based on content */
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    resize: none;
    padding: 0;
    margin: 0;
    outline: none;
    line-height: 1.4;
    /* Ensure consistent box model */
    box-sizing: border-box;
    /* Prevent inconsistent text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Remove scrolling - parent container will handle it */
    overflow: hidden;
    /* Allow textarea to grow with content */
    min-height: 3rem;
}

.post-composer-textarea::placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

.post-card.post-composer .post-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-modal-background);
}

.character-count {
    font-size: var(--font-size-1);
    color: var(--color-text-muted);
    font-style: italic;
    padding-top: 0.1rem;
}

.character-count.over-limit {
    color: var(--color-error) !important;
    font-weight: bold;
}

/* Header right container for character count and lexicon display */
.post-card-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

/* Lexicon display - currently hidden */
/* .lexicon-display {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

.lexicon-display.success-dimmed {
    opacity: 0.3;
} */

/* Post actions container (tags button + post button) */
.post-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Icon button styles for post composer */
.icon-button-icon {
    width: 1.2rem;
    height: 1.2rem;
    stroke-width: 1.5;
}

/* Common button styles for post composer action buttons */
.tags-toggle-button, .image-upload-button, .media-upload-button,
.drafts-button,
.save-draft-button,
.recent-posts-button, 
.publish-target-button,
.composer-tags-standalone {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.5rem;
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tags-toggle-button:hover:not(:disabled), .image-upload-button:hover:not(:disabled), .media-upload-button:hover:not(:disabled),
.drafts-button:hover:not(:disabled),
.save-draft-button:hover:not(:disabled),
.recent-posts-button:hover:not(:disabled),
.publish-target-button:hover:not(:disabled),
.composer-tags-standalone:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.tags-toggle-button:disabled,
.image-upload-button:disabled,
.media-upload-button:disabled,
.drafts-button:disabled,
.save-draft-button:disabled,
.recent-posts-button:disabled,
.publish-target-button:disabled,
.composer-tags-standalone:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Save draft button - now styled like other icon buttons */
.save-draft-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border-color: var(--color-border);
}

.save-draft-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

/* Post button - wider and more prominent */
.post-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.5rem 1rem;
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 3.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.post-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.post-button:disabled {
    cursor: not-allowed;
}

/* Post button colors based on publishing target */
.post-composer.publish-target-bluesky .post-button:not(:disabled) {
    background: rgba(74, 158, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.6);
    color: rgb(74, 158, 255);
}

.post-composer.publish-target-bluesky .post-button:hover:not(:disabled) {
    background: rgba(74, 158, 255, 0.25);
    border-color: rgba(74, 158, 255, 0.8);
}

.post-composer.publish-target-anisota .post-button:not(:disabled) {
    background: rgba(255, 149, 0, 0.15);
    border-color: rgba(255, 149, 0, 0.6);
    color: rgb(255, 149, 0);
}

.post-composer.publish-target-anisota .post-button:hover:not(:disabled) {
    background: rgba(255, 149, 0, 0.25);
    border-color: rgba(255, 149, 0, 0.8);
}

/* Button state animations */
.save-draft-button.saving {
    animation: buttonSaving 1.5s ease-in-out infinite;
}

.post-button.posting {
    animation: buttonPosting 1.5s ease-in-out infinite;
}

.post-actions .lucide {
    stroke-width: 1.5;
}

@keyframes buttonSaving {
    0%, 100% { 
        opacity: 0.7; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.02);
    }
}

@keyframes buttonPosting {
    0%, 100% { 
        opacity: 0.7; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.02);
    }
}

/* Button loading text */
.button-loading-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--font-size-0-75);
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
    pointer-events: none;
}

.save-draft-button.saving .icon-button-icon,
.post-button.posting .icon-button-icon {
    opacity: 0.3;
}

.save-draft-button.saving,
.post-button.posting {
    position: relative;
}

/* Post composer loading states */
.post-composer {
    transition: opacity 0.2s ease-out;
}

.post-composer.loading {
    position: relative;
    opacity: 0.9;
}

.composer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Ensure overlay covers full height even with scrollable content */
    min-height: 100%;
    background: var(--color-background);
    opacity: 0.9;
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--border-radius);
    animation: loadingOverlayFadeIn 0.2s ease-out;
    /* Block all pointer events when this overlay is shown (for posting/saving) */
    pointer-events: auto;
}

.composer-loading-content {
    text-align: center;
    padding: 1rem;
}

/* Non-blocking loading indicator for image processing */
.composer-loading-indicator {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-modal-background);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    pointer-events: none; /* Don't block interactions */
    animation: loadingIndicatorFadeIn 0.2s ease-out;
}

.composer-loading-indicator-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.composer-loading-indicator-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

@keyframes loadingIndicatorFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.composer-loading-text {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Drag and drop styles */
.post-composer.drag-over {
    border-color: #ff9500 !important;
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.5) !important;
    animation: none !important; /* Override any existing animations during drag */
}

.composer-drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 158, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    backdrop-filter: blur(1px);
    border: 1px dashed var(--color-link);
    border-radius: inherit;
    pointer-events: none;
}

.composer-drag-content {
    text-align: center;
    padding: 2rem;
    background: rgba(var(--color-modal-background-rgb), 0.9);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.composer-drag-icon {
    margin-bottom: 1rem;
    color: var(--color-link);
    opacity: 0.8;
}

.composer-drag-text {
    font-size: var(--font-size-1-2);
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.composer-drag-subtext {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
}


/* Embed loading indicator */
.embed-loading-indicator {
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--color-background-secondary);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-border-light);
    /* Smooth fade-in animation for loading indicators */
    opacity: 0;
    animation: embedFadeIn calc(0.2s / var(--animation-overall, 1)) ease-out forwards;
    position: relative;
}

.embed-loading-cancel {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity calc(0.15s / var(--animation-overall, 1)) ease;
}

.embed-loading-cancel:hover {
    opacity: 1;
}

.embed-loading-cancel:active {
    opacity: 0.8;
}

.embed-loading-text {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    font-style: italic;
}

.video-upload-hint {
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-style: normal;
    text-align: left;
}

/* Tags input container */
.tags-input-container {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: none;
    border-radius: 0;
    margin: 0;
    background: var(--color-background-tertiary);
}

.tags-label {
    display: block;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    margin-bottom: 0.5rem;
    font-family: adobe-jenson-pro, serif;
}

.tags-input {
    width: 100%;
    color: var(--color-text);
    padding: 0.5rem;
    font-size: var(--font-size-1);
    font-family: adobe-jenson-pro, serif;
    outline: none;
    box-sizing: border-box;
}

.tags-input:focus {
    border-color: var(--color-border-focus);
    background: var(--color-card-background-hover);
}

.tags-input::placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

.tags-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tags preview */
.tags-preview {
    margin-top: 0.75rem;
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
}

.tag-item {
    color: var(--color-link);
}

.tag-item.default-tag {
    color: var(--color-warning);
    font-weight: 500;
}

.post-card.post-composer .error {
    color: var(--color-error);
    margin-top: 1rem;
    font-size: var(--font-size-0-9);
}

/* Success message styles for post composer */
.success-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    opacity: 1;
    animation: successFadeInOut 2.5s ease-in-out forwards;
}

.success-text {
    font-size: var(--font-size-1-1);
    color: var(--color-text);
    text-align: center;
    opacity: 0.8;
}

/* Smooth transitions for elements during success state */
.character-count {
    transition: opacity 0.3s ease-in-out, color 0.3s ease-in-out;
}

.post-footer-content {
    transition: opacity 0.3s ease-in-out;
}

.success-dimmed {
    opacity: 0.4;
    pointer-events: none;
}

.success-dimmed .character-count {
    color: var(--color-text-muted);
}

@keyframes successFadeInOut {
    0% {
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes loadingOverlayFadeIn {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 0.9;
        backdrop-filter: blur(2px);
    }
}

/* Post composer closing animation */
.post-card.post-composer.closing {
    animation: postComposerFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes postComposerFadeOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
}

@media (max-width: 599px) {
    .card-stack-container {
        transform: translateY(0);
        /* Reduce the height calculation for mobile to center the card stack better */
    }
    .post-composer {
        margin-bottom: 3rem;
    }
}

@media (min-width: 600px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
        background: var(--color-background);
        height: 100dvh;
        position: fixed;
        width: 100%;
    }

    #root {
        max-width: 500px;
        width: 100%;
        margin: 0 auto;
        height: 100dvh;
    }

    .settings-container {
        max-width: 500px;
    }

    .stamina-level-bar, .anisota-footer {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.feed-container.showing-welcome {
    margin-bottom: 3rem;
  }

/* Scale down feed container on devices with short screens */
@media (max-height: 539px) {
    .feed-container {
        transform: scale(0.7);
        transform-origin: center;
    }
}

.compose-section {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
}

.feed-section {
    border: 1px solid #ccc;
    padding: 15px;
}

select {
    width: auto;
}

.home-page-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-card-background);
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.home-page-select:focus {
    border-color: #5badff;
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.4);
}

.home-page-select:hover {
    border-color: var(--color-text-muted);
}

button:disabled {
    cursor: not-allowed;
}

.post {
    padding: 1rem;
    border-bottom: 1px solid #2f3336;
}

.post-header {
    margin-bottom: 0.5rem;
}

.post-author-name {
    font-weight: bold;
    margin-right: 0.5rem;
}

.post-author-handle {
    color: #71767b;
    margin-right: 0.5rem;
}

.post-time {
    color: #71767b;
}

.post-text {
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    line-height: 1.4;
}

.post-engagement {
    color: #71767b;
    font-size: var(--font-size-0-9);
}

.error {
    color: #ff4444;
    padding: 1rem;
}

.success {
    color: green;
    margin: 10px 0;
}

/* X-ray theme override for success messages */
[data-theme="xray"] .success {
    color: var(--color-text);
}

.post-link {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.post-link a {
    color: #0066cc;
    text-decoration: none;
}

.post-link a:hover {
    text-decoration: underline;
}

@property --text-length {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

/* Interactive corner items */
.interactive-corner-item {
    cursor: pointer;
    transition: transform calc(0.2s / var(--animation-corner-elements, 1)) cubic-bezier(0.2, 1, 0.3, 1);
    user-select: none;
    pointer-events: auto;
}

/* Small font size for long content in bottom corners */
.corner-element-small-font {
    font-size: var(--font-size-1) !important;
}

/* Layout element fade-in animations */
.layout-element-animated {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transition: opacity calc(0.8s / var(--animation-corner-elements, 1)) cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform calc(0.8s / var(--animation-corner-elements, 1)) cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--animation-delay, 0ms);
}

.layout-element-animated.layout-element-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Footer controls use fade-only animation to avoid positioning issues */
.layout-element-fade-only {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--animation-delay, 0ms);
}

.layout-element-fade-only.layout-element-visible {
    opacity: 1;
}

/* Ensure hover animations still work properly on animated elements */
.layout-element-animated.layout-element-visible .interactive-corner-item:hover,
.layout-element-fade-only.layout-element-visible .interactive-corner-item:hover {
    transform: scale(1.1);
}

.layout-element-animated.layout-element-visible .interactive-corner-item:active,
.layout-element-fade-only.layout-element-visible .interactive-corner-item:active {
    transform: scale(1.05);
}

.interactive-corner-item:hover {
    transform: scale(1.1);
}

.interactive-corner-item:active {
    transform: scale(1.05);
}

/* Dynamic corner elements layout */
.corner-elements-top,
.corner-elements-bottom {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 1.5rem;
    font-size: var(--font-size-1-5);
    font-family: adobe-jenson-pro, serif;
    box-sizing: border-box;
    z-index: 1000;
    isolation: isolate;
    pointer-events: none; /* Allow clicks to pass through empty areas */
}

.corner-elements-top {
    top: 0;
    height: calc(3rem + max(1rem, env(safe-area-inset-top)));
    padding-top: max(1rem, env(safe-area-inset-top));
    background: var(--color-header-gradient);
}

.corner-elements-bottom {
    bottom: 0;
    height: calc(3rem + max(1rem, env(safe-area-inset-bottom)));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    align-items: flex-end;
    background: var(--color-footer-gradient);
    /* Ensure footer controls can show through */
    z-index: 999; /* Below footer controls */
}

.corner-element {
    pointer-events: auto; /* Re-enable clicks for actual elements */
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corner-element:empty {
    pointer-events: none; /* Disable clicks for empty corners */
}

.corner-top-left,
.corner-bottom-left {
    justify-content: flex-start;
}

.corner-top-right,
.corner-bottom-right {
    justify-content: flex-end;
}

/* Mobile responsive - smaller corner elements for very narrow screens */
@media (max-width: 400px) {
    .corner-elements-top {
        font-size: var(--font-size-1-2); /* Reduced from 1.5rem */
        padding-left: 1rem; /* Reduced side padding from 1.5rem */
        padding-right: 1rem; /* Reduced side padding from 1.5rem */
        /* Keep original top padding: padding-top: max(1rem, env(safe-area-inset-top)) */
    }
    
    .corner-elements-bottom {
        font-size: var(--font-size-1-2); /* Reduced from 1.5rem */
        padding-left: 1rem; /* Reduced side padding from 1.5rem */
        padding-right: 1rem; /* Reduced side padding from 1.5rem */
        /* Keep original bottom padding: padding-bottom: max(1rem, env(safe-area-inset-bottom)) */
    }
    
    .corner-element-small-font {
        font-size: 0.9rem !important; /* Reduced from 1rem */
    }
    
    /* Brand element responsive sizing */
    .brand-title {
        font-size: 1.2rem !important; /* Reduced from 1.5rem */
    }
    
    .brand-subtitle {
        font-size: 0.7rem !important; /* Reduced from 0.85rem */
    }
    
    .footer-controls-fixed {
        font-size: var(--font-size-1-2); /* Reduced from 1.5rem */
        padding-left: 1rem; /* Reduced side padding from 1.5rem */
        padding-right: 1rem; /* Reduced side padding from 1.5rem */
        /* Keep original bottom padding: max(1rem, env(safe-area-inset-bottom)) */
        gap: 1rem; /* Reduced from 1.4rem */
    }
}

/* Desktop positioning for corner elements */
@media (min-width: 600px) {
    .corner-elements-top,
    .corner-elements-bottom {
        left: 0;
        right: 0;
        width: 100%;
        max-width: none; /* Remove mobile constraint */
    }
}

/* Fixed middle footer controls */
.footer-controls-fixed {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 1.5rem max(1rem, env(safe-area-inset-bottom)) 1.5rem;
    font-size: var(--font-size-1-5);
    font-family: adobe-jenson-pro, serif;
    box-sizing: border-box;
    z-index: 1001; /* Above corner elements to ensure visibility */
    gap: 1.4rem;
    pointer-events: none; /* Allow clicks to pass through */
}

.footer-controls-fixed > * {
    pointer-events: auto; /* Re-enable clicks for actual controls */
}

/* Desktop positioning for footer controls */
@media (min-width: 600px) {
    .footer-controls-fixed {
        max-width: 500px; /* Match the main container width on desktop */
    }
}

/* Corner Elements Preview Styles */
.corner-elements-preview {
    margin-top: 1rem;
}

.corner-preview-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    width: 100%;
    margin: 0px auto;
    aspect-ratio: 4 / 3;
    padding: 1rem;
    background: var(--color-background-tertiary);
    border: 1px solid var(--color-border);
    position: relative;
    pointer-events: auto;
    box-sizing: border-box;
}

.corner-element-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-card-background);
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-8);
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 0.8rem;
    padding-right: 2rem;
    min-width: 100px;
    transition: border-color 0.2s ease;
}

.corner-element-select:focus {
    border-color: #5badff;
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.4);
}

.corner-element-select:hover {
    border-color: var(--color-text-muted);
}

/* Layout reset section */
.layout-reset-section {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.reset-layout-button {
    padding: 0.5rem 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.reset-layout-button:hover {
    background: var(--color-background-tertiary);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.reset-layout-button:active {
    transform: scale(0.98);
}

/* Settings Page Styles */
.settings-page {
    color: var(--color-text);
    padding: 1.5rem;
    padding-top: 20dvh;
    padding-bottom: 20dvh;
    box-sizing: border-box;
    /* Ensure full width for scroll detection while maintaining visual centering */
    width: 100%;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for better mobile browser support */
    /* Scroll performance optimizations */
    contain: layout style;
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scrolling */
    overflow-x: hidden;
}

/* Disable transitions during scroll for better performance */
.settings-page.scrolling * {
    transition: none !important;
}

.settings-container {
    max-width: 430px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.settings-header {
    text-align: center;
    margin-bottom: 2rem;
}

.settings-header h1 {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-3);
    margin-bottom: 1rem;
    color: var(--color-text);
    line-height: var(--font-size-3);
}

.settings-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-2);
    color: var(--color-text-secondary);
    margin: 0;
    text-align: center;
}

.settings-section {
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.settings-section h2 {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-2);
    margin-bottom: 0.5rem;
    color: var(--color-text);
    text-align: center;
    line-height: var(--font-size-2);
}

.settings-section h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-2);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    color: var(--color-text);
    text-align: center;
    font-weight: 500;
}
.section-description {
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    font-size: var(--font-size-1-1);
    text-align: center;
}

.settings-section-title {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-5);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.settings-section-description {
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-95);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.settings-note {
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    line-height: 1.5;
}

.settings-note strong {
    color: var(--color-text);
}

/* Standard Input Field Styles */
.standard-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-input-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.standard-input:focus {
    outline: none;
    border-color: rgba(255, 149, 0, 0.75);
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.3);
}

.standard-input::placeholder {
    color: var(--color-text-muted);
}

.standard-input.error {
    border-color: #ff4444;
}

.standard-input.monospace {
    font-family: monospace;
}

.appview-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.appview-option {
    font-family: adobe-jenson-pro, serif;
    padding: 1.25rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    user-select: none;
}

.appview-option:hover {
    border-color: #5badff;
    background: rgba(74, 158, 255, 0.1);
}

.appview-option.selected {
    border-color: rgba(255, 149, 0, 0.75);
    background: rgba(74, 158, 255, 0.15);
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.3);
}

.appview-option-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.appview-option-name {
    font-size: var(--font-size-1-1);
    font-weight: 500;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.appview-option-name .check-icon {
    color: rgba(255, 149, 0, 0.75);
}

.appview-option-url {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    font-family: monospace;
}

.appview-option-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
    line-height: 1.4;
}

.custom-url-input-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.custom-input-label {
    display: block;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-95);
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.custom-url-input {
    /* Inherits from .standard-input */
    font-size: var(--font-size-0-9);
}

.custom-url-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: #ff4444;
    font-size: var(--font-size-0-85);
}

.control-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

@media (min-width: 600px) {
    .control-buttons-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

.control-button-setting {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    user-select: none;
    contain: layout;
}

.control-button-setting.enabled:hover {
    border-color: #5badff;
    background: rgba(74, 158, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.4);
}

.control-button-setting.enabled:hover .control-button-symbol {
    background: #5badff;
    border-color: #5badff;
}

.control-button-setting.disabled:hover {
    border-color: #555;
    background: #2a2a2a;
}

.control-button-setting.disabled:hover .control-button-symbol {
    background: #3a3a3a;
    border-color: #555;
}

.control-button-setting:active {
    transform: translateY(1px);
}

.control-button-setting.enabled:active {
    background: rgba(74, 158, 255, 0.25);
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.5);
}

.control-button-setting.disabled:active {
    background: #333;
}

.control-button-setting.enabled {
    border-color: rgba(255, 149, 0, 0.75);
    background: rgba(74, 158, 255, 0.25);
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.4);
}

.control-button-setting.enabled .control-button-symbol {
    background: rgba(255, 149, 0, 0.75);
    border-color: rgba(255, 149, 0, 0.75);
    color: #fff;
}

.control-button-setting.disabled {
    opacity: 1;
    background: var(--color-background-secondary);
    color: var(--color-text-disabled, #666);
    border-color: var(--color-border-disabled, #444);
}

.control-button-setting.disabled .control-button-symbol {
    background: #2a2a2a;
    border-color: #444;
    color: #666;
}

.control-button-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-button-symbol {
    background: #333;
    border: 1px solid #555;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Standardized font size */
    font-family: adobe-jenson-pro, serif;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
    contain: layout;
    line-height: 1; /* Consistent line height */
    text-align: center;
}

.control-button-setting:hover .control-button-symbol {
    background: #444;
    border-color: #666;
}

.control-button-setting:active .control-button-symbol {
    background: #555;
}

/* Standardized button symbol sizing for consistency */
.control-button-setting[data-button="back"] .control-button-symbol,
.control-button-setting[data-button="forward"] .control-button-symbol {
    font-size: 16px; /* Arrows work better at slightly larger size */
}

.control-button-setting[data-button="shuffle"] .control-button-symbol,
.control-button-setting[data-button="flip"] .control-button-symbol,
.control-button-setting[data-button="repost"] .control-button-symbol,
.control-button-setting[data-button="reply"] .control-button-symbol,
.control-button-setting[data-button="quote"] .control-button-symbol,
.control-button-setting[data-button="list"] .control-button-symbol,
.control-button-setting[data-button="fetch"] .control-button-symbol,
.control-button-setting[data-button="fullscreen"] .control-button-symbol {
    font-size: 14px;
}

/* Special styling for like button */
.control-button-setting[data-button="like"] .control-button-symbol {
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    text-rendering: optimizeLegibility;
}

.control-button-name {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    font-weight: bold;
    color: var(--color-text);
    flex: 1;
}

.control-button-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-85);
    color: var(--color-text-secondary);
    line-height: 1.3;
}

/* Note: Drag handle styles removed - configuration section no longer supports dragging */

/* Drag and drop states - only for library zones now */
.control-button-setting.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    z-index: 1000;
    pointer-events: none;
}

.control-button-setting.drag-over {
    transform: scale(1.02);
    background: #333 !important;
    border-color: #555 !important;
}

/* Fullscreen Settings */
.fullscreen-setting {
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.fullscreen-setting-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fullscreen-setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fullscreen-setting-header h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-2);
    margin: 0;
    color: var(--color-text);
}

.fullscreen-setting-description {
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}



.control-button-setting.drag-over .control-button-symbol {
    transform: scale(1.1);
}

/* Touch dragging states - only for library zones now */
.control-button-setting.touch-dragging {
    opacity: 0.3;
    transform: scale(0.9);
    z-index: 1;
    transition: none;
    border-style: dashed;
    border-color: #888 !important;
    background: #1a1a1a !important;
}

.control-button-setting.touch-dragging .drag-handle {
    opacity: 1;
    color: #fff;
}

.preview-control-button.touch-dragging {
    opacity: 0.3;
    transform: scale(0.9);
    border-style: dashed;
    border-color: #888 !important;
    background: #1a1a1a !important;
}


.controls-preview .controls-row {
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
    position: static;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .controls-preview .controls-row.preview {
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .preview-control-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    touch-action: manipulation;
    user-select: none;
  }
  
  .preview-control-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
  }
  
  .preview-control-button.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
  }
  
  .preview-control-button.drag-over {
    transform: scale(1.05);
    border-color: var(--color-link);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  }
  
  .preview-empty-state {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 0.2s ease;
  }
  
  .controls-preview.active-zone.drag-over-zone .preview-empty-state {
    border-color: var(--color-link-hover);
    color: var(--color-link);
  }
  
  .controls-preview.library-zone.drag-over-zone .preview-empty-state,
  .controls-preview.library-zone.drag-over-zone .library-empty-state {
    border-color: rgba(128, 128, 128, 0.6);
    color: rgba(128, 128, 128, 0.9);
  }
  

/* Touch drag active states - only for library zones now */
.controls-preview.touch-drag-active,
.library-zone.touch-drag-active {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Long press feedback */
.control-button-setting.long-pressing {
    background: #333 !important;
    border-color: #555 !important;
    transform: scale(1.02);
    animation: longPressProgress 0.5s ease-out forwards;
}

.control-button-setting.long-pressing .drag-handle {
    opacity: 1;
    color: #fff;
}

@keyframes longPressProgress {
    0% {
        box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.2);
    }
}

/* Floating drag preview */
.drag-preview {
    will-change: transform, left, top;
    transition: none;
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden;
    pointer-events: none;
    position: fixed;
    z-index: 10000;
    touch-action: none;
}

.drag-preview .control-button-setting {
    opacity: 0.95;
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    border: 2px solid #888;
    background: #2a2a2a !important;
    pointer-events: none;
    animation: dragPreviewFloat 0.15s ease-out;
    will-change: transform;
    transform-origin: center;
    touch-action: none;
}

.drag-preview .control-button-setting.preview {
    box-sizing: border-box;
    /* Use natural dimensions from the original element */
}

.drag-preview .control-button-description {
    display: none; /* Hide description in preview for cleaner look */
}

.drag-preview .preview-control-button {
    opacity: 0.95;
    transform: scale(1.2) rotate(3deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 2px solid #999;
    background: #333 !important;
    pointer-events: none;
    touch-action: none;
}

@keyframes dragPreviewFloat {
    from {
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }
    to {
        transform: scale(1.1) rotate(2deg);
        opacity: 0.95;
    }
}

/* Enhanced text selection prevention */
.control-button-setting {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* Allow drag gestures while disabling zoom/pan */
}

.control-button-setting * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.control-button-setting .drag-handle {
    pointer-events: auto;
}

/* Touch drag zones need proper touch handling */
.controls-preview,
.config-zone,
.library-zone {
    touch-action: manipulation; /* Allow drag gestures while disabling zoom/pan */
    -webkit-user-select: none;
    user-select: none;
}

.preview-control-button,
.preview-control-button.library-button {
    touch-action: manipulation; /* Allow drag gestures while disabling zoom/pan */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .drag-handle {
        opacity: 0.7;
        font-size: var(--font-size-1);
        padding: 0.5rem;
        margin: -0.5rem -0.5rem -0.5rem auto;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation; /* Allow drag gestures while disabling zoom/pan */
    }
    
    .control-button-setting:hover .drag-handle {
        opacity: 1;
    }
    
    .control-button-setting {
        touch-action: manipulation; /* Allow drag gestures while disabling zoom/pan */
        user-select: none;
    }
    
    /* Prevent text selection during touch */
    .control-button-setting:active {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Ensure header layout accommodates drag handle */
.control-button-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

/* Button Type Legend */
.button-type-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    font-family: adobe-jenson-pro, serif;
}

.legend-title {
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    font-weight: 600;
}

.legend-items {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
}

.legend-indicator {
    width: 16px;
    height: 16px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--color-text);
}

.legend-indicator.single {
    background: var(--color-button-background);
    border-color: var(--color-border-light);
}

.legend-indicator.unified {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* Button Category Sections */
.button-category-section {
    margin-bottom: 2.5rem;
    margin-top: 1.5rem;
}

.button-category-section h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-4);
    color: var(--color-text);
    text-align: center;
}

/* Library Zones Wrapper */
.library-zones-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.library-section {
    display: flex;
    flex-direction: column;
}

.library-section-title {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    text-align: center;
    font-weight: 600;
}

/* Single Button Styling */
.preview-control-button.single-button,
.control-button-setting.single-button {
    /* Default single button style - no special visual indicators */
}

/* Unified Button Styling */
.preview-control-button.unified-button {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.preview-control-button.unified-button:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-1px) scale(1.02);
}

.control-button-setting.unified-button:not(.disabled) {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

.control-button-setting.unified-button.enabled {
    background: var(--color-border-dark);
    border-color: var(--color-border-focus);
    box-shadow: none;
}

.control-button-setting.unified-button.enabled:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    box-shadow: 0 0 0 1px var(--color-accent-hover);
}

.control-button-setting.unified-button .control-button-symbol {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.control-button-setting.unified-button.enabled .control-button-symbol {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}



/* Separate styling for single and unified library zones */
.single-library {
    border-left: 3px solid var(--color-border-light);
}

.unified-library {
    border-left: 3px solid var(--color-accent);
}

.single-library:hover {
    border-left-color: var(--color-text-muted);
}

.unified-library:hover {
    border-left-color: var(--color-accent-hover);
}


.settings-actions {
    text-align: center;
    margin-top: 32px;
}

.reset-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 1rem 2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    border-radius: 0;
    contain: layout;
}

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

.reset-button:active {
    background: var(--color-button-active);
}

.reset-button-small {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.6rem 1.2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    border-radius: 0;
    contain: layout;
}

.reset-button-small:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.reset-button-small:active {
    background: var(--color-button-active);
}

.sync-status {
    margin-top: 12px;
    text-align: center;
}

.sync-indicator {
    font-size: 12px;
}

.sync-progress {
    color: var(--color-accent);
    font-style: italic;
}

.sync-success {
    color: var(--color-success);
}

.sync-ready {
    color: var(--color-text-muted);
}

.sync-disabled {
    color: var(--color-text-muted);
    font-style: italic;
}

.sync-section {
    border-radius: 0;
}

.sync-section .sync-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.sync-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    border-radius: 0;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.sync-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.sync-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sync-message {
    font-size: 13px;
    text-align: center;
    padding: 8px;
    border-radius: 0;
    color: var(--color-success);
}

/* Modal styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    animation: modalFadeIn calc(0.3s / var(--animation-modals, 1)) cubic-bezier(0.2, 1, 0.3, 1) forwards;
    will-change: opacity;
    /* Ensure modal backdrop covers entire viewport, not constrained by parent containers */
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    transform: none;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

.modal-backdrop.closing {
    animation: modalFadeOut calc(0.3s / var(--animation-modals, 1)) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-content {
    background: var(--color-modal-background);
    border: 2px solid var(--color-border);
    width: 90dvw;
    max-width: 500px;
    max-height: 80vh;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text);
    animation: modalSlideIn 0.3s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    /* Ensure the modal content is properly positioned */
    position: relative;
    margin: 0;
    transform: none;
    margin-bottom: 2rem;
}

/* Hide scrollbar for webkit browsers */
.modal-content::-webkit-scrollbar {
    display: none;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes modalSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
}

.modal-content.closing {
    animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Flip Modal Styles - mirrors post card structure for proper iOS scrolling */
/* Structure: container (perspective) > inner (preserve-3d, rotates) > sides (absolute, backface-hidden) */
.modal-flip-container {
    /* Perspective on container, like .card-stack-container */
    perspective: 1200px;
    /* Remove the border from container since sides have their own */
    border: none;
    background: transparent;
    /* Container needs to size to content */
    position: relative;
    max-height: 80dvh;
}

/* Inner wrapper that rotates - mirrors .card-inner */
.modal-inner {
    position: relative;
    width: 100%;
    /* Use grid to stack both sides and let content determine height */
    display: grid;
    grid-template-areas: "modal";
    transition: transform calc(0.6s / var(--animation-modals, 1)) cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    max-height: 80dvh;
}

/* When flipped, rotate the inner wrapper */
.modal-flip-container.flipped .modal-inner {
    transform: rotateY(180deg);
}

/* Modal sides - use grid-area to stack, with backface-visibility for flip effect */
.modal-side {
    /* Grid-area stacking allows content to determine height */
    grid-area: modal;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--color-modal-background);
    border: 2px solid var(--color-border);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 80dvh;
}

.modal-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.modal-back {
    z-index: 1;
    transform: rotateY(180deg);
}

/* When flipped, swap z-index so visible side is on top (for scrolling) */
.modal-flip-container.flipped .modal-front {
    z-index: 1;
}

.modal-flip-container.flipped .modal-back {
    z-index: 2;
}

/* Hide scrollbar for webkit browsers in flip modal */
.modal-side .modal-body::-webkit-scrollbar {
    display: none;
}

/* Ensure flip modal body can scroll - mirrors .post-card-body */
.modal-side .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Allow flex item to shrink for scrolling */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* Smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    flex-shrink: 0;
    gap: 1rem;
}

.modal-header-content {
    flex: 1;
    min-width: 0; /* Allow content to shrink */
}

.modal-custom-close {
    flex-shrink: 0;
}

.modal-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.modal-title-container {
    flex: 1;
    min-width: 0; /* Allow text truncation if needed */
}

.modal-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.modal-close-buttons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.modal-extra-button {
    display: flex;
    align-items: center;
}

.modal-controls .lucide {
    stroke-width: 1.5;
  }

.modal-title {
    font-size: var(--font-size-1-5);
    font-weight: 600;
    margin: 0;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-subtitle {
    font-size: var(--font-size-0-95);
    color: var(--color-text-muted);
    margin: 0.25rem 0 0 0;
    font-family: adobe-jenson-pro, serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-modal-subtitle {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.record-collection {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-style: italic;
    font-family: adobe-jenson-pro, serif;
}

.record-timestamp {
    font-size: var(--font-size-0-875);
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
}

.modal-header-extras {
    margin-top: 0.6rem;
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.modal-title-with-extras {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header-extras-inline {
    display: flex;
    align-items: center;
}

/* Notifications modal controls styling */
.notifications-modal-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Notifications header extras styling */
.notifications-header-extras {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notifications-unread-count {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
    align-self: flex-start;
    line-height: 1;
    /* Ensure perfect centering of the X character */
    text-align: center;
}

.modal-close:hover {
    background: var(--color-card-background-hover);
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    min-height: 0; /* Allow flex item to shrink below content size for scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide modal-body when empty */
.modal-body:empty {
    display: none;
    padding: 0;
}

/* Hide scrollbar for webkit browsers */
.modal-body::-webkit-scrollbar {
    display: none;
}

/* Modal footer styling */
.modal-footer {
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
}

.search-modal-footer {
    padding: 0;
}

/* Modal footer button styles */
.modal-footer .cancel-btn,
.modal-footer .save-btn,
.modal-footer .delete-btn {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: var(--font-size-0-9);
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
    font-family: inherit;
}

.modal-footer .cancel-btn {
    background: var(--color-background);
    color: var(--color-text);
    border-color: var(--color-border, rgba(0, 0, 0, 0.2));
}

.modal-footer .cancel-btn:hover {
    background: var(--color-background-secondary, rgba(0, 0, 0, 0.05));
    border-color: var(--color-border-hover, rgba(0, 0, 0, 0.3));
}

.modal-footer .save-btn {
    background: var(--color-glow-anisota-dark);
    color: white;
    border-color: var(--color-glow-anisota);
}

.modal-footer .save-btn:hover {
    background: var(--color-glow-anisota-hover);
    border-color: var(--color-glow-anisota);
}

.modal-footer .save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-footer .delete-btn.danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.modal-footer .delete-btn.danger:hover {
    background: #c82333;
    border-color: #c82333;
}



/* Reply modal container - simpler styling for post-composer */
.reply-modal-container {
    width: calc(100% - 1rem);
    height: 80dvh;
    animation: modalSlideIn 0.3s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
    margin-bottom: 2rem;
    max-width: 500px;
}

.reply-modal-container.closing {
    animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Override post-composer positioning when inside reply modal */
.reply-modal-container .post-card.post-composer {
    position: relative;
    width: 100%;
    height: 80dvh;
}

/* Post Composer Modal - specific styling for the global post composer modal */
.reply-modal-container:has(.post-card.modal-composer) {
    max-width: 500px;
    max-height: 70vh;
}

/* Override post-composer positioning when inside post composer modal */
.post-card.post-composer.modal-composer {
    position: relative;
    width: 100%;
    height: 70dvh;
    /* Keep the glow border effect for modal composer */
    border: 2px solid var(--color-border);
    box-shadow: 0 4px 24px var(--color-shadow);
}

/* Touch menu specific styles */
.touch-menu {
    display: flex;
    flex-direction: column;
}

.touch-menu-user-header {
    display: flex;
    align-items: center;
    padding: 1rem 0rem;
    margin-bottom: 0.5rem;
    padding-top: 0rem;
}

.touch-menu-username-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.touch-menu-username {
    font-size: 1.6rem;
    font-weight: 400;
    font-family: adobe-jenson-pro, serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text);
    max-width: 100%;
}

.touch-menu-did {
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.touch-menu-header-actions {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.touch-menu-action-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.touch-menu-profile-stats {
    display: flex;
    gap: 0.5rem;
}

/* DID styling - no longer needs truncation since tier display moved */

/* Responsive layout for touch menu header */
@media (max-width: 768px) {
    .touch-menu-header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.75rem;
    }
    
    .touch-menu-profile-stats {
        order: 1; /* Profile stats at top */
    }
    
    .touch-menu-action-buttons {
        order: 2; /* Action buttons below stats */
    }
}

@media (max-width: 480px) {
    .touch-menu-header-actions {
        gap: 0.5rem;
    }
    
    .touch-menu-profile-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .touch-menu-tier-display {
        font-size: 0.8rem; /* Slightly smaller on very small screens */
        padding: 0.4rem 0.6rem; /* Reduce padding on small screens */
    }
    
    .touch-menu-tier-display .tier-name {
        font-size: 0.8rem;
    }
    
    .touch-menu-tier-display .tier-upgrade-hint {
        font-size: 0.65rem;
    }
    
    
    /* Make modal title smaller on very small screens */
    .modal-title {
        font-size: var(--font-size-1-25);
    }
    
    .modal-subtitle {
        font-size: var(--font-size-0-85);
    }
}

.touch-menu-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0rem;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.touch-menu-action-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background: none !important;
}

.touch-menu-logout-btn {
    color: var(--color-error);
}

.touch-menu-logout-btn:hover {
    color: var(--color-error);
}

/* Tier display in modal header content - positioned underneath DID */
.touch-menu-tier-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
    border: 1px solid var(--color-border);
    background: var(--color-card-background);
    min-width: 80px;
    text-align: center;
    margin-top: 1rem;
    max-width: 120px;
}

.touch-menu-tier-display:hover {
    background: var(--color-card-background-hover);
    transform: scale(1.02);
}

.touch-menu-tier-display .tier-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.2;
}

.touch-menu-tier-display .tier-upgrade-hint {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    line-height: 1;
    font-style: italic;
}

/* Free tier styling */
.touch-menu-tier-display.tier-free {
    border-color: #ff9500;
    background: linear-gradient(135deg, var(--color-card-background) 0%, rgba(255, 149, 0, 0.05) 100%);
}

.touch-menu-tier-display.tier-free:hover {
    background: linear-gradient(135deg, var(--color-card-background-hover) 0%, rgba(255, 149, 0, 0.1) 100%);
    border-color: #ff9500;
    box-shadow: 0 0 8px rgba(255, 149, 0, 0.2);
}

.touch-menu-tier-display.tier-free .tier-upgrade-hint {
    color: #ff9500;
    font-weight: 500;
}

/* Premium tier styling */
.touch-menu-tier-display.tier-premium {
    border-color: var(--color-notification-repost);
    background: linear-gradient(135deg, var(--color-card-background) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.touch-menu-tier-display.tier-premium:hover {
    background: linear-gradient(135deg, var(--color-card-background-hover) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: var(--color-notification-repost);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

.touch-menu-item {
    padding: 0.7rem 0rem;
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.touch-menu-item:hover {
    background: var(--color-card-background-hover);
}

.touch-menu-item.disabled {
    color: var(--color-text-muted);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

.touch-menu-item.disabled:hover {
    background: transparent;
}

.touch-menu-item:first-child {
}

.touch-menu-item:last-child {
    border-bottom: none !important;
}

.touch-menu-item-harvest {
    animation: harvest-glow 2s ease-in-out infinite alternate;
    position: relative;
}

@keyframes harvest-glow {
    0% {
        text-shadow: 0 0 8px var(--color-glow-anisota);
        color: var(--color-text);
    }
    100% {
        text-shadow: 0 0 15px var(--color-glow-anisota), 0 0 20px var(--color-glow-anisota);
        color: #ff9500;
    }
}

.touch-menu-item-logout {
    color: var(--color-error);
}

.touch-menu-item-logout:hover {
    background: var(--color-card-background-hover);
    color: var(--color-error);
}

/* Info displays for stamina/level modals */
.info-display {
    font-family: adobe-jenson-pro, serif;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
.info-display::-webkit-scrollbar {
    display: none;
}

.info-display h3 {
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
    color: var(--color-text);
}

.info-display h4 {
    font-size: var(--font-size-1-1);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.9;
}

.info-display p {
    font-size: var(--font-size-1);
    line-height: 1.4;
    margin: 0 0 1rem 0;
    color: var(--color-text-muted);
}

.info-display .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    flex-direction: row;
}

.info-display .stat-item:last-child {
    border-bottom: none;
}

.info-display .stat-label {
    color: var(--color-text);
}

.info-display .stat-value {
    color: var(--color-text-muted);
}



/* Stats sections */
.stats-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
}

.stats-section:last-child {
    margin-bottom: 0;
}

.stats-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.stats-section .stat-item:last-child {
    border-bottom: none !important;
}

/* Progress Management Controls */
.progress-management-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 1rem;
}

.save-progress-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.5rem 1rem;
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-progress-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.save-progress-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.save-progress-button.saving {
    animation: buttonSaving 1.5s ease-in-out infinite;
}

.save-progress-status {
    font-size: var(--font-size-0-8);
    font-style: italic;
    text-align: center;
    padding: 0.25rem;
}

.save-progress-status.status-success {
    color: var(--color-success, #22c55e);
}

.save-progress-status.status-error {
    color: var(--color-error, #ef4444);
}

.save-progress-status.status-info {
    color: var(--color-text-secondary, #666);
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Section headers for highlighted and all notifications */
.notifications-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notifications-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-primary);
    margin: 0 !important;
}

.notifications-section-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-top: 0.15rem;
    opacity: 0.7;
}

.notifications-section-count {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-secondary);
    background: var(--color-background-tertiary);
    padding: 0.25rem 0.5rem;
    min-width: 1.5rem;
    text-align: center;
    border: 1px solid var(--color-border);
}

.notification-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--color-card-background-hover);
    border-left: 3px solid var(--color-border);
    transition: all 0.2s ease;
}

.notification-item.clickable-notification {
    cursor: pointer;
}

.notification-item.clickable-notification:hover {
    background: var(--color-card-background-active);
    border-left-color: var(--color-text-muted);
    transform: translateX(2px);
}

.notification-item.clickable-notification:active {
    background: var(--color-card-background-hover);
    transform: translateX(1px);
}

.notification-type {
    font-size: var(--font-size-0-8);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.notification-text {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--color-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.notification-text-basic {
    display: block;
    padding-right: 50px; /* Space for multi-engage button (32px + 18px margin) */
}

.notification-username {
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.notification-username:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.notification-username:active {
    opacity: 0.6;
}

.notification-time {
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
    font-style: italic;
}

/* Batched notifications */
.batched-notification {
    border-left-color: rgb(74, 158, 255) !important;
    background: var(--color-card-background-hover) !important;
}

.batched-notification:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: rgb(74, 158, 255) !important;
}

.batched-notification .notification-type {
    color: var(--color-link);
    font-weight: 700;
}

/* Batch expansion styles */

.expanded-batch-item {
    margin-left: 1rem;
    border-left: 2px solid var(--color-border-subtle) !important;
    background: var(--color-card-background) !important;
    opacity: 0;
    animation: slideInDown 0.2s ease-out forwards;
}

.expanded-batch-item:nth-child(2) { animation-delay: 0.02s; }
.expanded-batch-item:nth-child(3) { animation-delay: 0.04s; }
.expanded-batch-item:nth-child(4) { animation-delay: 0.06s; }
.expanded-batch-item:nth-child(5) { animation-delay: 0.08s; }
.expanded-batch-item:nth-child(6) { animation-delay: 0.1s; }
.expanded-batch-item:nth-child(7) { animation-delay: 0.12s; }
.expanded-batch-item:nth-child(8) { animation-delay: 0.14s; }
.expanded-batch-item:nth-child(9) { animation-delay: 0.16s; }
.expanded-batch-item:nth-child(10) { animation-delay: 0.18s; }

.expanded-batch-item:hover {
    background: var(--color-card-background-hover) !important;
    border-left-color: var(--color-border) !important;
}

.expanded-batch-item .notification-type {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Slide down animation for expanded items */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Slide up animation for collapsing items */
@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
}

/* Collapsing state for batch items */
.expanded-batch-item.collapsing {
    animation: slideOutUp 0.15s ease-in forwards;
}

/* Same-post batch user items */
.same-post-batch-user-item {
    padding: 0.75rem 1rem !important;
    position: relative;
}

.same-post-batch-user-item img {
    flex-shrink: 0;
}

.same-post-batch-username {
    user-select: none;
}

/* Unread user items in expanded batches - more prominent */
.same-post-batch-user-unread {
    opacity: 1 !important;
}

/* Read user items maintain the standard dimmed appearance */
.same-post-batch-user-item.notification-read {
    opacity: 0.75 !important;
}

/* Action buttons (More / Close) at the end of expanded batch */
.same-post-batch-actions {
    background: var(--color-card-background) !important;
    border-left: 2px solid var(--color-border-subtle) !important;
    display: flex !important;
    gap: 8px;
    padding: 0.5rem 1rem !important;
    justify-content: stretch;
}

.same-post-batch-action-button {
    flex: 1;
    padding: 10px 16px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    border: 2px solid var(--color-border);
    background: var(--color-card-background-hover);
    color: inherit;
    transition: all 0.2s ease;
}

.same-post-batch-action-button:hover {
    background: var(--color-card-background-active);
    border-color: var(--color-border-active);
    transform: translateY(-1px);
}

.same-post-batch-action-button:active {
    transform: translateY(0);
}

.same-post-batch-post-link {
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.same-post-batch-post-link:hover {
    opacity: 1 !important;
}

/* Notification type colors */
.notification-like {
    border-left-color: var(--color-notification-like) !important;
    background: rgba(255, 68, 191, 0.08) !important;
}

.notification-like:hover {
    background: rgba(255, 68, 191, 0.12) !important;
    border-left-color: var(--color-notification-like) !important;
}

.notification-like .notification-type {
    color: var(--color-notification-like);
}

.notification-repost {
    border-left-color: var(--color-notification-repost) !important;
    background: var(--color-card-background-hover) !important;
}

.notification-repost:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: var(--color-notification-repost) !important;
}

.notification-repost .notification-type {
    color: var(--color-notification-repost);
}

.notification-like-via-repost {
    border-left-color: var(--color-notification-like) !important;
    background: rgba(255, 68, 191, 0.08) !important;
}

.notification-like-via-repost:hover {
    background: rgba(255, 68, 191, 0.12) !important;
    border-left-color: var(--color-notification-like) !important;
}

.notification-like-via-repost .notification-type {
    color: var(--color-notification-like);
}

.notification-repost-via-repost {
    border-left-color: var(--color-notification-repost) !important;
    background: var(--color-card-background-hover) !important;
}

.notification-repost-via-repost:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: var(--color-notification-repost) !important;
}

.notification-repost-via-repost .notification-type {
    color: var(--color-notification-repost);
}

.notification-reply {
    border-left-color: rgb(74, 158, 255) !important;
}

.notification-reply:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: rgb(74, 158, 255) !important;
}

.notification-reply .notification-type {
    color: rgb(74, 158, 255);
}

.notification-quote {
    border-left-color: var(--color-notification-quote) !important;
    background: var(--color-card-background-hover) !important;
}

.notification-quote:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: var(--color-notification-quote) !important;
}

.notification-quote .notification-type {
    color: var(--color-notification-quote);
}

.notification-mention {
    border-left: 3px solid var(--color-notification-mention);
}

.notification-mention:hover {
    background: var(--color-card-background-hover);
}

.notification-mention .notification-type {
    color: var(--color-notification-mention);
}

.notification-follow {
    border-left-color: var(--color-notification-follow) !important;
    background: var(--color-card-background-hover) !important;
}

.notification-follow:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: var(--color-notification-follow) !important;
}

.notification-follow .notification-type {
    color: var(--color-notification-follow);
}

/* Read notification styling - dimmed versions of type colors */

.notification-item.notification-read {
    opacity: 0.75 !important;
  }

.notification-like.notification-read {
    border-left-color: rgba(255, 68, 191, 0.4) !important;
}

.notification-like.notification-read:hover {
    border-left-color: rgba(255, 68, 191, 0.5) !important;
}

.notification-repost.notification-read {
    border-left-color: rgba(34, 197, 94, 0.4) !important;
}

.notification-repost.notification-read:hover {
    border-left-color: rgba(34, 197, 94, 0.5) !important;
}

.notification-like-via-repost.notification-read {
    border-left-color: rgba(255, 68, 191, 0.4) !important;
}

.notification-like-via-repost.notification-read:hover {
    border-left-color: rgba(255, 68, 191, 0.5) !important;
}

.notification-repost-via-repost.notification-read {
    border-left-color: rgba(34, 197, 94, 0.4) !important;
}

.notification-repost-via-repost.notification-read:hover {
    border-left-color: rgba(34, 197, 94, 0.5) !important;
}

.notification-reply.notification-read {
    border-left-color: rgba(74, 158, 255, 0.4) !important;
}

.notification-reply.notification-read:hover {
    border-left-color: rgba(74, 158, 255, 0.5) !important;
}

.notification-quote.notification-read {
    border-left-color: rgba(136, 136, 136, 0.4) !important;
}

.notification-quote.notification-read:hover {
    border-left-color: rgba(136, 136, 136, 0.5) !important;
}

.notification-mention.notification-read {
    border-left-color: rgba(255, 149, 0, 0.4) !important;
}

.notification-mention.notification-read:hover {
    border-left-color: rgba(255, 149, 0, 0.5) !important;
}

.notification-follow.notification-read {
    border-left-color: rgba(136, 136, 136, 0.4) !important;
}

.notification-follow.notification-read:hover {
    border-left-color: rgba(136, 136, 136, 0.5) !important;
}

/* New notification states */
.notification-loading,
.notification-error,
.no-notifications {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    flex-direction: column;
}

.notification-loading {
    flex-direction: column;
    gap: 0.5rem;
}

.notification-error {
    flex-direction: column;
    gap: 1rem;
}

.retry-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.5rem 1rem;
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
}

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

.auth-required-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    gap: 1rem;
}

.auth-required-message h4 {
    margin: 0;
    color: var(--color-text);
    font-size: var(--font-size-1-5);
    font-family: adobe-jenson-pro, serif;
}

.auth-required-message p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-1-1);
}

.login-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-1);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
}
.login-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

/* Notifications modal specific styles */
.notifications-modal {
    min-height: 70dvh;
    height: auto;
    transition: height 0.3s ease;
}

/* Notifications modal title with inline counter */
.notifications-title-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notifications-title-text {
    font-size: inherit;
    font-weight: inherit;
}

.notifications-counter {
    font-size: 0.85em;
    opacity: 0.7;
    font-weight: 400;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: fadeInSlide 0.4s ease-out;
}

.notifications-counter.fade-out {
    opacity: 0;
    transform: translateX(-10px);
    animation: fadeOutSlide 0.3s ease-in forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 0.7;
        transform: translateX(0);
    }
}

@keyframes fadeOutSlide {
    from {
        opacity: 0.7;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-10px);
    }
}

/* Notification stats fade animation */
.notification-stats-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-stats-container.fade-out {
    opacity: 0;
    transform: translateY(-5px);
    animation: fadeOutStats 0.3s ease-in forwards;
}

@keyframes fadeOutStats {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* Notification items fade animations */
.notification-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: fadeInNotification 0.4s ease-out;
}

.notification-item.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeOutNotification 0.3s ease-in forwards;
}

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

@keyframes fadeOutNotification {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Staggered animation for multiple notifications */
.notification-item:nth-child(1) { animation-delay: 0ms; }
.notification-item:nth-child(2) { animation-delay: 50ms; }
.notification-item:nth-child(3) { animation-delay: 100ms; }
.notification-item:nth-child(4) { animation-delay: 150ms; }
.notification-item:nth-child(5) { animation-delay: 200ms; }
.notification-item:nth-child(6) { animation-delay: 250ms; }
.notification-item:nth-child(7) { animation-delay: 300ms; }
.notification-item:nth-child(8) { animation-delay: 350ms; }
.notification-item:nth-child(9) { animation-delay: 400ms; }
.notification-item:nth-child(10) { animation-delay: 450ms; }

/* Filter toggle expansion animations */
.notification-filters {
    position: relative;
}

.notification-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.notification-filters-container.collapsed {
    max-height: 3rem; /* Approximate height for one row */
}

.notification-filters-container.expanded {
    max-height: 10rem; /* Enough for multiple rows */
}

.filter-toggle {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-toggle.expanding {
    opacity: 0;
    animation: expandFilterToggle 0.3s ease-out forwards;
}

.filter-toggle.collapsing {
    animation: collapseFilterToggle 0.3s ease-out forwards;
}

.expand-filters-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease, transform 0.3s ease;
    user-select: none;
    position: relative;
    font-size: 1.1em;
}

.expand-filters-button.transitioning {
    transform: scale(0.95);
}

.expand-filters-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    color: var(--color-text);
}

@keyframes expandFilterToggle {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes collapseFilterToggle {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.notifications-modal .info-display {
    min-height: 50vh;
    transition: min-height 0.3s ease;
}

.notifications-modal .notifications-list {
    min-height: 40vh;
    transition: min-height 0.3s ease;
}

/* Smooth loading state for notifications modal */
.notifications-modal .notification-loading {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}

.notifications-modal .auth-required-message {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

/* Notification filters */
.notification-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.filter-button {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.4rem 0.8rem;
    font-size: var(--font-size-0-85);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.filter-button:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
    color: var(--color-text);
}

.filter-button.active {
    background: var(--color-card-background-active);
    border-color: var(--color-border-light);
    color: var(--color-text);
}

.filter-button.active:hover {
    background: var(--color-card-background-active);
    border-color: var(--color-border-light);
}

@media (max-width: 430px) {
    .filter-button {
        padding: 0.2rem 0.3rem;
        font-size: var(--font-size-0-75);
    }

    .notification-filters {
        gap: 0.3rem;
    }
}

/* Account Lists Page Controls */
.lists-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

/* Lists Groups */

.lists-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Lists Groups */
.lists-group {
    margin-bottom: 2rem;
}

.lists-group:last-child {
    margin-bottom: 0;
}

.lists-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    text-align: center;
}

.lists-group-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Ensure consistent container width regardless of content */
.lists-section {
    min-height: 200px;
    width: 100%;
}

.lists-column {
    width: 100%;
}

.empty-state {
    width: 100%;
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state-with-suggestion {
    width: 100%;
}

.search-suggestion {
    color: var(--color-text-muted);
    font-size: 0.9em;
    margin-top: 0.5rem;
}

/* Ensure settings container maintains consistent width */
.settings-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Force consistent width for list sections */
.settings-page .lists-section,
.settings-page .lists-column,
.settings-page .empty-state,
.settings-page .empty-state-with-suggestion {
    width: 100%;
    box-sizing: border-box;
}

/* Load more notifications */
.load-more-section {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
    margin-top: 1rem;
}

.load-more-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.load-more-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Follower count input */
.follower-count-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.follower-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.range-label {
    color: var(--color-text-muted);
    font-size: var(--font-size-0-85);
    font-family: adobe-jenson-pro, serif;
    min-width: 35px;
}

.follower-input {
    width: 120px;
    background: var(--color-input-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem;
    font-size: var(--font-size-1);
    font-family: adobe-jenson-pro, serif;
    border-radius: 0;
}

.follower-input:focus {
    outline: none;
    border-color: #777;
    background: #2a2a2a;
}

.follower-input::placeholder {
    color: #666;
    font-style: italic;
}

.follower-label {
    color: #ccc;
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
}

.range-display {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(74, 158, 255, 0.1);
    border-left: 3px solid rgba(255, 149, 0, 0.75);
}

.range-preview {
    color: rgba(255, 149, 0, 0.75);
    font-size: var(--font-size-0-85);
    font-family: adobe-jenson-pro, serif;
    font-weight: 600;
}

.stamina-error {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: adobe-jenson-pro, serif;
    color: #ff4444;
    font-size: 1.6rem;
    font-style: italic;
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 10;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.empty-state-card {
    position: absolute;
    top: 0;
    left: 1rem;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-size: var(--font-size-1-2);
    background: transparent;
    z-index: 0;
    pointer-events: none;
    margin: 0;
    box-sizing: border-box;
}

.post-card-button {
    width: 100%;
    padding: 1rem;
    margin: 0;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: var(--font-size-1-2);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 200px;
    margin-top: 1rem;
}

.post-card-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.post-card-button.test-button {
    color: #888;
    background: transparent;
    border: none;
}

.post-card-button.test-button:hover {
    color: #aaa;
}

/* Primary and secondary button variants for welcome cards */
.post-card-button.primary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid rgba(255, 149, 0, 0.6);
    font-weight: 500;
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
    animation: primaryButtonPulse 3s ease-in-out infinite;
    margin: 0;
}

.post-card-button.primary:hover {
    border-color: rgba(255, 149, 0, 0.8);
    box-shadow: 0 0 25px rgba(255, 149, 0, 0.5);
    background: rgba(255, 149, 0, 0.05);
}

.post-card-button.secondary {
    color: var(--color-text);
    border-color: var(--color-border-light);
    margin-top: 0;
}

.post-card-button.secondary:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

/* Login card styles */
.login-card-header {
    justify-content: center;
    text-align: center;
    width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
}

/* Empty state styles */
.empty-state {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: adobe-jenson-pro, serif;
    color: #666;
    pointer-events: none;
    box-sizing: border-box;
    overflow: visible;
}

.empty-state-text {
    font-size: var(--font-size-1-2);
    font-style: italic;
    text-align: center;
}

.empty-state-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: adobe-jenson-pro, serif;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.empty-state-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.empty-state-button:active {
    background: var(--color-button-active);
    transform: translateY(1px);
}

.empty-state-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-state-button.tutorial-complete-button {
    margin-top: 1rem;
  }

.empty-state-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    pointer-events: auto;
}

.feed-action-button {
    min-width: 140px;
}

@media (min-width: 480px) {
    .empty-state-actions {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
    }
}

.empty-state-footer {
    font-size: var(--font-size-1-2);
    opacity: 0.8;
}

/* Empty state entrance animation */
.empty-state.hidden {
    opacity: 0;
    transition: none;
}

.empty-state.visible {
    opacity: 1;
    transition: none; /* Disable transition entirely to prevent flicker */
}

/* ===== MOBILE PERFORMANCE OPTIMIZATIONS ===== */

/* Media query for mobile optimizations */
@media (max-width: 768px) {
    /* Disable expensive effects on mobile */
    .post-card.liked .card-front,
    .post-card.liked .card-back {
        /* Simplified glow for mobile */
        box-shadow: 0 0 15px rgba(255, 68, 191, 0.7);
        animation: likedPulseOptimized 3s ease-in-out infinite;
    }
    
    .post-card.reposted .card-front,
    .post-card.reposted .card-back {
        /* Simplified green glow for mobile */
        box-shadow: 0 0 15px rgba(34, 197, 94, 0.7);
        animation: repostedPulseOptimized 3s ease-in-out infinite;
    }
    
    /* Disable post composer glow animations on mobile to prevent cursor movement issues */
    /* Keep the glow effect but disable the pulsing animation */
    .post-card.post-composer.publish-target-bluesky {
        animation: none !important;
        box-shadow: 0 0 20px rgba(74, 158, 255, 0.7);
    }
    
    .post-card.post-composer.publish-target-anisota {
        animation: none !important;
        box-shadow: 0 0 20px rgba(255, 149, 0, 0.7);
    }
    


    /* Reduce backdrop blur on mobile */
    .modal-backdrop {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    
    /* Simplify shuffle animation on mobile */
    @keyframes cardShuffle {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1) translateZ(0);
        }
        50% {
            transform: translateX(calc(var(--card-shake-x, 0) * 0.6px)) translateY(calc(var(--card-shake-y, 0) * 0.6px)) rotate(calc(var(--card-shake-r, 0) * 0.1deg)) scale(1) translateZ(0);
        }
        100% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1) translateZ(0);
        }
    }
    
    /* Mobile-specific entrance animation optimizations for smoother transitions */
    .post-card.entrance.animate-entrance {
        /* Reduce transform complexity on mobile for better performance */
        animation: 
            cardEntranceMainMobile calc(var(--duration-card-stack-entrance) * 0.7) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
            cardEntranceSettleMobile calc(var(--duration-card-stack-entrance) * 0.3) cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--duration-card-stack-entrance) * 0.7) forwards;
        /* Force hardware acceleration and prevent subpixel rendering issues */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        /* Additional mobile optimizations */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000px;
        perspective: 1000px;
        /* Prevent text rendering issues during animation */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Simplified mobile entrance keyframes with smoother transition flow */
    @keyframes cardEntranceMainMobile {
        0% {
            opacity: 0.8;
            transform: translate3d(0, -100vh, 0) scale(0.85);
        }
        100% {
            opacity: 1;
            transform: translate3d(0, -40px, 0) scale(0.92);
        }
    }
    
    @keyframes cardEntranceSettleMobile {
        0% {
            opacity: 1;
            transform: translate3d(0, -40px, 0) scale(0.92);
        }
        50% {
            opacity: 1;
            transform: translate3d(0, -20px, 0) scale(0.96);
        }
        100% {
            opacity: 1;
            transform: translate3d(0, 0px, 0) scale(1);
        }
    }
    
    /* Additional mobile performance optimizations for very small screens */
    @media (max-width: 480px) {
        .post-card.entrance.animate-entrance {
            /* Further optimize for smaller mobile screens - adjust both parts proportionally */
            animation: 
                cardEntranceMainMobile calc(var(--duration-card-stack-entrance) * 0.7 * 0.85) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
                cardEntranceSettleMobile calc(var(--duration-card-stack-entrance) * 0.3 * 0.85) cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--duration-card-stack-entrance) * 0.7 * 0.85) forwards;
        }
        
        /* Reduce motion for users who prefer it */
        @media (prefers-reduced-motion: reduce) {
            .post-card.entrance.animate-entrance {
                animation: 
                    cardEntranceReducedMotion calc(var(--duration-card-stack-entrance) * 0.5) ease-out forwards;
            }
            
            @keyframes cardEntranceReducedMotion {
                0% {
                    opacity: 0;
                    transform: translate3d(0, -20vh, 0) scale(0.95);
                }
                100% {
                    opacity: 1;
                    transform: translate3d(0, 0, 0) scale(1);
                }
            }
        }
    }
}

/* Clean up will-change after animations complete */
.post-card:not(.animate-entrance):not(.animate-exit):not(.animate-entrance-reverse):not(.animate-shuffle):not(.flipping-to-back):not(.flipping-to-front) {
    will-change: auto;
}

.card-inner:not(.animate-entrance):not(.animate-exit):not(.animate-entrance-reverse):not(.animate-shuffle):not(.flipping-to-back):not(.flipping-to-front) {
    will-change: auto;
}

/* Keep the original for reference/fallback */
@keyframes likedPulse {
    0% {
        filter: brightness(1.1);
        box-shadow: 
            0 0 15px rgba(255, 68, 191, 0.4),
            0 0 30px rgba(255, 68, 191, 0.2),
            0 0 45px rgba(255, 68, 191, 0.1),
            inset 0 0 20px rgba(255, 68, 191, 0.1);
    }
    50% {
        filter: brightness(1.15);
        box-shadow: 
            0 0 20px rgba(255, 68, 191, 0.5),
            0 0 35px rgba(255, 68, 191, 0.25),
            0 0 50px rgba(255, 68, 191, 0.15),
            inset 0 0 25px rgba(255, 68, 191, 0.15);
    }
    100% {
        filter: brightness(1.1);
        box-shadow: 
            0 0 15px rgba(255, 68, 191, 0.4),
            0 0 30px rgba(255, 68, 191, 0.2),
            0 0 45px rgba(255, 68, 191, 0.1),
            inset 0 0 20px rgba(255, 68, 191, 0.1);
    }
}

/* Thread parked position - cards that have finished sliding and are in train formation */
.post-card.thread-parked {
    transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
    opacity: 0.6; /* Final visible state for parked cards */
    pointer-events: none; /* Prevent interaction with parked cards */
    /* Ensure parked cards stay visible and maintain full size */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--train-z-index, 5);
    /* Disable opacity transition to prevent flickering of post-card-body content */
    transition: transform 0.3s ease-out !important;
}

/* Thread parked cards that haven't faded in yet should be invisible - but only on thread pages */
body.thread-page-active .post-card.thread-parked:not(.thread-fading-in):not(.thread-faded-in) {
    opacity: 0;
}

/* Thread fading-in animation - applies to cards that are both parked and fading in */
.post-card.thread-parked.thread-fading-in {
    /* Override the parked opacity with the fade-in animation */
    animation: threadFadeIn 0.8s ease-out forwards;
}

@keyframes threadFadeIn {
    0% {
        opacity: 0;
        transform: translateX(var(--train-position, 100%)) translateY(0px) translateZ(0);
    }
    100% {
        opacity: 0.6;
        transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
    }
}

/* Disable ALL transitions during thread animations to prevent jerky movement */
.post-card.animate-thread-slide .card-inner,
.post-card.animate-thread-slide-back .card-inner {
    transition: none !important;
}

/* Disable all transitions during back animation to prevent conflicts and flickering */
.post-card.thread-parked.animate-thread-slide-back {
    transition: none !important;
}

/* ===== FULLSCREEN MODE ===== */

/* Fullscreen mode - hide all UI elements except the card stack */
body.fullscreen-mode .stamina-level-bar,
body.fullscreen-mode .anisota-footer,
body.fullscreen-mode .controls-row,
body.fullscreen-mode .feed-switcher,
body.fullscreen-mode .layout-ui-element {
    opacity: 0 !important; /* Use !important to override entrance animation */
    pointer-events: none !important;
    transition: opacity calc(0.3s / var(--animation-ui-transitions, 1)) ease-out;
}

/* Hide feed subtitle in all fullscreen modes (both fullscreen and immersive) */
body.fullscreen-mode .feed-subtitle {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px) !important;
    transition: opacity calc(0.3s / var(--animation-ui-transitions, 1)) ease-out;
}

/* Override: Show feed-subtitle when an alert is being displayed, even in fullscreen */
body.fullscreen-mode.showing-alert .feed-subtitle {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(20px) !important;
    transition: opacity calc(0.3s / var(--animation-ui-transitions, 1)) ease-in;
}

/* Override: Show stamina corner element when stamina is low (20% or below), even in fullscreen */
/* Step 1: Make the parent container visible but keep it non-interactive */
body.fullscreen-mode.stamina-low-warning .corner-elements-bottom.layout-ui-element {
    opacity: 1 !important;
    pointer-events: none !important;
    transition: opacity calc(0.4s / var(--animation-ui-transitions, 1)) ease-in;
}

/* Step 2: Hide ALL children of the container by default */
body.fullscreen-mode.stamina-low-warning .corner-elements-bottom * {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Step 3: Show ONLY the stamina element and its parent corner-element container */
body.fullscreen-mode.stamina-low-warning .corner-element:has(.stamina-corner-element) {
    opacity: 1 !important;
}

body.fullscreen-mode.stamina-low-warning .stamina-corner-element {
    opacity: 0.8 !important;
    pointer-events: auto !important;
    transition: opacity calc(0.4s / var(--animation-ui-transitions, 1)) ease-in;
}

body.fullscreen-mode.stamina-low-warning .stamina-corner-element * {
    pointer-events: auto !important;
}

/* Ensure all child elements in hidden containers also have pointer events disabled */
body.fullscreen-mode .stamina-level-bar *,
body.fullscreen-mode .anisota-footer *,
body.fullscreen-mode .feed-switcher *,
body.fullscreen-mode .layout-ui-element * {
    pointer-events: none !important;
}

/* Feed subtitle children are handled separately based on fullscreen mode */
body.fullscreen-mode .feed-subtitle * {
    pointer-events: none !important;
}

/* Also disable pointer events on control row children when controls are hidden */
body.fullscreen-mode .controls-row * {
    pointer-events: none !important;
}

/* Show control row in fullscreen when setting is enabled */
body.fullscreen-mode.fullscreen-show-control-row .controls-row {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Re-enable pointer events for control row children when controls are shown */
body.fullscreen-mode.fullscreen-show-control-row .controls-row * {
    pointer-events: auto !important;
}

/* Feed subtitle is now hidden in all fullscreen modes (both fullscreen and immersive) */
/* Removed the rules that would show it when fullscreen-show-control-row is active */

/* Layout UI elements should remain hidden in regular fullscreen mode */
/* They should only be visible in normal (non-fullscreen) mode */
/* Removed the rules that would show layout UI elements in fullscreen mode */

/* Explicitly hide control row in fullscreen when setting is disabled */
body.fullscreen-mode.fullscreen-hide-control-row .controls-row {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Explicitly hide feed subtitle in immersive mode */
body.fullscreen-mode.fullscreen-hide-control-row .feed-subtitle {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity calc(0.3s / var(--animation-ui-transitions, 1)) ease-out;
}

/* Keep the card stack centered and visible in fullscreen mode */
body.fullscreen-mode .card-stack-container {
    /* Ensure the card stack stays centered without the header/footer gradients */
    transform: translateY(0);
}

/* Add a subtle hint overlay when in fullscreen mode */
body.fullscreen-mode .card-stack-container::after {
    content: 'tap anywhere to exit fullscreen';
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--font-size-0-8);
    color: rgba(255, 255, 255, 0.4);
    font-family: adobe-jenson-pro, serif;
    font-style: italic;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    animation: fullscreenHint 3s ease-in-out;
}

/* Hide fullscreen hint when welcome card is present */
body.fullscreen-mode .card-stack-container:has(.post-card.interactive)::after {
    display: none;
}

/* Animation for fullscreen hint - show for 3 seconds then fade */
@keyframes fullscreenHint {
    0% { opacity: 0; }
    10% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Fullscreen Height Expansion - when enabled, expand card to 80% screen height */
body.fullscreen-mode.fullscreen-height-expansion .card-stack-container,
body.fullscreen-mode.fullscreen-height-expansion .profile-page .card-stack-container,
body.fullscreen-mode.fullscreen-height-expansion .feed-page .card-stack-container {
    height: 80dvh !important; /* Desktop default */
    margin-top: 3dvh !important; /* Account for hidden feed subtitle */
    transition: height calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1), margin-top calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile screens: keep fullscreen at 70dvh */
@media (max-width: 599px) {
    body.fullscreen-mode.fullscreen-height-expansion .card-stack-container,
    body.fullscreen-mode.fullscreen-height-expansion .profile-page .card-stack-container,
    body.fullscreen-mode.fullscreen-height-expansion .feed-page .card-stack-container {
        height: 70dvh !important;
        margin-top: 3dvh !important; /* Account for hidden feed subtitle on mobile too */
    }
}

/* Fullscreen Height Expansion with Control Row Hidden - immersive mode */
body.fullscreen-mode.fullscreen-height-expansion.fullscreen-hide-control-row .card-stack-container,
body.fullscreen-mode.fullscreen-height-expansion.fullscreen-hide-control-row .profile-page .card-stack-container,
body.fullscreen-mode.fullscreen-height-expansion.fullscreen-hide-control-row .feed-page .card-stack-container {
    height: 90dvh !important;
    margin-top: 3dvh !important; /* Account for hidden feed subtitle */
    transition: height calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1), margin-top calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile screens: immersive mode at 80dvh */
@media (max-width: 599px) {
    body.fullscreen-mode.fullscreen-height-expansion.fullscreen-hide-control-row .card-stack-container,
    body.fullscreen-mode.fullscreen-height-expansion.fullscreen-hide-control-row .profile-page .card-stack-container,
    body.fullscreen-mode.fullscreen-height-expansion.fullscreen-hide-control-row .feed-page .card-stack-container {
        height: 80dvh !important;
        margin-top: 3dvh !important; /* Account for hidden feed subtitle on mobile too */
    }
}

/* Ensure smooth transition when exiting fullscreen height expansion */
body:not(.fullscreen-mode) .card-stack-container {
    transition: height calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1), margin-top calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add transition to the base card-stack-container for smooth height and margin changes */
.card-stack-container {
    transition: height calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1), margin-top calc(0.5s / var(--animation-fullscreen-transitions, 1)) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional: Add a subtle fade animation when entering/exiting fullscreen */
.stamina-level-bar,
.anisota-footer,
.controls-row,
.feed-subtitle {
    transition: opacity calc(0.3s / var(--animation-ui-transitions, 1)) ease-out;
}

/* Page transition fade out for UI elements */
.page-exiting .controls-row,
.page-exiting .feed-subtitle {
    opacity: 0 !important;
    transform: translateY(-5px);
    transition: opacity calc(0.25s / var(--animation-page-transitions, 1)) ease-out, transform calc(0.25s / var(--animation-page-transitions, 1)) ease-out;
    pointer-events: none;
}

/* Ensure UI elements fade in properly on page enter */
.page-entering .controls-row,
.page-entering .feed-subtitle {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity calc(0.3s / var(--animation-page-transitions, 1)) ease-out calc(0.1s / var(--animation-page-transitions, 1)), transform calc(0.3s / var(--animation-page-transitions, 1)) ease-out calc(0.1s / var(--animation-page-transitions, 1));
} 

/* Fix footer background gradient blocking clicks on feed page */
body.feed-page-active .anisota-footer {
    pointer-events: none;
}

/* Keep footer interactive elements clickable on feed page */
body.feed-page-active .anisota-footer .brand,
body.feed-page-active .anisota-footer .back,
body.feed-page-active .anisota-footer .refresh,
body.feed-page-active .anisota-footer .touch,
body.feed-page-active .anisota-footer a {
    pointer-events: auto;
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* ===== NESTED SETTINGS STYLES ===== */

/* Settings Menu Styles */
.settings-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-card-background);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
}

.settings-menu-item:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.settings-menu-item:active {
    transform: translateY(0);
    background: var(--color-card-background-active);
}

.settings-menu-item.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.settings-menu-item.disabled:hover {
    background: var(--color-card-background);
    border-color: var(--color-border);
    transform: translateY(0);
}

.settings-menu-item.disabled .settings-menu-arrow {
    transform: translateX(0);
}

.settings-menu-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
    color: var(--color-text);
}

.settings-menu-info {
    flex: 1;
}

.settings-menu-name {
    font-size: var(--font-size-1-2);
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.settings-menu-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
}

.settings-menu-arrow {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.settings-menu-item:hover .settings-menu-arrow {
    transform: translateX(0.2rem);
    color: var(--color-text);
}

/* Lists Menu Styles (similar to settings menu) */
.lists-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.lists-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-card-background);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
}

.lists-menu-item:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.lists-menu-item:active {
    transform: translateY(0);
    background: var(--color-card-background-active);
}

.lists-menu-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
    color: var(--color-text);
}

.lists-menu-info {
    flex: 1;
}

.lists-menu-name {
    font-size: var(--font-size-1-2);
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.lists-menu-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
}

.lists-menu-arrow {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.lists-menu-item:hover .lists-menu-arrow {
    transform: translateX(0.2rem);
    color: var(--color-text);
}

/* Theme Options Styles */
.theme-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-card-background);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border-light);
}

.theme-option:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border);
}

.theme-option.selected {
    border-color: var(--color-accent);
    background: var(--color-card-background-hover);
    border: 2px solid var(--color-accent);
}

.theme-preview {
    min-width: 3rem;
    height: 3rem;
    overflow: hidden;
}

.theme-color-sample {
    width: 100%;
    height: 100%;
}

.theme-info {
    flex: 1;
}
.theme-name {
    font-size: var(--font-size-1-1);
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: var(--color-text);
}

.theme-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
}

.theme-selected-indicator {
    font-size: 1.5rem;
    color: var(--color-text);
}

/* Locked Theme Styles */
.theme-option.locked {
    opacity: 0.6;
    background: var(--color-card-background);
    position: relative;
    filter: grayscale(0.3);
}

.theme-option.locked:hover {
    background: var(--color-card-background) !important;
    transform: none;
}

.theme-option.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(0, 0, 0, 0.1) 8px,
        rgba(0, 0, 0, 0.1) 16px
    );
    pointer-events: none;
}

.theme-preview {
    position: relative;
}

.theme-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-overlay-dark);
    backdrop-filter: blur(2px);
}

.theme-lock-icon {
    font-size: 1.5rem;
    color: var(--color-text);
    text-shadow: 0 0 4px var(--color-shadow-dark);
}

.locked-badge {
    font-size: var(--font-size-0-7);
    color: #ff6b6b;
    font-weight: bold;
    margin-left: 0.5rem;
    padding: 2px 6px;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* UI Toggles Styles */
.ui-toggles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.ui-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    gap: 10px;
}

.ui-toggle-info {
    flex: 1;
}

.ui-toggle-vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.ui-toggle-vertical .ui-toggle-info {
    flex: none;
}

.ui-toggle-name {
    font-size: var(--font-size-1-1);
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: var(--color-text);
}

.ui-toggle-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
}

.toggle-button {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background: var(--color-border-dark);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toggle-button.enabled {
    background: var(--color-success);
}

.toggle-slider {
    position: absolute;
    top: 0.12rem;
    left: 0.165rem;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--color-text-inverse);
    transition: transform 0.2s ease;
}

.toggle-button.enabled .toggle-slider {
    transform: translateX(1.4rem);
}

/* Card Name Slots Styles */

.card-name-slots h3 {
    font-size: var(--font-size-1-2);
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

/* Font Size Control Styles */

.font-size-control {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    margin-top: 1rem;
}

.font-size-slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.font-size-label {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

.font-size-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--color-border);
    outline: none;
    cursor: pointer;
}

.font-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-text);
    cursor: pointer;
    /* No border-radius for square thumb */
}

.font-size-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-text);
    cursor: pointer;
    border: none;
    /* No border-radius for square thumb */
}

.font-size-markers {
    display: flex;
    justify-content: space-between;
    padding: 0 9px; /* Adjusted to align with square thumb */
}

.font-size-marker {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
}

.font-size-preview {
    padding: 1rem;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border-light);
    text-align: center;
}

.font-size-sample-text {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-2);
    color: var(--color-text);
    line-height: 1.4;
}

/* Animation Timing Controls */
.animation-timing-control {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.animation-timing-slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.animation-timing-label {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

.animation-timing-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--color-border);
    outline: none;
    cursor: pointer;
}

.animation-timing-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    cursor: pointer;
}

.animation-timing-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    cursor: pointer;
    border: none;
}

.animation-timing-markers {
    display: flex;
    position: relative;
    margin-top: 0.5rem;
    width: 100%;
    overflow: visible;
}

.animation-timing-marker {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.animation-timing-marker:nth-child(1) { left: 0%; }      /* 25% */
.animation-timing-marker:nth-child(2) { left: 16.67%; }  /* 50% */
.animation-timing-marker:nth-child(3) { left: 50%; }     /* 100% */
.animation-timing-marker:nth-child(4) { left: 83.33%; }  /* 150% */
.animation-timing-marker:nth-child(5) { left: 100%; }    /* 175% */

/* Adjust edge markers to prevent cutoff */
.animation-timing-marker:nth-child(1) { transform: translateX(0); }      /* Left-align first marker */
.animation-timing-marker:nth-child(5) { transform: translateX(-100%); }  /* Right-align last marker */

/* Individual controls collapsible container */
.individual-controls-container {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.individual-controls-container.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.individual-controls-container.expanded {
    max-height: 2000px; /* Large enough to accommodate all controls */
    opacity: 1;
    margin-top: 1rem;
}

.animation-timing-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.breathing-circle {
    width: 60px;
    height: 60px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-circle:hover {
    transform: scale(1.05);
}

.breathing-circle .breathing-circle-outer {
    animation: breatheOuter var(--animation-duration, 2s) ease-in-out infinite;
}

.breathing-circle .breathing-circle-middle {
    animation: breatheMiddle var(--animation-duration, 2s) ease-in-out infinite;
}

.breathing-circle .breathing-circle-inner {
    animation: breatheInner var(--animation-duration, 2s) ease-in-out infinite;
}

.breathing-circle-outer {
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.breathing-circle-middle {
    width: 70%;
    height: 70%;
    background: var(--color-text);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.breathing-circle-inner {
    width: 40%;
    height: 40%;
    background: var(--color-card-background);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes breatheOuter {
    0%, 100% {
        transform: scale(1);
    }
    33% {
        transform: scale(1.3);
    }
    66%, 100% {
        transform: scale(1);
    }
}

@keyframes breatheMiddle {
    0%, 16% {
        transform: translate(-50%, -50%) scale(1);
    }
    49% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    82%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes breatheInner {
    0%, 33% {
        transform: translate(-50%, -50%) scale(1);
    }
    66% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.preview-label {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    text-align: center;
}

.individual-animation-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.individual-animation-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.individual-animation-label {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-95);
    font-weight: 600;
    color: var(--color-text);
}

.individual-animation-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: var(--color-border);
    outline: none;
    cursor: pointer;
    margin: 0.5rem 0;
}

.individual-animation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--color-text);
    cursor: pointer;
}

.individual-animation-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--color-text);
    cursor: pointer;
    border: none;
}

.individual-animation-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
    line-height: 1.3;
}

.name-slot-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.name-slot-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.name-slot-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.name-slot-option:hover {
    background: var(--color-background-hover);
    border-color: var(--color-border-hover);
}

.name-slot-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.name-slot-option span {
    font-size: var(--font-size-1);
    color: var(--color-text);
    cursor: pointer;
}

/* Card Preview Styles */
.name-slots-preview {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-background-subtle);
    border: 1px solid var(--color-border);
}

.name-slots-preview h4 {
    font-size: var(--font-size-1-1);
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--color-text);
    text-align: center;
}

/* Card preview containers */
.card-preview {
    display: flex;
    justify-content: center;
    margin: 1rem auto;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid var(--color-border);
    background: var(--color-background-tertiary);
}

.preview-card {
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-family: adobe-jenson-pro, serif;
    position: relative;
    transform: scale(0.8);
    transform-origin: center;
    width: min(340px, calc(100vw - 6rem));
    height: 340px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Ensure preview cards don't cause horizontal scrolling on mobile */
@media (max-width: 430px) {
    .preview-card {
        width: calc(100vw - 4rem);
        max-width: 340px;
    }
}

.preview-card .post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-card-background);
}

.preview-card .post-card-user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.preview-card .profile-name-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.preview-card .profile-display-name {
    font-size: var(--font-size-1-25);
    font-weight: 600;
    line-height: 1;
    color: var(--color-text);
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.preview-card .profile-handle {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
    margin-top: 0.2rem;
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.preview-bluesky-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 1rem;
}

.preview-bluesky-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--color-text-muted);
}

.preview-card .post-card-body {
    padding: 1rem;
}

.preview-card .post-card-text {
    font-size: var(--font-size-0-95);
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.preview-card .post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-card-background);
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
}

.preview-card .post-card-time {
    color: var(--color-text-muted);
}

.preview-card .post-card-delta {
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
}

/* Profile card specific preview styles */
.profile-card-preview .preview-card {
    background: var(--color-card-background);
}

.profile-card-preview .post-card-text.profile-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-9);
}



/* ===== WELCOME CARD STYLES ===== */

/* Welcome card text elements */
.welcome-description {
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-2);
    line-height: 1.4;
}

.welcome-coming-soon {
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    line-height: 1.4;
}

/* Welcome card content container */
.welcome-card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

/* Welcome card title */
.welcome-card-title {
    text-align: center;
    margin-bottom: 1rem;
    margin: 0;
    font-size: 1.2rem;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Welcome card subtitle */
.welcome-card-subtitle {
    text-align: center;
    margin-bottom: 1rem;
    margin: 0;
    font-size: 1rem;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Welcome card buttons container */
.welcome-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: center;
    margin-top: 1rem;
    justify-content: center;
}

/* Responsive welcome card text for small screens */
@media (max-width: 480px) {
    .welcome-description {
        font-size: var(--font-size-1);
        line-height: 1.3;
    }
    
    .welcome-coming-soon {
        font-size: var(--font-size-0-95);
        line-height: 1.3;
    }
    /* Hide footer for welcome cards */
    .post-card.welcome-card .post-card-footer {
        display: none;
    }
    
    /* Hide footer for login cards */
    .login-card-footer {
        display: none;
    }
    /* Responsive welcome card content for small screens */
    .welcome-card-content {
        padding: 0;
        gap: 0.8rem;
    }
    
    .welcome-card-title {
        font-size: 1rem;
    }

    .post-card-username {
        font-size: var(--font-size-1-4);
    }

    .login-card-input::placeholder {
        font-size: var(--font-size-1);
    }
    
    .welcome-card-subtitle {
        font-size: 0.95rem;
    }
    
    /* Responsive button sizing for welcome card on medium-small screens */
    .post-card.interactive .post-card-button {
        padding: 0.6rem 0.8rem;
        font-size: var(--font-size-1);
    }
}

@media (max-width: 320px) {
    .welcome-description {
        font-size: var(--font-size-0-95);
        line-height: 1.25;
    }

        /* Hide footer for welcome cards */
.post-card.welcome-card .post-card-footer {
    display: none;
}

    /* Hide footer for login cards */
    .login-card-footer {
        display: none;
    }

    .welcome-card-buttons {
        gap: 0.6rem;
        flex-direction: row;
    }
    
    .welcome-coming-soon {
        font-size: var(--font-size-0-9);
        line-height: 1.25;
    }

    
    /* Responsive button sizing for welcome card */
    .post-card.interactive .post-card-button {
        padding: 0.5rem 0.5rem;
        font-size: var(--font-size-1);
        min-width: 100px;
    }
}

.welcome-link {
    color: inherit;
    text-decoration: none;
}

.welcome-link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* ===== UI ELEMENT VISIBILITY CONTROLS ===== */

/* Hide UI elements based on user preferences */
[data-show-post-count="false"] .post-count-indicator {
    display: none !important;
}

[data-show-timestamp="false"] .post-card-time {
    display: none !important;
}

[data-show-at-symbol="false"] .post-card:not(.profile-card) .post-card-at {
    display: none !important;
}

[data-show-profile-at-symbol="false"] .profile-card .post-card-at {
    display: none !important;
}

[data-show-rarity-indicator="false"] .rarity-indicator {
    display: none !important;
}

[data-show-post-read-indicator="false"] .post-read-indicator {
    display: none !important;
}

[data-show-post-card-header="false"] .post-card-header {
    display: none !important;
}

[data-show-post-card-footer="false"] .post-card-footer {
    display: none !important;
}

/* No Stats Mode - hide all stats when enabled */
[data-no-stats-mode="true"] .profile-stats {
    display: none !important;
}

/* Profile stats visibility controls */
[data-show-profile-followers="false"] .profile-stat.followers {
    display: none !important;
}

[data-show-profile-following="false"] .profile-stat.follows {
    display: none !important;
}

[data-show-profile-collections="false"] .profile-stat.collections {
    display: none !important;
}

[data-show-profile-lexicons="false"] .profile-stat.lexicons {
    display: none !important;
}

[data-show-profile-posts="false"] .profile-stat.posts {
    display: none !important;
}

/* Engagement stats visibility controls */
[data-show-engagement-likes="false"] .profile-stat.likes {
    display: none !important;
}

[data-show-engagement-reposts="false"] .profile-stat.reposts {
    display: none !important;
}

[data-show-engagement-quotes="false"] .profile-stat.quotes {
    display: none !important;
}

[data-show-engagement-replies="false"] .profile-stat.replies {
    display: none !important;
}

/* ===== LOGIN PAGE STYLES ===== */

/* Login page layout - matches feed page structure */
.login-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}



/* Login card container - matches card-stack-container positioning */
.login-card-stack-container {
    position: relative;
    width: calc(100% - 3rem);
    height: clamp(340px, calc(100vh - 12rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 420px);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    box-sizing: border-box;
    transform: translateY(-1.5rem);
    isolation: isolate;
}

/* ===== PROFILE PAGE STYLES ===== */


/* Profile page layout - scrollable container for profile header */
.feed-page,
.thread-page, .profile-page {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    padding-top: calc(4rem + max(1rem, env(safe-area-inset-top)));
    padding-bottom: calc(4rem + max(1rem, env(safe-area-inset-bottom)));
    position: relative;
    /* Hide scrollbar like rest of app */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.profile-page::-webkit-scrollbar {
    display: none;
}

/* Profile page scrollbar hidden while maintaining scroll functionality */

/* Profile header styling */
.profile-header {
    margin-bottom: 2rem;
    /* Constrain width to match card stack container */
    width: calc(100% - 3rem);
    max-width: 430px;
    /* Ensure it doesn't overflow */
    box-sizing: border-box;
    /* Lower z-index so it doesn't cover other elements */
    position: relative;
    z-index: 1;
}

.post-card-text.profile-description {
    font-size: var(--font-size-0-9);
    flex: auto;
    align-content: center;
  }

/* Override rich-content font size specifically for profile descriptions */
.post-card-text.profile-description .rich-content {
    font-size: var(--font-size-1-1) !important;
}

/* ===== ANIMATED COUNTER STYLES ===== */

.animated-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.animated-counter.loading {
    color: var(--color-text-muted);
}

.animated-counter.animating {
    color: var(--color-text);
}

/* ===== SEARCH MODAL STYLES ===== */

/* Align search modal to top on mobile only */
@media (max-width: 768px) {
  .modal-backdrop.search-modal-backdrop {
    align-items: flex-start;
    padding-top: max(env(safe-area-inset-top), 3rem);
    /* Prevent keyboard from pushing modal up */
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  
  .modal-content.search-modal {
    /* Keep modal at top even when keyboard appears */
    position: relative;
    top: 0;
    transform: none;
  }
}

.modal-content.search-modal {
  margin-top: 0;
}

.search-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
    box-sizing: border-box;
}

.search-type-toggle {
    display: flex;
    gap: 0.5rem;
}

.search-type-toggle .post-card-button {
    flex: 0;
    font-size: var(--font-size-1);
    padding: 0.5rem 0.8rem;
}

.search-type-toggle .search-type-active {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.search-type-toggle .search-type-inactive {
    background: var(--color-card-background);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.search-type-toggle .search-type-inactive:hover {
    background: var(--color-card-background-hover);
    color: var(--color-text);
}

.search-input-container {
    display: flex;
    width: 100%;
    gap: 10px;
}

.search-input-container .login-card-input.search-input {
    flex: 1;
    text-align: left;
    max-width: none;
    min-width: 0; /* Allows input to shrink properly */
    margin: 0;
}

.search-input-container .search-input::placeholder {
    text-align: left;
}

.search-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-controls-row .search-type-toggle {
    display: flex;
    gap: 0.4rem;
}

.search-controls-row .search-type-toggle .post-card-button {
    padding: 0.5rem 0.75rem;
    min-width: 60px;
    font-size: var(--font-size-0-9);
}

.search-submit-button {
    padding: 0.5rem 0.75rem;
    min-width: 70px;
    max-width: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    font-size: var(--font-size-0-9);
    margin: 0;
}

.search-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-tips {
    text-align: center;
}

.search-tip {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    font-style: italic;
    line-height: 1.4;
}

/* Profile display name styling */
.profile-display-name {
    font-size: var(--font-size-1-6) !important;
    font-weight: 600;
    line-height: 1 !important;
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 95%;
}

/* Profile handle styling */
.profile-handle {
    font-size: var(--font-size-1-1) !important;
    color: var(--color-text-muted) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Profile stats container */
.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.profile-stat {
  font-size: var(--font-size-0-9);
  color: var(--color-text-secondary);
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.profile-stat-number {
  font-weight: bold;
  color: var(--color-text);
}

.profile-stat-label {
  opacity: 0.7;
}

/* Profile footer content container */
.profile-footer-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Membership tier icon */
.membership-tier-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    flex-shrink: 0;
    --membership-icon-size: 1.5rem;
    --membership-icon-stroke: 1.4;
    background: var(--color-accent-light);
    border: 1px solid var(--color-text-muted);
    width: 35px;
    height: 35px;
    justify-content: center;
    margin-right: 0.3rem;
  }

/* Allow size and stroke customization via CSS variables 
   Examples: 
   .membership-tier-icon { --membership-icon-size: 16px; }
   .membership-tier-icon { --membership-icon-stroke: 1.5; }
   .membership-tier-icon { --membership-icon-size: 18px; --membership-icon-stroke: 2.5; } */
.membership-tier-icon svg {
  width: var(--membership-icon-size, 14px);
  height: var(--membership-icon-size, 14px);
  stroke-width: var(--membership-icon-stroke, 2);
}



/* Profile identifiers in footer */
.profile-identifiers {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--color-text-secondary);
}

.profile-did, .profile-service-endpoint, .profile-creation-date {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  word-break: break-all;
  line-height: 1.2;
  text-transform: lowercase;
}



/* Ensure feed subtitle is visible above profile header */
.profile-page .feed-subtitle {
    position: relative;
    z-index: 15;
}

/* Pinned post indicator (legacy - for Anisota posts only) */
.post-card-pin-indicator {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-0-8);
    text-align: center;
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
    /* Smooth color transitions when glow effects change */
    transition: 
        background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        border-bottom-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}



/* =================================================================
   PIN INDICATOR COLOR MATCHING - PRIORITY ORDER
   ================================================================= */

/* HIGHEST PRIORITY: Liked posts always take precedence (pink) */
.post-card.liked .post-card-pin-indicator {
    background: rgba(255, 68, 191, 0.2) !important;
    color: #ff44bf !important;
    border-bottom: 1px solid rgba(255, 68, 191, 0.3) !important;
}

/* SECOND PRIORITY: Reposted posts (green) - only if not liked */
.post-card.reposted:not(.liked) .post-card-pin-indicator {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #22c55e !important;
    border-bottom: 1px solid rgba(34, 197, 94, 0.3) !important;
}

/* THIRD PRIORITY: Publishing target glows (for post composer) */
.post-card.publish-target-bluesky:not(.liked):not(.reposted) .post-card-pin-indicator {
    background: rgba(74, 158, 255, 0.2) !important;
    color: rgba(255, 149, 0, 0.75) !important;
    border-bottom: 1px solid rgba(74, 158, 255, 0.3) !important;
}

.post-card.publish-target-anisota:not(.liked):not(.reposted) .post-card-pin-indicator {
    background: rgba(255, 149, 0, 0.2) !important;
    color: #ff9500 !important;
    border-bottom: 1px solid rgba(255, 149, 0, 0.3) !important;
}



/* =================================================================
   SPECIAL CASES: Ensure combinations work correctly
   ================================================================= */
/* Profile page card stats */
.post-card-stats {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.post-card-stat {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
}

/* Make followers count and label bold */
.post-card-stat:first-child {
    font-weight: bold;
}

/* Profile page user info layout */
.profile-page .post-card-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    /* Remove any avatar-related margins since we're not showing avatars */
    margin-left: 0;
}


/* Profile page reply context */
.post-card-reply-context {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    margin-bottom: 0.75rem;
}

.post-card-reply-indicator {
    font-size: var(--font-size-0-85);
    color: #999;
    font-style: italic;
}

/* JSON content styling for card backs - styles defined earlier in file */

/* Tags section - expands upward from footer */
.tags-section {
  position: relative;
  background: var(--color-accent);
  animation: tagsExpandFromBelow 0.3s ease-out forwards;
  z-index: 1; /* Lower z-index so it appears behind the footer */
  overflow: hidden;
}

/* Ensure post-card-footer has higher z-index to stay on top */
.post-card.post-composer .post-card-footer {
  position: relative;
  z-index: 2; /* Higher than tags section */
}

/* Animation for expanding tags section (appearing from underneath footer) */
@keyframes tagsExpandFromBelow {
  from {
    max-height: 0;
    opacity: 0;
    transform: translateY(20px); /* Start further down to simulate coming from under footer */
  }
  to {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation for hiding tags section (sliding back underneath footer) */
@keyframes tagsCollapseToBelow {
  from {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
  }
  to {
    max-height: 0;
    opacity: 1;
    transform: translateY(20px); /* End further down to simulate going under footer */
  }
}

/* Class for when tags section is being hidden */
.tags-section.collapsing {
  animation: tagsCollapseToBelow 0.3s ease-in forwards;
}

/* Mentions section - expands upward from footer, similar to tags section */
.mentions-section {
    position: relative;
    background: var(--color-card-background-active);
    animation: mentionsExpandFromBelow 0.3s ease-out forwards;
    z-index: 1;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
}

/* Animation for expanding mentions section (appearing from underneath footer) */
@keyframes mentionsExpandFromBelow {
  from {
    max-height: 0;
    opacity: 0;
    transform: translateY(20px); /* Start further down to simulate coming from under footer */
  }
  to {
    max-height: 300px; /* Taller than tags section to accommodate user list */
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation for hiding mentions section (sliding back underneath footer) */
@keyframes mentionsCollapseToBelow {
  from {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
  }
  to {
    max-height: 0;
    opacity: 1;
    transform: translateY(20px); /* End further down to simulate going under footer */
  }
}

/* Class for when mentions section is being hidden */
.mentions-section.collapsing {
  animation: mentionsCollapseToBelow 0.3s ease-in forwards;
}

/* Mentions container */
.mentions-container {
  padding: 16px 16px 16px 16px;
  max-height: 280px;
  overflow: hidden; /* Prevent container from scrolling */
  /* Smooth transitions when content height changes */
  transition: all 0.2s ease-out;
}

/* Mentions header */
.mentions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mentions-label {
  font-size: 0.9em;
  font-weight: 500;
  color: var(--color-text-muted);
}

.mentions-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
}

.mentions-close:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

/* Mentions list - horizontal scrolling layout */
.mentions-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
  margin: 0 -16px; /* Negative margin to extend beyond container padding */
  padding-left: 16px; /* Add back the left padding */
  padding-right: 16px; /* Add back the right padding */
  /* Hide scrollbar for cleaner look */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.mentions-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Mentions loading state - horizontal layout */
.mentions-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border-light);
  background: var(--color-button-background);
  color: var(--color-text-muted);
  font-size: 0.9em;
  white-space: nowrap;
  min-width: 150px;
  max-height: 40px;
  height: 40px;
  flex-shrink: 0;
  /* Fade-in animation */
  animation: mentionItemFadeIn 0.3s ease-out forwards;
}

/* Mentions empty state - horizontal layout */
.mentions-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border-light);
  background: var(--color-button-background);
  color: var(--color-text-muted);
  font-size: 0.9em;
  white-space: nowrap;
  min-width: 150px;
  max-height: 40px;
  height: 40px;
  flex-shrink: 0;
  /* Fade-in animation */
  animation: mentionItemFadeIn 0.3s ease-out forwards;
}

/* Individual mention item - horizontal card layout */
.mentions-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    white-space: nowrap;
    min-width: 150px;
    max-height: 40px;
    flex-shrink: 0;
    /* Fade-in animation */
    animation: mentionItemFadeIn 0.4s ease-out forwards;
}

/* Fade-in animation for mention items */
@keyframes mentionItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mentions-item:hover,
.mentions-item.selected {
  background: var(--color-hover);
  border-color: var(--color-accent-hover);
}

.mentions-item.selected {
    background: var(--color-button-active);
}

/* Mention avatar */
.mentions-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Mention info */
.mentions-info {
  flex: 1;
  min-width: 0;
}

.mentions-display-name {
  font-weight: 500;
  font-size: 0.9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}

.mentions-handle {
  color: var(--color-text-muted);
  font-size: 0.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mentions hint */
.mentions-hint {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 0.8em;
    color: var(--color-text-muted);
}

/* Small loading spinner for mentions section */
.loading-spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border-light);
  border-top: 2px solid var(--color-accent);
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Rich text input styles */
.rich-text-input-container {
  position: relative;
  width: 100%;
  /* Remove fixed height to allow content to flow naturally */
  min-height: 3rem;
  /* Allow content to be visible when embed previews expand */
  overflow: visible;
  /* Prevent layout shifts */
  contain: layout;
  /* Ensure it takes up the space it needs and doesn't shrink */
  flex: 0 0 auto;
}

.rich-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* Remove bottom: 0 to allow natural height expansion */
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 1.2rem;
  font-family: adobe-jenson-pro, serif;
  line-height: 1.4;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  overflow: hidden;
  z-index: 1;
  color: var(--color-text); /* Make the overlay text visible in theme color */
  /* Ensure perfect alignment with textarea */
  box-sizing: border-box;
  /* Prevent text selection and interaction */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Allow height to match textarea dynamically */
  height: auto;
}

.rich-text-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* Remove bottom: 0 to allow natural height expansion */
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 1.2rem;
  font-family: adobe-jenson-pro, serif;
  line-height: 1.4;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-style: italic;
  overflow: hidden;
  z-index: 1;
  /* Ensure perfect alignment with textarea */
  box-sizing: border-box;
  /* Prevent text selection and interaction */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Allow height to match textarea dynamically */
  height: auto;
}

/* Hide scrollbars for rich text input components */
.rich-text-input-container textarea::-webkit-scrollbar {
  display: none;
}

.rich-text-input-container textarea {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.rich-text-overlay::-webkit-scrollbar {
  display: none;
}

.rich-text-overlay {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Ensure post composer textarea also hides scrollbars */
.post-composer-textarea::-webkit-scrollbar {
  display: none;
}

.post-composer-textarea {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Account Switcher Styles */
.account-switcher {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    max-height: 600px;
    width: 100%;
}

.account-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid #333;
    margin-bottom: 1rem;
}

.account-switcher-header h3 {
    margin: 0;
    font-size: var(--font-size-1-2);
    color: #fff;
}

.account-switcher-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-switcher-close:hover {
    color: #fff;
}

.account-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Allow flex item to shrink for scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.account-list::-webkit-scrollbar {
    width: 6px;
}

.account-list::-webkit-scrollbar-track {
    background: #222;
}

.account-list::-webkit-scrollbar-thumb {
    background: #444;
}

.no-accounts {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #333;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.account-item:hover {
    border-color: #555;
    background: rgba(255, 255, 255, 0.02);
}

.account-item.active {
    border-color: rgba(255, 149, 0, 0.75);
    background: rgba(74, 158, 255, 0.1);
}

.account-info {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
}



.account-details {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-handle {
    color: #888;
    font-size: var(--font-size-0-9);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-last-used {
    color: #666;
    font-size: var(--font-size-0-8);
}

.current-indicator {
    color: rgba(255, 149, 0, 0.75);
    font-weight: bold;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.remove-account-btn {
    background: none;
    border: none;
    color: #888;
    font-size: var(--font-size-1-2);
    cursor: pointer;
    padding: 0.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.remove-account-btn:hover {
    background: rgba(255, 68, 191, 0.2);
    color: var(--color-notification-like);
}

.account-switcher-actions {
    border-top: 1px solid #333;
    padding-top: 1rem;
}

.add-account-btn {
    width: 100%;
    background: #444;
    border: 1px solid #555;
    color: #fff;
    padding: 0.75rem;
    cursor: pointer;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    transition: all 0.2s ease;
}

.add-account-btn:hover:not(:disabled) {
    background: #555;
    border-color: #666;
}

.add-account-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-account-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-account-input {
    width: 100%;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 0.75rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    box-sizing: border-box;
}

.add-account-input:focus {
    outline: none;
    border-color: var(--color-glow-anisota);
    box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.2);
}

.add-account-input::placeholder {
    color: #666;
}

.add-account-buttons {
    display: flex;
    gap: 0.5rem;
}

.add-account-confirm,
.add-account-cancel {
    flex: 1;
    padding: 0.75rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-account-confirm {
    background: rgba(255, 149, 0, 0.75);
    border: 1px solid rgba(255, 149, 0, 0.75);
    color: #fff;
}

.add-account-confirm:hover:not(:disabled) {
    background: #3a8eef;
    border-color: #3a8eef;
}

.add-account-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-account-cancel {
    background: transparent;
    border: 1px solid #555;
    color: #fff;
}

.add-account-cancel:hover:not(:disabled) {
    background: #555;
}

.add-account-error {
    color: #ff4444;
    font-size: var(--font-size-0-9);
    margin-top: 0.5rem;
}


/* Profile info stacking layout */
.post-card-user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Profile info text styles */
.profile-display-name {
  font-size: var(--font-size-1-1);
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 95%;
  line-height: 1.4;
  padding: 0.1em 0;
}

.profile-handle {
  font-size: var(--font-size-0-9);
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.4;
  padding: 0.1em 0;
}

.profile-did,
.profile-service-endpoint {
  font-size: var(--font-size-0-8);
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  word-break: break-all;
}

/* Remove any default margins that might affect stacking */
.post-card-user-info > span {
  margin: 0;
  line-height: 1.2;
}

/* Loading placeholder styles */
.loading-placeholder {
  background: var(--color-background-secondary);
  animation: loading-pulse 1.5s ease-in-out infinite;
}

.profile-card.loading .profile-display-name {
  height: 1.8rem;
  width: 200px;
  margin-bottom: 0.5rem;
}

.profile-card.loading .profile-handle {
  height: 1.2rem;
  width: 150px;
  margin-bottom: 0.5rem;
}

.profile-card.loading .profile-stat {
  height: 1rem;
  width: 80px;
  margin: 0;
}

.profile-card.loading .loading-line {
  height: 1rem;
  margin: 0.5rem 0;
  background: var(--color-background-secondary);
  animation: loading-pulse 1.5s ease-in-out infinite;
}

.profile-card.loading .loading-line:nth-child(2) {
  width: 90%;
}

.profile-card.loading .loading-line:nth-child(3) {
  width: 75%;
}

.profile-card.loading .profile-did {
  height: 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.profile-card.loading .profile-service-endpoint {
  height: 1rem;
  width: 80%;
}

@keyframes loading-pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.6;
  }
}

/* Notification type toggles in behavior settings */
.notification-type-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.5rem 0;
}

.notification-type-toggle {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 150px;
}

.notification-type-toggle label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.notification-type-toggle label:hover {
  color: var(--color-text);
}

.notification-type-toggle input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  cursor: pointer;
}

.notification-type-toggle input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.notification-type-toggle input[type="checkbox"]:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Post target selector in behavior settings */
.post-target-selector {
  position: relative;
  min-width: 150px;
}

.post-target-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
  padding: 0.5rem;
  font-size: 0.9rem;
  font-family: adobe-jenson-pro, serif;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  height: 2.5rem;
  white-space: nowrap;
}

.post-target-button:hover:not(:disabled) {
  background-color: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.post-target-label {
  flex: 1;
  text-align: left;
}

.post-target-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.post-target-arrow.open {
  transform: rotate(180deg);
}

.post-target-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 24px var(--color-shadow-dark);
  z-index: 1000;
  animation: dropdownSlideIn 0.15s ease-out;
}

.post-target-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.post-target-option:last-child {
  border-bottom: none;
}

.post-target-option:hover:not(:disabled) {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.post-target-option.active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.post-target-check {
  color: var(--color-link);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Enhanced notification content styles */
.notification-item .notification-enhanced-content {
  margin-top: 8px;
}

/* Legacy styles for non-thread notification posts (when not using thread chain) */
.notification-item .notification-original-post:not(.notification-thread-post),
.notification-item .notification-reply-content:not(.notification-thread-post) {
  display: block !important;
  padding: 8px 0 !important;
  margin: 4px 0 !important;
  border-radius: 0 !important;
  background: none !important;
  border: none !important;
  border-left: 2px solid rgba(255, 255, 255, 0.2) !important;
  padding-left: 12px !important;
  transition: all 0.2s ease !important;
  font-family: adobe-jenson-pro, serif !important;
}

.notification-item .notification-original-post:not(.notification-thread-post):hover,
.notification-item .notification-reply-content:not(.notification-thread-post):hover {
  border-left-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  transform: none !important;
}

.notification-item .notification-original-post:not(.notification-thread-post) {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.9em !important;
  font-style: italic !important;
  font-weight: normal !important;
}

.notification-item .notification-reply-content:not(.notification-thread-post) {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  font-style: normal !important;
}

/* Light theme adjustments */
[data-theme="light"] .notification-item .notification-enhanced-content {
  border-top-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-item .notification-original-post:not(.notification-thread-post),
[data-theme="light"] .notification-item .notification-reply-content:not(.notification-thread-post) {
  border-left-color: rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .notification-item .notification-original-post:not(.notification-thread-post):hover,
[data-theme="light"] .notification-item .notification-reply-content:not(.notification-thread-post):hover {
  border-left-color: rgba(0, 0, 0, 0.4) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .notification-item .notification-original-post:not(.notification-thread-post) {
  color: rgba(0, 0, 0, 0.5) !important;
}
[data-theme="light"] .notification-item .notification-reply-content:not(.notification-thread-post) {
  color: rgba(0, 0, 0, 0.75) !important;
}

/* Notification thread chain styling (similar to PostComposer thread posts) */
.notification-thread-chain {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.notification-thread-post-container {
  position: relative;
}

.notification-thread-post {
  padding: 0.75rem 1rem;
  background: var(--color-card-background);
  border-left: 1px solid var(--color-border-light);
  border-right: 1px solid var(--color-border-light);
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

/* First post - solid top border, no bottom border */
.notification-thread-post-container.notification-thread-post-first .notification-thread-post {
  border-top: 1px solid var(--color-border-light);
  border-bottom: none;
}

/* First post that is itself a reply - dashed top border to indicate connection above */
.notification-thread-post-container.notification-thread-post-first-is-reply .notification-thread-post {
  border-top: 1px dashed var(--color-border-light);
  border-bottom: none;
}

/* Middle posts - dashed top border, no bottom border */
.notification-thread-post-container.notification-thread-post-middle .notification-thread-post {
  border-top: 1px dashed var(--color-border-light);
  border-bottom: none;
}

/* Last post - dashed top border, solid bottom border */
.notification-thread-post-container.notification-thread-post-last .notification-thread-post {
  border-top: 1px dashed var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

/* Single post (when there's only one) - restore all borders */
.notification-thread-post-container.notification-thread-post-single .notification-thread-post {
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

/* Original post styling */
.notification-thread-post-original {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  font-weight: normal;
}

/* Parent post styling */
.notification-thread-post-parent {
  color: rgba(255, 255, 255, 0.75);
  font-style: normal;
  font-weight: normal;
}

/* Reply post styling */
.notification-thread-post-reply {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-style: normal;
}

/* Light theme adjustments for thread posts */
[data-theme="light"] .notification-thread-post {
  border-left-color: rgba(0, 0, 0, 0.15);
  border-right-color: rgba(0, 0, 0, 0.15);
  border-top-color: rgba(0, 0, 0, 0.15);
  border-bottom-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-thread-post-original {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .notification-thread-post-parent {
  color: rgba(0, 0, 0, 0.65);
}

[data-theme="light"] .notification-thread-post-reply {
  color: rgba(0, 0, 0, 0.75);
}

/* Thread gap indicator for intermediate posts */
.notification-thread-gap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1rem;
  margin: 0;
}

.notification-thread-gap-line {
  flex: 1;
  height: 1px;
  background: var(--color-border-light);
  border: none;
}

.notification-thread-gap-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85em;
  font-style: italic;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .notification-thread-gap-line {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-thread-gap-text {
  color: rgba(0, 0, 0, 0.4);
}

/* Nested quoted post within a quote notification */
.notification-quoted-post-nested {
  margin-top: 0.75rem;
  border-left: 1px solid var(--color-border-light);
  border-right: 1px solid var(--color-border-light);
}

.notification-quoted-post-nested .notification-thread-post {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: none;
}

/* When a quote post contains a nested quoted post, add bottom border */
.notification-thread-post-container:has(.notification-quoted-post-nested) .notification-thread-post {
  border-bottom: 1px solid var(--color-border-light);
}

[data-theme="light"] .notification-thread-post-container:has(.notification-quoted-post-nested) .notification-thread-post {
  border-bottom-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-quoted-post-nested {
  border-left-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-quoted-post-nested .notification-thread-post {
  background: rgba(0, 0, 0, 0.02);
}

/* Notification multi-engage button styles */
.notification-multi-engage-container {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
}

/* When expanded, the container should span the full notification for proper centering */
.notification-multi-engage-container.expanded {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-item {
  position: relative;
  transition: opacity 0.2s ease;
}

/* Dim the notification when multi-engage is expanded */
.notification-item.multi-engage-active {
  opacity: 0.4;
}

.notification-item.multi-engage-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 5;
  pointer-events: none;
}



/* Notification engage trigger button */
.notification-engage-trigger {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 1px solid var(--color-border-focus);
    transition: all 0.2s ease;
    font-family: inherit;
    cursor: pointer;
}

.notification-engage-trigger:hover {
  background: var(--color-card-background-hover);
  color: var(--color-text);
  border-color: var(--color-text-muted);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-engage-trigger:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Hide the trigger button when expanded */
.notification-multi-engage-container.expanded .notification-engage-trigger {
  display: none;
}

/* Notification engage options overlay */
.notification-engage-options {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 8px;
  background: var(--color-modal-background, var(--color-card-background));
  border: 1px solid var(--color-border);
  border-radius: 0;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  z-index: 25;
}

.notification-engage-option {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 1px solid var(--color-border-light);
  background: var(--color-card-background);
  color: var(--color-text);
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}


/* Class-based styling for liked posts */
.like-button.liked {
    background: rgba(255, 68, 191, 0.1) !important;
    border-color: var(--color-notification-like) !important;
    color: var(--color-notification-like) !important;
  }
  
  .like-button.liked:hover {
    background: rgba(255, 68, 191, 0.2) !important;
    border-color: var(--color-notification-like) !important;
  }
  
  /* Class-based styling for reposted posts */
  .repost-button.reposted {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.75) !important;
    color: rgba(34, 197, 94, 0.9) !important;
  }
  
  .repost-button.reposted:hover {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: rgba(34, 197, 94, 0.75) !important;
  }
  

.notification-engage-option:hover {
  background: var(--color-card-background-hover);
  color: var(--color-text);
  border-color: var(--color-border);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.notification-engage-option:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* State-based styling for liked posts */
.notification-engage-like[style*="var(--color-notification-like)"] {
  background: rgba(255, 68, 191, 0.1) !important;
  border-color: var(--color-notification-like) !important;
}

.notification-engage-like[style*="var(--color-notification-like)"]:hover {
  background: rgba(255, 68, 191, 0.2) !important;
  border-color: var(--color-notification-like) !important;
}

/* State-based styling for reposted posts */
.notification-engage-repost[style*="#00aa00"] {
  background: rgba(0, 170, 0, 0.1) !important;
  border-color: #00aa00 !important;
}

.notification-engage-repost[style*="#00aa00"]:hover {
  background: rgba(0, 170, 0, 0.2) !important;
  border-color: #00aa00 !important;
}

/* Animation states */
.notification-multi-engage.expanding .notification-engage-options,
.notification-multi-engage.expanded .notification-engage-options {
  animation: slideInFromCenter 0.2s ease-out;
}

.notification-multi-engage.collapsing .notification-engage-options {
  animation: slideOutToCenter 0.2s ease-in;
}

@keyframes slideInFromCenter {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideOutToCenter {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.7);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutToRight {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(20px) scale(0.8);
  }
}

/* Light theme adjustments for multi-engage */
[data-theme="light"] .notification-engage-options {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  background: var(--color-modal-background, #ffffff);
}

[data-theme="light"] .notification-engage-trigger {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .notification-engage-trigger:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-item.multi-engage-active::before {
  background: rgba(255, 255, 255, 0.6);
}

/* Account Lists and Post Lists Page Styles */
.account-lists-page,
.post-lists-page {
    color: var(--color-text);
    padding: 2rem;
    padding-top: calc(4rem + max(1rem, env(safe-area-inset-top))); /* Space for fixed stamina bar with gradient */
    padding-bottom: calc(6rem + max(2rem, env(safe-area-inset-bottom))); /* Extra space for footer gradient */
    box-sizing: border-box;
    /* Scroll performance optimizations */
    contain: layout style;
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    max-width: 800px;
    margin: 0 auto;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
.account-lists-page::-webkit-scrollbar,
.post-lists-page::-webkit-scrollbar {
    display: none;
}

/* Disable transitions during scroll for better performance */
.account-lists-page.scrolling *,
.post-lists-page.scrolling * {
    transition: none !important;
}

.lists-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lists-header h1 {
    font-family: adobe-jenson-pro, serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.lists-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-2);
    color: var(--color-text-secondary);
    margin: 0 0 2rem 0;
}

.create-list-btn {
    background: var(--color-glow-anisota);
    color: var(--color-text-inverse);
    border: none;
    padding: 1rem 2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.lists-section {
    margin-top: 2rem;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
}

/* Enhanced empty state for lists pages only - matches list item container size */
.account-lists-page .empty-state,
.post-lists-page .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem 1rem;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
    transition: border-color 0.2s ease;
    min-height: 120px; /* Similar height to a list item with content */
    box-sizing: border-box;
}

.account-lists-page .empty-state:hover,
.post-lists-page .empty-state:hover {
    border-color: var(--color-border);
}

.account-lists-page .empty-state h3,
.post-lists-page .empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: normal;
}

.account-lists-page .empty-state p,
.post-lists-page .empty-state p {
    font-size: var(--font-size-1);
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.empty-state p {
    font-size: var(--font-size-1-1);
    margin: 0;
}

.lists-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .lists-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .lists-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.lists-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
}

/* Empty state with suggestion styling */
.empty-state-with-suggestion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 1rem;
}

.empty-state-text {
    text-align: center;
}

.empty-state-text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: normal;
    font-family: adobe-jenson-pro, serif;
}

.empty-state-text p {
    font-size: var(--font-size-1);
    margin: 0;
    line-height: 1.4;
    text-align: center;
    font-family: adobe-jenson-pro, serif;
}

.suggested-list-container {
    width: 100%;
    max-width: 600px;
}

.suggestion-header {
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: normal;
    font-family: adobe-jenson-pro, serif;
}

.suggestion-card {
    border: 2px dashed var(--color-border) !important;
    background: var(--color-card-background-subtle) !important;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.suggestion-card:hover {
    opacity: 1;
    border-color: var(--color-accent) !important;
    background: var(--color-card-background) !important;
    transform: translateY(-1px);
}

.create-suggestion-btn {
    font-family: adobe-jenson-pro, serif;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-0-9);
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-suggestion-btn:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.create-suggestion-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.list-card {
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.list-card:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
    transform: translateY(-2px);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.list-header h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.3rem;
    margin: 0;
    color: var(--color-text);
    flex: 1;
    margin-right: 1rem;
}

.list-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.list-actions button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
}

.list-actions button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.list-actions .view-btn:hover {
    background: var(--color-glow-anisota);
    border-color: var(--color-link);
    color: var(--color-text-inverse);
}

.list-actions .edit-btn:hover {
    background: #ffa500;
    border-color: #ffa500;
    color: var(--color-text-inverse);
}

.list-actions .delete-btn:hover {
    background: var(--color-error);
    border-color: var(--color-error);
    color: var(--color-text-inverse);
}

.list-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.tag-item {
    color: var(--color-text);
    padding: 0.25rem 0.4rem;
    border-radius: 0;
    font-size: var(--font-size-0-8);
    font-family: adobe-jenson-pro, serif;
    font-weight: 500;
    margin-left: 0.2rem;
    border: solid 1px var(--color-accent);
    background: var(--color-accent-dark);
}

.list-meta {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
    margin: 0;
}

.list-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.75rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    border-radius: 0;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-link);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.form-group input:disabled,
.form-group textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-actions button {
    padding: 0.75rem 1.5rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
}

.cancel-btn {
    background: var(--color-button-background);
    color: var(--color-button-text);
}

.cancel-btn:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.save-btn,
.create-btn {
    background: var(--color-glow-anisota);
    color: var(--color-text-inverse);
    border-color: var(--color-glow-anisota);
}

.save-btn:hover,
.create-btn:hover {
    background: var(--color-glow-anisota);
    border-color: var(--color-glow-anisota);
    opacity: 0.8;
}

.save-btn:disabled,
.create-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.delete-btn.danger {
    background: var(--color-error);
    color: var(--color-text-inverse);
    border-color: var(--color-error);
}

.delete-btn.danger:hover {
    background: #cc0000;
    border-color: #cc0000;
}

.delete-confirmation {
    text-align: center;
    padding: 1rem 0;
}

.delete-confirmation p {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    color: var(--color-text);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.delete-confirmation .warning {
    color: var(--color-error);
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.message {
    padding: 1rem;
    margin: 1rem 0;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    border-radius: 0;
    text-align: center;
}

.message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #28a745;
}

.message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #dc3545;
}

/* Post List Contents Modal Styles */
.list-contents {
    max-height: 400px;
    overflow-y: auto;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-preview {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    padding: 1rem;
    transition: background-color 0.2s ease;
}

.post-preview:hover {
    background: var(--color-card-background-hover);
}

.post-author {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.post-content {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.post-meta {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
}

.list-section h3 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.2rem;
  color: var(--color-text);
  margin: 0 0 1rem 0;
}

.loading-message,
.empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
}

/* List modal loading and empty states */
.list-modal .loading-message,
.list-modal .empty-message {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* List modal create form section */
.list-modal .create-list-form {
  min-height: 250px;
}

/* List modal success message */
.list-modal .success-message {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-message p {
  margin: 0 0 1rem 0;
}

.create-list-button,
.create-new-list-button {
  background: var(--color-glow-anisota);
  color: var(--color-text-inverse);
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  margin-top: 1rem;
}

.lists-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

.list-item:hover {
  background: var(--color-card-background-hover);
}

.list-info {
  flex: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
  display: flex;
  flex-direction: column;
}

.list-info:hover {
  color: var(--color-link);
}

.list-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* List modal specific styling */
.list-modal .modal-body {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.list-modal .list-section {
  flex: 1;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.list-actions .edit-btn:hover {
  background: #ffa500;
  border-color: #ffa500;
  color: var(--color-text-inverse);
}

.list-actions .delete-btn:hover {
  background: var(--color-error);
  border-color: var(--color-error);
  color: var(--color-text-inverse);
}

.list-info h4 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
}

.list-tags .tag-item {
  background: var(--color-accent);
  color: var(--color-text);
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-family: adobe-jenson-pro, serif;
}

.list-description {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.3;
}

/* Account list modal - consistent button widths for Add/Remove */
.account-list-modal .list-item .cancel-btn,
.account-list-modal .list-item .save-btn {
  min-width: 100px;
  margin-left: 1rem;
}

.add-to-list-button {
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
  padding: 0.5rem 1rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: 1rem;
}

.add-to-list-button:hover {
  background: var(--color-glow-anisota);
  border-color: var(--color-link);
  color: var(--color-text-inverse);
}

.create-list-form {
  padding: 1rem 0;
}

.create-list-form h3 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.2rem;
  color: var(--color-text);
  margin: 0 0 1.5rem 0;
}

.create-list-form .form-group {
  margin-bottom: 1rem;
}

/* Account List Modal - Create Form */
.create-form {
  padding: 1rem 0;
}

.create-form .form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
  color: var(--color-input-text);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-input-focus);
  background: var(--color-input-background);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-input-placeholder);
  font-style: italic;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.add-muted-word-form .form-actions {
    margin-top: 0;
}

.cancel-button,
.create-button,
.tags-toggle-button {
  height: 2.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cancel-button,
.create-button {
  padding: 0 1.5rem;
}

.tags-toggle-button {
  padding: 0 0.75rem;
  min-width: 2.5rem;
  border: 1px solid var(--color-border-light);
}

.cancel-button {
  background: var(--color-button-background);
  color: var(--color-button-text);
}

.cancel-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.create-button {
  background: var(--color-glow-anisota);
  color: var(--color-text-inverse);
  border-color: var(--color-link);
}

.create-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tags-toggle-button {
  background: var(--color-button-background);
  color: var(--color-button-text);
}

.tags-toggle-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.tags-toggle-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Account List Modal - Form Actions */
.create-form .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.create-form .form-actions button {
  height: 2.5rem;
  padding: 0 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-form .form-actions button[type="button"] {
  background: var(--color-button-background);
  color: var(--color-button-text);
}

.create-form .form-actions button[type="button"]:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.create-form .form-actions button[type="submit"] {
  background: var(--color-glow-anisota);
  color: var(--color-text-inverse);
}

.create-form .form-actions button[type="submit"]:hover:not(:disabled) {
  opacity: 0.8;
}

.create-form .form-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.success-message {
  text-align: center;
  padding: 2rem;
  color: var(--color-success);
}

.success-icon {
  font-size: 3rem;
  color: var(--color-success);
  margin-bottom: 1rem;
}

.success-message p {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 0;
}

/* Lists Page Styles */
.lists-page {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  color: var(--color-text);
  z-index: 100;
  overflow-y: auto;
  padding: 0;
  box-sizing: border-box;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.lists-page::-webkit-scrollbar {
  display: none;
}

.lists-page.scrolling * {
  pointer-events: none;
}

.lists-page.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: adobe-jenson-pro, serif;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
}

.lists-container {
  padding: calc(3rem + max(1rem, env(safe-area-inset-top))) 1.5rem calc(4rem + max(2rem, env(safe-area-inset-bottom))) 1.5rem;
  padding-top: calc(4rem + max(1rem, env(safe-area-inset-top)));
  padding-bottom: calc(6rem + max(2rem, env(safe-area-inset-bottom)));
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
}

.lists-header {
  margin-bottom: 2rem;
}

.lists-header p {
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin: 0 0 1.5rem 0;
}



/* Messages */
.message {
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  border: 1px solid;
  border-radius: 0;
}

.message.success {
  background: var(--color-success-bg, rgba(34, 197, 94, 0.1));
  color: var(--color-success, #22c55e);
  border-color: var(--color-success, #22c55e);
}

.message.error {
  background: var(--color-error-bg, rgba(239, 68, 68, 0.1));
  color: var(--color-error, #ef4444);
  border-color: var(--color-error, #ef4444);
}

/* Create List Button */
.create-list-btn {
  background: var(--color-glow-anisota);
  color: var(--color-text-inverse);
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
  margin-top: 2rem;
}

.create-list-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.create-list-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Lists Section */
.lists-section {
  margin-top: 2rem;
}

.loading-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
  font-size: 1.1rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary);
}

.empty-state h3 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.3rem;
  color: var(--color-text);
  margin: 0 0 0.5rem 0;
  font-weight: normal;
}

.empty-state p {
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  margin: 0;
}

/* Lists Grid */
.lists-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-card {
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: background-color 0.2s ease;
}

.list-card:hover {
  background: var(--color-card-background-hover);
}

.list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.list-header h3 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.2rem;
  color: var(--color-text);
  margin: 0;
  font-weight: normal;
  flex: 1;
}

.list-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.edit-btn,
.delete-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.edit-btn:hover,
.delete-btn:hover {
  opacity: 1;
}

.list-description {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.list-tags .tag {
  background: var(--color-accent);
  color: var(--color-text);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-family: adobe-jenson-pro, serif;
}

.list-meta {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.post-lists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-lists-header h1 {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0;
    color: var(--color-text);
}

.post-lists-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Form Styles */
.list-form,
.list-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
  color: var(--color-input-text);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-input-focus);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-input-placeholder);
  font-style: italic;
}

.form-group input:disabled,
.form-group textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cancel-btn,
.create-btn,
.save-btn {
    padding: 0.75rem 1.5rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.cancel-btn {
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
}

.cancel-btn:hover:not(:disabled) {
  background: var(--color-button-hover);
}

.create-btn,
.save-btn {
  background: var(--color-glow-anisota);
  color: var(--color-text-inverse);
}

.create-btn:disabled,
.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Delete Modal */
.delete-confirmation {
  font-family: adobe-jenson-pro, serif;
}

.delete-confirmation p {
  margin: 0 0 1rem 0;
  color: var(--color-text);
  line-height: 1.4;
}

.delete-confirmation .warning {
  color: var(--color-error, #ef4444);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.delete-btn.danger:hover:not(:disabled) {
  background: var(--color-error-hover, #dc2626);
}

.delete-btn.danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .cancel-btn,
  .form-actions .create-btn,
  .form-actions .save-btn {
    width: 100%;
  }
  
  .list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .list-actions {
    margin-left: 0;
  }
}

/* Post Lists Page - Card Stack Grid Layout */
.post-lists-page {
    color: var(--color-text);
    padding-top: calc(from max(1rem, env(safe-area-inset-top)));
    padding-bottom: calc(from max(2rem, env(safe-area-inset-bottom)));
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
.post-lists-page::-webkit-scrollbar {
    display: none;
}

.post-lists-page.viewing-list {
    max-width: 600px;
    padding: 0;
}

.post-lists-page.scrolling * {
    pointer-events: none;
}

.post-lists-page.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    font-size: var(--font-size-1-2);
    color: var(--color-text-muted);
}

/* Grid Layout */
.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .lists-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lists-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 2rem auto 0;
    }
}

/* Card Stack Containers */
.list-card-stack-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Simple Info Card */
.list-info-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 200px;
    max-height: 250px;
    aspect-ratio: 1;
}

.list-info-card:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-text-muted);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.list-info-header {
    padding: 1rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.list-title {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
    line-height: 1.3;
}

/* Card Body */
.list-info-body {
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.list-description {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-description-placeholder {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
    margin: 0;
    font-style: italic;
}

/* Card Footer */
.list-info-footer {
    padding: 0.75rem 1rem 1rem 1rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.list-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
}

/* Card Stack Actions (Edit/Delete buttons underneath) */
.list-card-stack-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem;
}

/* List View Page Header */
.list-view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    position: relative;
    z-index: 0; /* Keep header behind all card animations */
}

.list-view-header {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.list-view-header.entrance-complete {
    opacity: 1;
}

/* Alert mode for list view header */
.list-view-header.alert-mode {
    transition: all 0.3s ease-in-out;
}

.list-view-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    font-size: var(--font-size-0-9);
    text-align: center;
    color: var(--color-text);
}

/* Alert animations for list view header */
.list-view-header.alert-stamina .list-view-alert {
    animation: staminaAlert 0.3s ease-out;
    color: #ff6b6b;
}

.list-view-header.alert-levelup .list-view-alert {
    animation: levelUpAlert 0.5s ease-out;
    color: #4ecdc4;
}

.list-view-header.alert-success .list-view-alert {
    color: #4ecdc4;
}

.list-view-header.alert-error .list-view-alert {
    color: #ff6b6b;
}

.list-view-header.alert-info .list-view-alert {
    color: var(--color-text);
}

/* Thread view header styles */
.thread-view-header {
    width: 100%;
    position: relative;
    z-index: 0; /* Keep header behind all card animations */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.thread-view-header.entrance-complete {
    opacity: 1;
}

/* Alert mode for thread view header */
.thread-view-header.alert-mode {
    transition: all 0.3s ease-in-out;
}

.thread-view-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    font-size: var(--font-size-0-9);
    text-align: center;
    color: var(--color-text);
}

/* Alert animations for thread view header */
.thread-view-header.alert-stamina .thread-view-alert {
    animation: staminaAlert 0.3s ease-out;
    color: #ff6b6b;
}

.thread-view-header.alert-levelup .thread-view-alert {
    animation: levelUpAlert 0.5s ease-out;
    color: #4ecdc4;
}

.thread-view-header.alert-success .thread-view-alert {
    color: #4ecdc4;
}

.thread-view-header.alert-error .thread-view-alert {
    color: #ff6b6b;
}

.thread-view-header.alert-info .thread-view-alert {
    color: var(--color-text);
}

.thread-view-info {
    padding: 1rem;
    text-align: center;
}

.thread-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.thread-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.thread-author {
    font-size: var(--font-size-0-8);
    color: var(--color-text-secondary);
}

.author-username {
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-username:hover {
    color: #ff9500;
}

.back-to-lists-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    padding: 0.5rem 1rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.back-to-lists-btn:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.list-view-info {
    flex: 1;
    text-align: center;
    gap: 0.3rem;
    display: flex;
    flex-direction: column;
}

.list-view-info h2 {
    margin: 0;
    font-size: var(--font-size-1-2);
    font-weight: 600;
    color: var(--color-text);
}

.list-view-info .list-description {
    margin: 0;
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
    font-style: italic;
}
.list-card-stack-actions button {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    padding: 0.5rem 1rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-card-stack-actions button:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.list-card-stack-actions .edit-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.list-card-stack-actions .delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Edit Form Container */
.list-edit-form-container {
    padding: 1.5rem;
    background: var(--color-card-background);
}

.list-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Viewing List Mode */
.viewing-list-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-card-background);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.back-button {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.back-button:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.viewing-list-info {
    flex-grow: 1;
}

.viewing-list-info h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.viewing-list-info .list-description {
    font-size: var(--font-size-1);
    color: var(--color-text-muted);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.viewing-list-info .list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.5rem 0 0 0;
}

.viewing-list-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.viewing-list-actions button {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.viewing-list-actions button:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.viewing-list-content {
    flex-grow: 1;
}

.viewing-list-cardstack {
    min-height: 500px;
}

.viewing-list-cardstack .feed-container {
    padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-lists-page {
        padding: 0.5rem;
    }
    
    .lists-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .viewing-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .viewing-list-actions {
        justify-content: stretch;
    }
    
    .viewing-list-actions button {
        flex: 1;
    }
    
    .list-info-card {
        min-height: 160px;
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .list-card-stack-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .list-card-stack-actions button {
        justify-content: center;
        width: 100%;
    }
    
    .viewing-list-header {
        padding: 0.5rem;
    }
    
    .back-button {
        padding: 0.75rem;
        text-align: center;
    }
}

.delete-confirmation-content {
    padding: 1rem;
}

.delete-message {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-top: 0;
}

.draft-warning-message {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-top: 0;
    font-family: adobe-jenson-pro, serif;
}

.dont-show-again-option {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-background-secondary, rgba(0, 0, 0, 0.05));
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
}

.dont-show-again-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: var(--font-size-0-9);
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.dont-show-again-checkbox {
    margin: 0;
    cursor: pointer;
}

.dont-show-again-note {
    font-size: var(--font-size-0-8);
    color: var(--color-text-secondary, rgba(0, 0, 0, 0.6));
    font-style: italic;
    margin-left: 1.5rem;
}

.delete-confirmation-modal .modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.delete-confirmation-modal .cancel-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.2));
    background: var(--color-background);
    color: var(--color-text);
    cursor: pointer;
    font-size: var(--font-size-0-9);
    transition: all 0.2s ease;
}

.delete-confirmation-modal .cancel-btn:hover {
    background: var(--color-background-secondary, rgba(0, 0, 0, 0.05));
    border-color: var(--color-border-hover, rgba(0, 0, 0, 0.3));
}

.delete-confirmation-modal .delete-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dc3545;
    background: #dc3545;
    color: white;
    cursor: pointer;
    font-size: var(--font-size-0-9);
    transition: all 0.2s ease;
}

.delete-confirmation-modal .delete-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

.delete-confirmation-modal .delete-btn.danger {
    background: #dc3545;
    border-color: #dc3545;
}

.delete-confirmation-modal .delete-btn.danger:hover {
    background: #c82333;
    border-color: #c82333;
}

.draft-warning-modal .save-draft-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-warning);
    background: var(--color-warning);
    color: var(--color-text);
    cursor: pointer;
    font-size: var(--font-size-0-9);
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
}

.draft-warning-modal .save-draft-btn:hover {
    background: var(--color-warning-hover);
    border-color: var(--color-warning-hover);
}

/* Dark theme adjustments */
[data-theme="dark"] .dont-show-again-option {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dont-show-again-note {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .delete-confirmation-modal .cancel-btn {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .delete-confirmation-modal .cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Unified Confirmation Modal Styles */
.confirmation-modal .modal-content {
  max-width: 450px;
  width: 90vw;
}

/* Allow subtitle to wrap in confirmation modals */
.confirmation-modal .modal-subtitle,
.threadgate-confirm-modal .modal-subtitle {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.confirmation-message {
  margin-bottom: 1.5rem;
  line-height: 1.5;
  color: var(--color-text);
  margin-top: 0;
}

.confirmation-message p {
  margin: 0 0 1rem 0;
}

.confirmation-message p:last-child {
  margin-bottom: 0;
}

.edit-warning-list {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.edit-technical-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .confirmation-modal .modal-content {
    width: 95vw;
    max-width: none;
  }
}

/* Drafts modal styles */
.drafts-modal {
  min-height: 300px;
  max-height: 70vh;
  overflow-y: auto;
}

.drafts-modal .loading,
.drafts-modal .error {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
}

.drafts-modal .error {
  color: var(--color-error);
}

.drafts-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 250px;
  padding: 2rem;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
}

.drafts-empty-state p {
  margin: 0;
  line-height: 1.5;
}

.drafts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Hide scrollbar for drafts list */
.drafts-modal::-webkit-scrollbar {
  display: none;
}

.drafts-modal {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.draft-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-radius: 0;
  align-items: flex-start;
}

.draft-item:hover {
  background: var(--color-card-background-hover);
  border-color: var(--color-border-light);
}

.draft-content {
  flex: 1;
  min-width: 0;
}

.draft-text {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.draft-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.draft-date,
.draft-updated,
.draft-tags {
  font-family: adobe-jenson-pro, serif;
}

.draft-tags {
  color: var(--color-link);
}

.draft-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.edit-draft-button,
.publish-draft-button,
.delete-draft-button {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  font-family: adobe-jenson-pro, serif;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--color-border);
  white-space: nowrap;
  min-width: 80px;
}

.edit-draft-button {
  background: var(--color-button-background);
  color: var(--color-button-text);
}

.edit-draft-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.publish-draft-button {
  background: var(--color-success);
  color: var(--color-text);
  border-color: var(--color-success);
}

.publish-draft-button:hover:not(:disabled) {
  background: var(--color-success-hover);
  border-color: var(--color-success-hover);
}

.delete-draft-button {
  background: var(--color-error);
  color: var(--color-text);
  border-color: var(--color-error);
}

.delete-draft-button:hover:not(:disabled) {
  background: var(--color-error-hover);
  border-color: var(--color-error-hover);
}

.edit-draft-button:disabled,
.publish-draft-button:disabled,
.delete-draft-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile responsive adjustments for drafts */
@media (max-width: 768px) {
  .draft-item {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .draft-actions {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  
  .draft-actions button {
    min-width: 70px;
    font-size: var(--font-size-0-85);
    padding: 0.3rem 0.6rem;
  }
  
  .post-actions {
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: end;
  }
  
  .tags-toggle-button,
  .drafts-button, .image-upload-button, .media-upload-button,
  .save-draft-button,
  .recent-posts-button,
  .publish-target-button,
  .composer-actions-button,
  .composer-tags-standalone {
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0.4rem;
  }
  
  /* Composer-specific expandable options mobile sizing */
  .composer-actions-options .nav-control-option {
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0.4rem;
  }

  .publish-target-option {
    padding: 0.4rem;
  }
  
  .post-button {
    min-width: 3rem;
    height: 2.2rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Smooth loading page styles */
.settings-page.loading-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    opacity: 0;
    animation: pageEnterNoTransform calc(0.6s / var(--animation-page-transitions, 1)) ease-out forwards;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-text {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1-1);
    color: var(--color-text-muted);
    text-align: center;
    opacity: 0.8;
}

/* Smooth content transitions for settings pages */
.settings-page.page-entering {
    opacity: 0;
    animation: pageEnterNoTransform var(--duration-page-transitions) ease-out forwards;
}

.settings-page.content-ready {
    opacity: 1;
}

/* Loading state for lists sections */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    opacity: 0;
    animation: fadeInGentle 0.4s ease-out forwards;
}

.loading-state .loading-text {
    font-size: var(--font-size-1);
    opacity: 0.7;
}

/* Gentle fade-in animation for loading states */
@keyframes fadeInGentle {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for lists content */
.lists-section {
    opacity: 0;
    animation: fadeInGentle 0.5s ease-out forwards;
    animation-delay: 0.1s;
}

.settings-page.content-ready .lists-section {
    opacity: 1;
}

/* Staggered animation for list items */
.list-item {
    opacity: 0;
    animation: fadeInGentle 0.4s ease-out forwards;
}

.list-item:nth-child(1) { animation-delay: 0.1s; }
.list-item:nth-child(2) { animation-delay: 0.15s; }
.list-item:nth-child(3) { animation-delay: 0.2s; }
.list-item:nth-child(4) { animation-delay: 0.25s; }
.list-item:nth-child(5) { animation-delay: 0.3s; }
.list-item:nth-child(6) { animation-delay: 0.35s; }
.list-item:nth-child(7) { animation-delay: 0.4s; }
.list-item:nth-child(8) { animation-delay: 0.45s; }
.list-item:nth-child(9) { animation-delay: 0.5s; }
.list-item:nth-child(10) { animation-delay: 0.55s; }

/* Ensure content is visible once animations complete */
.settings-page.content-ready .list-item {
    opacity: 1;
}

/* Empty state fade-in */
.empty-state {
    opacity: 0;
    animation: fadeInGentle 0.5s ease-out forwards;
    animation-delay: 0.2s;
}

.settings-page.content-ready .empty-state {
    opacity: 1;
}

/* Staggered animation for collection items - only animate when content is ready */
.settings-page.content-ready .collection-item {
    opacity: 0;
    animation: fadeInGentle 0.4s ease-out forwards;
}

.settings-page.content-ready .collection-item:nth-child(1) { animation-delay: 0.1s; }
.settings-page.content-ready .collection-item:nth-child(2) { animation-delay: 0.15s; }
.settings-page.content-ready .collection-item:nth-child(3) { animation-delay: 0.2s; }
.settings-page.content-ready .collection-item:nth-child(4) { animation-delay: 0.25s; }
.settings-page.content-ready .collection-item:nth-child(5) { animation-delay: 0.3s; }
.settings-page.content-ready .collection-item:nth-child(6) { animation-delay: 0.35s; }
.settings-page.content-ready .collection-item:nth-child(7) { animation-delay: 0.4s; }
.settings-page.content-ready .collection-item:nth-child(8) { animation-delay: 0.45s; }
.settings-page.content-ready .collection-item:nth-child(9) { animation-delay: 0.5s; }
.settings-page.content-ready .collection-item:nth-child(10) { animation-delay: 0.55s; }
.settings-page.content-ready .collection-item:nth-child(11) { animation-delay: 0.6s; }
.settings-page.content-ready .collection-item:nth-child(12) { animation-delay: 0.65s; }
.settings-page.content-ready .collection-item:nth-child(13) { animation-delay: 0.7s; }
.settings-page.content-ready .collection-item:nth-child(14) { animation-delay: 0.75s; }
.settings-page.content-ready .collection-item:nth-child(15) { animation-delay: 0.8s; }
.settings-page.content-ready .collection-item:nth-child(16) { animation-delay: 0.85s; }
.settings-page.content-ready .collection-item:nth-child(17) { animation-delay: 0.9s; }
.settings-page.content-ready .collection-item:nth-child(18) { animation-delay: 0.95s; }
.settings-page.content-ready .collection-item:nth-child(19) { animation-delay: 1.0s; }
.settings-page.content-ready .collection-item:nth-child(20) { animation-delay: 1.05s; }

/* Hide collection items by default until content is ready */
.settings-page:not(.content-ready) .collection-item {
    opacity: 0;
}

/* Staggered animation for inventory items - only animate when content is ready */
.settings-page.content-ready .inventory-item {
    opacity: 0;
    animation: fadeInGentle 0.4s ease-out forwards;
}

.settings-page.content-ready .inventory-item:nth-child(1) { animation-delay: 0.1s; }
.settings-page.content-ready .inventory-item:nth-child(2) { animation-delay: 0.15s; }
.settings-page.content-ready .inventory-item:nth-child(3) { animation-delay: 0.2s; }
.settings-page.content-ready .inventory-item:nth-child(4) { animation-delay: 0.25s; }
.settings-page.content-ready .inventory-item:nth-child(5) { animation-delay: 0.3s; }
.settings-page.content-ready .inventory-item:nth-child(6) { animation-delay: 0.35s; }
.settings-page.content-ready .inventory-item:nth-child(7) { animation-delay: 0.4s; }
.settings-page.content-ready .inventory-item:nth-child(8) { animation-delay: 0.45s; }
.settings-page.content-ready .inventory-item:nth-child(9) { animation-delay: 0.5s; }
.settings-page.content-ready .inventory-item:nth-child(10) { animation-delay: 0.55s; }
.settings-page.content-ready .inventory-item:nth-child(11) { animation-delay: 0.6s; }
.settings-page.content-ready .inventory-item:nth-child(12) { animation-delay: 0.65s; }
.settings-page.content-ready .inventory-item:nth-child(13) { animation-delay: 0.7s; }
.settings-page.content-ready .inventory-item:nth-child(14) { animation-delay: 0.75s; }
.settings-page.content-ready .inventory-item:nth-child(15) { animation-delay: 0.8s; }
.settings-page.content-ready .inventory-item:nth-child(16) { animation-delay: 0.85s; }
.settings-page.content-ready .inventory-item:nth-child(17) { animation-delay: 0.9s; }
.settings-page.content-ready .inventory-item:nth-child(18) { animation-delay: 0.95s; }
.settings-page.content-ready .inventory-item:nth-child(19) { animation-delay: 1.0s; }
.settings-page.content-ready .inventory-item:nth-child(20) { animation-delay: 1.05s; }

/* Hide inventory items by default until content is ready */
.settings-page:not(.content-ready) .inventory-item {
    opacity: 0;
}

/* Ensure hover states work during and after animations */
.settings-page .collection-item:hover,
.settings-page.content-ready .collection-item:hover {
    opacity: 1 !important;
    background: var(--color-card-background-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px var(--item-color, var(--color-border-light)) !important;
    z-index: 1 !important;
}

.settings-page .inventory-item:hover,
.settings-page.content-ready .inventory-item:hover {
    opacity: 1 !important;
    background: var(--color-card-background-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px var(--item-type-color, var(--color-border-light)) !important;
    z-index: 1 !important;
}

/* Special styling for liked thread posts - use dashed borders */
.post-card.liked.thread-post .card-front,
.post-card.liked.thread-post .card-back {
    border-top: 2px solid var(--color-notification-like) !important;
    border-bottom: 2px solid var(--color-notification-like) !important;
    border-left: 1px dashed var(--color-notification-like) !important;
    border-right: 1px dashed var(--color-notification-like) !important;
}

/* Smooth content transitions for notifications modal */
.notifications-list.notifications-entering {
    opacity: 0;
    animation: pageEnterNoTransform calc(0.6s / var(--animation-page-transitions, 1)) ease-out forwards;
}

.notifications-list.notifications-ready {
    opacity: 1;
}

/* Staggered animation for notification items */
.notifications-list .notification-item {
    opacity: 0;
}

.notifications-stats {
    color: var(--color-text-muted);
  }

.notifications-list.notifications-ready .notification-item {
    animation: fadeInGentle 0.4s ease-out forwards;
}

.notifications-list.notifications-ready .notification-item:nth-child(1) { animation-delay: 0.1s; }
.notifications-list.notifications-ready .notification-item:nth-child(2) { animation-delay: 0.15s; }
.notifications-list.notifications-ready .notification-item:nth-child(3) { animation-delay: 0.2s; }
.notifications-list.notifications-ready .notification-item:nth-child(4) { animation-delay: 0.25s; }
.notifications-list.notifications-ready .notification-item:nth-child(5) { animation-delay: 0.3s; }
.notifications-list.notifications-ready .notification-item:nth-child(6) { animation-delay: 0.35s; }
.notifications-list.notifications-ready .notification-item:nth-child(7) { animation-delay: 0.4s; }
.notifications-list.notifications-ready .notification-item:nth-child(8) { animation-delay: 0.45s; }
.notifications-list.notifications-ready .notification-item:nth-child(9) { animation-delay: 0.5s; }
.notifications-list.notifications-ready .notification-item:nth-child(10) { animation-delay: 0.55s; }
.notifications-list.notifications-ready .notification-item:nth-child(11) { animation-delay: 0.6s; }
.notifications-list.notifications-ready .notification-item:nth-child(12) { animation-delay: 0.65s; }
.notifications-list.notifications-ready .notification-item:nth-child(13) { animation-delay: 0.7s; }
.notifications-list.notifications-ready .notification-item:nth-child(14) { animation-delay: 0.75s; }
.notifications-list.notifications-ready .notification-item:nth-child(15) { animation-delay: 0.8s; }

/* Loading state animation for notifications */
.notification-loading {
    opacity: 0;
    animation: fadeInGentle 0.4s ease-out forwards;
}

/* Error state animation for notifications */
.notification-error {
    opacity: 0;
    animation: fadeInGentle 0.5s ease-out forwards;
    animation-delay: 0.2s;
}

/* No notifications message animation */
.no-notifications {
    opacity: 0;
    animation: fadeInGentle 0.5s ease-out forwards;
    animation-delay: 0.2s;
}

/* Publishing Target Selector */
.publish-target-selector {
  position: relative;
}

.publish-target-button {
  gap: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.publish-target-label {
  flex: 1;
  text-align: left;
}

.publish-target-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.publish-target-arrow.open {
  transform: rotate(180deg);
}

.publish-target-dropdown {
  position: absolute;
  bottom: 100%;
  margin-bottom: 0.25rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 -4px 24px var(--color-shadow-dark);
  z-index: 1000;
  animation: dropdownSlideUp 0.15s ease-out;
}

.publish-target-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
  gap: 0.4rem;
}

.publish-target-option:last-child {
  border-bottom: none;
}

.publish-target-option:hover:not(:disabled) {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.publish-target-option.active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.publish-target-check {
  color: var(--color-link);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

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

/* Home Page Selector (Settings) */
.home-page-selector {
  position: relative;
  min-width: 150px;
}

.home-page-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
  padding: 0.5rem;
  font-size: 0.9rem;
  font-family: adobe-jenson-pro, serif;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  height: 2.5rem;
  white-space: nowrap;
}

.home-page-button:hover:not(:disabled) {
  background-color: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.home-page-label {
  flex: 1;
  text-align: left;
}

.home-page-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.home-page-arrow.open {
  transform: rotate(180deg);
}

.home-page-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 24px var(--color-shadow-dark);
  z-index: 1000;
  animation: dropdownSlideIn 0.15s ease-out;
}

.home-page-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.home-page-option:last-child {
  border-bottom: none;
}

.home-page-option:hover:not(:disabled) {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.home-page-option.active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.home-page-check {
  color: var(--color-link);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Fullscreen Behavior Selector Styles - Match existing dropdown pattern exactly */
.fullscreen-behavior-selector {
  position: relative;
  min-width: 200px;
}

.fullscreen-behavior-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--color-input-background);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 0.5rem 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fullscreen-behavior-button:hover:not(:disabled) {
  border-color: var(--color-border-light);
  background: var(--color-button-hover);
  color: var(--color-text);
}

.fullscreen-behavior-button:focus {
  outline: none;
  border-color: var(--color-link);
}

.fullscreen-behavior-label {
  font-weight: 500;
}

.fullscreen-behavior-arrow {
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.fullscreen-behavior-arrow.open {
  transform: rotate(180deg);
}

.fullscreen-behavior-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 24px var(--color-shadow-dark);
  z-index: 1000;
  animation: dropdownSlideIn 0.15s ease-out;
}

.fullscreen-behavior-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.fullscreen-behavior-option:last-child {
  border-bottom: none;
}

.fullscreen-behavior-option:hover:not(:disabled) {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.fullscreen-behavior-option.active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.fullscreen-behavior-option-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.fullscreen-behavior-option-label {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.fullscreen-behavior-option-description {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

.fullscreen-behavior-check {
  color: var(--color-link);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Name Slot Selector Styles - Match existing dropdown pattern exactly */
.name-slot-selector {
  position: relative;
  min-width: 150px;
}

.name-slot-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
  padding: 0.5rem;
  font-size: 0.9rem;
  font-family: adobe-jenson-pro, serif;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  height: 2.5rem;
  white-space: nowrap;
}

.name-slot-button:hover:not(:disabled) {
  background-color: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.name-slot-label {
  flex: 1;
  text-align: left;
}

.name-slot-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.name-slot-arrow.open {
  transform: rotate(180deg);
}

.name-slot-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 24px var(--color-shadow-dark);
  z-index: 1000;
  animation: dropdownSlideIn 0.15s ease-out;
}

.name-slot-dropdown .name-slot-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.name-slot-dropdown .name-slot-option:last-child {
  border-bottom: none;
}

.name-slot-dropdown .name-slot-option:hover:not(:disabled) {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.name-slot-dropdown .name-slot-option.active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.name-slot-check {
  color: var(--color-link);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Publishing Target Glow Effects */
.post-card.post-composer {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-card.post-composer.publish-target-bluesky {
  border-color: rgba(74, 158, 255, 0.6);
  animation: blueskyComposerPulse 3s ease-in-out infinite;
}

.post-card.post-composer.publish-target-anisota {
  border-color: rgba(255, 149, 0, 0.6);
  animation: anisotaComposerPulse 3s ease-in-out infinite;
}



.post-card.post-composer.publish-target-bluesky::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.25), rgba(74, 158, 255, 0.05));
  z-index: -1;
  pointer-events: none;
}

.post-card.post-composer.publish-target-anisota::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.25), rgba(255, 149, 0, 0.05));
  z-index: -1;
  pointer-events: none;
}



/* Pulse animations for post composer glow effects */
@keyframes blueskyComposerPulse {
  0% {
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.9);
  }
  100% {
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.6);
  }
}

@keyframes anisotaComposerPulse {
  0% {
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 149, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.6);
  }
}

/* Primary button pulse animation - anisota orange glow */
@keyframes primaryButtonPulse {
  0% {
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
    border-color: rgba(255, 149, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 149, 0, 0.6);
    border-color: rgba(255, 149, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
    border-color: rgba(255, 149, 0, 0.6);
  }
}



/* Post embeds in composer */
.post-embeds-preview {
    margin-top: 12px;
    padding: 0;
    /* Ensure it takes up the space it needs within the flex container */
    flex: 0 0 auto;
}

.post-embed-preview {
    margin-bottom: 8px;
    /* Smooth fade-in animation for embed previews */
    opacity: 0;
    animation: embedFadeIn calc(0.3s / var(--animation-overall, 1)) ease-out forwards;
}

.post-embed-preview:last-child {
    margin-bottom: 0;
}

/* Quote post preview should look like regular embeds */
.post-embed-preview.quote-post-preview {
    /* No special styling - use default embed appearance */
}

.post-embed-content {
    /* Remove custom styling to let the existing embedded-quote styles take precedence */
}

/* Keep the existing embedded-quote styles intact for composer embeds */
.post-embed-content .embedded-quote {
    /* Use the existing embedded-quote styles from the main CSS */
}

.post-embed-content .embedded-quote-author {
    /* Use the existing embedded-quote-author styles from the main CSS */
}

.post-embed-loading,
.post-embed-error {
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    text-align: center;
}

.post-embed-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.post-embed-loading-text {
    color: var(--color-text-muted);
    font-size: 0.9em;
}

.post-embed-error-text {
    color: var(--color-error);
    font-size: 0.9em;
}

/* Ensure embedded posts don't interfere with composer interactions */
.post-embed-content * {
    pointer-events: none;
}

/* Light theme adjustments for loading/error states only */
[data-theme="light"] .post-embed-loading,
[data-theme="light"] .post-embed-error {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 599px) {
    .post-embed-preview {
        max-width: 100%;
        height: auto;
    }
}

.post-embed-content {
  pointer-events: none;
  position: relative;
}

.post-embed-content * {
  pointer-events: auto;
}

.post-embed-content a,
.post-embed-content button {
  pointer-events: none !important;
}

.post-embed-remove {
  position: absolute;
  top: 8px;
  right: 0px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid var(--color-border);
  width: 26px;
  height: 26px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  pointer-events: auto !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  padding-bottom: 3px;
}

.post-embed-remove:hover {
  background: rgba(255, 0, 0, 0.8);
  transform: scale(1.1);
}

.post-embed-edit {
  position: absolute;
  top: 8px;
  right: 32px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid var(--color-border);
  width: 26px;
  height: 26px;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
  pointer-events: auto !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.post-embed-edit:hover {
  background: rgba(74, 158, 255, 0.8);
  transform: scale(1.1);
}

.post-embed-preview {
  position: relative;
}

[data-theme="light"] .post-embed-loading,
[data-theme="light"] .post-embed-error {
  background: rgba(0, 0, 0, 0.05);
}

/* New unified scrollable container for textarea and embeds */
.post-composer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.post-composer-content::-webkit-scrollbar {
    display: none; /* WebKit browsers */
}

/* ===== IMAGE UPLOAD STYLES ===== */

/* Mobile responsive height for media upload button */
@media (max-width: 768px) {
    .image-upload-button, .media-upload-button {
        height: 2.2rem;
        width: 2.2rem;
        padding: 0.4rem;
    }
}

.image-upload-button:disabled, .media-upload-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-upload-button .icon-button-icon, .media-upload-button .icon-button-icon {
    width: 1.2rem;
    height: 1.2rem;
}

/* Image count badge */
.image-count-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.3rem;
    background: #ff9500;
    color: white;
    font-size: var(--font-size-0-7);
    font-weight: bold;
    width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

/* Image previews container */
.image-previews {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-background-secondary);
    /* Smooth fade-in animation for image previews */
    opacity: 0;
    animation: embedFadeIn calc(0.3s / var(--animation-overall, 1)) ease-out forwards;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.image-preview {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-preview:hover {
    transform: scale(1.02);
}

.image-preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-alt-indicator {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.image-remove-button {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--font-size-1);
    font-weight: bold;
    transition: background 0.2s ease;
}

.image-remove-button:hover {
    background: rgba(220, 38, 38, 0.9);
}

.image-info {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
}

/* Video preview container */
.video-preview-container {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-background-secondary);
    opacity: 0;
    animation: embedFadeIn calc(0.3s / var(--animation-overall, 1)) ease-out forwards;
}

.video-preview {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.video-preview-player {
    width: 100%;
    display: block;
    max-height: 400px;
}

.video-alt-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: var(--font-size-0-75);
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.video-remove-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.video-remove-button:hover {
    background: rgba(220, 38, 38, 0.9);
}

.video-info {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    justify-content: center;
}

.video-alt-button {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    font-size: var(--font-size-0-85);
    text-decoration: underline;
    font-family: inherit;
}

.video-alt-button:hover {
    color: var(--color-primary-hover);
}

/* Existing video preview (when editing posts) */
.video-preview-container.existing-video .video-preview {
    background: var(--color-background-secondary);
}

.video-preview-thumbnail {
    width: 100%;
    display: block;
    max-height: 400px;
    object-fit: contain;
}

.video-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 1rem;
    color: var(--color-text-muted);
    background: var(--color-background);
}

.video-preview-placeholder svg {
    opacity: 0.5;
}

.video-preview-placeholder span {
    font-size: var(--font-size-0-9);
}

.existing-video-notice {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 12px;
    font-size: var(--font-size-0-75);
    pointer-events: none;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
}

/* Video upload progress */
.video-upload-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    overflow: hidden;
}

.video-upload-progress-bar {
    height: 100%;
    background: var(--color-glow-anisota);
    transition: width 0.3s ease;
}

/* Bluesky target - blue progress bar */
.post-composer.publish-target-bluesky .video-upload-progress-bar {
    background: rgb(74, 158, 255);
}

/* Anisota target - orange progress bar */
.post-composer.publish-target-anisota .video-upload-progress-bar {
    background: rgb(255, 149, 0);
}

/* Processing state for media upload button (images) */
.media-upload-button:disabled.processing {
    position: relative;
    overflow: hidden;
}

/* Uploading state for media upload button (videos) */
.media-upload-button:disabled.uploading {
    position: relative;
    overflow: hidden;
}

.media-upload-button:disabled.uploading::after,
.media-upload-button:disabled.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer-sweep 1.5s infinite;
}


@keyframes shimmer-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Link Embed Edit Modal */
.link-embed-edit-modal {
    max-width: 600px;
}

.link-embed-edit-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-x: hidden;
}

/* Feature Lock Banner */
.feature-lock-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    margin-bottom: 0.5rem;
}

.feature-lock-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.feature-lock-content svg {
    color: var(--color-glow-anisota);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-lock-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-lock-text strong {
    color: var(--color-text);
    font-size: var(--font-size-1);
}

.feature-lock-text p {
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    margin: 0;
}

.feature-lock-upgrade-btn {
    padding: 0.5rem 1rem;
    background: var(--color-glow-anisota);
    color: var(--color-text-inverse);
    border: none;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.feature-lock-upgrade-btn:hover {
    opacity: 0.8;
}

/* Locked state styling */
.link-embed-edit-modal-locked-wrapper {
    pointer-events: none;
}

.link-embed-edit-modal-locked-wrapper .feature-lock-banner {
    pointer-events: auto;
}

.link-embed-edit-modal-locked-wrapper .content-locked {
    opacity: 0.5;
    filter: grayscale(50%);
}

.link-embed-edit-modal-locked-wrapper .link-embed-edit-input:disabled,
.link-embed-edit-modal-locked-wrapper .link-embed-edit-textarea:disabled {
    cursor: not-allowed;
    background: var(--color-background-secondary);
}

.link-embed-edit-modal-locked-wrapper .link-embed-upload-btn:disabled,
.link-embed-edit-modal-locked-wrapper .link-embed-remove-upload-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.link-embed-edit-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-embed-edit-preview-label {
    font-size: var(--font-size-0-9);
    font-weight: 600;
    color: var(--color-text);
}

.link-embed-edit-preview-card {
    pointer-events: none;
    max-width: 100%;
    overflow: hidden;
}

.link-embed-edit-preview-card img {
    max-width: 100%;
    height: auto;
}

.link-embed-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-embed-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-embed-edit-label {
    font-size: var(--font-size-0-9);
    font-weight: 600;
    color: var(--color-text);
}

.link-embed-edit-input,
.link-embed-edit-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-input-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: var(--font-size-1);
    font-family: adobe-jenson-pro, serif;
    box-sizing: border-box;
}

.link-embed-edit-textarea {
    resize: vertical;
    min-height: 80px;
}

.link-embed-edit-input:focus,
.link-embed-edit-textarea:focus {
    outline: none;
    border-color: var(--color-glow-anisota);
}

.link-embed-edit-count {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    text-align: right;
}

.link-embed-image-upload {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.link-embed-upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-button-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.link-embed-upload-btn:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.link-embed-remove-upload-btn {
    padding: 0.5rem 1rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-85);
    cursor: pointer;
    transition: all 0.2s ease;
}

.link-embed-remove-upload-btn:hover:not(:disabled) {
    color: var(--color-error);
    border-color: var(--color-error);
}

.link-embed-image-divider {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-85);
    margin: 0.5rem 0;
}

.link-embed-upload-info {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    font-style: italic;
}

/* Image alt text modal */
.image-alt-modal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.image-alt-preview {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
}

.image-alt-preview-image {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid var(--color-border);
}

.image-alt-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-alt-label {
    font-weight: 500;
    color: var(--color-text);
    font-size: var(--font-size-1);
}

.image-alt-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-input-background);
    color: var(--color-text);
    font-size: var(--font-size-1);
    font-family: adobe-jenson-pro, serif;
    resize: vertical;
    box-sizing: border-box;
}
.image-alt-textarea:focus {
    outline: none;
    border-color: #ff9500;
    box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.1);
}

.image-alt-count {
    text-align: right;
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
}

.image-alt-help {
    font-size: var(--font-size-0-85);
    color: var(--color-text-muted);
    line-height: 1.4;
}

.image-alt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.image-alt-actions .button-primary,
.image-alt-actions .button-secondary {
    font-family: adobe-jenson-pro, serif;
    padding: 0.5rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    
    .image-alt-preview-image {
        max-width: 150px;
        max-height: 150px;
    }
}

/* ===== ENHANCED EMPTY STATE FOR LISTS PAGES ===== */
/* These styles must come at the end to override general empty-state styles */

/* Enhanced empty state for lists pages only - matches list item container size */
.account-lists-page .empty-state,
.post-lists-page .empty-state {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    padding: 2rem 1rem !important;
    background: transparent !important;
    border: 1px dashed var(--color-border-light) !important;
    color: var(--color-text-secondary) !important;
    font-family: adobe-jenson-pro, serif !important;
    transition: border-color 0.2s ease !important;
    min-height: 120px !important; /* Similar height to a list item with content */
    box-sizing: border-box !important;
    text-align: center !important;
}

.account-lists-page .empty-state:hover,
.post-lists-page .empty-state:hover {
    border-color: var(--color-border) !important;
}

.account-lists-page .empty-state h3,
.post-lists-page .empty-state h3 {
    font-size: var(--font-size-1-25) !important;
    margin-bottom: 0.5rem !important;
    color: var(--color-text) !important;
    font-weight: normal !important;
    font-family: adobe-jenson-pro, serif !important;
}

.account-lists-page .empty-state p,
.post-lists-page .empty-state p {
    font-size: var(--font-size-1) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    font-family: adobe-jenson-pro, serif !important;
}

/* Inventory Page Styles */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
}

/* Mobile responsive - 2 columns for narrow screens */
@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px; /* Slightly larger gap for better touch targets */
    }
}

/* Mobile responsive - 2 columns for narrow screens */
@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px; /* Slightly larger gap for better touch targets */
    }
}

.inventory-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    text-align: center;
    min-height: 80px;
    box-sizing: border-box;
    min-width: 0; /* Prevent grid items from overflowing */
}

.inventory-item:hover {
    background: var(--color-card-background-hover);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px var(--item-type-color, var(--color-border-light));
    z-index: 1;
}

.inventory-item:active {
    transform: translateY(0);
    background: var(--color-card-background-active);
}

.inventory-item-quantity {
    position: absolute;
    top: 0rem;
    right: 0rem;
    background: var(--item-type-color, var(--color-accent));
    color: white;
    font-size: var(--font-size-0-7);
    font-weight: bold;
    min-width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.inventory-item-name {
    font-size: var(--font-size-1);
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.2;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Inventory Summary */
.inventory-summary {
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    text-align: center;
}

.inventory-summary p {
    margin: 0;
    font-size: var(--font-size-0-875);
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Tablet responsive - keep 4 columns */
@media (max-width: 768px) {
    .inventory-item-name {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Mobile responsive - optimize for 2 columns */
/* Mobile responsive - optimize for 2 columns */
@media (max-width: 480px) {
    .settings-container {
        padding: 0 0.5rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .inventory-item {
        min-height: 70px;
        padding: 0.4rem;
    }
    
    .collection-item {
        min-height: 70px;
        padding: 0.4rem;
    }
    
    /* Adjust item names for better readability in 2-column layout */
    .inventory-item-name,
    .collection-item-name {
        font-size: var(--font-size-0-9);
        line-height: 1.1;
    }
    
    /* Adjust subtitles for collection items */
    .collection-item-subtitle {
        font-size: var(--font-size-0-8);
        line-height: 1.1;
    }
    
    .collection-item {
        min-height: 70px;
        padding: 0.4rem;
    }
    
    /* Adjust item names for better readability in 2-column layout */
    .inventory-item-name,
    .collection-item-name {
        font-size: var(--font-size-0-9);
        line-height: 1.1;
    }
    
    /* Adjust subtitles for collection items */
    .collection-item-subtitle {
        font-size: var(--font-size-0-8);
        line-height: 1.1;
    }
}

/* =================================================================
   SPECIAL CASES: Ensure combinations work correctly
   ================================================================= */

/* Liked + Repost indicator: Pink always wins */



/* =================================================================
   GLOW EFFECTS DOCUMENTATION AND FUTURE-PROOFING
   ================================================================= */

/*
   CURRENT GLOW EFFECTS IN THE SYSTEM:
   
   1. LIKED POSTS (.liked)
      - Color: Pink (#ff44bf / rgba(255, 68, 191, 0.75))
      - Priority: HIGHEST (always takes precedence)
      - Applied when: User has liked a post
   
   2. REPOSTED POSTS (.reposted) 
      - Color: Green (#22c55e / rgba(34, 197, 94, 0.75))
      - Priority: SECOND (only if not liked)
      - Applied when: User has reposted a post
   
   3. PUBLISHING TARGET GLOWS (post composer only)
      - Bluesky (.publish-target-bluesky): Blue (rgba(255, 149, 0, 0.75))
      - Anisota (.publish-target-anisota): Orange (#ff9500)
      - Priority: THIRD (only if not liked/reposted)
   
   POTENTIAL FUTURE GLOW EFFECTS:
   - Notification-related glows
   - Draft status glows
   - Queue/scheduled post glows
   - User interaction state glows
   - Theme-specific accent glows
   
   CONFLICT RESOLUTION PRIORITY ORDER:
   1. Liked (pink) - always wins
   2. Reposted (green) - if not liked
   3. Publishing targets (blue/orange) - if not liked/reposted
   4. Future effects - should follow this hierarchy
   
   INDICATOR TYPES THAT NEED COLOR MATCHING:
   - Pin indicators (.post-card-pin-indicator)
   - Any future status indicators at the top of cards
*/

/* =================================================================
   FUTURE-PROOFING: Generic glow effect matching
   ================================================================= */

/* 
   For future glow effects, use CSS custom properties to automatically
   match pin indicator colors. Example usage:
   
   .post-card.new-glow-effect {
     --glow-bg-color: rgba(123, 45, 67, 0.2);
     --glow-text-color: #7b2d43;
     --glow-border-color: rgba(123, 45, 67, 0.3);
   }
*/

/* Anisota post glow effect - follows the same pattern as liked/reposted posts */
.post-card.anisota-post .card-front,
.post-card.anisota-post .card-back {
    /* Orange glow for anisota posts */
    box-shadow: 0 0 25px var(--color-glow-anisota);
    border: 2px solid var(--color-glow-anisota);
    animation: anisotaPulseOptimized 3s ease-in-out infinite;
    will-change: box-shadow; /* Only animate shadow */
}

/* Hide glow on anisota cards when they are not interactive (not on top) */
.post-card.anisota-post:not(.interactive) .card-front,
.post-card.anisota-post:not(.interactive) .card-back {
    box-shadow: 0 4px 24px var(--color-shadow);
    border: 2px solid var(--color-border);
    filter: brightness(1);
    animation: none;
}

/* When anisota posts are liked, like glow takes precedence */
.post-card.anisota-post.liked .card-front,
.post-card.anisota-post.liked .card-back {
    box-shadow: 0 0 25px var(--color-glow-like) !important;
    border: 2px solid var(--color-notification-like) !important;
    animation: likedPulseOptimized 3s ease-in-out infinite !important;
    will-change: box-shadow !important;
}

/* When anisota posts are reposted, repost glow takes precedence */
.post-card.anisota-post.reposted .card-front,
.post-card.anisota-post.reposted .card-back {
    box-shadow: 0 0 25px var(--color-glow-repost) !important;
    border: 2px solid var(--color-notification-repost) !important;
    animation: repostedPulseOptimized 3s ease-in-out infinite !important;
    will-change: box-shadow !important;
}

/* Pin indicator styling for anisota posts */
.post-card.anisota-post:not(.liked):not(.reposted) .post-card-pin-indicator {
    background: var(--color-glow-anisota-dark) !important;
    color: var(--color-glow-anisota) !important;
    border-bottom: 1px solid var(--color-glow-anisota-hover) !important;
}

/* Mobile optimization for anisota posts */
@media (max-width: 768px) {
    .post-card.anisota-post .card-front,
    .post-card.anisota-post .card-back {
        /* Simplified glow for mobile */
        box-shadow: 0 0 15px var(--color-glow-anisota);
        animation: anisotaPulseOptimized 3s ease-in-out infinite;
    }
    
    /* Mobile: When anisota posts are liked */
    .post-card.anisota-post.liked .card-front,
    .post-card.anisota-post.liked .card-back {
        box-shadow: 0 0 15px var(--color-glow-like) !important;
        animation: likedPulseOptimized 3s ease-in-out infinite !important;
    }
    
    /* Mobile: When anisota posts are reposted */
    .post-card.anisota-post.reposted .card-front,
    .post-card.anisota-post.reposted .card-back {
        box-shadow: 0 0 15px var(--color-glow-repost) !important;
        animation: repostedPulseOptimized 3s ease-in-out infinite !important;
    }
}

/* =================================================================
   ANISOTA THREAD POST BORDER OVERRIDES
   ================================================================= */

/* Override thread post borders for anisota posts - use orange glow color */
.post-card.thread-post.anisota-post:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post:has(.card-inner) .card-back {
    /* Default: solid top/bottom with orange, dashed left/right with orange */
    border-top: 2px solid var(--color-glow-anisota) !important;
    border-bottom: 2px solid var(--color-glow-anisota) !important;
    border-left: 1px dashed var(--color-glow-anisota) !important;
    border-right: 1px dashed var(--color-glow-anisota) !important;
}

/* First child in anisota thread: solid right border with orange */
.post-card.thread-post.anisota-post[data-thread-position="0"]:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post[data-thread-position="0"]:has(.card-inner) .card-back {
    border-right: 2px solid var(--color-glow-anisota) !important;
}

/* Last child in anisota thread: solid left border with orange */
.post-card.thread-post.anisota-post[data-thread-last="true"]:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post[data-thread-last="true"]:has(.card-inner) .card-back {
    border-left: 2px solid var(--color-glow-anisota) !important;
}

/* Flipped anisota thread card backs with orange borders */
/* First child in anisota thread: when flipped, back should have solid left, dashed right with orange */
.post-card.thread-post.anisota-post[data-thread-position="0"].flipped .card-back {
    border-left: 2px solid var(--color-glow-anisota) !important;
    border-right: 1px dashed var(--color-glow-anisota) !important;
}

/* Last child in anisota thread: when flipped, back should have dashed left, solid right with orange */
.post-card.thread-post.anisota-post[data-thread-last="true"].flipped .card-back {
    border-left: 1px dashed var(--color-glow-anisota) !important;
    border-right: 2px solid var(--color-glow-anisota) !important;
}

/* For anisota thread posts without flip structure */
.post-card.thread-post.anisota-post:not(:has(.card-inner)) {
    /* Default: solid top/bottom with orange, dashed left/right with orange */
    border-left: 1px solid var(--color-glow-anisota) !important;
    border-right: 1px solid var(--color-glow-anisota) !important;
    border-top: 1px dashed var(--color-glow-anisota) !important;
    border-bottom: 1px dashed var(--color-glow-anisota) !important;
}

/* First child in anisota thread: solid right border (no flip structure) */
.post-card.thread-post.anisota-post[data-thread-position="0"]:not(:has(.card-inner)) {
    border-right: 2px solid var(--color-glow-anisota) !important;
}

/* Last child in anisota thread: solid left border (no flip structure) */
.post-card.thread-post.anisota-post[data-thread-last="true"]:not(:has(.card-inner)) {
    border-left: 2px solid var(--color-glow-anisota) !important;
}

/* =================================================================
   ANISOTA THREAD POST INTERACTION OVERRIDES (LIKED/REPOSTED)
   ================================================================= */

/* When anisota thread posts are liked, use pink border color */
.post-card.thread-post.anisota-post.liked:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post.liked:has(.card-inner) .card-back {
    /* Default: solid top/bottom with pink, dashed left/right with pink */
    border-top: 2px solid var(--color-notification-like) !important;
    border-bottom: 2px solid var(--color-notification-like) !important;
    border-left: 1px dashed var(--color-notification-like) !important;
    border-right: 1px dashed var(--color-notification-like) !important;
}

/* First child in liked anisota thread: solid right border with pink */
.post-card.thread-post.anisota-post.liked[data-thread-position="0"]:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post.liked[data-thread-position="0"]:has(.card-inner) .card-back {
    border-right: 2px solid var(--color-notification-like) !important;
}

/* Last child in liked anisota thread: solid left border with pink */
.post-card.thread-post.anisota-post.liked[data-thread-last="true"]:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post.liked[data-thread-last="true"]:has(.card-inner) .card-back {
    border-left: 2px solid var(--color-notification-like) !important;
}

/* Flipped liked anisota thread card backs with pink borders */
.post-card.thread-post.anisota-post.liked[data-thread-position="0"].flipped .card-back {
    border-left: 2px solid var(--color-notification-like) !important;
    border-right: 1px dashed var(--color-notification-like) !important;
}

.post-card.thread-post.anisota-post.liked[data-thread-last="true"].flipped .card-back {
    border-left: 1px dashed var(--color-notification-like) !important;
    border-right: 2px solid var(--color-notification-like) !important;
}

/* For liked anisota thread posts without flip structure */
.post-card.thread-post.anisota-post.liked:not(:has(.card-inner)) {
    border-left: 1px solid var(--color-notification-like) !important;
    border-right: 1px solid var(--color-notification-like) !important;
    border-top: 1px dashed var(--color-notification-like) !important;
    border-bottom: 1px dashed var(--color-notification-like) !important;
}

.post-card.thread-post.anisota-post.liked[data-thread-position="0"]:not(:has(.card-inner)) {
    border-right: 2px solid var(--color-notification-like) !important;
}

.post-card.thread-post.anisota-post.liked[data-thread-last="true"]:not(:has(.card-inner)) {
    border-left: 2px solid var(--color-notification-like) !important;
}

/* When anisota thread posts are reposted, use green border color */
.post-card.thread-post.anisota-post.reposted:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post.reposted:has(.card-inner) .card-back {
    /* Default: solid top/bottom with green, dashed left/right with green */
    border-top: 2px solid var(--color-notification-repost) !important;
    border-bottom: 2px solid var(--color-notification-repost) !important;
    border-left: 1px dashed var(--color-notification-repost) !important;
    border-right: 1px dashed var(--color-notification-repost) !important;
}

/* First child in reposted anisota thread: solid right border with green */
.post-card.thread-post.anisota-post.reposted[data-thread-position="0"]:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post.reposted[data-thread-position="0"]:has(.card-inner) .card-back {
    border-right: 2px solid var(--color-notification-repost) !important;
}

/* Last child in reposted anisota thread: solid left border with green */
.post-card.thread-post.anisota-post.reposted[data-thread-last="true"]:has(.card-inner) .card-front,
.post-card.thread-post.anisota-post.reposted[data-thread-last="true"]:has(.card-inner) .card-back {
    border-left: 2px solid var(--color-notification-repost) !important;
}

/* Flipped reposted anisota thread card backs with green borders */
.post-card.thread-post.anisota-post.reposted[data-thread-position="0"].flipped .card-back {
    border-left: 2px solid var(--color-notification-repost) !important;
    border-right: 1px dashed var(--color-notification-repost) !important;
}

.post-card.thread-post.anisota-post.reposted[data-thread-last="true"].flipped .card-back {
    border-left: 1px dashed var(--color-notification-repost) !important;
    border-right: 2px solid var(--color-notification-repost) !important;
}

/* For reposted anisota thread posts without flip structure */
.post-card.thread-post.anisota-post.reposted:not(:has(.card-inner)) {
    border-left: 1px solid var(--color-notification-repost) !important;
    border-right: 1px solid var(--color-notification-repost) !important;
    border-top: 1px dashed var(--color-notification-repost) !important;
    border-bottom: 1px dashed var(--color-notification-repost) !important;
}

.post-card.thread-post.anisota-post.reposted[data-thread-position="0"]:not(:has(.card-inner)) {
    border-right: 2px solid var(--color-notification-repost) !important;
}

.post-card.thread-post.anisota-post.reposted[data-thread-last="true"]:not(:has(.card-inner)) {
    border-left: 2px solid var(--color-notification-repost) !important;
}

/* =================================================================
   ANISOTA POST RARITY INDICATOR OVERRIDE
   ================================================================= */

/* Hide rarity indicator on anisota posts */
.post-card.anisota-post .rarity-indicator {
    display: none !important;
}

/* =================================================================
   MENTION TYPEAHEAD STYLES
   ================================================================= */

.mention-typeahead {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px var(--color-shadow);
    min-width: 280px;
    max-width: 320px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    /* Performance optimizations */
    contain: layout;
    will-change: transform, opacity;
    /* Hide scrollbar for webkit browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Initial state for animations */
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.95);
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.4, 1), 
                transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.mention-typeahead::-webkit-scrollbar {
    display: none;
}

/* Animation states for mention typeahead */
.mention-typeahead.mention-typeahead-enter {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.mention-typeahead.mention-typeahead-exit {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px) scale(0.98);
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.6, 1), 
                transform 0.15s cubic-bezier(0.4, 0, 0.6, 1);
}

/* Inline typeahead for modal footer */
.mention-typeahead-inline {
    /* Reset positioning styles from regular typeahead */
    position: static !important;
    transform: none !important;
    z-index: auto !important;
    min-width: auto !important;
    max-width: none !important;
    width: 100% !important;
    box-shadow: none !important;
    
    /* Reset border styles - modal footer already has top border */
    border: none !important;
    border-radius: 0 !important;
    
    /* Initial state for animations */
    opacity: 0;
    max-height: 0;
    transition: opacity 0.15s ease, max-height 0.15s ease;
    
    /* Container styling for inline typeahead */
    background-color: var(--color-background);
    max-height: 180px;
    overflow-y: auto;
}

/* Search context typeahead */
.mention-typeahead-search {
    /* Additional styles specific to search context can go here */
}

/* Empty state for typeahead */
.mention-typeahead-empty {
    padding: 12px;
    text-align: center;
    color: var(--color-text-muted);
}

/* Typeahead item container */
.mention-typeahead-item-container {
    padding: 12px 16px;
    cursor: pointer;
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
}

.mention-typeahead-item-container:last-child {
    border-bottom: none;
}

.mention-typeahead-item-container.selected,
.mention-typeahead-item-container:hover {
    background-color: var(--color-hover);
}

/* Typeahead avatar */
.mention-typeahead-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-typeahead-avatar.error {
    opacity: 0.5;
}

/* Typeahead item info container */
.mention-typeahead-item-info {
    flex: 1;
    min-width: 0;
}

/* Typeahead item display name */
.mention-typeahead-item-display-name {
    font-weight: 500;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Typeahead item handle */
.mention-typeahead-item-handle-text {
    color: var(--color-text-muted);
    font-size: 0.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-typeahead-inline.mention-typeahead-enter {
    opacity: 1;
    max-height: 200px;
}

.mention-typeahead-loading {
    padding: 12px 16px;
    color: var(--color-text-muted);
    font-size: 0.9em;
    font-family: adobe-jenson-pro, serif;
    text-align: center;
}

.mention-typeahead-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
    /* Subtle initial offset for staggered entrance */
    transform: translateY(0);
}

/* Subtle hover lift effect for typeahead items */
.mention-typeahead-item:hover {
    transform: translateY(-1px);
}

.mention-typeahead-item:last-child {
    border-bottom: none;
}

.mention-typeahead-item.selected {
    background: var(--color-card-background-hover);
    transform: translateY(-1px);
}

.mention-typeahead-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
}

.mention-typeahead-item-details {
    flex: 1;
    min-width: 0;
}

.mention-typeahead-item-name {
    font-weight: 500;
    font-size: 0.9em;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-typeahead-item-handle {
    color: var(--color-text-muted);
    font-size: 0.8em;
    font-family: adobe-jenson-pro, serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Facet styling for mentions in composer */
.rich-text-overlay .facet-mention {
    color: var(--color-link);
    background: rgba(74, 158, 255, 0.15);
    transition: background-color 0.2s ease;
}

.rich-text-overlay .facet-link {
    color: var(--color-link);
    background: rgba(74, 158, 255, 0.10);
    transition: background-color 0.2s ease;
}

.rich-text-overlay .facet-tag {
    color: var(--color-warning);
    background: rgba(255, 152, 0, 0.15);
    transition: background-color 0.2s ease;
}

/* Dynamic facet colors based on publish target */
.post-composer.publish-target-bluesky .rich-text-overlay .facet-mention {
    color: rgb(74, 158, 255);
    background: rgba(74, 158, 255, 0.15);
}

.post-composer.publish-target-bluesky .rich-text-overlay .facet-link {
    color: rgb(74, 158, 255);
    background: rgba(74, 158, 255, 0.10);
}

.post-composer.publish-target-bluesky .rich-text-overlay .facet-tag {
    color: rgb(74, 158, 255);
    background: rgba(74, 158, 255, 0.15);
}

.post-composer.publish-target-anisota .rich-text-overlay .facet-mention {
    color: rgb(255, 149, 0);
    background: rgba(255, 149, 0, 0.15);
}

.post-composer.publish-target-anisota .rich-text-overlay .facet-link {
    color: rgb(255, 149, 0);
    background: rgba(255, 149, 0, 0.10);
}

.post-composer.publish-target-anisota .rich-text-overlay .facet-tag {
    color: rgb(255, 149, 0);
    background: rgba(255, 149, 0, 0.15);
}

/* =================================================================
   ITEM DETAIL MODAL STYLES
   ================================================================= */


.item-detail-modal .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
}

.item-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.item-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-quantity-large {
    font-size: var(--font-size-1);
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
}

.item-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-type-badge,
.item-rarity-badge {
    font-size: var(--font-size-0-7);
    font-weight: 600;
    color: white;
    padding: 0.2rem 0.5rem;
    text-transform: capitalize;
    font-family: adobe-jenson-pro, serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.item-description {
    flex: 1;
    margin-bottom: 0.5rem;
}

.item-description p {
    font-size: var(--font-size-0-9);
    line-height: 1.4;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    margin: 0;
    font-style: italic;
}

.item-effects {
    margin-bottom: 0.5rem;
}

.item-effects h4 {
    font-size: var(--font-size-0-9);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    font-family: adobe-jenson-pro, serif;
}

.item-effects ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-effects li {
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
    font-family: adobe-jenson-pro, serif;
}

/* Energy item effects styling */
.energy-item-effects {
    margin-top: 1rem;
}

.energy-effects-label {
    font-size: var(--font-size-0-85);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    font-family: adobe-jenson-pro, serif;
}

.energy-effects-list {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0;
}

.energy-effects-list li {
    font-size: var(--font-size-0-8);
    color: var(--color-text);
    margin-bottom: 0.25rem;
    font-family: adobe-jenson-pro, serif;
}

.item-effects li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

.item-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-top: 1px solid var(--color-border-light);
    margin-top: auto;
}

.value-label {
    font-size: var(--font-size-0-9);
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
}

.value-amount {
    font-size: var(--font-size-0-9);
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
}

.item-actions {
    display: flex;
}

.use-item-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0;
    font-size: var(--font-size-0-9);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.use-item-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.use-item-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .item-detail-modal .modal-content {
        max-width: 90vw;
        width: 90vw;
        height: 90vw;
        max-height: 90vw;
    }
    
    .item-detail-content {
        gap: 0.75rem;
    }
    
    .item-detail-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .item-badges {
        gap: 0.25rem;
    }
    
    .item-type-badge,
    .item-rarity-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    .item-description p {
        font-size: var(--font-size-0-8);
    }
    
    .item-effects h4 {
        font-size: var(--font-size-0-8);
    }
    
    .item-effects li {
        font-size: var(--font-size-0-75);
    }
    
    .value-label,
    .value-amount {
        font-size: var(--font-size-0-8);
    }
    
    .use-item-btn {
        font-size: var(--font-size-0-8);
        padding: 0.4rem 1.2rem;
    }
}

/* =================================================================
   TOOLTIP STYLES
   ================================================================= */

.tooltip-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 1em;
    line-height: 1;
}

.tooltip {
    position: absolute;
    z-index: 9999;
    pointer-events: none;
    font-size: var(--font-size-0-8);
    min-width: 100px;
    max-width: 200px;
    white-space: nowrap;
}

/* Tooltip positioning classes - positioning handled by inline styles in Tooltip component */

.tooltip-content {
    background: var(--color-card-background);
    color: var(--color-text);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-family: adobe-jenson-pro, serif;
    line-height: 1.3;
    text-align: left;
    /* Ensure solid background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Force opacity to ensure solid background */
    opacity: 1;
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tooltip-arrow-top {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-color: var(--color-border) transparent transparent transparent;
}

.tooltip-arrow-top::after {
    content: '';
    position: absolute;
    top: -7px;
    left: -6px;
    width: 0;
    height: 0;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: var(--color-card-background) transparent transparent transparent;
}

.tooltip-arrow-bottom {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent var(--color-border) transparent;
}

.tooltip-arrow-bottom::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: -6px;
    width: 0;
    height: 0;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent var(--color-card-background) transparent;
}

.tooltip-arrow-left {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent var(--color-border);
}

.tooltip-arrow-left::after {
    content: '';
    position: absolute;
    left: -7px;
    top: -6px;
    width: 0;
    height: 0;
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--color-card-background);
}

.tooltip-arrow-right {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--color-border) transparent transparent;
}

.tooltip-arrow-right::after {
    content: '';
    position: absolute;
    right: -7px;
    top: -6px;
    width: 0;
    height: 0;
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent var(--color-card-background) transparent transparent;
}

/* Tooltip engagement stats styling */
.tooltip-engagement-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tooltip-rarity-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.tooltip-stat-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-0-75);
    color: var(--color-text-muted);
    gap: 0.5rem;
    margin-bottom: 0.1rem;
}

.tooltip-stat-line:last-child {
    margin-bottom: 0;
}

.tooltip-stat-value {
    font-weight: 500;
    color: var(--color-text);
    flex-shrink: 0;
}
/* Mobile-specific tooltip adjustments */
@media (max-width: 768px) {
    .tooltip {
        font-size: var(--font-size-0-75);
        max-width: 180px;
    }
    
    .tooltip-content {
        padding: 0.4rem 0.6rem;
    }
    
    .tooltip-stat-line {
        font-size: var(--font-size-0-7);
    }
}

/* Animated placeholder text styles */
.animated-placeholder {
    transition: opacity 0.6s ease-in-out;
    opacity: 0.6;
    display: inline !important;
}

/* Simple fade animation */
.animated-placeholder.fade-simple.fade-out {
    opacity: 0;
}

.animated-placeholder.fade-simple.fade-in {
    opacity: 1;
}

/* Character-by-character fade animation */
.animated-placeholder.fade-by-character .char {
    display: inline-block;
    opacity: 1;
    transition: opacity 0.15s ease-in-out;
}

.animated-placeholder.fade-by-character.fade-out .char {
    opacity: 0;
    transition-delay: var(--char-delay, 0s);
}

.animated-placeholder.fade-by-character.fade-in .char {
    opacity: 0;
    animation: fadeInChar 0.15s ease-in-out forwards;
    animation-delay: var(--char-delay, 0s);
}

@keyframes fadeInChar {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Word-by-word fade animation */
.animated-placeholder.fade-by-word .word {
    display: inline-block;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
    margin-right: 0.25em;
}

.animated-placeholder.fade-by-word .word:last-child {
    margin-right: 0;
}

.animated-placeholder.fade-by-word.fade-out .word {
    opacity: 0;
    transition-delay: var(--word-delay, 0s);
}

.animated-placeholder.fade-by-word.fade-in .word {
    opacity: 0;
    animation: fadeInWord 0.2s ease-in-out forwards;
    animation-delay: var(--word-delay, 0s);
}

@keyframes fadeInWord {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.audio-toggle.interactive-corner-item {
    pointer-events: auto;
  }

/* Soundscape Selector Styles */
.soundscape-selector {
    padding: 0;
    pointer-events: auto;
}

.soundscape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
}

.soundscape-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--color-text);
    min-height: 80px;
}

.soundscape-button:hover {
    background: var(--color-hover);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.soundscape-button:active {
    transform: translateY(0);
}

.soundscape-button.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-background);
}

.soundscape-button.active:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.soundscape-button .lucide {
    stroke-width: 1;
  }

.soundscape-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.soundscape-selector .interactive-corner-item {
    /* Ensure soundscape selector icon in footer behaves consistently */
}

@media (max-width: 480px) {
    .soundscape-grid {
        gap: 8px;
    }
    
    .soundscape-button {
        padding: 12px 8px;
        min-height: 70px;
    }
    
    .soundscape-name {
        font-size: 11px;
    }
}

/* ===== SCROLL INDICATOR STYLES ===== */

.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

@keyframes scrollIndicatorPulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

/* Theme-specific styling for scroll indicator */
[data-theme="light"] .scroll-indicator {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

[data-theme="dark"] .scroll-indicator {
    background: rgba(255, 255, 255, 0.8);
    color: black;
}

[data-theme="xray"] .scroll-indicator {
    background: rgba(0, 255, 0, 0.8);
    color: black;
}

/* Responsive adjustments for scroll indicator */
@media (max-width: 768px) {
    .scroll-indicator {
        width: 1.75rem;
        height: 1.75rem;
        bottom: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .scroll-indicator {
        width: 1.5rem;
        height: 1.5rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

/* Profile avatar styles */
.profile-identifiers {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: 1rem;
}

.profile-avatar img {
  object-fit: cover;
  border-radius: 0;
  margin-left: auto;
  border: 1px solid var(--color-text-muted);
  /* Ensure avatars load completely */
  display: block;
  image-rendering: auto;
  min-height: 35px;
  min-width: 35px;
}

/* Post list card styles */
.post-card.post-list-card {
  border: 2px solid var(--color-border-accent);
}

.post-card.post-list-card .list-title {
  font-size: 2rem;
  text-align: center;
  line-height: 2rem;
  font-weight: bold;
  margin: 0;
  color: var(--color-text);
}

.post-card.post-list-card .list-curator {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.post-card.post-list-card .curator-username {
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.post-card.post-list-card .curator-username:hover {
  text-decoration: underline;
}

.post-card.post-list-card .list-description {
  color: var(--color-text);
  line-height: 1.4;
  font-style: italic;
}

.post-card.post-list-card .list-identifiers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-card.post-list-card .list-creation-date {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.post-card.post-list-card .list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.post-card.post-list-card .tag-item {
  background: var(--color-bg-secondary);
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text);
}

.post-card.post-list-card .list-json-header {
  text-align: center;
}

.post-card.post-list-card .list-json-header .post-card-did {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  word-break: break-all;
}

.post-card.post-list-card .post-card-body {
  padding: 0.5rem 1rem;
  justify-content: center;
}

.post-card.post-list-card .post-card-footer {
  text-align: center;
  justify-content: center;
}

/* Account list card styles - identical to post list card styles */
.post-card.account-list-card {
  border: 2px solid var(--color-border-accent);
}

/* Center the header text */
.post-card.account-list-card .post-card-header {
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 1rem;
  color: var(--color-text-secondary);
  justify-content: center;
}

.post-card.account-list-card .list-title {
  font-size: 2rem;
  text-align: center;
  line-height: 2rem;
  font-weight: bold;
  margin: 0 0 1rem 0;
  color: var(--color-text);
}

.post-card.account-list-card .list-curator {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 1rem;
}

.post-card.account-list-card .curator-username {
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.post-card.account-list-card .curator-username:hover {
  text-decoration: underline;
}

.post-card.account-list-card .list-description {
  color: var(--color-text);
  line-height: 1.4;
  font-style: italic;
  margin: 0.5rem 0;
  text-align: center;
}

.post-card.account-list-card .list-description.placeholder-text {
  color: var(--color-text-muted);
}

.post-card.account-list-card .list-name-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.post-card.account-list-card .list-identifiers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-card.account-list-card .list-creation-date {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.post-card.account-list-card .list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.post-card.account-list-card .tag-item {
  background: var(--color-bg-secondary);
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text);
}

.post-card.account-list-card .account-list-json-header {
  text-align: center;
}

.post-card.account-list-card .account-list-json-header .post-card-did {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  word-break: break-all;
}

.post-card.account-list-card .post-card-body {
  padding: 0.5rem 1rem;
  justify-content: center;
}

.post-card.account-list-card .post-card-footer {
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.post-card.post-list-card .list-name-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.post-list-card .post-card-header {
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.3rem 1.5rem;
}

/* Control Button Settings - Live Preview Styles */
.preview-zone-wrapper {
  margin: 1rem 0;
}

/* Zone labels */
.preview-zone-label {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.5px;
  margin: 0.5rem 0;
  padding: 0;
}

.controls-preview {
  background: var(--color-card-background);
  border: 2px solid var(--color-border-light);
  padding: 1.5rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Active zone (first preview) styling */
.controls-preview.active-zone {
  background: var(--color-card-background);
  border-color: var(--color-link);
  border-style: solid;
}

.preview-zone-wrapper:has(.controls-preview.active-zone) .preview-zone-label {
  color: var(--color-link);
}

/* Library zone styling */
.controls-preview.library-zone {
  background: rgba(128, 128, 128, 0.02);
  border-color: rgba(128, 128, 128, 0.3);
  border-style: dashed;
}

.preview-zone-wrapper:has(.controls-preview.library-zone) .preview-zone-label {
  color: rgba(128, 128, 128, 0.8);
}

.controls-preview.active-zone.drag-over-zone {
  border-color: var(--color-link-hover);
  background: color-mix(in srgb, var(--color-link) 5%, transparent);
  opacity: 1;
}

.controls-preview.library-zone.drag-over-zone {
  border-color: rgba(128, 128, 128, 0.6);
  background: rgba(128, 128, 128, 0.08);
}

/* Configuration zone drag feedback */
.config-zone.drag-over-zone {
  background: rgba(59, 130, 246, 0.02);
}

.config-zone.drag-over-zone .control-button-setting {
  opacity: 0.7;
}

/* Library zone drag feedback is handled above */

.library-zone .controls-row.library {
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preview-control-button.library-button {
  opacity: 0.8;
  cursor: grab;
}

.preview-control-button.library-button:hover {
  opacity: 1;
  transform: translateY(-1px) scale(1.05);
}

.library-empty-state {
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  padding: 1rem;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.2s ease;
}

/* Library zone empty state drag feedback is handled above */

/* Enhanced drag preview styling */
.drag-preview .preview-control-button.preview {
  border-color: #666;
  background: #2a2a2a;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

/* Real-time dragging animations */
.controls-preview.dragging-active .controls-row.preview {
  transition: all 0.2s ease;
}

.preview-control-button.dragging.animating {
  opacity: 0.3;
  transform: scale(0.95);
}

/* Smooth animations for buttons moving around */
.controls-preview.dragging-active .preview-control-button:not(.dragging) {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Enhanced visual feedback during drag */
.controls-preview.active-zone.dragging-active {
  background: color-mix(in srgb, var(--color-link) 2%, transparent);
  border-color: var(--color-link);
  opacity: 1;
}

.controls-preview.library-zone.dragging-active {
  background: rgba(128, 128, 128, 0.03);
  border-color: rgba(128, 128, 128, 0.4);
}

.controls-preview.dragging-active .preview-empty-state {
  transition: all 0.2s ease;
  transform: scale(0.98);
  opacity: 0.8;
}

/* Spacing between stacked preview rows */
.controls-preview + .controls-preview {
  margin-top: 0.5rem;
}

/* Responsive adjustments for preview */
@media (max-width: 480px) {
  .controls-preview {
    padding: 0.7rem;
    min-height: 40px;
  }
  
  .controls-preview .controls-row.preview {
    gap: 0.4rem;
  }
  
  .preview-control-button {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }
  
  .preview-control-button svg {
    width: 14px;
    height: 14px;
  }
}

/* Profile name group width constraints for text truncation */
.profile-name-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
    overflow: visible;
}

.post-card-user-info {
    min-width: 0;
    flex: 1;
    overflow: visible;
}

/* Ensure profile cards have proper width constraints */
.profile-card .post-card-header,
.post-card .post-card-header {
    min-width: 0;
    overflow: visible;
}

.profile-card .post-card-user-info,
.post-card .post-card-user-info {
    min-width: 0;
    flex: 1;
    overflow: visible;
}

/* ===== SETTINGS FOOTER STYLES ===== */
.settings-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.settings-footer .version-info {
    width: 100%;
    max-width: 600px;
    display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== VERSION SECTION STYLES ===== */
.version-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: transparent;
    border: none;
    text-align: center;
}

.version-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.version-icon {
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.clickable-version-icon {
    cursor: pointer;
    padding: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.clickable-version-icon:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-text);
}

.version-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.version-current {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-status {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.version-timestamp {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 2px;
    cursor: help;
    padding-bottom: 1px;
}

.cache-message {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.update-available-badge {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Version buttons grid - 2x2 layout */
.version-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
    width: 100%;
    max-width: 400px;
}

/* Common styles for all version buttons */
.version-buttons-grid button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-0-9);
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    color: var(--color-button-text);
    min-height: 48px;
    text-align: center;
}

.version-buttons-grid button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.version-buttons-grid button:active {
    transform: translateY(0);
}

.version-buttons-grid button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Clear cache button - warning colors */
.version-buttons-grid .clear-cache-button {
    border-color: #ff8f00;
    background: rgba(255, 152, 0, 0.1);
    color: #e65100;
}

.version-buttons-grid .clear-cache-button:hover:not(:disabled) {
    background: rgba(255, 152, 0, 0.15);
    border-color: #ffb74d;
}

.version-buttons-grid .clear-cache-button:active {
    background: rgba(255, 152, 0, 0.2);
}

/* Reset button - danger colors */
.version-buttons-grid .reset-button-small {
    border-color: #d32f2f;
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
}

.version-buttons-grid .reset-button-small:hover:not(:disabled) {
    background: rgba(211, 47, 47, 0.15);
    border-color: #f44336;
}

.version-buttons-grid .reset-button-small:active {
    background: rgba(211, 47, 47, 0.2);
}

.check-updates-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: var(--font-size-0-9);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    font-family: adobe-jenson-pro, serif;
    border-radius: 0;
    contain: layout;
}

.check-updates-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.check-updates-button:active {
    background: var(--color-button-active);
}

.check-updates-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.check-updates-button .spinning {
    animation: spin 1s linear infinite;
}

.clear-cache-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    font-family: adobe-jenson-pro, serif;
    border-radius: 0;
    contain: layout;
}

.clear-cache-button:hover {
    background: var(--color-warning-hover);
    border-color: var(--color-warning-border-light);
    transform: translateY(-1px);
}

.clear-cache-button:active {
    background: var(--color-warning-active);
    transform: translateY(0);
}

.clear-cache-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.clear-cache-button svg {
    transition: transform 0.15s ease;
}

.clear-cache-button:not(:disabled):hover svg {
    transform: rotate(45deg);
}

/* Dark theme variants for clear cache button */
[data-theme="dark"] .clear-cache-button {
    border-color: #ff8f00;
    background: rgba(255, 152, 0, 0.1);
    color: #ffb74d;
}

[data-theme="dark"] .clear-cache-button:hover {
    background: rgba(255, 152, 0, 0.15);
    border-color: #ffb74d;
}

[data-theme="dark"] .clear-cache-button:active {
    background: rgba(255, 152, 0, 0.2);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .version-header {
        gap: 16px;
        padding: 20px 16px;
    }
    
    .version-details {
        text-align: center;
    }
    
    .version-buttons-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 280px;
    }
    
    .version-buttons-grid button {
        min-height: 44px;
        padding: 0.7rem 1rem;
    }
    
    /* Reorder buttons on mobile: Info & Credits, Developer Tools, Reset, Clear Cache */
    .version-buttons-grid .info-button {
        order: 1;
    }
    
    .version-buttons-grid .developer-button {
        order: 2;
    }
    
    .version-buttons-grid .reset-button-small {
        order: 3;
    }
    
    .version-buttons-grid .clear-cache-button {
        order: 4;
    }
    
    .settings-footer {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
}

/* ==========================================================================
   Moderation Overlay Styles
   ========================================================================== */

.moderation-overlay {
    position: relative;
    width: 100%;
}

/* Hidden content overlay */
.moderation-overlay--hidden {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--color-background-rgb), 0.8);
    border: 1px dashed var(--color-border);
    backdrop-filter: blur(4px);
}

.moderation-overlay--hidden .moderation-overlay__content {
    text-align: center;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.moderation-overlay--hidden .moderation-overlay__message {
    color: var(--color-text-secondary);
    font-size: 14px;
    max-width: 250px;
}

/* Warning overlay */
.moderation-overlay--warning {
    overflow: hidden;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.moderation-overlay__warning-bar {
    background: rgba(255, 193, 7, 0.1);
    border-bottom: 1px solid rgba(255, 193, 7, 0.2);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.moderation-overlay__warning-bar .moderation-overlay__icon {
    color: #ffc107;
    flex-shrink: 0;
}

.moderation-overlay__warning-bar .moderation-overlay__message {
    flex: 1;
    color: var(--color-text);
    font-weight: 500;
}

/* Reveal buttons */
.moderation-overlay__reveal-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.moderation-overlay__reveal-button:hover {
    background: var(--color-button-hover);
}

.moderation-overlay__reveal-button--small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Hide button for revealed content */
.moderation-overlay__revealed-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.moderation-overlay__hide-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.moderation-overlay__hide-button:hover {
    background: var(--color-button-hover);
}

/* Revealed content styling - keeps overlay structure without blur */
.moderation-overlay--revealed {
    border: 1px dashed var(--color-border);
    background: rgba(var(--color-background-rgb), 0.3);
}

.moderation-overlay__revealed-header {
    background: rgba(var(--color-background-rgb), 0.8);
    border-bottom: 1px dashed var(--color-border);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.moderation-overlay__revealed-header .moderation-overlay__icon {
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.moderation-overlay__revealed-header .moderation-overlay__message {
    flex: 1;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.moderation-overlay__revealed-content {
    padding: 12px;
}

/* Warning revealed state */
.moderation-overlay--warning-revealed {
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.moderation-overlay__warning-bar--revealed {
    background: rgba(255, 193, 7, 0.1);
    border-bottom: 1px solid rgba(255, 193, 7, 0.2);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.moderation-overlay__warning-bar--revealed .moderation-overlay__icon {
    color: #ffc107;
    flex-shrink: 0;
}

.moderation-overlay__warning-bar--revealed .moderation-overlay__message {
    flex: 1;
    color: var(--color-text);
    font-weight: 500;
}

/* Blur effects */
.moderation-overlay__blurred-content,
.moderation-overlay__content--blurred {
    filter: blur(12px);
    transition: filter 0.3s ease;
}

.moderation-overlay__blurred-content--full,
.moderation-overlay__content--blur-full {
    filter: blur(16px);
}

.moderation-overlay__blurred-content--media,
.moderation-overlay__content--blur-media {
    /* Apply blur only to images and media elements */
}

.moderation-overlay__blurred-content--media img,
.moderation-overlay__blurred-content--media video,
.moderation-overlay__blurred-content--media .embedded-image,
.moderation-overlay__blurred-content--media .embedded-video,
.moderation-overlay__content--blur-media img,
.moderation-overlay__content--blur-media video,
.moderation-overlay__content--blur-media .embedded-image,
.moderation-overlay__content--blur-media .embedded-video {
    filter: blur(16px);
    transition: filter 0.3s ease;
}

/* Visible content (no moderation or revealed) */
.moderation-overlay--visible {
    position: relative; /* Needed for absolute positioning of hide button */
}

/* Animation for revealing content */
.moderation-overlay__blurred-content {
    transition: filter 0.3s ease;
}

/* Overlay animation states */
.moderation-overlay--animating {
    pointer-events: none; /* Prevent interaction during animation */
}

.moderation-overlay--animating * {
    pointer-events: none;
}

/* Hidden overlay animations - removed transforms, just fade */
.moderation-overlay--hidden {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.moderation-overlay--hiding {
    opacity: 0;
}

/* Warning overlay animations - no transforms, overlay stays in place */
.moderation-overlay--warning {
    transition: none; /* No animation on the container */
    opacity: 1;
}

.moderation-overlay--warning.moderation-overlay--hiding {
    opacity: 1; /* Keep overlay visible during hide animation */
}

.moderation-overlay__warning-bar {
    transition: none; /* No animation on warning bar */
    opacity: 1;
}

.moderation-overlay__warning-bar--hiding {
    opacity: 1; /* Keep warning bar visible */
}

/* Revealed content - no special animations needed */
.moderation-overlay--visible {
    opacity: 1;
}

.moderation-overlay__revealed-controls {
    opacity: 1;
}

/* Revealed overlay states - no transforms */
.moderation-overlay--revealed {
    opacity: 1;
}

.moderation-overlay--warning-revealed {
    opacity: 1;
}

/* Embedded muted content animations */
.moderation-overlay--embedded-muted {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.moderation-overlay--embedded-muted.moderation-overlay--hiding {
    opacity: 0;
    transform: scale(0.98);
}

.moderation-overlay--embedded-muted-revealed {
    opacity: 1;
}

/* Keyframe animations - removed unused animations */

/* Button states during animation */
.moderation-overlay__reveal-button:disabled,
.moderation-overlay__hide-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth blur transitions */
.moderation-overlay__blurred-content {
    transition: filter 0.3s ease;
}

.moderation-overlay__content--blurred {
    transition: filter 0.3s ease;
}

/* Warning states for different severities */
.moderation-overlay--warning.severity-alert .moderation-overlay__warning-bar {
    background: rgba(220, 53, 69, 0.1);
    border-bottom-color: rgba(220, 53, 69, 0.2);
}

.moderation-overlay--warning.severity-alert .moderation-overlay__icon {
    color: #dc3545;
}

.moderation-overlay--warning.severity-inform .moderation-overlay__warning-bar {
    background: rgba(13, 110, 253, 0.1);
    border-bottom-color: rgba(13, 110, 253, 0.2);
}

.moderation-overlay--warning.severity-inform .moderation-overlay__icon {
    color: #0d6efd;
}

/* Blocked post styling */
.blocked-post {
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    background: rgba(220, 53, 69, 0.05);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.blocked-post .moderation-overlay__warning-bar {
    background: rgba(220, 53, 69, 0.1);
    border-bottom: 1px solid rgba(220, 53, 69, 0.2);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.blocked-post .moderation-overlay__icon {
    color: #dc3545;
}

/* Embedded muted content overlay styles */
.moderation-overlay--embedded-muted {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--color-background-rgb), 0.9);
    border: 1px solid rgba(var(--color-text-secondary-rgb), 0.3);
    border-radius: 6px;
    margin: 8px 0;
}

.moderation-overlay__embedded-muted-content {
    text-align: center;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.moderation-overlay__embedded-muted-content .moderation-overlay__icon {
    color: var(--color-text-secondary);
}

.moderation-overlay__embedded-muted-content .moderation-overlay__message {
    color: var(--color-text-secondary);
    font-size: 13px;
    max-width: 280px;
}

.moderation-overlay--embedded-muted-revealed {
    position: relative;
}

.moderation-overlay__revealed-controls--embedded {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(var(--color-background-rgb), 0.8);
    border: 1px solid rgba(var(--color-text-secondary-rgb), 0.2);
    font-size: 11px;
}

.moderation-overlay__muted-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-secondary);
    font-style: italic;
}

.moderation-overlay__hide-button--small {
    padding: 2px 6px;
    font-size: 11px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .moderation-overlay--hidden .moderation-overlay__content {
        padding: 16px;
    }
    
    .moderation-overlay--hidden .moderation-overlay__message {
        font-size: 13px;
    }
    
    .moderation-overlay__warning-bar {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .moderation-overlay__reveal-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .moderation-overlay--embedded-muted .moderation-overlay__embedded-muted-content {
        padding: 12px;
    }
    
    .moderation-overlay__embedded-muted-content .moderation-overlay__message {
        font-size: 12px;
    }
}

/* Muted content dropdown styles (for ContentSettings) - Using app's standard dropdown pattern */
.muted-content-selector {
    position: relative;
    min-width: 150px;
}

.muted-content-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 0.5rem;
    font-size: 0.9rem;
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: space-between;
}

.muted-content-button:hover:not(:disabled) {
    background-color: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.muted-content-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.muted-content-label {
    flex: 1;
    text-align: left;
}

.muted-content-arrow {
    transition: transform 0.2s ease;
    color: var(--color-text-secondary);
}

.muted-content-arrow.open {
    transform: rotate(180deg);
}

.muted-content-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border-light);
    box-shadow: 0 4px 24px var(--color-shadow-dark);
    z-index: 1000;
    animation: dropdownSlideIn 0.15s ease-out;
}

.muted-content-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    padding: 0.75rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.muted-content-option:last-child {
    border-bottom: none;
}

.muted-content-option:hover:not(:disabled) {
    background: var(--color-button-hover);
    color: var(--color-text);
}

.muted-content-option.active {
    background: var(--color-button-hover);
    color: var(--color-text);
}

.muted-content-option-content {
    /* No flex needed since we're using block layout */
}

.muted-content-option-label {
    font-weight: 500;
    color: inherit;
    margin-bottom: 0.25rem;
    display: block;
}

.muted-content-option-description {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    line-height: 1.3;
    display: block;
}

/* ==================== CUSTOM DROPDOWN COMPONENT ==================== */

/* Base dropdown container */
.custom-dropdown {
  position: relative;
  min-width: 150px;
}

/* Size variants */
.custom-dropdown--small {
  min-width: 120px;
}

.custom-dropdown--medium {
  min-width: 150px;
}

.custom-dropdown--large {
  min-width: 200px;
}

/* Style variants */
.custom-dropdown--default .custom-dropdown__button {
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border-light);
}

.custom-dropdown--input .custom-dropdown__button {
  background: var(--color-input-background);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* Dropdown button */
.custom-dropdown__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
  height: 100%;
}

.custom-dropdown__button:hover:not(:disabled) {
  border-color: var(--color-border-light);
  background: var(--color-button-hover);
  color: var(--color-text);
}

.custom-dropdown__button:focus {
  outline: none;
  border-color: var(--color-link);
  box-shadow: 0 0 0 2px rgba(var(--color-link-rgb), 0.2);
}

.custom-dropdown__button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Dropdown label */
.custom-dropdown__label {
  font-weight: 500;
  flex: 1;
  text-align: left;
}

/* Dropdown arrow */
.custom-dropdown__arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.custom-dropdown__arrow--open {
  transform: rotate(180deg);
}

/* Dropdown menu */
.custom-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 24px var(--color-shadow-dark);
  z-index: 1000;
  animation: dropdownSlideIn 0.15s ease-out;
  max-height: 300px;
  overflow-y: auto;
}

/* Dropdown options */
.custom-dropdown__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.75rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.custom-dropdown__option:last-child {
  border-bottom: none;
}

.custom-dropdown__option:hover,
.custom-dropdown__option--focused {
  background: var(--color-button-hover);
  color: var(--color-text);
}

.custom-dropdown__option--active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

/* Option label */
.custom-dropdown__option-label {
  flex: 1;
}

/* Check mark for active option */
.custom-dropdown__check {
  color: var(--color-link);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Disabled state */
.custom-dropdown--disabled {
  opacity: 0.6;
}

.custom-dropdown--disabled .custom-dropdown__button {
  cursor: not-allowed;
  pointer-events: none;
}

/* ==================== TUTORIAL ENHANCEMENTS ==================== */

/* Tutorial card text styling - lowercase transform */
.tutorial-mode .post-card-text,
.tutorial-mode .post-card-text *,
.tutorial-mode .card-front .post-card-text,
.tutorial-mode .card-back .post-card-text {
    text-transform: lowercase;
}

/* Tutorial mode styling for disabled buttons */
.tutorial-mode .nav-control:disabled {
    background: var(--color-button-background-disabled, #2a2a2a);
    color: var(--color-button-text-disabled, #666);
    border-color: var(--color-border-disabled, #444);
    cursor: not-allowed;
    transform: none !important;
}

.tutorial-mode .nav-control:disabled:hover {
    background: var(--color-button) !important;
    color: var(--color-text) !important;
    transform: none !important;
}

/* Tutorial mode progress indicator */
.tutorial-container.tutorial-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--primary-color) calc(var(--tutorial-progress, 0) * 1%),
        rgba(var(--color-border-rgb), 0.3) calc(var(--tutorial-progress, 0) * 1%)
    );
    z-index: 9998;
    transition: all 0.3s ease;
}

.feed-container.tutorial-container {
    margin-bottom: 0rem;
  }

/* ==================== DAILY PACK BANNER ==================== */

.daily-pack-banner {
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
}

/* ==================== CROSS-REFERENCE BANNER ==================== */

.cross-reference-banner {
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cross-reference-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cross-reference-text {
    flex: 1;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    line-height: 1.4;
    color: var(--color-text);
}

.cross-reference-text strong {
    font-weight: 600;
    color: var(--color-text);
}

.cross-reference-button {
    padding: 8px 16px;
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-85);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.cross-reference-button:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

@media (max-width: 768px) {
    .cross-reference-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .cross-reference-button {
        align-self: stretch;
        text-align: center;
    }
}


.daily-pack-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.daily-pack-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
    flex-shrink: 0;
}

.daily-pack-info {
    flex: 1;
    min-width: 0;
}

.daily-pack-title {
    font-size: var(--font-size-1-1);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 0.125rem 0.5rem;
    font-size: var(--font-size-0-75);
    font-weight: 600;
    white-space: nowrap;
}

.daily-pack-available {
    color: var(--color-success);
    font-size: var(--font-size-0-9);
    font-weight: 500;
}

.daily-pack-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-9);
}

.daily-pack-action {
    flex-shrink: 0;
}

.open-pack-btn {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-0-9);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    overflow: hidden;
  font-family: inherit;
}

.open-pack-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #2d7831);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.open-pack-btn:active:not(:disabled) {
    transform: translateY(0);
}

.open-pack-btn.disabled,
.open-pack-btn:disabled {
    background: var(--color-background-muted);
    color: var(--color-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    overflow: hidden;
  font-family: inherit;
}

.claim-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--color-background-muted);
    border: 1px solid var(--color-border);
    font-size: var(--font-size-0-9);
    color: var(--color-text);
    text-align: center;
    animation: slideInDown 0.3s ease;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.daily-pack-stats {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .daily-pack-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .daily-pack-icon {
        align-self: center;
    }
    
    .daily-pack-title {
        justify-content: center;
    }
    
    .streak-badge {
        align-self: flex-start;
    }
    
    .open-pack-btn {
        width: 100%;
    }
    
    .daily-pack-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
    
         .daily-pack-stats span:nth-child(2) {
         display: none;
     }
 }

/* ==================== PACK NOTIFICATION MODAL ==================== */


.pack-notification-header {
    margin-bottom: 1.5rem;
}

.pack-notification-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.pack-notification-body p {
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    margin-top: 0px;
}

.pack-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--color-background-muted);
    flex-direction: column;
    align-items: flex-start;
}

.pack-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-0-9);
    color: var(--color-text);
}

.pack-notification-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.open-pack-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border-light);
    padding: 1rem 2rem;
    font-size: var(--font-size-1);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.open-pack-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.remind-later-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.remind-later-button:hover {
    color: var(--color-text);
    border-color: var(--color-text-secondary);
    background: var(--color-background-muted);
}

@media (max-width: 480px) {
    .pack-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pack-notification-actions {
        gap: 0.5rem;
    }
    
    .open-pack-button,
    .remind-later-button {
        padding: 0.875rem 1.5rem;
    }
}

/* ==================== RELEASE NOTES MODAL ==================== */

.release-notes-modal {
    max-width: 500px;
}

.release-notes-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-notes-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.release-notes-close:hover {
    color: var(--color-text);
}

.release-notes-loading {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-secondary);
}

.release-notes-body {
    font-size: var(--font-size-1);
    line-height: 1.6;
    color: var(--color-text);
}

.release-notes-body h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
}

.release-notes-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 1.5rem 0 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.25rem;
}

.release-notes-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 1.25rem 0 0.5rem 0;
}

.release-notes-body p {
    margin: 0 0 1rem 0;
    color: var(--color-text);
}

.release-notes-body strong {
    font-weight: 600;
    color: var(--color-text);
}

.release-notes-body em {
    font-style: italic;
    color: var(--color-text-secondary);
}

.release-notes-body code {
    background: var(--color-background-muted);
    padding: 0.125rem 0.25rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--color-accent);
    border-radius: 3px;
}

.release-notes-body a {
    color: var(--color-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.release-notes-body a:hover {
    text-decoration: underline;
}

.release-notes-body ul {
    margin: 1rem 0 1rem 0;
    padding-left: 1.5rem;
}

.release-notes-body li {
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.release-notes-actions {
    margin-top: 2rem;
    display: flex;
}

.release-notes-dismiss-button {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: var(--font-size-1);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.release-notes-dismiss-button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .release-notes-modal {
        max-width: 95vw;
    }
    
    .release-notes-body {
        font-size: var(--font-size-0-9);
    }
    
    .release-notes-dismiss-button {
        padding: 0.875rem 1.5rem;
        font-size: var(--font-size-0-9);
    }
}

/* ==================== DAILY PACK MODAL ==================== */

.pack-modal-content {
    text-align: center;
}

/* ==================== PACK OPENING CARDS ==================== */

.post-card.pack-opening .card-front {
    background: linear-gradient(135deg, #FF9800, #FF5722);
    border: 2px solid #FF5722;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-card.pack-opening .card-front:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.4);
}

.post-card.pack-opening .post-card-text {
    color: white;
    font-weight: 500;
    text-align: center;
    font-size: var(--font-size-1-1);
}

.post-card.pack-item .card-front {
    background: var(--color-card-background);
    border: 2px solid var(--item-type-color, var(--color-border));
    transition: all 0.3s ease;
}

.post-card.pack-item .card-front:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 0 0 2px var(--item-type-color, var(--color-border));
}

.post-card.pack-item .post-card-header {
    background: linear-gradient(135deg, var(--item-type-color, #666), rgba(var(--item-type-color-rgb, 102, 102, 102), 0.8));
    color: white;
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
}

.post-card.pack-item .post-card-username {
    color: white;
    opacity: 0.9;
}

.post-card.pack-item .post-card-text {
    font-size: var(--font-size-1);
    line-height: 1.5;
}

.post-card.pack-item .post-card-footer {
    border-top: 1px solid var(--item-type-color, var(--color-border));
    margin-top: 1rem;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-card.pack-item .pack-item-badges {
    display: flex;
    gap: 0.5rem;
}

.post-card.pack-item .pack-item-type-badge,
.post-card.pack-item .pack-item-rarity-badge {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-0-75);
    font-weight: 600;
    color: white;

    text-transform: capitalize;
}

.pack-header {
    margin-bottom: 1.5rem;
}

.pack-message {
    font-size: var(--font-size-1-1);
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
}

.streak-text {
    display: block;
    margin-top: 0.5rem;
    font-size: var(--font-size-0-9);
    color: var(--color-success);
    font-weight: 600;
}

.pack-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-width: 100%;
    margin-top: 1rem;
}

/* Special styling for pack inventory items in modal */
.pack-inventory-item {
    cursor: default;
}

.pack-inventory-item:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px var(--item-type-color, var(--color-border-light));
}

.pack-item {
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    padding: 1rem;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
}

.pack-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pack-item-name {
    font-size: var(--font-size-1);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.pack-item-description {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.pack-item-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0.75rem;
}

.pack-item-type-badge,
.pack-item-rarity-badge {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-0-75);
    font-weight: 600;
    color: white;
    text-transform: capitalize;
    white-space: nowrap;
}



/* Responsive adjustments for pack modal */
@media (max-width: 768px) {
    .pack-items-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .pack-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }
}

/* ==================== INVENTORY PAGE ENHANCEMENTS ==================== */

.inventory-item {
    position: relative;
}

.inventory-item-rarity-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: var(--font-size-0-7);
    font-weight: 600;
    color: white;
    padding: 0.125rem 0.375rem;
    text-transform: capitalize;
    white-space: nowrap;
    opacity: 0.9;
    pointer-events: none;
}

/* ===== INFO SETTINGS STYLES ===== */

.citation-item,
.credit-item {
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
    padding: 2rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.citation-item:last-child,
.credit-item:last-child {
    margin-bottom: 0;
}

/* Add spacing between multiple credit items in the same section */
.credit-item + .credit-item {
    margin-top: 1.5rem;
}
.citation-item h3,
.credit-item h3 {
    margin: 0 0 1rem 0;
    font-size: var(--font-size-1-2);
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
}

.citation-text {
    font-size: var(--font-size-1);
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-family: adobe-jenson-pro, serif;
}

.citation-text em {
    font-style: italic;
}

.credit-item p {
    margin: 0;
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    line-height: 1.7;
    font-family: adobe-jenson-pro, serif;
}

.external-link-button,
.resource-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: var(--font-size-1);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    font-family: adobe-jenson-pro, serif;
    border-radius: 0;
    text-align: left;
    justify-content: flex-start;
}

.external-link-button:hover,
.resource-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.external-link-button:active,
.resource-button:active {
    background: var(--color-button-active);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-item {
    padding: 1.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-card-background);
}

.info-item h3 {
    margin: 0 0 0.75rem 0;
    font-size: var(--font-size-1-2);
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
    text-align: left;
}

.info-item p {
    margin: 0 0 1.25rem 0;
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-family: adobe-jenson-pro, serif;
}

.info-item .external-link-button + .external-link-button {
    margin-top: 0.75rem;
}

/* Legacy support - keep old classes for compatibility */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    padding: 1.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-card-background);
}

.tech-item h3 {
    margin: 0 0 0.75rem 0;
    font-size: var(--font-size-1-2);
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
}

.tech-item p {
    margin: 0 0 1.25rem 0;
    font-size: var(--font-size-1);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-family: adobe-jenson-pro, serif;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}



.info-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: var(--font-size-0-9);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    font-family: adobe-jenson-pro, serif;
    border-radius: 0;
}

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

.info-button:active {
    background: var(--color-button-active);
}

.members-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-border-light);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    border-radius: 0;
    contain: layout;
}

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

.members-button:active {
    background: var(--color-button-active);
}

/* Community Section Styles */
.community-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    gap: 1.5rem;
}

.community-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.community-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #ff9500;
    color: white;
    flex-shrink: 0;
}

.community-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-1-1);
    color: var(--color-text);
    font-weight: 600;
}

.community-text p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    line-height: 1.4;
}

.members-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    font-size: var(--font-size-0-9);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.members-link-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.members-link-button:active {
    background: var(--color-button-active);
}

/* Community item styling (for InfoSettings) */
.community-item {
    margin-bottom: 2rem;
}

.community-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-1-1);
    color: var(--color-text);
    font-weight: 600;
}

.community-item p {
    margin: 0 0 1rem 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Simple Members Link Styles */
.simple-members-link {
    margin: 1.5rem 0;
    text-align: center;
}

.members-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    padding: 0.5rem;
}

.members-text-link:hover {
    color: var(--color-text);
    transform: translateX(2px);
    background: none !important;
}

.members-text-link:active {
    color: #ff9500;
}

/* Membership Upgrade Link Styles - Inline text links */
.membership-upgrade-link {
    display: inline;
    color: var(--color-glow-anisota);
    font-family: adobe-jenson-pro, serif;
    font-size: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.membership-upgrade-link:hover {
    opacity: 0.8;
    text-decoration-color: currentColor;
}

.membership-upgrade-link:active {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .info-section {
        padding: 1rem;
    }
    
    .version-buttons {
        align-items: stretch;
    }
    
    .check-updates-button,
    .info-button,
    .members-button,
    .reset-button-small {
        width: 100%;
    }
    
    /* Community section mobile styles */
    .community-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .community-info {
        justify-content: center;
        text-align: center;
    }
    
    .members-link-button {
        width: 100%;
    }
}

/* ==================== COLLECTION PAGE STYLES ==================== */

/* Collection Stats */
.collection-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.collection-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.collection-stats .stat-label {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.collection-stats .stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-text);
}

/* Collection Filters */
.collection-filters {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: var(--font-size-0-875);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    font-size: var(--font-size-0-875);
    min-width: 120px;
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 100%;
}

/* Mobile responsive - 2 columns for narrow screens */
@media (max-width: 480px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px; /* Slightly larger gap for better touch targets */
    }
}

/* Mobile responsive - 2 columns for narrow screens */
@media (max-width: 480px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px; /* Slightly larger gap for better touch targets */
    }
}

.collection-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-card-background);
    border: 1px solid var(--item-color, var(--color-border));
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    text-align: center;
    min-height: 80px;
    box-sizing: border-box;
    min-width: 0;
}

/* Collection item status styles */
.collection-item.seen {
    opacity: 0.8;
    background: var(--color-card-background-muted);
}

.collection-item.caught {
    opacity: 1;
    border-left: 3px solid var(--status-color, var(--color-accent-primary));
}

.collection-item:hover {
    background: var(--color-card-background-hover);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px var(--item-color, var(--color-border-light));
    z-index: 1;
}

.collection-item.seen:hover {
    opacity: 0.7;
}

.collection-item:active {
    transform: translateY(0);
    background: var(--color-card-background-active);
}

.collection-item-name {
    font-size: var(--font-size-1);
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.2;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.25rem;
}

.collection-item-family-badge {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    font-size: 0.6rem;
    font-weight: 600;
    color: white;
    padding: 0.125rem 0.25rem;
    text-transform: capitalize;
    white-space: nowrap;
    opacity: 0.9;
    pointer-events: none;
}

/* Empty Collection State */
.empty-collection {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Species Detail Header (matching item modal) */
.species-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.species-quantity-large {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.species-badges {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.species-family-badge,
.species-rarity-badge {
    font-size: var(--font-size-0-75);
    font-weight: 600;
    color: white;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.species-names {
    padding: 1rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
}

.species-names > div {
    margin-bottom: 0.5rem;
}

.species-names > div:last-child {
    margin-bottom: 0;
}

.scientific-name em {
    font-style: italic;
    color: var(--color-text);
}

.species-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.species-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.detail-value {
    color: var(--color-text);
}

.collection-note {
    padding: 1rem;
    background: var(--color-background-light);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    text-align: center;
}

/* Custom Dropdown Styles for Collection and Inventory Filters */
.family-selector,
.status-selector,
.category-selector,
.rarity-selector,
.sort-selector {
    position: relative;
    min-width: 120px;
}

.family-button,
.status-button,
.category-button,
.rarity-button,
.sort-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    font-size: var(--font-size-0-875);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
    height: 36px;
}

.family-button:hover,
.status-button:hover,
.category-button:hover,
.rarity-button:hover,
.sort-button:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
}

.family-arrow,
.status-arrow,
.category-arrow,
.rarity-arrow,
.sort-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.family-arrow.open,
.status-arrow.open,
.category-arrow.open,
.rarity-arrow.open,
.sort-arrow.open {
    transform: rotate(180deg);
}

.family-dropdown,
.status-dropdown,
.category-dropdown,
.rarity-dropdown,
.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    border-top: none;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.family-option,
.status-option,
.category-option,
.rarity-option,
.sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-0-875);
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: left;
}

.family-option:hover,
.status-option:hover,
.category-option:hover,
.rarity-option:hover,
.sort-option:hover {
    background: var(--color-card-background-hover);
}

.family-option.active,
.status-option.active,
.category-option.active,
.rarity-option.active,
.sort-option.active {
    background: var(--color-card-background-active);
    color: var(--color-accent);
}

.family-check,
.status-check,
.category-check,
.rarity-check,
.sort-check {
    flex-shrink: 0;
    color: var(--color-accent);
}

/* Sort cycle button */
.sort-cycle-button,
.rarity-cycle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.sort-cycle-button:hover,
.rarity-cycle-button:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.sort-cycle-button:active,
.rarity-cycle-button:active {
    transform: translateY(0);
}

/* Rarity option content */
.rarity-option-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rarity-option-icon {
    flex-shrink: 0;
}

/* Items count display */
.items-count {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 0.75rem;
    font-size: var(--font-size-0-875);
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-background-muted);
    border: 1px solid var(--color-border);
    font-family: inherit;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Responsive Design for Collection Grid */
@media (max-width: 1024px) {
    .collection-filters {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    
    .collection-stats {
        gap: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 0.5rem;
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: var(--font-size-0-8);
    }
    
}

@media (max-width: 480px) {

    .collection-stats {
        gap: 1rem;
        margin-top: 2rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }

    .stat-number {
        font-size: var(--font-size-1-1);
    }

    .stat-label {
        font-size: var(--font-size-0-75);
    }
}

/* PWA-specific fixes for Safari iOS */
@media all and (display-mode: standalone) {
  body {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
  
  #root {
    position: relative !important;
    width: 100% !important;
  }
}

/* Additional PWA viewport fixes for WebKit/Safari */
@supports (-webkit-touch-callout: none) {
  @media all and (display-mode: standalone) {
    body {
      -webkit-overflow-scrolling: auto !important;
      touch-action: none !important;
    }
  }
}

/* Developer Page Styles */
.developer-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.6rem 1.2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    border-radius: 0;
    contain: layout;
}

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

.developer-button:active {
    background: var(--color-button-active);
}

.developer-health-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    border-radius: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.developer-health-section.section-ready {
    opacity: 1;
    transform: translateY(0);
}

.developer-health-section h2 {
    font-family: adobe-jenson-pro, serif;
    font-size: 2rem;
    margin: 0 0 1.5rem 0;
    color: var(--color-text);
    text-align: center;
}

.health-score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.health-score {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.health-score-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.health-score-label {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
}

.health-score-icon {
    display: flex;
    align-items: center;
}

.text-green-600 {
    color: #059669;
}

.text-yellow-600 {
    color: #d97706;
}

.text-red-600 {
    color: #dc2626;
}

.health-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.health-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    flex-direction: row;
    text-align: left;
}

.health-stats .stat-label {
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-9);
    margin: 0;
}

.health-stats .stat-value {
    color: var(--color-text);
    font-weight: 600;
    font-size: var(--font-size-1);
}

.health-issues {
    margin-top: 1.5rem;
}

/* Modal trigger buttons */
.health-issues-summary {
    margin: 1.5rem 0;
}

.issues-modal-trigger, .anomalies-modal-trigger {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.75rem 1rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
    contain: layout;
}

.issues-modal-trigger:hover, .anomalies-modal-trigger:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.anomalies-summary-section {
    margin: 1.5rem 0;
}
.anomalies-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.anomalies-count {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    color: var(--color-text);
    font-weight: 600;
}

.anomaly-count {
    font-family: inherit;
    font-size: var(--font-size-0-8);
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    margin-right: 0.25rem;
}

.anomaly-count.anomaly-critical {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626;
}

.anomaly-count.anomaly-high {
    background: rgba(234, 88, 12, 0.1);
    border-color: #ea580c;
    color: #ea580c;
}

.anomaly-count.anomaly-medium {
    background: rgba(217, 119, 6, 0.1);
    border-color: #d97706;
    color: #d97706;
}

.anomaly-count.anomaly-low {
    background: rgba(14, 165, 233, 0.1);
    border-color: #0ea5e9;
    color: #0ea5e9;
}

/* Modal content styles */
.issues-modal-content, .anomalies-modal-content {
    max-height: 70vh;
    overflow-y: auto;
}

.health-issues h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.issue-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-background);
}

.issue-error {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.issue-warning {
    border-color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.issue-info {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

/* Report Generation Section Styles */
.report-generation-section {
    margin: 2rem 0 0 0;
    padding: 1.5rem 0 0 0;
    border-top: 1px solid var(--color-border-light);
}

.report-generation-section h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    color: var(--color-text);
}

.report-generation-section .settings-description {
    text-align: left;
}

.report-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.report-download-button,
.report-copy-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.75rem 1rem;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
    contain: layout;
}

.report-download-button:hover:not(:disabled),
.report-copy-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
}

.report-download-button:disabled,
.report-copy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.report-download-button {
    background: var(--color-accent);
    color: var(--color-background);
    border-color: var(--color-accent);
}

.report-download-button:hover:not(:disabled) {
    background: var(--color-accent-hover, var(--color-accent));
    border-color: var(--color-accent-hover, var(--color-accent));
    opacity: 0.9;
}

.developer-timeline-section {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    background: var(--color-card-background);
    border: 1px solid var(--color-border);
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.developer-timeline-section.section-ready {
    opacity: 1;
    transform: translateY(0);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-direction: column;
    gap: 0.7rem;
}

.timeline-header h2 {
    font-family: adobe-jenson-pro, serif;
    font-size: 2rem;
    margin: 0;
    color: var(--color-text);
}

.refresh-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: adobe-jenson-pro, serif;
    transition: background-color 0.2s ease;
}

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

.refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.records-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-background-secondary);
    transition: all 0.2s ease;
}

.timeline-item.clickable {
    cursor: pointer;
}

.timeline-item.clickable:hover {
    background: var(--color-card-background-hover);
    border-color: var(--color-border-light);
}

.timeline-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background-tertiary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-type {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    font-weight: 600;
    color: var(--color-text);
    text-transform: capitalize;
}

.timeline-time {
    font-family: inherit;
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-tid, .timeline-session {
    font-family: inherit;
    font-size: var(--font-size-0-75);
    color: var(--color-text-secondary);
}

.timeline-tid {
    font-weight: 600;
}

/* Record Detail Modal Styles */
.record-detail-modal-content {
    max-height: 70vh;
    overflow-y: auto;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.record-header h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.25rem;
    margin: 0;
    color: var(--color-text);
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-button-background);
    border: 1px solid var(--color-border-light);
    color: var(--color-button-text);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-0-9);
    transition: all 0.2s ease;
}

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

.copy-button:active {
    background: var(--color-button-active);
}

.record-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    font-family: adobe-jenson-pro, serif;
    font-size: var(--font-size-1);
    font-weight: 600;
    color: var(--color-text);
}

.detail-value {
    font-family: inherit;
    font-size: var(--font-size-0-85);
    color: var(--color-text-secondary);
    background: var(--color-background-tertiary);
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    word-break: break-all;
}

.json-value {
    font-family: inherit;
    font-size: var(--font-size-0-8);
    color: var(--color-text-secondary);
    background: var(--color-background-tertiary);
    padding: 1rem;
    border: 1px solid var(--color-border);
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.4;
}

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

.refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.15s ease;
}

.timeline-item:hover {
    background: var(--color-card-background-hover);
}

.timeline-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--color-accent);
    color: white;
    flex-shrink: 0;
}

.timeline-main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-type {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-1);
}

.timeline-time {
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-875);
    flex-shrink: 0;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-tid,
.timeline-session {
    font-size: var(--font-size-0-8);
    color: var(--color-text-muted);
    font-family: inherit;
}

.error-message {
    color: var(--color-error);
    text-align: center;
    padding: 2rem;
    font-size: var(--font-size-1-1);
}

/* Header Info Styling for PostListsPage */
.settings-header .header-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-header .header-info h1 {
    margin: 0;
}

.settings-header .tier-info {
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    margin: 0;
}

/* Tier Info Section for ListModal */
.tier-info-section {
    padding: 1rem;
    background: var(--color-surface);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.tier-info-section .tier-info {
    color: var(--color-text-muted);
    font-size: var(--font-size-0-9);
    margin: 0;
    text-align: center;
}

/* Disabled button styling for list creation limits */
.create-list-btn:disabled,
.create-new-list-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-message {
    text-align: center;
    color: var(--color-text-secondary);
    font-style: italic;
    padding: 2rem;
}

/* Anomalies Section Styles */
.anomalies-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.anomalies-section h3 {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.anomalies-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.anomaly-count {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-1-1);
}

.anomaly-severity-breakdown {
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-9);
}

.anomalies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.anomaly-item {
    border: 1px solid var(--color-border);
    background: var(--color-card-background);
    padding: 1rem;
    border-radius: 0;
}

.anomaly-item.severity-critical {
    border-left: 4px solid #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.anomaly-item.severity-high {
    border-left: 4px solid #ea580c;
    background: rgba(234, 88, 12, 0.05);
}

.anomaly-item.severity-medium {
    border-left: 4px solid #d97706;
    background: rgba(217, 119, 6, 0.05);
}

.anomaly-item.severity-low {
    border-left: 4px solid #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

.anomaly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.anomaly-type {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-0-9);
    font-family: inherit;
}

.anomaly-severity {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-0-75);
    font-weight: 600;
    text-transform: uppercase;
}

.anomaly-severity.severity-critical {
    background: #dc2626;
    color: white;
}

.anomaly-severity.severity-high {
    background: #ea580c;
    color: white;
}

.anomaly-severity.severity-medium {
    background: #d97706;
    color: white;
}

.anomaly-severity.severity-low {
    background: #0ea5e9;
    color: white;
}

.anomaly-time {
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-875);
}

.anomaly-description {
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.anomaly-details {
    margin-top: 1rem;
}

.anomaly-details summary {
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: var(--font-size-0-9);
    font-weight: 500;
    padding: 0.5rem 0;
    user-select: none;
}

.anomaly-details summary:hover {
    color: var(--color-text);
}

.anomaly-json {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    padding: 1rem;
    overflow-x: auto;
    font-family: inherit;
    font-size: var(--font-size-0-8);
    color: var(--color-text);
    margin-top: 0.5rem;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .health-score-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .health-score-number {
        font-size: 2.5rem;
    }
    
    .developer-timeline-section .timeline-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .timeline-item {
        gap: 0.75rem;
    }
    
    .timeline-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .anomalies-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .anomaly-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .anomaly-json {
        font-size: var(--font-size-0-7);
    }
}

/* Keyboard Shortcuts Help Styles */
.keyboard-shortcuts-help {
  font-family: adobe-jenson-pro, serif;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.keyboard-shortcuts-help::-webkit-scrollbar {
  display: none; /* Webkit browsers */
}

.shortcuts-category {
  margin-bottom: 2rem;
}

.shortcuts-category:last-child {
  margin-bottom: 0;
}

.shortcuts-category h4 {
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
  color: var(--color-text);
  font-weight: 600;
  text-transform: capitalize;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.shortcut-key {
  background: var(--color-button-background);
  border: 1px solid var(--color-border-light);
  color: var(--color-text);
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  min-width: 3rem;
  text-align: center;
  flex-shrink: 0;
}

.shortcut-description {
  flex: 1;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.4;
}

.shortcut-auth-badge {
  background: var(--color-glow-anisota);
  color: white;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  flex-shrink: 0;
}

.shortcuts-auth-notice {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.shortcuts-auth-notice p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.shortcuts-auth-notice strong {
  color: var(--color-text);
}

/* Responsive design for keyboard shortcuts */
@media (max-width: 768px) {
  .shortcut-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .shortcut-key {
    align-self: flex-start;
  }
}

/* Developer Page Delete Section Styles */
.developer-danger-section {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-left: 4px solid #dc3545;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
  position: relative;
  z-index: 1;
}

.developer-danger-section.section-ready {
  opacity: 1;
  transform: translateY(0);
}

.danger-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.danger-zone-buttons {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  margin-top: 1.5rem;
}

.danger-zone-button-group {
  padding: 1.5rem;
  background: rgba(220, 53, 69, 0.05);
  border: 1px solid rgba(220, 53, 69, 0.2);
  text-align: left;
}

.danger-zone-button-group.danger-zone-critical {
  background: rgba(139, 0, 0, 0.1);
  border: 2px solid rgba(139, 0, 0, 0.4);
}

.danger-zone-button-group h3 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.2rem;
  margin: 0 0 0.75rem 0;
  color: #dc3545;
}

.danger-zone-button-group.danger-zone-critical h3 {
  color: #8b0000;
}

.danger-zone-button-group p {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.developer-danger-section h2 {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  color: #dc3545;
}

.delete-all-button {
  background: #dc3545;
  border: 1px solid #dc3545;
  color: white;
  padding: 0.75rem 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  width: 100%;
  justify-content: center;
}

.delete-all-button.delete-all-critical {
  background: #8b0000;
  border: 1px solid #8b0000;
}

.delete-all-button:hover:not(:disabled) {
  background: #c82333;
  border-color: #c82333;
}

.delete-all-button.delete-all-critical:hover:not(:disabled) {
  background: #6b0000;
  border-color: #6b0000;
}

.delete-all-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.confirm-delete-button.delete-all-critical {
  background: #8b0000;
  border: 1px solid #8b0000;
}

.confirm-delete-button.delete-all-critical:hover:not(:disabled) {
  background: #6b0000;
  border-color: #6b0000;
}

.delete-warning {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.warning-icon {
  color: #dc3545;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.warning-text p {
  margin: 0 0 1rem 0;
  line-height: 1.5;
  color: var(--color-text);
  font-family: adobe-jenson-pro, serif;
}

.deletion-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
}

.deletion-list li {
  margin: 0.5rem 0;
}

.final-warning {
  margin-top: 1.5rem !important;
  padding: 1rem;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545 !important;
  font-weight: bold;
}

.delete-confirmation-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.cancel-button, .confirm-delete-button {
  padding: 0.75rem 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cancel-button {
  border: 1px solid var(--color-border);
  background: var(--color-background);
  color: var(--color-text);
}

.cancel-button:hover:not(:disabled) {
  background: var(--color-background-secondary);
  border-color: var(--color-border-light);
}

.confirm-delete-button {
  border: 1px solid #dc3545;
  background: #dc3545;
  color: white;
}

.confirm-delete-button:hover:not(:disabled) {
  background: #c82333;
  border-color: #c82333;
}

.cancel-button:disabled, .confirm-delete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Dark theme adjustments */
[data-theme="dark"] .final-warning {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.4);
}

[data-theme="dark"] .cancel-button {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .cancel-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Developer Page Loading Animations */
.loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top: 2px solid var(--color-text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Debug mode warning styles */
.debug-mode-warning {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0;
  margin-top: 1rem;
  color: var(--color-text);
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
}

.debug-mode-warning svg {
  color: #f59e0b;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progressive loading for sections */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Timeline pagination styles */
.timeline-load-more {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.load-more-button {
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.load-more-button:hover {
  background: var(--color-accent);
  color: var(--color-background);
  border-color: var(--color-accent);
}

.load-more-button:active {
  transform: translateY(1px);
}

.timeline-summary {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* Developer Page Timeline Filter Styles */
.timeline-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.timeline-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-filter-group label {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  color: var(--color-text);
  white-space: nowrap;
}

.timeline-filter-selector {
  position: relative;
}

.timeline-filter-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-button-background);
  border: 1px solid var(--color-border-light);
  color: var(--color-button-text);
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  min-width: 160px;
  text-align: left;
}

.timeline-filter-button:hover {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.timeline-filter-button .filter-label {
  flex: 1;
}

.timeline-filter-button .filter-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.timeline-filter-button .filter-arrow.open {
  transform: rotate(180deg);
}

.timeline-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-align: left;
}

.filter-option:hover {
  background: var(--color-background-secondary);
}

.filter-option.active {
  background: rgba(255, 149, 0, 0.1);
  color: #ff9500;
}

.filter-option .filter-check {
  flex-shrink: 0;
  margin-left: 0.5rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .timeline-filter-dropdown {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Developer Timeline Empty State */
.developer-timeline-section .empty-state {
  position: relative;
  background: var(--color-card-background);
  margin: 2rem 0;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  font-style: italic;
}

/* =============================================
   SUBSCRIPTION PAGE STYLES
   ============================================= */

/* Subscription Page Layout */
.subscription-page {
  /* Inherits from .settings-page */
}

.subscription-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}

/* Subscription Messages */
.subscription-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0;
  font-size: 0.95rem;
}

.subscription-message-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--color-text);
}

.subscription-message-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--color-text);
}

.subscription-message-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--color-text);
}

.message-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
}

.message-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Active Subscriptions */
.active-subscriptions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.active-subscription-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-background-elevated);
}

.subscription-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.subscription-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-active {
  background: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}

.status-canceled {
  background: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}

.subscription-details h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: var(--color-text);
}

.subscription-billing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.cancel-subscription-button {
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgb(239, 68, 68);
  border-radius: 0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.cancel-subscription-button:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Subscription Tiers */
.subscription-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.subscription-tier {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 0;
  padding: 1.5rem;
  background: var(--color-background-elevated);
  transition: all 0.3s ease;
}

/* Promotional banner styling */
.tier-promo-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-glow-anisota);
  color: var(--color-background);
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  border: none;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.tier-promo-banner:hover {
  opacity: 0.9;
}

.tier-promo-banner:active {
  opacity: 0.8;
}

.tier-promo-banner .promo-text {
  font-size: var(--font-size-0-9);
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tier-promo-banner .promo-text strong {
  font-weight: 700;
  letter-spacing: 0.025rem;
}

.tier-promo-banner .promo-copy-icon {
  opacity: 0.8;
  flex-shrink: 0;
}

.tier-promo-banner .promo-expires {
  font-size: var(--font-size-0-75);
  opacity: 0.9;
}

/* Add top padding to tier when promo is shown */
.subscription-tier:has(.tier-promo-banner) {
  padding-top: 4.5rem;
}

/* .subscription-tier:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
} */

/* .tier-popular {
  border-color: var(--color-accent);
  transform: scale(1.02);
} */

.tier-active {
  border-color: rgb(34, 197, 94);
  background: rgba(34, 197, 94, 0.02);
}

.tier-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 500;
}

.tier-active-badge {
  position: absolute;
  top: -8px;
  right: 1rem;
  background: rgb(34, 197, 94);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 500;
}

.tier-header {
  margin-bottom: 1.5rem;
}

.tier-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  color: var(--color-text);
  text-align: left;
}

.tier-description {
  margin: 0 0 1rem 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.tier-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-amount {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text);
}

.price-interval {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.price-annual-total {
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  opacity: 0.7;
  margin-top: -0.125rem;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.tier-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.tier-features li:last-child {
  margin-bottom: 0;
}

.tier-features svg {
  color: var(--color-glow-anisota);
  flex-shrink: 0;
}

/* Short features list */
.tier-features-short {
  margin-bottom: 1rem;
}

/* View all features button */
.view-all-features-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
}

.view-all-features-button:hover {
  color: var(--color-accent-hover);
}

.view-all-features-button .caret-icon {
  transition: transform 0.3s ease;
}

.view-all-features-button .caret-expanded {
  transform: rotate(180deg);
}

/* Expanded features container */
.tier-features-expanded {
  animation: expandFeatures 0.3s ease-out;
  overflow: hidden;
}

@keyframes expandFeatures {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

/* Full features list */
.tier-features-full {
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}

/* Feature availability states */
.tier-features .feature-unavailable {
  opacity: 0.5;
  color: var(--color-text-secondary);
}

.tier-features .feature-unavailable svg {
  color: var(--color-text-tertiary);
}

.tier-features .feature-coming-soon {
  position: relative;
}

.tier-features .feature-coming-soon svg {
  color: var(--color-accent);
}

/* Coming soon badge */
.coming-soon-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  margin-left: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.tier-action {
  margin-top: auto;
}

.tier-button {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tier-button-subscribe {
  background: var(--color-accent);
  color: white;
}

.tier-button-subscribe:hover {
  background: var(--color-accent-dark);
}

.tier-button-upgrade {
  background: rgb(59, 130, 246);
  color: white;
}

.tier-button-upgrade:hover {
  background: rgb(37, 99, 235);
}

.tier-button-active {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
  border: 1px solid rgba(34, 197, 94, 0.3);
  cursor: default;
}

.tier-button-free {
  background: var(--color-text-muted);
  color: var(--color-text-primary);
  cursor: default;
  opacity: 0.7;
}

.tier-button-free:hover {
  background: var(--color-text-muted);
  transform: none;
}

.tier-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.price-savings {
  font-size: 0.75rem;
  color: var(--color-success);
  font-weight: 500;
  margin-top: 0.25rem;
}

.tier-badge-savings {
  background: var(--color-success);
  color: white;
}

/* FAQ Section */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.faq-item {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-background-elevated);
}

.faq-item h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: var(--color-text);
}

.faq-item p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =============================================
   CHECKOUT FORM STYLES
   ============================================= */

.checkout-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.checkout-summary {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-background-elevated);
  height: fit-content;
}

.checkout-summary h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  color: var(--color-text);
}

.checkout-price {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 1rem 0;
}

.checkout-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checkout-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.checkout-features li:last-child {
  margin-bottom: 0;
}

.checkout-features svg {
  color: rgb(34, 197, 94);
  flex-shrink: 0;
}

.checkout-form {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-background-elevated);
}

.payment-section {
  margin-bottom: 1.5rem;
}

.payment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.payment-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--color-text);
}

.payment-element {
  margin-bottom: 1rem;
}

.payment-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0;
  color: rgb(239, 68, 68);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.security-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0;
  color: rgb(34, 197, 94);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.pay-button {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.pay-button:hover:not(:disabled) {
  background: var(--color-accent-dark);
}

.pay-button:disabled {
  background: var(--color-text-tertiary);
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.terms-text {
  margin: 0 0 1rem 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.4;
}

.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
}

.stripe-logo {
  width: 40px;
  height: auto;
}

/* Back button for subscription page */
.subscription-page .back-button {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  margin-right: 1rem;
  transition: all 0.2s ease;
}

.subscription-page .back-button:hover {
  background: var(--color-background-secondary);
  color: var(--color-text);
}

/* Responsive Design */
@media (max-width: 768px) {
  .subscription-tiers {
    grid-template-columns: 1fr;
  }
  
  .checkout-section {
    grid-template-columns: 1fr;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .subscription-tier {
    padding: 1rem;
  }
  
  /* .tier-popular {
    transform: none;
  } */
}

/* Ensure subscription page uses app font consistently */
.subscription-page h1,
.subscription-page h2,
.subscription-page h3,
.subscription-page h4,
.subscription-page p,
.subscription-page button,
.subscription-page .tier-header,
.subscription-page .tier-description,
.subscription-page .tier-price,
.subscription-page .tier-features,
.subscription-page .subscription-details,
.subscription-page .section-description {
  font-family: adobe-jenson-pro, serif;
}

/* Current Plan Card Styling */
.current-plan-card {
  border: 1px solid var(--color-border);
  background: var(--color-background-elevated);
  padding: 2rem;
  margin-top: 1rem;
  border-radius: 0;
}

.current-plan-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.plan-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  color: white;
  flex-shrink: 0;
}

.plan-status-icon svg {
  filter: none;
}

.plan-status-info {
  flex: 1;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-family: adobe-jenson-pro, serif;
}

.plan-status-badge {
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-block;
  font-family: adobe-jenson-pro, serif;
}

.plan-status-badge.status-free {
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
}

.plan-status-badge.status-premium {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.3rem 0.5rem;
}

.manage-billing-button {
  padding: 0.75rem 1.25rem;
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 0;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: adobe-jenson-pro, serif;
}

.manage-billing-button:hover {
  background: var(--color-background-hover);
  border-color: var(--color-accent);
}

.current-plan-details {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}

.plan-description {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  font-family: adobe-jenson-pro, serif;
}

.plan-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.plan-pricing .price-amount {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
  font-family: adobe-jenson-pro, serif;
}

.plan-pricing .price-interval {
  font-size: 1rem;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
}

/* Billing Options Styling */
.billing-options {
  margin: 1rem 0;
}

.billing-toggle {
  display: flex;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.billing-button {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.members-list-page .settings-container {
    padding: 1.5rem;
  }

.billing-button:first-child {
  border-right: 1px solid var(--color-border);
}

.billing-button.billing-active {
  background: var(--color-accent);
  color: white;
}

.billing-button:hover:not(.billing-active) {
  background: var(--color-background-hover);
  color: var(--color-text-primary);
}

.savings-badge {
  background: var(--color-glow-anisota);
  color: white;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Quick Access Modal Styles */
.quick-access-modal .modal-content {
  max-height: 80vh;
}

.quick-access-content {
  padding: 0;
}

.quick-access-category {
  margin-bottom: 1.5rem;
}

.quick-access-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.35rem;
  }

.quick-access-button {
  background: var(--color-button-background);
  border: 1px solid var(--color-border-light);
  color: var(--color-button-text);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-transform: lowercase;
  min-height: 60px;
}

.quick-access-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
  transform: translateY(-1px);
}

.quick-access-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quick-access-button .button-label {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-access-button.navigation-button,
.quick-access-button.view-button,
.quick-access-button.action-button,
.quick-access-button.relationship-button {
  border-color: var(--color-border-light);
}

.quick-access-button.navigation-button:hover:not(:disabled),
.quick-access-button.view-button:hover:not(:disabled),
.quick-access-button.action-button:hover:not(:disabled),
.quick-access-button.relationship-button:hover:not(:disabled) {
  border-color: var(--color-border-light);
}

.quick-access-button.active {
  font-weight: 600;
}

.no-buttons-message {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .quick-access-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.375rem;
  }
  
  .quick-access-button {
    padding: 0.5rem;
    min-height: 50px;
  }
  
  .quick-access-button .button-label {
    font-size: 0.6875rem;
  }
}

/* =============================================================================
   FEATURE LOCKING SYSTEM
   ============================================================================= */

/* Locked Sections */
.locked-section {
  opacity: 0.6;
  position: relative;
}

.locked-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

/* Disable ALL interactions in locked sections */
.locked-section .toggle-button,
.locked-section .ui-toggle button,
.locked-section button,
.locked-section .home-page-button,
.locked-section .post-target-button,
.locked-section .fullscreen-behavior-button {
  pointer-events: none !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.locked-section .toggle-button:hover,
.locked-section button:hover {
  pointer-events: none !important;
}

/* Member Badges */
.premium-badge-section {
  font-size: 0.75rem;
  color: #fbbf24;
  margin-left: 0.5rem;
  font-weight: 500;
}

.premium-badge-inline {
  font-size: 0.6875rem;
  color: #fbbf24;
  margin-left: 0.25rem;
  font-weight: 500;
}

.premium-badge-config {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.625rem;
  color: #fbbf24;
  z-index: 2;
}

.premium-badge-control {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.5rem;
  color: #fbbf24;
  z-index: 2;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Member text styling */
.premium-text {
  color: #fbbf24;
  font-weight: 500;
}

/* Locked Descriptions */
.locked-description {
  color: #9ca3af;
  font-style: italic;
}

.upgrade-prompt {
  color: #fbbf24;
  font-weight: 500;
}

/* Control Button Settings - Locked State */
.control-button-setting.locked {
  opacity: 0.6;
  background: rgba(128, 128, 128, 0.1);
  border: 1px solid rgba(128, 128, 128, 0.2);
  cursor: not-allowed !important;
}

.control-button-setting.locked:hover {
  background: rgba(128, 128, 128, 0.15);
  transform: none;
}

/* Toggle Button - Locked State */
.toggle-button.locked {
  background: #4a5568 !important;
  opacity: 0.5;
  cursor: not-allowed !important;
}

.toggle-button.locked:hover {
  background: #4a5568 !important;
  transform: none;
}

.toggle-button.locked .toggle-slider {
  background: #718096;
}

/* Dropdown - Locked State */
.locked-dropdown {
  opacity: 0.6;
  background: rgba(128, 128, 128, 0.1);
  cursor: not-allowed !important;
}

.locked-dropdown:hover {
  background: rgba(128, 128, 128, 0.15);
}

/* Control Row Buttons - Locked State */
.nav-control.locked {
  background: var(--color-button-background-disabled, #2a2a2a);
  color: var(--color-button-text-disabled, #666);
  border-color: var(--color-border-disabled, #444);
  cursor: not-allowed !important;
  position: relative;
}

.nav-control.locked:hover {
  background: var(--color-button-background-disabled, #2a2a2a);
  color: var(--color-button-text-disabled, #666);
  border-color: var(--color-border-disabled, #444);
  transform: none;
}

.nav-control.locked:active {
  transform: none;
}

/* Preview Control Buttons - Locked State */
.preview-control-button.locked-button {
  border: 1px solid rgba(128, 128, 128, 0.3);
  cursor: not-allowed !important;
  position: relative;
}

.preview-control-button.locked-button:hover {
  background: rgba(128, 128, 128, 0.15);
  transform: none;
}

.preview-control-button.locked-button .premium-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.5rem;
  color: #fbbf24;
  z-index: 2;
}

/* Locked Zones in Control Settings */
.locked-zone {
  background: rgba(128, 128, 128, 0.05);
  border: 1px dashed rgba(128, 128, 128, 0.3);
}

.unlockable-zones-wrapper {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.unlockable-section-header {
  text-align: center;
  margin-bottom: 1rem;
}

.unlockable-section-header h3 {
  color: #fbbf24;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.unlockable-section-header p {
  color: #9ca3af;
  font-size: 0.875rem;
}

.locked-section .library-section {
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  padding: 1rem;
}

/* Member Feature Cards */
.feature-lock-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.feature-lock-card h3 {
  color: #fbbf24;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-lock-card p {
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.feature-lock-card .upgrade-button {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a202c;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feature-lock-card .upgrade-button:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Tier Indicators */
.tier-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tier-indicator.caterpillar {
  background: rgba(156, 163, 175, 0.1);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.tier-indicator.cocoon,
.tier-indicator.moth {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Interactive States for Locked Elements */
.locked-interactive:hover {
  cursor: not-allowed !important;
}

.locked-interactive:active {
  transform: none !important;
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
  .locked-section {
    opacity: 0.8;
  }
  
  .premium-badge-section,
  .premium-badge-inline,
  .premium-badge-config,
  .premium-badge-control,
  .premium-text {
    color: #ffcf40;
  }
  
  .locked-description {
    color: #a0aec0;
  }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .locked-section::after {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .control-button-setting.locked {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .toggle-button.locked {
  background: #2d3748 !important;
}

[data-theme="dark"] .locked-dropdown {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .nav-control.locked {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .preview-control-button.locked-button {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .locked-zone {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Animation for Member Badges */
@keyframes shimmer-pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

.premium-badge-control,
.premium-badge-config {
  animation: shimmer-pulse 2s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .premium-badge-section {
    font-size: 0.6875rem;
  }
  
  .premium-badge-control,
  .premium-badge-config {
    font-size: 0.5rem;
  }
  
  .unlockable-zones-wrapper {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
  
  .feature-lock-card {
    padding: 0.75rem;
    margin: 0.75rem 0;
  }
}

/* Members List Page Styles */
.members-list-page {
  /* Inherits from .settings-page */
}

.members-summary {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  text-align: center;
}

.members-summary p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.members-content {
  margin-top: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.members-section {
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.members-section .section-header {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  text-align: center;
}

.members-section .section-header.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.members-section .section-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: var(--color-text);
  font-weight: 600;
  text-align: center;
}



.members-section .section-count {
  margin: 0.75rem 0 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.members-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  width: 100%;
  box-sizing: border-box;
  max-width: 429px;
}

.member-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.member-item:hover {
  background: var(--color-card-background-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.05);
}

.member-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-border);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensure member avatars load completely */
  display: block;
  image-rendering: auto;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff9500, #ffaa33);
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-handle {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.member-display-name {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.member-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading state for members */
.members-list-page .loading-state {
  text-align: center;
  padding: 4rem 2rem;
}

.members-list-page .error-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-error);
}

.members-list-page .error-state p {
  margin: 0;
  font-size: 1.1rem;
}

/* Members CTA Button Container */
.members-cta-container {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .members-grid {
    gap: 0.75rem;
    margin-top: 1rem;
  }
  
  .member-item {
    gap: 0.75rem;
    padding: 0.75rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .member-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  
  .member-info {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
  
  .member-handle {
    font-size: var(--font-size-0-9);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .member-display-name {
    font-size: var(--font-size-0-8);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .member-description {
    font-size: var(--font-size-0-75);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* ===== LEAFLET DOCUMENT STYLES ===== */

/* Publication info styling - similar to feed-subtitle */
.leaflet-publication-info {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 2rem;
}

.leaflet-publication-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.leaflet-publication-description {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto;
}

/* Leaflet document cards */
.leaflet-read-button {
  font-family: var(--font-family-primary) !important;
}

.leaflet-document-title {
  font-family: var(--font-family-primary);
}

.leaflet-document-description {
  font-family: var(--font-family-primary);
}

/* Leaflet document card footer - normal layout with timestamp left and counter right */
.post-card.leaflet-publication .post-card-footer {
  justify-content: space-between !important;
}

/* Leaflet document card title styling */
.post-card.leaflet-publication .leaflet-document-title {
  font-size: var(--font-size-2) !important;
  line-height: 2rem !important;
}

/* Leaflet document card header styling */
.post-card.leaflet-publication .post-card-username {
  font-size: 1rem !important;
}

/* Leaflet document page styling - post-card appearance */
.leaflet-document-page .settings-container {
  background: var(--color-card-background);
  border: 2px solid var(--color-border);
  box-shadow: 0 4px 24px var(--color-shadow);
  max-width: 500px;
  margin: 2rem auto;
  padding: 0;
}

/* Adjust header padding for post-card style */
.leaflet-document-page .settings-header {
  padding: 2rem 1.5rem 0 1.5rem;
  margin-bottom: 0;
}

/* Override document title font size and alignment */
.leaflet-document-page .settings-header h1 {
  font-size: calc(2.5rem * var(--font-size-scale, 1.0));
  line-height: calc(2.5rem * var(--font-size-scale, 1.0));
  margin-top: 0;
  text-align: left;
}

/* Left align document description */
.leaflet-document-page .settings-description {
  text-align: left;
  font-style: italic;
}

/* Title section wrapper with border bottom */
.leaflet-document-title-section {
  border-bottom: 1px solid var(--color-border);
}

/* Adjust description padding */
.leaflet-document-page .settings-description {
  padding: 0 1.5rem 2rem 1.5rem;
  margin-bottom: 0;
}

/* Adjust header padding when it's the last element in title section */
.leaflet-document-title-section .settings-header:last-child {
  padding-bottom: 1.3rem;
}

/* Adjust section padding */
.leaflet-document-page .settings-section {
  padding: 1.3rem 1.5rem;
  margin-bottom: 0;
  margin-top: 0;
}

/* Adjust actions padding */
.leaflet-document-page .settings-actions {
  padding: 1rem 2rem 2rem 2rem;
}

/* Document header styling - similar to post-card-header */
.leaflet-document-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-card-background);
  min-height: 2rem;
  gap: 1rem;
}

/* Author info styling within header - matches post-card styling */
.leaflet-document-author-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  transition: all 0.2s ease;
}

.leaflet-document-author-info:hover {
  opacity: 0.8;
}

.leaflet-document-author-avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.leaflet-document-author-avatar:hover {
  opacity: 0.8;
}

.leaflet-document-author-name {
  font-size: 1.6rem;
  font-weight: 600;
  font-family: adobe-jenson-pro, serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
  line-height: 1.2;
}

.leaflet-document-author-handle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.2;
  margin-top: 0.1rem;
}

.leaflet-document-date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

/* Document footer styling - similar to post-card-footer */
.leaflet-document-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  background: var(--color-card-background);
  min-height: 1.4rem;
  padding: 1.3rem 1.5rem;
  padding-top: 1.4rem;
}

/* Loading skeleton styles */
.loading-skeleton {
  background: linear-gradient(90deg, 
    #d0d0d0 25%, 
    #e8e8e8 50%, 
    #d0d0d0 75%
  );
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
  min-height: 0.9rem;
  display: block;
  margin: 0.3rem 0;
  padding: 0.2rem 0;
  opacity: 0.8;
}

/* Dark theme skeleton colors */
@media (prefers-color-scheme: dark) {
  .loading-skeleton {
    background: linear-gradient(90deg, 
      #404040 25%, 
      #505050 50%, 
      #404040 75%
    );
  }
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Fade-in animations for loading and content states */
.leaflet-document-page {
  animation: leaflet-fade-in 0.3s ease-out;
}

.leaflet-document-page .settings-container {
  animation: leaflet-content-fade-in 0.4s ease-out;
}

.leaflet-publication-info {
  animation: leaflet-fade-in 0.2s ease-out;
}

@keyframes leaflet-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes leaflet-content-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered loading animations for skeleton elements - only on document page */
.leaflet-document-page .leaflet-document-header {
  animation: leaflet-fade-in 0.4s ease-out 0.1s both;
}

.leaflet-document-page .leaflet-document-title-section {
  animation: leaflet-fade-in 0.4s ease-out 0.2s both;
}

.leaflet-document-page .leaflet-document-content {
  animation: leaflet-fade-in 0.4s ease-out 0.3s both;
  transition: max-height 0.6s ease-out, opacity 0.4s ease-out;
}

.leaflet-document-page .leaflet-document-footer {
  animation: leaflet-fade-in 0.4s ease-out 0.4s both;
}

/* Expansion animation for content transition - only on document page */
.leaflet-document-page .leaflet-document-content {
  transition: all 0.6s ease-out;
  transform-origin: top;
  position: relative;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.leaflet-document-page .leaflet-document-content.loading {
  max-height: 300px;
  overflow: hidden;
  opacity: 1;
}

.leaflet-document-page .leaflet-document-content.loading-fade-out {
  max-height: 300px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.leaflet-document-page .leaflet-document-content.loaded {
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
  opacity: 0;
  animation: leaflet-expand-fade-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Ensure leaflet-document-page-content has no internal scrolling */
.leaflet-document-page-content {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  display: block !important;
}

/* Skeleton fade-out animation */
.loading-skeleton.fade-out {
  animation: skeleton-fade-out 0.3s ease-out forwards;
}

@keyframes skeleton-fade-out {
  from {
    opacity: 0.8;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

/* Content fade-in with expansion */
@keyframes leaflet-expand-fade-in {
  0% {
    max-height: 300px;
    opacity: 0;
    transform: scaleY(0.3) translateY(10px);
  }
  30% {
    opacity: 0.3;
    transform: scaleY(0.5) translateY(5px);
  }
  60% {
    opacity: 0.7;
    transform: scaleY(0.8) translateY(2px);
  }
  100% {
    max-height: 5000px;
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}

.leaflet-document-footer .leaflet-document-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.leaflet-document-footer .leaflet-document-social {
  display: flex;
  align-items: center;
}

/* Document content within settings sections */
.leaflet-document-content {
  line-height: 1.7;
  color: var(--color-text);
}

/* Remove margin-bottom from last block in each page */
.leaflet-document-page-content .leaflet-block-wrapper:last-child {
  margin-bottom: 0 !important;
}

/* Social links styling */
.leaflet-document-social {
  text-align: center;
}

/* Loading and error states within settings layout */
.leaflet-document-loading {
  text-align: center;
  padding: 2rem;
}

.leaflet-document-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

.leaflet-document-error {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

/* Block alignment */
.leaflet-align-left {
  text-align: left;
}

.leaflet-align-center {
  text-align: center;
}

.leaflet-align-right {
  text-align: right;
}

/* Block wrappers */
.leaflet-block-wrapper {
  margin-bottom: 1.5rem;
}

/* Text blocks */
.leaflet-text-block {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Header blocks */
.leaflet-header-block {
  margin: 2rem 0 1rem 0;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.leaflet-header-1 {
  font-size: 2.2rem;
}

.leaflet-header-2 {
  font-size: 1.8rem;
}

.leaflet-header-3 {
  font-size: 1.5rem;
}

.leaflet-header-4 {
  font-size: 1.3rem;
}

.leaflet-header-5 {
  font-size: 1.1rem;
}

.leaflet-header-6 {
  font-size: 1rem;
}

/* Blockquote blocks */
.leaflet-blockquote-block {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-background);
  font-style: italic;
  font-size: 1.1rem;
}

/* Code blocks */
.leaflet-code-block {
  position: relative;
  margin: 2rem 0;
  background: var(--color-background);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.leaflet-code-block pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.leaflet-code-block code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.leaflet-code-language {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
}

/* Image blocks */
.leaflet-image-block {
  margin: 2rem 0;
}

.leaflet-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-background);
}

.leaflet-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaflet-image-caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
  font-style: italic;
}

/* List blocks */
.leaflet-unordered-list-block {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.leaflet-list-item {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.leaflet-nested-list {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Website blocks */
.leaflet-website-block {
  margin: 2rem 0;
  background: var(--color-background-secondary);
}

.leaflet-website-link {
  display: block;
  text-decoration: none;
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all 0.2s ease;
  background: var(--color-background-secondary);
}

.leaflet-website-link:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leaflet-website-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.leaflet-website-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaflet-website-content {
  padding: 1.5rem;
}

.leaflet-website-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
}

.leaflet-website-description {
  margin: 0 0 0.75rem 0;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.leaflet-website-url {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 500;
}

/* Math blocks */
.leaflet-math-block {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  text-align: center;
}

.leaflet-math-tex {
  margin: 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 1rem;
  color: var(--color-text);
  white-space: pre-wrap;
}

/* Horizontal rule blocks */
.leaflet-horizontal-rule-block {
  margin: 3rem 0;
  border: none;
  height: 1px;
  background: var(--color-border);
}

/* Bluesky post blocks */
.leaflet-bsky-post-block {
  margin: 2rem 0;
}

.leaflet-bsky-post-placeholder {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
}

.leaflet-bsky-post-icon {
  font-size: 2rem;
}

.leaflet-bsky-post-text {
  flex: 1;
}

.leaflet-bsky-post-uri {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  word-break: break-all;
}

/* Rich text styling */
.leaflet-inline-code {
  background: var(--color-background);
  padding: 0.2em 0.4em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid var(--color-border);
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.leaflet-underline {
  text-decoration: underline;
}

.leaflet-strikethrough {
  text-decoration: line-through;
}

.leaflet-highlight {
  background: var(--color-accent);
  color: var(--color-background);
  padding: 0.1em 0.3em;
}

.leaflet-link {
    color: var(--color-glow-anisota);
    text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.leaflet-link:hover {
  border-bottom-color: var(--color-accent);
  text-decoration: underline;
}

.leaflet-id-anchor {
  scroll-margin-top: 2rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Unknown block styling */
.leaflet-unknown-block {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--color-background);
  border: 1px dashed var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
}

/* Mobile responsive styles for Leaflet blocks */
@media (max-width: 768px) {
  /* Fix mobile scrolling issues */
  body.settings-scrollable {
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  .leaflet-header-1 {
    font-size: 1.8rem;
  }
  
  .leaflet-header-2 {
    font-size: 1.5rem;
  }
  
  .leaflet-header-3 {
    font-size: 1.3rem;
  }
  
  .leaflet-code-block pre {
    padding: 1rem;
    font-size: var(--font-size-0-85);
  }
  
  .leaflet-website-image {
    height: 160px;
  }
  
  .leaflet-website-content {
    padding: 1rem;
  }
  
  .leaflet-document-header {
    padding: 1rem;
  }
  
  .leaflet-document-author-avatar {
    width: 40px;
    height: 40px;
  }
  
  .leaflet-document-author-name {
    font-size: 1.3rem;
  }
  
  .leaflet-document-author-handle {
    font-size: var(--font-size-0-85);
  }
  
  .leaflet-document-date {
    font-size: var(--font-size-0-85);
  }
  
  .leaflet-publication-info {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
  }
  
  .leaflet-publication-name {
    font-size: var(--font-size-1-1);
  }
  
  .leaflet-publication-description {
    font-size: var(--font-size-0-9);
  }
  
  .leaflet-document-page .settings-header h1 {
    font-size: 2rem;
    line-height: 2rem;
  }
  
  
  .leaflet-document-page .settings-container {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  
  /* Ensure all content containers allow touch scrolling */
  .leaflet-document-page .leaflet-document-content,
  .leaflet-document-page .leaflet-document-page-content,
  .leaflet-document-page .settings-section {
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* TID Clock Styles */
.tid-clock {
    font-family: Monaco, "Lucida Console", "Courier New", Courier, monospace;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.1s ease-out;
    color: var(--color-text);
    user-select: none;
    cursor: default;
}

.feed-subtitle .tid-clock {
    font-size: 0.6rem;
}

/* Subtle glow animation for TID updates */
@keyframes tidUpdate {
    0% {
        transform: scale(1);
        text-shadow: none;
    }
    50% {
        transform: scale(1.02);
        text-shadow: 0 0 8px rgba(255, 149, 0, 0.4);
    }
    100% {
        transform: scale(1);
        text-shadow: none;
    }
}

.tid-clock-updating {
    animation: tidUpdate 0.1s ease-out;
}

/* Dark mode adjustments for TID clock */
@media (prefers-color-scheme: dark) {
    .tid-clock-updating {
        text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
    }
}

/* Touch Menu Footer Styles */
.touch-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    background: var(--color-background-secondary);
}

.touch-menu-footer-left {
    display: flex;
    align-items: center;
}

.touch-menu-footer .tid-clock {
    font-size: var(--font-size-0-9);
    color: var(--color-text-secondary);
}

/* Level Up Modal Specific Styles */
.unlock-feature {
    margin-bottom: 1.5rem;
}

.unlock-feature-header {
    margin-bottom: 1rem;
}

.unlock-feature-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.25rem;
    font-family: adobe-jenson-pro, serif;
}

.unlock-feature-category {
    font-size: var(--font-size-0-8);
    color: var(--color-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: adobe-jenson-pro, serif;
}

.unlock-feature-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-family: adobe-jenson-pro, serif;
}

.unlock-feature-message {
    font-size: var(--font-size-0-9);
    color: var(--color-text);
    line-height: 1.5;
    background: var(--color-accent-subtle);
    padding: 1rem;
    border-left: 3px solid var(--color-accent);
    font-style: italic;
    font-family: adobe-jenson-pro, serif;
}

.level-up-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.level-up-continue-button {
    background: var(--color-button-background);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.level-up-continue-button:hover {
    background: var(--color-button-hover);
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

.level-up-continue-button:active {
    transform: translateY(1px);
}

/* Version TID Clock Styles */
.version-tid-clock {
}

.version-tid-clock .tid-clock {
    font-size: var(--font-size-0-75);
    color: var(--color-text-muted);
    opacity: 0.8;
}

/* ========================================
   iOS Safari Lucide Icon Fixes
   ======================================== */

/* SVG normalization for consistent rendering across browsers */
svg {
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Lucide-specific styling to fix stroke rendering issues */
.lucide, [data-lucide] {
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
    vertical-align: middle;
}

/* Force consistent SVG rendering across Safari versions */
svg[data-lucide] {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
    vertical-align: text-bottom;
}

/* Safari-specific fixes with hardware acceleration */
@supports (-webkit-appearance: none) {
    /* Apply SVG optimizations, but not to modal icons or harvest card icons which need to respect 3D transforms */
    svg:not(.modal-side svg):not(.modal-front svg):not(.modal-back svg):not(.harvest-card-front svg):not(.harvest-card-back svg) {
        transform: translateZ(0); /* Force hardware acceleration */
        backface-visibility: hidden;
    }
    
    /* Allow membership tier icons to show on card backs */
    .card-back .membership-tier-icon svg {
        backface-visibility: visible;
    }
    
    /* Ensure modal side SVGs inherit backface-visibility from their parent */
    .modal-side svg,
    .modal-front svg,
    .modal-back svg {
        backface-visibility: inherit;
        -webkit-backface-visibility: inherit;
    }
    
    /* Ensure harvest card SVGs inherit backface-visibility from their parent */
    .harvest-card-front svg,
    .harvest-card-back svg {
        backface-visibility: inherit;
        -webkit-backface-visibility: inherit;
    }
}

/* Emergency Safari icon fix for problematic versions */
.lucide, [data-lucide], svg {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Keyboard Shortcuts Settings Styles */
.keyboard-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.keyboard-shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.keyboard-shortcut-item:hover {
  border-color: var(--color-border-hover);
  background: var(--color-hover);
}

.shortcut-info {
  flex: 1;
}

.shortcut-name {
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
}

.shortcut-key-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-key-button {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--color-button-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.9em;
  min-width: 80px;
  justify-content: center;
}

.shortcut-key-button:hover {
  background: var(--color-button-secondary-hover);
  border-color: var(--color-border-hover);
}

.shortcut-key-display {
  font-weight: 500;
}

.shortcut-editing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-capture-input {
  padding: 6px 12px;
  background: var(--color-input-background);
  border: 2px solid #ff9500;
  color: var(--color-text);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.9em;
  min-width: 120px;
  text-align: center;
  outline: none;
  animation: pulse 1.5s ease-in-out infinite;
}

.shortcut-capture-input::placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.shortcut-cancel-button {
  padding: 6px 12px;
  background: var(--color-button-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85em;
}

.shortcut-cancel-button:hover {
  background: var(--color-button-secondary-hover);
  border-color: var(--color-border-hover);
}

@keyframes pulse {
  0%, 100% {
    border-color: #ff9500;
  }
  50% {
    border-color: rgba(255, 149, 0, 0.5);
  }
}

/* Muted Words Settings Styles */
.add-muted-word-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  font-weight: 500;
}

.add-muted-word-button:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.add-muted-word-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1-4);
  color: var(--color-text);
}

.add-muted-word-form {
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Override form styles when inside a modal */
.mute-modal .add-muted-word-form {
  background: none;
  border: none;
  padding: 0;
}

/* Advanced form fields animation container */
.advanced-form-fields {
  overflow: hidden;
  transition: all calc(0.3s / var(--animation-ui-transitions, 1)) ease;
}

.advanced-form-fields.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.advanced-form-fields.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: visible;
  }

.form-field {
  /* Remove margin-bottom since we're using gap now */
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-95);
  color: var(--color-text);
  font-weight: 500;
}

.form-field label input[type="checkbox"] {
  margin-right: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.muted-word-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
  color: var(--color-input-text);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1);
  box-sizing: border-box;
}

.muted-word-input:focus {
  outline: none;
  border-color: var(--color-input-focus);
}

.muted-word-input::placeholder {
  color: var(--color-input-placeholder);
}

.duration-select,
.target-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
  color: var(--color-input-text);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  cursor: pointer;
}

.duration-select:focus,
.target-select:focus {
  outline: none;
  border-color: var(--color-input-focus);
}

.form-actions {
  display: flex;
  gap: 12px;
  /* Remove margin-top since parent uses gap now */
}

.add-button {
  padding: 10px 20px;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  font-weight: 500;
}

.add-button:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.add-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cancel-button {
  padding: 10px 20px;
  background: var(--color-button-background);
  border: 1px solid var(--color-border);
  color: var(--color-button-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
}

.cancel-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border-light);
}

.cancel-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1);
}

/* Muted words settings empty state */
.settings-page .empty-state {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--color-text-secondary);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1);
  background: var(--color-card-background);
  border: 1px dashed var(--color-border-light);
  margin: 1rem 0;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.settings-page .empty-state:hover {
  border-color: var(--color-border);
}

.settings-page .empty-state p {
  margin: 0;
  line-height: 1.5;
  font-style: italic;
}

.muted-words-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1.5rem;
}

.muted-word-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  padding: 1rem;
  transition: all 0.2s ease;
}

.muted-word-item:hover {
  background: var(--color-card-background-hover);
  border-color: var(--color-border-light);
}

.muted-word-content {
  flex: 1;
}

.muted-word-value {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1-1);
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.muted-word-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.muted-word-target,
.muted-word-actor-target,
.muted-word-expiry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-85);
  color: var(--color-text-muted);
  background: var(--color-background-secondary);
  padding: 4px 8px;
  border: 1px solid var(--color-border);
}

.remove-muted-word-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-button-background);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 12px;
}

.remove-muted-word-button:hover:not(:disabled) {
  background: var(--color-error);
  border-color: var(--color-error);
  color: var(--color-text-inverse);
}

.remove-muted-word-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .muted-word-details {
    gap: 6px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* Mute filters */
.mute-filters {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.mute-filters .notification-filters {
    justify-content: center;
}

/* Mute Modal Styles */
.mute-modal {
  max-width: 600px;
  width: 90vw;
}

.mute-modal-content {
  padding: 0;
}

.mute-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.mute-tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.mute-tab:hover {
  background: var(--color-background-hover);
  color: var(--color-text-primary);
}

.mute-tab.active {
  color: #ff9500;
  border-bottom-color: #ff9500;
  background: var(--color-background-hover);
}

.mute-tab-content {
  padding: 0 1rem 1rem;
}

.mute-section {
  margin-bottom: 2rem;
}

.mute-section h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--color-text-primary);
}

.mute-section h4 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1rem;
  color: var(--color-text-primary);
}

.mute-description {
  margin: 0 0 1.5rem 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.mute-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--color-background-secondary);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.mute-status-info {
  flex: 1;
}

.mute-status-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.mute-status-value {
  font-weight: 600;
  margin-left: 0.5rem;
}

.mute-status-value.muted {
  color: #ff4444;
}

.mute-status-value.not-muted {
  color: var(--color-text-secondary);
}

.mute-status-note {
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
  margin-top: 0.25rem;
}

.mute-action-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mute-action-button.mute {
  background: #ff4444;
  color: white;
}

.mute-action-button.mute:hover {
  background: #cc3333;
}

.mute-action-button.unmute {
  background: var(--color-background-tertiary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.mute-action-button.unmute:hover {
  background: var(--color-background-hover);
}

.mute-action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.existing-mutes {
  margin-bottom: 2rem;
}

.muted-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.muted-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.muted-item-content {
  flex: 1;
}

.muted-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.muted-item-target,
.muted-item-feeds,
.muted-item-expiry,
.muted-item-reason {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.muted-item-target svg,
.muted-item-feeds svg,
.muted-item-expiry svg,
.muted-item-reason svg {
  opacity: 0.7;
}

.remove-mute-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-tertiary);
  padding: 0.25rem;
  transition: all 0.2s ease;
  margin-left: 1rem;
}

.remove-mute-button:hover {
  color: #ff4444;
  background: var(--color-background-hover);
}

.remove-mute-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.no-existing-mutes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.create-advanced-mute {
  padding: 1.5rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.create-advanced-mute .form-field {
  /* Remove margin-bottom since we're using gap now */
}

.create-advanced-mute label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

.reason-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.reason-input:focus {
  outline: none;
  border-color: #ff9500;
}

.create-mute-button {
  width: 100%;
  padding: 0.75rem;
  background: #ff9500;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.create-mute-button:hover {
  background: #ffaa33;
}

.create-mute-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-state {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Responsive adjustments for mute modal */
@media (max-width: 768px) {
  .mute-modal {
    width: 95vw;
    max-width: none;
  }
  
  .mute-tabs {
    flex-direction: column;
  }
  
  .mute-tab {
    border-bottom: 1px solid var(--color-border);
    border-right: none;
  }
  
  .mute-tab.active {
    border-bottom-color: #ff9500;
  }
  
  .mute-status {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .checkbox-group {
    flex-direction: column;
    gap: 0.1rem;
  }
  
  .muted-item {
    flex-direction: column;
    gap: 1rem;
  }
  
  .remove-mute-button {
    align-self: flex-end;
    margin-left: 0;
  }
}

/* Hide desktop-only elements on mobile devices */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

/* ThreadGate Modal Styles */
.threadgate-modal {
  max-width: 500px;
  width: 90vw;
}

.threadgate-loading {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.threadgate-content {
  padding: 0;
}

.threadgate-section-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--color-text-primary);
  font-weight: 600;
}

.threadgate-section-description {
  margin: 0 0 1rem 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.threadgate-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.threadgate-option {
  flex: 1;
  padding: 0.75rem 0.5rem;
  background: var(--color-background-secondary);
  border: 2px solid var(--color-border);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: inherit;
}

.threadgate-option:hover {
  background: var(--color-background-hover);
  border-color: var(--color-border-light);
}

.threadgate-option.active {
  background: #ff9500;
  border-color: #ff9500;
  color: white;
}

.threadgate-rules {
  padding: 1rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.threadgate-rules-description {
  margin: 0 0 0.5rem 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.threadgate-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.threadgate-checkbox-label:hover {
  background: var(--color-background-hover);
}

.threadgate-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.threadgate-checkbox-label input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.threadgate-checkbox-label:has(input[type="checkbox"]:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.threadgate-checkbox-label:has(input[type="checkbox"]:disabled):hover {
  background: transparent;
}

.threadgate-checkbox-label span {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  flex: 1;
}

.threadgate-lists {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.threadgate-lists-title {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.list-count {
  color: var(--color-text-tertiary);
  font-size: 0.85rem;
}


.threadgate-quote-section {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.threadgate-quote-section .ui-toggle {
  margin-bottom: 0;
}

/* Confirmation Modal Styles */
.threadgate-confirm-modal {
  max-width: 400px;
  width: 90vw;
}

.threadgate-confirm-modal .modal-actions {
    margin-top: 0rem;
  }

/* Responsive adjustments for threadgate modal */
@media (max-width: 768px) {
  .threadgate-modal {
    width: 95vw;
    max-width: none;
  }
  
  .threadgate-options {
    flex-direction: column;
  }
  
  .threadgate-actions {
    flex-direction: column;
  }
  
  .threadgate-cancel-button,
  .threadgate-save-button {
    width: 100%;
  }
}

/* ===== THREAD COMPOSER STYLES ===== */
/* Scoped to PostComposer to avoid conflicts with post cards in feed */

/* Thread suggestion when over character limit */
.post-composer .thread-suggestion {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px dashed var(--color-accent);
  font-family: adobe-jenson-pro, serif;
  animation: fadeIn 0.3s ease-out;
}

.post-composer .thread-suggestion-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-composer .thread-suggestion-text {
  font-size: var(--font-size-0-9);
  color: var(--color-text);
  line-height: 1.4;
  font-family: adobe-jenson-pro, serif;
}

.post-composer .thread-suggestion-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-composer .thread-suggestion-button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  font-size: var(--font-size-0-875);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
}

.post-composer .thread-suggestion-create {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.post-composer .thread-suggestion-create:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.post-composer .thread-suggestion-dismiss {
  background: var(--color-button-background);
  color: var(--color-text);
}

.post-composer .thread-suggestion-dismiss:hover {
  background: var(--color-button-hover);
}

/* Thread posts chain display */
.post-composer .thread-posts-chain {
  animation: fadeIn 0.3s ease-out;
}


/* Individual thread post containers */
.post-composer .thread-post-container {
  position: relative;
}

.post-composer .thread-post {
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  font-family: adobe-jenson-pro, serif;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 5rem; /* Ensure minimum height for footer positioning */
}

/* First post - no top border, solid bottom border */
.post-composer .thread-post-container:first-child .thread-post {
    border-top: 1px solid var(--color-border-light);
  border-bottom: none;
}

/* Middle posts - dashed top border, no bottom border (except last) */
.post-composer .thread-post-container:not(:first-child) .thread-post {
  border-top: 1px dashed var(--color-border-light);
  border-bottom: none;
}

/* Last post - dashed top border, solid bottom border */
.post-composer .thread-post-container:last-child .thread-post {
  border-bottom: 1px solid var(--color-border-light);
}

/* Single post (when there's only one) - restore all borders */
.post-composer .thread-post-container:first-child:last-child .thread-post {
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.post-composer .thread-post:hover:not(.current-post) {
  background: var(--color-card-background-hover);
}

.thread-post.current-post.last-post {
    border-bottom: 1px dashed var(--color-border-light) !important;
  }

.thread-post.last-post {
    border-bottom: 1px solid var(--color-border-light) !important;
  }

.thread-post.current-post {
  background: var(--color-card-background-active);
  cursor: default;
}

/* Bluesky thread posts - blue borders and glow */
.post-composer .thread-post.thread-post-bluesky {
  border-left-color: rgba(74, 158, 255, 0.4);
  border-right-color: rgba(74, 158, 255, 0.4);
}

.post-composer .thread-post-container:first-child .thread-post.thread-post-bluesky {
  border-top-color: rgba(74, 158, 255, 0.4);
}

.post-composer .thread-post-container:not(:first-child) .thread-post.thread-post-bluesky {
  border-top-color: rgba(74, 158, 255, 0.3);
}

.post-composer .thread-post-container:last-child .thread-post.thread-post-bluesky {
  border-bottom-color: rgba(74, 158, 255, 0.4);
}

.post-composer .thread-post-container:first-child:last-child .thread-post.thread-post-bluesky {
  border-top-color: rgba(74, 158, 255, 0.4);
  border-bottom-color: rgba(74, 158, 255, 0.4);
}

.post-composer .thread-post.thread-post-bluesky.current-post {
  background: rgba(74, 158, 255, 0.05);
  border-left-color: rgba(74, 158, 255, 0.5);
  border-right-color: rgba(74, 158, 255, 0.5);
}

.post-composer .thread-post.thread-post-bluesky:hover:not(.current-post) {
  background: rgba(74, 158, 255, 0.03);
}

/* Anisota thread posts - orange borders and glow */
.post-composer .thread-post.thread-post-anisota {
  border-left-color: rgba(255, 149, 0, 0.4);
  border-right-color: rgba(255, 149, 0, 0.4);
}

.post-composer .thread-post-container:first-child .thread-post.thread-post-anisota {
  border-top-color: rgba(255, 149, 0, 0.4);
}

.post-composer .thread-post-container:not(:first-child) .thread-post.thread-post-anisota {
  border-top-color: rgba(255, 149, 0, 0.3);
}

.post-composer .thread-post-container:last-child .thread-post.thread-post-anisota {
  border-bottom-color: rgba(255, 149, 0, 0.4);
}

.post-composer .thread-post-container:first-child:last-child .thread-post.thread-post-anisota {
  border-top-color: rgba(255, 149, 0, 0.4);
  border-bottom-color: rgba(255, 149, 0, 0.4);
}

.post-composer .thread-post.thread-post-anisota.current-post {
  background: rgba(255, 149, 0, 0.05);
  border-left-color: rgba(255, 149, 0, 0.5);
  border-right-color: rgba(255, 149, 0, 0.5);
}

.post-composer .thread-post.thread-post-anisota:hover:not(.current-post) {
  background: rgba(255, 149, 0, 0.03);
}

.thread-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.thread-post-number {
    font-size: var(--font-size-0-75);
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-background-secondary);
    padding: 0.25rem 0.5rem;
    font-family: adobe-jenson-pro, serif;
    border: 1px solid var(--color-border);
}

.thread-post-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.thread-post-content-wrapper {
  flex: 1;
  min-width: 0; /* Allow content to shrink */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevent overflow */
}

.thread-post-controls {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  align-items: center;
  flex-shrink: 0; /* Prevent controls from shrinking */
}

.thread-post-remove {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: all 0.2s ease;
  line-height: 1;
  font-family: adobe-jenson-pro, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .thread-post-remove:hover {
    background: var(--color-error);
    color: var(--color-text-inverse);
    border-color: var(--color-error);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px var(--color-shadow-light);
  }
}

/* Active states for mobile touch devices */
.thread-post-remove:active {
  background: var(--color-error);
  color: var(--color-text-inverse);
  border-color: var(--color-error);
  transform: translateY(0px);
}

.thread-post-reorder {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.thread-post-move-up,
.thread-post-move-down {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: all 0.2s ease;
  line-height: 1;
  font-family: adobe-jenson-pro, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .thread-post-move-up:hover:not(:disabled),
  .thread-post-move-down:hover:not(:disabled) {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px var(--color-shadow-light);
  }
}

/* Active states for mobile touch devices */
.thread-post-move-up:active:not(:disabled),
.thread-post-move-down:active:not(:disabled) {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border-color: var(--color-accent);
  transform: translateY(0px);
}

.thread-post-move-up:disabled,
.thread-post-move-down:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--color-background-muted);
  border-color: var(--color-border-light);
  transform: none;
  box-shadow: none;
}

.thread-post-current-indicator {
  font-size: var(--font-size-0-8);
  color: var(--color-accent);
  font-weight: 500;
  font-style: italic;
  font-family: adobe-jenson-pro, serif;
}

.thread-post-preview {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.thread-post-preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden; /* Prevent overflow */
  word-wrap: break-word;
  overflow-wrap: break-word;
}


.thread-post-text {
  font-size: var(--font-size-0-9);
  color: var(--color-text);
  line-height: 1.4;
  font-family: adobe-jenson-pro, serif;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word; /* Force break long words */
  hyphens: auto; /* Add hyphens for better readability */
}

.thread-post-empty {
  font-size: var(--font-size-0-9);
  color: var(--color-text-muted);
  font-style: italic;
  font-family: adobe-jenson-pro, serif;
}

.thread-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* Push footer to bottom */
  flex-shrink: 0; /* Prevent footer from shrinking */
}

.thread-post-embed-indicators {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.thread-post-embed-indicator {
  font-size: var(--font-size-0-75);
  color: var(--color-text-muted);
  background: var(--color-background-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--border-radius-sm);
}

.thread-post-length {
  font-size: var(--font-size-0-75);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.thread-post-length.over-limit {
  color: var(--color-error);
  font-weight: 600;
}

.thread-post-editor {
  /* Make the editor fill the available space */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.thread-post-editor .rich-text-input {
  /* Remove extra borders and padding since we're inside the thread post */
  border: none;
  background: transparent;
  padding: 0;
  font-family: adobe-jenson-pro, serif;
}

.thread-post-editor .rich-text-input textarea {
  /* Ensure the textarea inherits the thread post styling */
  background: transparent;
  border: none;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  line-height: 1.4;
  color: var(--color-text);
  padding: 0;
  resize: none;
  min-height: 2.5rem;
}

.thread-post-editor .rich-text-input textarea:focus {
  outline: none;
  box-shadow: none;
}

.thread-post-embeds {
  width: 100%;
  flex: 1;
}

.thread-post-embeds .image-previews {
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.thread-post-embeds .post-embeds-preview {
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.thread-post-embeds .link-embed-preview {
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.thread-post-embeds .embed-loading-indicator {
  font-size: var(--font-size-0-8);
  color: var(--color-text-muted);
  font-family: adobe-jenson-pro, serif;
}

.thread-post-embed-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.thread-post-embed-indicator {
    font-size: var(--font-size-0-75);
    color: var(--color-text-muted);
    background: var(--color-background-secondary);
    padding: 0.25rem 0.5rem;
    font-family: adobe-jenson-pro, serif;
    border: 1px solid var(--color-border);
}

/* Thread connector lines removed - using dashed borders instead */

/* Add new post button */
.post-composer .thread-add-post {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.post-composer .thread-add-post-button {
    padding: 0.75rem 1.5rem;
    background: var(--color-border);
    color: var(--color-text);
    font-size: var(--font-size-0-9);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: adobe-jenson-pro, serif;
    border: 1px solid var(--color-border-light);
}

.post-composer .thread-add-post-button:hover {
  background: var(--color-button-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

/* Thread mode button styling */
.post-button.thread-mode {
  background: var(--color-accent);
  position: relative;
  overflow: hidden;
}

.post-button.thread-mode:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

/* Recent Posts Modal Thread Creation Option */
.recent-posts-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.thread-creation-option {
  margin-bottom: 1rem;
}

.thread-creation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-card-background);
  border: 2px solid var(--color-accent);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: adobe-jenson-pro, serif;
}

.thread-creation-item:hover {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

.thread-creation-icon {
  display: none; /* Hide the emoji icon */
}

.thread-creation-content {
  flex: 1;
}

.thread-creation-title {
  font-size: var(--font-size-1-1);
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-family: adobe-jenson-pro, serif;
}

.thread-creation-description {
  font-size: var(--font-size-0-9);
  opacity: 0.8;
  line-height: 1.3;
  font-family: adobe-jenson-pro, serif;
}

.recent-posts-divider {
  display: flex;
  align-items: center;
  margin: 1rem 0;
  position: relative;
}

.recent-posts-divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.recent-posts-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.recent-posts-divider-text {
  padding: 0 1rem;
  font-size: var(--font-size-0-8);
  color: var(--color-text-muted);
  background: var(--color-modal-background);
  white-space: nowrap;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .post-composer .thread-suggestion-actions {
    flex-direction: column;
  }
  
  .post-composer .thread-suggestion-button {
    width: 100%;
    text-align: center;
  }
  
  .thread-creation-item {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }
}

/* Inspect Modal Styles */
.inspect-modal .modal-content {
  max-width: 700px;
  max-height: 85vh;
  width: 90vw;
}

.inspect-modal-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  max-height: calc(85vh - 120px);
}

.inspect-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.inspect-tab {
  flex: 1;
  padding: 0.875rem 1.25rem;
  background: transparent;
  border: none;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--font-size-0-95);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.inspect-tab:last-child {
  border-right: none;
}

.inspect-tab:hover {
  color: var(--color-text);
  background: var(--color-background-secondary);
}

.inspect-tab.active {
  color: var(--color-text);
  font-weight: 600;
}

.inspect-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ff9500;
}

.inspect-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* JSON Section */
.inspect-json-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.inspect-json-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.inspect-json-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.inspect-card-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-background-secondary);
  color: var(--color-text);
  font-size: var(--font-size-0-85);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
}

.inspect-uri {
  font-size: var(--font-size-0-8);
  color: var(--color-text-secondary);
  font-family: 'Monaco', 'Courier New', monospace;
  word-break: break-all;
}

.inspect-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-size: var(--font-size-0-875);
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.inspect-back-button:hover {
  background: var(--color-button-background-hover);
  border-color: var(--color-border-light);
}

.inspect-metadata-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  border-top: none;
  cursor: pointer;
  font-size: var(--font-size-0-875);
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
  width: 100%;
  flex-shrink: 0;
}

.inspect-metadata-toggle:hover {
  background: var(--color-button-background-hover);
  color: var(--color-text);
}

.inspect-metadata-toggle.expanded {
  background: var(--color-button-background);
  color: var(--color-text);
  border-bottom: 2px dashed var(--color-border);
}

.inspect-metadata-container {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-top: 1.3px dashed var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
  animation: metadataSlideIn 0.3s ease-out;
}

@keyframes metadataSlideIn {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 300px;
    opacity: 1;
  }
}

.inspect-copy-button-icon,
.inspect-share-button,
.inspect-open-button, .inspect-browse-collection-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 2rem;
  height: 2rem;
  background: transparent;
  color: var(--color-text);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: adobe-jenson-pro, serif;
  line-height: 1;
  text-align: center;
}

.inspect-copy-button-icon:hover,
.inspect-share-button:hover,
.inspect-open-button:hover, .inspect-browse-collection-button:hover {
  color: #ff9500;
  background: var(--color-card-background-hover);
}

.inspect-copy-button-icon.copied,
.inspect-share-button:active,
.inspect-open-button:active, .inspect-browse-collection-button:active {
  color: var(--color-success, #28a745);
}

.inspect-rkey-copy {
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.inspect-rkey-copy:hover {
  color: #ff9500;
  text-decoration-style: solid;
}

.inspect-rkey-copy.copied {
  color: var(--color-success, #28a745);
  text-decoration: none;
}

.inspect-json-container {
  flex: 1;
  overflow: auto;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-bottom: 1.3px dashed var(--color-border);
  padding: 0;
}

.inspect-json-content {
  margin: 0;
  padding: 1rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: var(--font-size-0-85);
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
  overflow-y: auto;
}

.post-card-body .inspect-json-container {
    background: inherit;
    border: inherit;
  }

/* Clickable URIs and DIDs in JSON */
.json-uri,
.json-did {
  color: #ff9500;
  text-decoration: underline;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

.json-uri:hover,
.json-did:hover {
  color: #ffaa33;
  text-decoration: none;
  background: rgba(255, 149, 0, 0.1);
}

/* Optional: slightly different styling for DIDs vs URIs */
.json-did {
  color: var(--color-accent, #ff9500);
}

/* Backlinks Section */
.inspect-backlinks-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.inspect-loading,
.inspect-error,
.inspect-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-0-95);
}

.inspect-error {
  color: var(--color-error, #dc3545);
  gap: 1rem;
}

.inspect-retry-button {
  padding: 0.625rem 1.25rem;
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-size: var(--font-size-0-875);
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.inspect-retry-button:hover {
  background: var(--color-button-background-hover);
  border-color: var(--color-border-light);
}

.inspect-backlinks-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  overflow: hidden;
}

.inspect-backlinks-count {
  padding: 0.75rem 1rem;
  background: var(--color-background-secondary);
  color: var(--color-text);
  font-size: var(--font-size-0-9);
  font-weight: 600;
  border-left: 3px solid #ff9500;
  flex-shrink: 0;
}

.inspect-backlinks-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.5rem;
}

.backlink-summary-item {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all 0.2s ease;
}

.backlink-summary-item:hover {
  border-color: var(--color-border-light);
}

.backlink-summary-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.backlink-summary-header:hover {
  background: var(--color-background-hover);
}

.backlink-summary-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.backlink-collection {
  font-size: var(--font-size-0-9);
  font-weight: 600;
  color: var(--color-text);
  font-family: 'Monaco', 'Courier New', monospace;
}

.backlink-path {
  font-size: var(--font-size-0-8);
  color: var(--color-text-secondary);
  font-family: 'Monaco', 'Courier New', monospace;
}

.backlink-stats {
  font-size: var(--font-size-0-85);
  color: var(--color-text-secondary);
  font-family: inherit;
}

.backlink-expand-icon {
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.backlink-summary-header:hover .backlink-expand-icon {
  color: var(--color-text);
}

.backlink-details {
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}

.backlink-details-loading {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-0-9);
  font-family: inherit;
}

.backlink-records-list {
  display: flex;
  flex-direction: column;
}

.backlink-record-item {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.backlink-record-item:last-child {
  border-bottom: none;
}

.backlink-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.backlink-record-did {
  font-size: var(--font-size-0-85);
  color: var(--color-text);
  font-family: 'Monaco', 'Courier New', monospace;
  word-break: break-all;
  font-weight: 500;
}

.backlink-record-rkey {
  font-size: var(--font-size-0-8);
  color: var(--color-text-secondary);
  font-family: 'Monaco', 'Courier New', monospace;
}

.backlink-record-external {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.backlink-record-external:hover {
  color: #ff9500;
}

.backlink-record-data {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

.backlink-record-data pre {
  margin: 0;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: var(--font-size-0-8);
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre;
}

.backlink-record-error {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.backlink-error-message {
  font-size: var(--font-size-0-85);
  color: var(--color-error, #dc3545);
  font-family: inherit;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .inspect-modal .modal-content {
    width: 95vw;
    max-height: 90vh;
  }

  .inspect-json-header {
    flex-direction: column;
    align-items: stretch;
  }

  .inspect-copy-button {
    width: 100%;
    justify-content: center;
  }

  .inspect-tab {
    padding: 0.75rem 1rem;
    font-size: var(--font-size-0-9);
  }

  .backlink-summary-header {
    padding: 0.875rem;
  }

  .backlink-record-item {
    padding: 0.875rem;
  }
}

/* Edit Profile Modal Styles */
.edit-profile-modal .modal-content {
  max-width: 700px;
  width: 90vw;
}

.edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edit-profile-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.edit-profile-form .form-field label {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-95);
  font-weight: 500;
  color: var(--color-text);
}

.avatar-upload-section {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: var(--color-background-subtle);
}

.avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avatar-controls .save-btn, .avatar-controls .cancel-btn {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.profile-input,
.profile-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
  color: var(--color-input-text);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1);
  box-sizing: border-box;
}

.profile-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.profile-input:focus,
.profile-textarea:focus {
  outline: none;
  border-color: var(--color-input-focus);
}

.profile-input::placeholder,
.profile-textarea::placeholder {
  color: var(--color-input-placeholder);
}

.form-help-text {
  font-size: var(--font-size-0-85);
  color: var(--color-text-muted);
  font-family: adobe-jenson-pro, serif;
}

.form-error-text {
  font-size: var(--font-size-0-85);
  color: var(--color-error);
  font-family: adobe-jenson-pro, serif;
  margin-top: 0.25rem;
}

.profile-input.error,
.profile-textarea.error {
  border-color: var(--color-error);
}

.profile-input.error:focus,
.profile-textarea.error:focus {
  border-color: var(--color-error);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .edit-profile-modal .modal-content {
    width: 95vw;
    max-width: none;
  }

  .avatar-upload-section {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Release Notes History Page Styling - Leaflet Document Style */
.release-notes-history-page .settings-container {
  background: var(--color-card-background);
  border: 2px solid var(--color-border);
  box-shadow: 0 4px 24px var(--color-shadow);
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
}

.release-notes-history-page .settings-header {
  padding: 0;
  margin-bottom: 1rem;
}

.release-notes-history-page .settings-header h1 {
  font-size: calc(2.5rem * var(--font-size-scale, 1.0));
  line-height: calc(2.5rem * var(--font-size-scale, 1.0));
  margin: 0;
  text-align: left;
}

.release-notes-history-page .settings-description {
  text-align: left;
  font-style: italic;
  padding: 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.release-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.release-note-item {
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

.release-note-item:last-child {
  border-bottom: none;
}

.release-note-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.release-note-header:hover {
  opacity: 0.7;
}

.release-note-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.release-note-item.expanded .release-note-icon {
  transform: rotate(0deg);
}

.release-note-info {
  flex: 1;
  min-width: 0;
}

.release-note-version {
  font-size: 1.6rem;
  font-weight: 600;
  font-family: adobe-jenson-pro, serif;
  color: var(--color-text);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.current-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-background);
  background: var(--color-glow-anisota);
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.release-note-date {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.2;
  margin-top: 0.2rem;
}

.release-note-content {
  padding: 0 0 1.3rem 0;
  overflow: hidden;
  animation: release-note-expand 0.3s ease-out;
}

@keyframes release-note-expand {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 5000px;
  }
}

.release-note-markdown {
  padding-left: 2.2rem;
  color: var(--color-text);
  line-height: 1.7;
}

.release-note-markdown h1,
.release-note-markdown h2,
.release-note-markdown h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-weight: 600;
  line-height: 1.3;
}

.release-note-markdown h1 {
  font-size: 1.8rem;
}

.release-note-markdown h2 {
  font-size: 1.5rem;
}

.release-note-markdown h3 {
  font-size: 1.2rem;
}

.release-note-markdown p {
  margin: 0.75rem 0;
}

.release-note-markdown ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.release-note-markdown li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.release-note-markdown strong {
  font-weight: 600;
}

.release-note-markdown em {
  font-style: italic;
}

.release-note-markdown code {
  background: var(--color-background);
  padding: 0.2em 0.4em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid var(--color-border);
}

.release-note-markdown a {
  color: var(--color-glow-anisota);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.release-note-markdown a:hover {
  border-bottom-color: var(--color-accent);
  text-decoration: underline;
}

.release-note-loading {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .release-notes-history-page .settings-container {
    margin: 1.5rem auto;
    padding: 1.5rem 1rem;
  }

  .release-notes-history-page .settings-header h1 {
    font-size: 2rem;
    line-height: 2rem;
  }

  .release-note-header {
    padding: 1rem 0;
  }

  .release-note-version {
    font-size: 1.3rem;
  }

  .release-note-markdown {
    padding-left: 2rem;
  }

  .release-note-markdown h1 {
    font-size: 1.5rem;
  }

  .release-note-markdown h2 {
    font-size: 1.3rem;
  }

  .release-note-markdown h3 {
    font-size: 1.1rem;
  }
}

/* ===== ACCOUNT SWITCHING FADE OUT ===== */

/* Apply smooth fade-out to entire body when switching accounts */
body {
  transition: opacity calc(500ms / var(--animation-page-transitions, 1)) ease-out;
  opacity: 1;
}

/* Fade out the entire UI when switching accounts */
body.account-switching-fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ===== MANAGE DATA PAGE STYLES ===== */

/* Data Summary Section */
.data-summary-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
}

.data-summary-stats .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: adobe-jenson-pro, serif;
}

.data-summary-stats .stat-label {
  font-size: var(--font-size-1);
  color: var(--color-text-secondary);
}

.data-summary-stats .stat-value {
  font-size: var(--font-size-1-2);
  font-weight: 600;
  color: var(--color-text);
}

.data-summary-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.download-button,
.refresh-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-button-background);
  border: 1px solid var(--color-border-light);
  color: var(--color-button-text);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-95);
  cursor: pointer;
  transition: all 0.15s ease;
}

.download-button:hover:not(:disabled),
.refresh-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  transform: translateY(-1px);
}

.download-button:disabled,
.refresh-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Collection List Styles - using unique class names to avoid conflicts */
.data-collection-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.data-collection-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  cursor: default;
  transition: all 0.2s ease;
}

.data-collection-item:hover {
  background: var(--color-card-background-hover);
}

.collection-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.collection-name {
  font-size: var(--font-size-1-1);
  font-weight: 600;
  color: var(--color-text);
  font-family: adobe-jenson-pro, serif;
}

.collection-nsid {
  font-size: var(--font-size-0-85);
  color: var(--color-text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

.collection-count {
  font-size: var(--font-size-0-9);
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
  font-family: adobe-jenson-pro, serif;
}

.delete-collection-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.delete-collection-button:hover:not(:disabled) {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
}

.delete-collection-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal specific styles */
.delete-confirmation-modal-content {
  font-family: adobe-jenson-pro, serif;
}

.collection-deletion-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
}

.deletion-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deletion-stat .label {
  font-size: var(--font-size-0-9);
  color: var(--color-text-secondary);
}

.deletion-stat .value {
  font-size: var(--font-size-0-95);
  font-weight: 600;
  color: var(--color-text);
  font-family: 'IBM Plex Mono', monospace;
  word-break: break-all;
}

.cancel-button {
  padding: 0.75rem 1.5rem;
  background: var(--color-button-background);
  border: 1px solid var(--color-border-light);
  color: var(--color-button-text);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-95);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cancel-button:hover:not(:disabled) {
  background: var(--color-button-hover);
}

.confirm-delete-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #dc3545;
  border: 1px solid #dc3545;
  color: white;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-95);
  cursor: pointer;
  transition: all 0.15s ease;
}

.confirm-delete-button:hover:not(:disabled) {
  background: #c82333;
  border-color: #c82333;
}

.confirm-delete-button:disabled,
.cancel-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================
   TRADITIONAL THREAD VIEW STYLES
   ========================================== */

/* Enable scrolling when traditional thread page is active */
body.traditional-thread-page-active {
    overflow: auto !important;
}

.traditional-thread-view {
    width: 100%;
    background: var(--color-background);
    overflow-y: auto;
    padding-top: 20dvh;
    padding-bottom: 20dvh;
}

.traditional-thread-container {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 100px;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.traditional-thread-container.content-ready {
  opacity: 1;
}

.traditional-thread-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 1rem;
}

.traditional-thread-title {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1-5);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  text-align: center;
}

.traditional-thread-switch-view-link-container {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem 1.5rem;
}

.traditional-thread-switch-view-link {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: underline;
  transition: opacity 0.15s ease;
}

.traditional-thread-switch-view-link:hover {
  opacity: 0.7;
}

/* Legacy class support */
.traditional-thread-switch-link {
  display: block;
  text-align: center;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-9);
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: underline;
  margin-bottom: 1.5rem;
  transition: opacity 0.15s ease;
}

.traditional-thread-switch-link:hover {
  opacity: 0.7;
}

.traditional-thread-loading,
.traditional-thread-error {
  text-align: center;
  padding: 4rem 2rem;
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1);
  color: var(--color-text-secondary);
}

.traditional-thread-loading {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.traditional-thread-error {
  color: #dc3545;
}

.traditional-thread-content {
  display: flex;
  flex-direction: column;
  overflow: visible; /* Allow tooltips to overflow */
}

/* Individual thread post container */
.traditional-thread-post-container {
  position: relative;
  margin-bottom: 0;
  overflow: visible; /* Allow tooltips to overflow */
}

/* Thread post styling - similar to notification thread posts */
.traditional-thread-post {
  padding: 1rem;
  background: var(--color-card-background);
  border-left: 1px solid var(--color-border-light);
  border-right: 1px solid var(--color-border-light);
  border-top: 1px dashed var(--color-border-light);
  transition: all 0.2s ease;
  overflow: visible; /* Allow tooltips to overflow */
}

/* First post in thread gets solid top border */
.traditional-thread-post-container:first-child .traditional-thread-post {
  border-top: 1px solid var(--color-border-light);
}

/* Main requested post styling */
.traditional-thread-post.is-main-post {
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .traditional-thread-post.is-main-post {
  background: rgba(0, 0, 0, 0.03);
  border-left: 2px solid rgba(0, 0, 0, 0.3);
  border-right: 2px solid rgba(0, 0, 0, 0.3);
}

/* Last post in a thread chain gets bottom border */
.traditional-thread-post-container:not(:has(+ .traditional-thread-post-container)) .traditional-thread-post {
  border-bottom: 1px solid var(--color-border-light);
}

/* Same author consecutive posts get subtle styling */
.traditional-thread-post-container.traditional-thread-post-same-author .traditional-thread-post {
  border-top-style: dashed;
  border-top-color: var(--color-border-subtle);
  opacity: 0.95;
}

/* For same-author posts, the last one in the chain should have bottom border */
.traditional-thread-post-container.traditional-thread-post-same-author:not(:has(+ .traditional-thread-post-container.traditional-thread-post-same-author)) .traditional-thread-post {
  border-bottom: 1px dashed var(--color-border-subtle);
}

/* Light theme adjustments for same-author borders */
[data-theme="light"] .traditional-thread-post-container.traditional-thread-post-same-author .traditional-thread-post {
  border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .traditional-thread-post-container.traditional-thread-post-same-author:not(:has(+ .traditional-thread-post-container.traditional-thread-post-same-author)) .traditional-thread-post {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Post header with author info */
.traditional-thread-post-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.traditional-thread-post-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.traditional-thread-post-author {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.traditional-thread-post-author-name {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-1);
  font-weight: 600;
  color: var(--color-text);
  transition: opacity 0.15s ease;
}

.traditional-thread-post-author-name:hover {
  opacity: 0.7;
}

.traditional-thread-post-author-handle {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-85);
  color: var(--color-text-secondary);
}

/* Traditional thread specific adjustments for multi-engage */
.traditional-thread-post {
  position: relative;
}

.traditional-thread-post.multi-engage-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 5;
  pointer-events: none;
}

[data-theme="light"] .traditional-thread-post.multi-engage-active::before {
  background: rgba(255, 255, 255, 0.6);
}

/* Footer with timestamp and rarity */
.traditional-thread-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: visible; /* Allow tooltips to overflow */
  position: relative;
  z-index: 10; /* Ensure footer content appears above other elements */
}

.traditional-thread-post-timestamp {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-8);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.traditional-thread-post-timestamp:hover {
  opacity: 0.7;
}

.traditional-thread-post-rarity {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
  z-index: 10; /* Ensure tooltips appear above other content */
}

/* Ensure tooltips within traditional thread have high z-index */
.traditional-thread-post .tooltip-container {
  z-index: 100;
}

.traditional-thread-post .tooltip-wrapper {
  z-index: 100;
}

/* Remove old meta and stats sections */
.traditional-thread-post-meta {
  display: none;
}

.traditional-thread-post-stats {
  display: none;
}

/* Post content */
.traditional-thread-post-content {
  margin-bottom: 0.75rem;
}

.traditional-thread-post-text {
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-95);
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.traditional-thread-post-embed {
  margin-top: 0.75rem;
}

/* Collapse/expand button */
.traditional-thread-collapse-button {
  padding: 0.4rem 0.8rem;
  background: var(--color-button-background);
  border: 1px solid var(--color-border-light);
  color: var(--color-button-text);
  font-family: adobe-jenson-pro, serif;
  font-size: var(--font-size-0-85);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 0.5rem;
}

.traditional-thread-collapse-button:hover {
  background: var(--color-button-hover);
}

/* Replies container */
.traditional-thread-replies {
  display: flex;
  flex-direction: column;
  padding-left: 24px; /* Indent replies from their parent */
  overflow: visible; /* Allow tooltips to overflow */
}

/* Don't apply inline marginLeft styles to containers within reply sections */
.traditional-thread-replies .traditional-thread-post-container {
  margin-left: 0 !important;
}

/* Light theme adjustments */
[data-theme="light"] .traditional-thread-post {
  border-left-color: rgba(0, 0, 0, 0.15);
  border-right-color: rgba(0, 0, 0, 0.15);
  border-top-color: rgba(0, 0, 0, 0.15);
  border-bottom-color: rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .traditional-thread-view {
    padding: 10px;
  }
  
  .traditional-thread-container {
    padding-bottom: 60px;
  }
  
  .traditional-thread-post-container {
    margin-left: 0 !important;
  }
  
  .traditional-thread-replies .traditional-thread-post-container {
    margin-left: 12px !important;
  }
}


/* Manage Data button in version-buttons-grid */
.version-buttons-grid .manage-data-button {
  border-color: var(--color-border-light);
  background: var(--color-button-background);
  color: var(--color-button-text);
}

.version-buttons-grid .manage-data-button:hover:not(:disabled) {
  background: var(--color-button-hover);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.version-buttons-grid .manage-data-button:active {
  transform: translateY(0);
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .data-summary-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .download-button,
  .refresh-button {
    width: 100%;
    justify-content: center;
  }
  
  .data-collection-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .delete-collection-button {
    width: 100%;
    justify-content: center;
  }
  
  .delete-confirmation-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cancel-button,
  .confirm-delete-button {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================
   SWIPE MODE STYLES - CardStackSwipe / FeedPageSwipe
   ===================================================== */

/* Swipe mode container - inherits from feed-container */
.feed-container.swipe-mode {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Swipe stack container - uses same base as card-stack-container */
.card-stack-container.swipe-stack {
  /* Inherits from .card-stack-container */
  touch-action: pan-y;
}

/* In swipe mode, cards need to be draggable */
.swipe-stack .post-card.interactive {
  cursor: grab;
  touch-action: pan-y;
}

.swipe-stack .post-card.interactive:active {
  cursor: grabbing;
}

/* Swipe instructions overlay */
.swipe-instructions {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.6;
  pointer-events: none;
  animation: swipeInstructionsFade 4s ease-out forwards;
  z-index: 1;
}

@keyframes swipeInstructionsFade {
  0% {
    opacity: 0.6;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
  }
}

/* Feed page swipe specific layout */
.feed-page-swipe {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* Responsive adjustments for swipe mode */
@media (max-width: 480px) {
  .swipe-instructions {
    bottom: -50px;
    font-size: 11px;
  }
}

/* ===================================
   Chat Modal Styles
   =================================== */

/* Chat unread badge on footer button */
.chat-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-primary);
  color: var(--color-background);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  min-width: 1rem;
  text-align: center;
  font-family: adobe-jenson-pro, serif;
  line-height: 1;
}

/* Chat icon with unread indicator */
.chat-toggle.has-unread {
  color: var(--color-link);
  filter: drop-shadow(0 0 8px var(--color-glow-anisota));
}

/* Chat modal specific sizing */
.chat-modal {
  width: 90dvw;
  max-width: 500px;
  min-height: 70dvh;
  height: auto;
  max-height: 85dvh;
  transition: height 0.3s ease;
}

/* Chat modal body should fill available space */
.chat-modal .modal-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 50vh;
  overflow: hidden; /* Prevent body from scrolling, only list scrolls */
}

/* Status tabs - fixed at top, doesn't scroll */
.chat-status-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-modal-background);
}

.chat-status-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.chat-status-tab:last-child {
  border-right: none;
}

.chat-status-tab:hover {
  color: var(--color-text);
  background: var(--color-card-background-hover);
}

.chat-status-tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-bluesky-blue);
}

/* Search bar in header extras */
.chat-search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.chat-search-bar input {
  flex: 1;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  outline: none;
}

.chat-search-bar input:focus {
  border-color: var(--color-input-focus);
}

.chat-search-bar input::placeholder {
  color: var(--color-text-muted);
}

.chat-search-clear {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.chat-search-clear:hover {
  color: var(--color-text);
}

.chat-search-toggle {
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chat-search-toggle:hover {
  background: var(--color-card-background-hover);
  opacity: 1;
}

/* Chat modal uses info-display for empty states like notifications modal */
.chat-modal .info-display {
  min-height: 50vh;
  transition: min-height 0.3s ease;
}

/* Chat empty/loading/error message containers */
.chat-empty-message,
.chat-loading-message,
.chat-error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 1rem;
  min-height: 40vh;
}

.chat-empty-message svg,
.chat-loading-message svg {
  opacity: 0.3;
  stroke-width: 1;
}

.chat-empty-message h4,
.chat-loading-message h4,
.chat-error-message h4 {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-1-5);
  font-family: adobe-jenson-pro, serif;
}

.chat-empty-message p,
.chat-loading-message p,
.chat-error-message p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-1-1);
}

.chat-error-message p {
  color: var(--color-error, #ff6b6b);
}

/* Conversation list */
.chat-conversation-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 0; /* Allow flex item to shrink for scrolling */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.chat-conversation-list::-webkit-scrollbar {
  display: none;
}

.chat-conversation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.chat-conversation-item:hover {
  background: var(--color-card-background-hover);
}

.chat-conversation-item.unread {
  background: var(--color-card-background-hover);
}

/* Avatar */
.chat-conversation-avatar,
.chat-thread-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.chat-conversation-avatar img,
.chat-thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--color-border-light);
}

.chat-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-background);
  font-family: adobe-jenson-pro, serif;
  font-weight: 600;
  font-size: 1.25rem;
  border: 1px solid var(--color-border-light);
}

.chat-avatar-deleted {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background-secondary);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-light);
}

.chat-avatar-placeholder-small {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-background);
  font-family: adobe-jenson-pro, serif;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid var(--color-border-light);
}

/* Conversation content */
.chat-conversation-content {
  flex: 1;
  min-width: 0;
}

.chat-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.chat-conversation-name {
  font-family: adobe-jenson-pro, serif;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conversation-time {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.chat-conversation-preview {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Thread container */
.chat-thread-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden; /* Clip emoji picker so it slides from underneath */
}

.chat-thread-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.chat-back-button {
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: -0.5rem;
}

.chat-back-button:hover {
  background: var(--color-card-background-hover);
}

.chat-thread-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.chat-thread-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.chat-thread-names {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.chat-thread-name {
  font-family: adobe-jenson-pro, serif;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-handle {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Conversation menu */
.chat-menu-container {
  position: relative;
}

.chat-more-button {
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chat-more-button:hover {
  background: var(--color-card-background-hover);
}

.chat-convo-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px var(--color-shadow);
  min-width: 200px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.chat-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.chat-menu-item:last-child {
  border-bottom: none;
}

.chat-menu-item:hover {
  background: var(--color-card-background-hover);
}

.chat-menu-item svg {
  flex-shrink: 0;
}

.chat-menu-item-danger {
  color: var(--color-error);
}

.chat-menu-item-danger:hover {
  background: rgba(255, 68, 68, 0.1);
}

/* Messages container */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 0;
}

.chat-messages-container::-webkit-scrollbar {
  display: none;
}

/* Message */
.chat-message {
  display: flex;
  gap: 0.5rem;
  max-width: 75%;
}

.chat-message.from-me {
  align-self: flex-end;
}

.chat-message.from-them {
  align-self: flex-start;
}

.chat-message-bubble {
  background: var(--color-button-background);
  padding: 0.75rem 1rem;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border: 1px solid var(--color-border);
}

.chat-message.from-me .chat-message-bubble {
  background: var(--color-bluesky-blue);
  color: white;
  border-color: var(--color-bluesky-blue);
}

.chat-message-text {
  font-family: adobe-jenson-pro, serif;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-message-embed {
  margin-top: 0.5rem;
  max-width: 100%;
}

/* Override embed styles for chat context */
.chat-message-embed .embedded-quote {
  margin: 0;
  font-size: 0.9em;
}

.chat-message-embed .post-images {
  margin: 0;
}

.chat-message-embed .post-image {
  max-width: 100%;
  height: auto;
  margin: 0;
}

.chat-message-embed .external-link-embed {
  font-size: 0.9em;
}

/* Facet links in chat messages */
.chat-message-text .facet-link,
.chat-message-text .facet-mention {
  text-decoration: underline;
  opacity: 0.9;
}

.chat-message-text .facet-link:hover,
.chat-message-text .facet-mention:hover {
  opacity: 1;
}

/* Inherit color for facets in "from me" messages */
.chat-message.from-me .chat-message-text .facet-link,
.chat-message.from-me .chat-message-text .facet-mention {
  color: inherit;
}

.chat-message-time {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* Message reactions */
.chat-message {
  position: relative;
}

.chat-message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
  margin-left: 0.25rem;
}

.chat-reaction {
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-reaction:hover {
  background: var(--color-card-background-hover);
  transform: scale(1.1);
}

.chat-reaction.my-reaction {
  background: var(--color-bluesky-blue);
  border-color: var(--color-bluesky-blue);
}

.chat-reaction.my-reaction:hover {
  opacity: 0.8;
}

.chat-add-reaction-button {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  color: var(--color-text-muted);
  padding: 0;
}

.chat-message:hover .chat-add-reaction-button {
  opacity: 1;
}

.chat-add-reaction-button:hover {
  background: var(--color-card-background-hover);
  color: var(--color-text);
  transform: scale(1.1);
}

/* Emoji Picker Overlay - Slides up from input */
.chat-emoji-picker-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5; /* Below chat-input-container so it appears to slide from underneath */
  background: var(--color-card-background);
  border-top: 1px solid var(--color-border);
}

/* Input container */
.chat-input-container {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
  flex-shrink: 0;
  position: relative;
  z-index: 10; /* Above emoji picker so picker slides underneath it */
}

.chat-input {
  flex: 1;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.625rem 0.75rem;
  resize: none;
  min-height: 2.5rem; /* ~1 line of text */
  max-height: 6rem; /* ~3-4 lines of text */
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Auto-expand as user types */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.chat-input::-webkit-scrollbar {
  display: none;
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-bluesky-blue);
}

.chat-input::placeholder {
  color: var(--color-text-muted);
}

.chat-send-button {
  background: var(--color-bluesky-blue);
  color: white;
  border: none;
  padding: 0.625rem 0.75rem;
  min-width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send-button:hover:not(:disabled) {
  background: var(--color-bluesky-blue-hover);
}

.chat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--color-bluesky-blue);
}

/* New Chat Styles */
.chat-new-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-new-chat-title {
  font-family: adobe-jenson-pro, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.chat-new-chat-search {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
}

.chat-user-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.chat-user-search-result {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.chat-user-search-result:hover {
  background: var(--color-card-background-hover);
  border-color: var(--color-link);
}

.chat-user-search-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.chat-user-search-name {
  font-family: adobe-jenson-pro, serif;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-user-search-handle {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-user-search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-family: adobe-jenson-pro, serif;
}

.chat-search-loading {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}

.chat-new-chat-recipient {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-card-background);
}

.chat-new-chat-recipient-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.chat-new-chat-recipient-name {
  font-family: adobe-jenson-pro, serif;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-new-chat-recipient-handle {
  font-family: adobe-jenson-pro, serif;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-new-chat-change {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chat-new-chat-change:hover {
  background: var(--color-card-background-hover);
  border-color: var(--color-link);
}

.chat-new-chat-input-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  flex: 1;
}

.chat-new-chat-input-container .chat-input {
  flex: 1;
  min-height: 100px;
}

.chat-new-chat-input-container .chat-send-button {
  align-self: flex-end;
}

/* Chat Modal Footer */
.chat-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}

.chat-modal-footer .button-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-modal {
    max-width: 100%;
    min-height: 85dvh;
    max-height: 90dvh;
  }

  .chat-message {
    max-width: 85%;
  }
}

/* ===== Warp Modal Backdrop Styles ===== */
/* Immersive animated backdrop with gradient overlay effects */

.warp-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
}

/* Gradient container - holds all the animated gradient elements */
.warp-gradient-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Expanding circle that blooms from bottom center */
.warp-expanding-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent, rgba(100, 100, 100, 0.8));
  filter: blur(15px);
  transform-origin: center;
  will-change: transform, opacity;
}

/* Gradient circles for atmospheric effect */
.warp-gradient-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  aspect-ratio: 1;
  will-change: transform, opacity;
}

/* Top-left gradient - uses accent color */
.warp-top-left {
  background: var(--color-accent, rgba(100, 100, 100, 0.9));
}

/* Bottom-right gradient - slightly lighter accent */
.warp-bottom-right {
  background: var(--color-accent-light, rgba(120, 120, 120, 0.9));
}

/* Overlay content layer - sits above gradients */
.warp-overlay-content {
  background: var(--color-overlay, rgba(0, 0, 0, 0.5));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  will-change: opacity;
  padding: 1rem;
  box-sizing: border-box;
}

/* Modal content wrapper for warp animation */
.warp-modal-wrapper {
  will-change: transform;
}

/* Ensure modal content in warp modal has proper styling */
.warp-modal-backdrop .modal-content {
  margin-bottom: 2rem;
}

/* ===== Waypoints Modal Styles ===== */

.waypoints-modal .modal-content {
  max-width: 400px;
  width: 90vw;
}

.waypoints-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.waypoint-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: adobe-jenson-pro, serif;
  width: 100%;
  text-align: left;
}

.waypoint-option:hover {
  background: var(--color-card-background-hover, var(--color-background));
  border-color: var(--color-primary);
}

.waypoint-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.waypoint-icon-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: var(--color-text-muted);
}

.waypoint-icon-svg.blacksky-icon {
  fill: currentColor;
}

.waypoint-icon-svg.pdsls-icon,
.waypoint-icon-svg.atptools-icon {
  fill: none;
  stroke: currentColor;
}

.waypoint-option:hover .waypoint-icon-svg {
  color: var(--color-primary);
}

.waypoint-option:hover .waypoint-icon-svg.pdsls-icon,
.waypoint-option:hover .waypoint-icon-svg.atptools-icon {
  color: var(--color-primary);
}

.waypoint-info {
  flex: 1;
  min-width: 0;
}

.waypoint-name {
  font-size: var(--font-size-1);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.waypoint-description {
  font-size: var(--font-size-0-85);
  color: var(--color-text-muted);
}

.waypoint-external-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
  opacity: 0.5;
}

.waypoint-option:hover .waypoint-external-icon {
  color: var(--color-primary);
  opacity: 1;
}

/* ===== Waypoints Settings Styles ===== */

.waypoint-settings-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.waypoint-setting-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.waypoint-setting-option:hover {
  background: var(--color-card-background-hover, var(--color-background));
  border-color: var(--color-text-muted);
}

.waypoint-setting-option.selected {
  border-color: var(--color-primary);
  background: var(--color-card-background);
}

.waypoint-setting-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.waypoint-setting-option.selected .waypoint-setting-icon {
  color: var(--color-primary);
}

.waypoint-setting-icon .waypoint-icon-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: inherit; /* Inherit color from parent */
}

.waypoint-setting-icon .waypoint-icon-svg.pdsls-icon,
.waypoint-setting-icon .waypoint-icon-svg.atptools-icon {
  fill: none;
  stroke: currentColor;
  color: inherit; /* Inherit color from parent */
}

.waypoint-setting-info {
  flex: 1;
  min-width: 0;
}

.waypoint-setting-name {
  font-size: var(--font-size-1);
  font-weight: 500;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.waypoint-setting-name .check-icon {
  color: var(--color-primary);
}

.waypoint-setting-description {
  font-size: var(--font-size-0-85);
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* Post card waypoints button styling */
.post-card-waypoints {
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-waypoints .waypoint-icon-svg {
  width: 100%;
  height: 100%;
}

/* Preview waypoints icon in appearance settings */
.preview-waypoints-icon {
  width: 1.5em;
  height: 1.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  opacity: 0.8;
}

.preview-waypoints-icon svg {
  width: 100%;
  height: 100%;
}

