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;
}

/* 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 */
}

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

/* Prevent scrollbars during page load transitions */
.settings-page:not(.content-ready) {
    overflow: hidden !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;
    position: static !important;
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important; /* Dynamic viewport height for better mobile browser support */
    /* 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 */
    /* 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 0.6s ease-out forwards;
}

.page-exiting {
    opacity: 1;
    animation: pageExit 0.3s ease-in 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 0.6s ease-out forwards;
}

.home-redirect.page-exiting {
    opacity: 1;
    animation: pageExit 0.3s ease-in forwards;
}

.home-redirect-message {
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: 1.1rem;
    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; }
}

@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 0.6s ease-out forwards;
}

body.settings-scrollable .page-exiting {
    animation: pageExitNoTransform 0.3s ease-in forwards;
}

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

@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 {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: calc(3rem + max(1rem, env(safe-area-inset-top)));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: max(1rem, env(safe-area-inset-top)) 1.5rem 0rem 1.5rem;
    font-size: 1.5rem;
    font-family: adobe-jenson-pro, serif;
    box-sizing: border-box;
    z-index: 1000;
    background: var(--color-header-gradient);
    /* Ensure it's not affected by parent transforms */
    isolation: isolate;
    /* Explicitly remove any potential borders */
    border: none !important;
    outline: 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: 1.5rem;
    font-family: adobe-jenson-pro, serif;
    box-sizing: border-box;
    z-index: 999;
    background: var(--color-footer-gradient);
    /* Ensure it's not affected by parent transforms */
    isolation: isolate;
    /* Explicitly remove any potential borders */
    border: none !important;
    outline: none !important;
}


.anisota-footer .brand,
.anisota-footer .back,
.anisota-footer .refresh,
.anisota-footer .touch {
    font-size: 1.5rem;
    font-family: adobe-jenson-pro, serif;
    font-style: normal;
}

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

.brand-title {
    font-size: 1.5rem;
    font-family: adobe-jenson-pro, serif;
    font-style: normal;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.85rem;
    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(--text-color);
    opacity: 0;
    font-size: 0.9rem;
    text-align: center;
    user-select: none;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.6s;
}

.entrance-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 0.3s ease-in-out;
    transition-delay: 0s;
}

.feed-container.subtitle-visible .feed-subtitle {
    opacity: 0.6;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.2s;
}

.feed-container.subtitle-visible.entrance-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 0.3s ease-out 0.3s, transform 0.3s ease-out 0.3s;
    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 {
    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: 0.85rem;
    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: 0.85rem;
    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: 0.9rem;
    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;
}

.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;
}

.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.active {
  background: var(--color-button-hover);
  color: var(--color-text);
}

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

.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;
}

.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 */
}
.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.thread-post {
    border: 1px dashed var(--color-border-light);
}

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

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

/* Advanced thread post border styling */
.post-card.thread-post:has(.card-inner) .card-front,
.post-card.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);
}

/* For thread posts without flip structure */
.post-card.thread-post:not(:has(.card-inner)) {
    /* Default: solid top/bottom, dashed left/right */
    border-top: 2px solid var(--color-border-light);
    border-bottom: 2px solid var(--color-border-light);
    border-left: 1px dashed var(--color-border-light);
    border-right: 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;
    transition: none;
    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: cardEntrance 1s cubic-bezier(.2,1,.3,1) forwards;
    pointer-events: auto;
    /* Force animation to always trigger */
    animation-fill-mode: forwards;
    position: absolute;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Animation for card entrance */
@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translate3d(0, -100vh, 0) scale(0.8);
    }
    70% {
        opacity: 1;
        transform: translate3d(0, -2vh, 0) scale(0.95);
    }
    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);
    }
}

/* 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 var(--color-primary);
    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;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    text-align: center;
    padding: 1rem;
}

.game-card-loading-text {
    font-size: 1rem;
    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(var(--color-primary-rgb), 0.3);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 25px rgba(var(--color-primary-rgb), 0.6);
        opacity: 0.9;
    }
    100% {
        box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 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: '.';
    }
}

/* 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;
}

/* 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;
}

/* 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;
}

/* Special styling for liked thread posts without flip structure */
.post-card.liked.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;
}

/* 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;
}

/* 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; 
}

/* Special styling for reposted thread posts without flip structure */
.post-card.reposted.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;
}


/* Animation for reverse card entrance (coming back from right) */
@keyframes cardEntranceReverse {
    0% {
        opacity: 0;
        transform: translateX(120vw) rotate(5deg) scale(0.95) translateZ(0);
    }
    30% {
        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;
    }
}

/* Animation for card exit */
@keyframes cardExit {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0) scale(1) translateZ(0);
    }
    30% {
        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 reverse card exit (going back) */
@keyframes cardExitReverse {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0) scale(1) translateZ(0);
    }
    30% {
        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 0.8s 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 0.8s 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 */

.post-card.animate-entrance-reverse {
    animation: cardEntranceReverse 0.8s cubic-bezier(.2,1,.3,1) forwards;
    pointer-events: auto;
}

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

.post-card.animate-exit {
    animation: cardExit 0.3s cubic-bezier(.2,1,.3,1) forwards;
    pointer-events: auto; /* Allow rapid clicking during exit animation */
}

.post-card.animate-exit-reverse {
    animation: cardExitReverse 0.3s cubic-bezier(.2,1,.3,1) 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 0.3s ease-out forwards;
    pointer-events: auto; /* Allow rapid clicking during thread slide animation */
}

.post-card.animate-thread-slide-back {
    animation: threadSlideBack 0.3s ease-out forwards;
    pointer-events: auto; /* Allow rapid clicking during thread slide back animation */
}

.post-card.animate-thread-exit {
    animation: threadExit 0.3s ease-out forwards;
    pointer-events: auto; /* Allow rapid clicking during thread exit animation */
}

.post-card.animate-thread-entrance {
    animation: threadEntrance 0.3s ease-out 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;
    }
}

/* Animation for entire thread train exiting */
@keyframes threadExit {
    0% {
        transform: translateX(var(--train-position, 100%)) translateY(0) translateZ(0);
    }
    30% {
        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;
    }
}

/* Animation for entire thread train entering (reverse of exit) */
@keyframes threadEntrance {
    0% {
        transform: translateX(calc(var(--train-position, 100%) + 120vw)) translateY(0) translateZ(0);
    }
    30% {
        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;
}

/* 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;
}

.json-content {
    font-family: adobe-jenson-pro, serif;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    padding: 0.5rem;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    overflow-x: hidden;
    /* Allow text selection within JSON content */
    user-select: text;
    cursor: text;
    /* Ensure touch scrolling works properly on mobile */
    -webkit-overflow-scrolling: touch;
    /* Prevent the parent card from capturing touch events when scrolling */
    touch-action: pan-y;
    /* Ensure it takes up available height for scrolling */
    height: 100%;
    flex: 1;
    /* Box sizing to include padding */
    box-sizing: border-box;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* Force scrollability */
    min-height: 0;
    max-height: 100%;
}

.json-content::-webkit-scrollbar {
    display: none;
}

/* Ensure card back footer stays at bottom */
.card-back .post-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-card-background);
    flex-shrink: 0;
}

.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: 0.85rem;
    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-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.8rem 0;
    line-height: 1.3;
}

.game-card-description {
    font-size: 0.9rem;
    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: 0.9rem;
    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:hover .card-front {
    box-shadow: 0 0 20px rgba(var(--color-accent-primary-rgb), 0.3);
}

.game-card-specimen.interactive: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: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: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    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: 0.9rem;
    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 Grid - Styled like Inventory Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    width: 100%;
    max-width: 100%;
}

.collection-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 */
}

.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%;
}

.collection-item-name {
    font-size: 1rem;
    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.2rem;
}

/* 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: 0.85rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

.collection-item-subtitle {
    font-size: 0.75rem;
    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(--quantity-color, var(--color-accent));
    color: white;
    font-size: 0.7rem;
    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: 0.8rem;
    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: 0.8rem;
        min-height: 36px;
    }
    
    .breadcrumb-navigation {
        min-width: 70px;
    }
    
    .navigation-button {
        min-width: 28px;
        height: 28px;
        padding: 0.3rem;
    }
    
}

@media (max-width: 480px) {
}

/* 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 .post-card-header {
    padding: 0.75rem 1rem;
  }

  .card-back .post-card-did {
    padding-top: 0.1rem;
}

.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: 0.9rem;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
}

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

.post-card-username {
    font-size: 1.6rem;
    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: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 400;
    font-style: italic;
    padding-top: 0.2rem;
}

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

.post-card-did {
    font-size: 0.9rem;
    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);
}

.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 */
    /* Ensure scrolling works even when liked/reposted */
    pointer-events: auto !important;
    touch-action: pan-y !important;
    position: relative;
}

/* 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 */
}

/* Fix JSON scrolling in card back */
.card-back .post-card-body.json-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1rem;
    overflow: hidden;
    min-height: 0;
    background: var(--color-card-background);
}

.post-card-text {
    font-size: 1.2rem;
    line-height: 1.4;
    font-family: adobe-jenson-pro, serif;
    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;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Rich content styles */
.rich-content {
    font-size: 1.2rem;
    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;
}

.rich-content a:visited {
    color: var(--color-link-visited);
}

/* 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;
}

.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;
}

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

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

.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-thumbnail {
    display: block;
}

.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%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    -webkit-touch-callout: default;
    display: block;
}

.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;
}

/* 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;
}

/* Link embed preview in composer */
.link-embed-preview {
    position: relative;
    margin: 8px 0;
}

.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);
}

/* 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;
}

/* 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);
}

/* 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;
}

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

.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: 1rem;
    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;
    position: relative; /* Enable absolute positioning for child elements */
}

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

.feed-container.entrance-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: 4px;
    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);
    }
}

/* 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);
}

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

.controls-row.loading .nav-control {
    opacity: 0.3;
    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: 0.9rem;
    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: 2em;
}

.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: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    font-weight: 300;
}

.login-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    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-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: 1.2rem;
    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);
}

.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 {
    width: 80%;
    min-width: 250px;
    max-width: 350px;
}

.login-card-signup-link {
    text-align: center;
    width: 100%;
    max-width: 300px;
    font-size: 1rem;
    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: 0.9rem;
}

.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-accent) !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;
}

/* 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-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 400;
    font-family: adobe-jenson-pro, serif;
}

.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: hidden;
}


.post-composer {
    margin-bottom: 4rem;
    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: 1.2rem;
    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: 1rem;
    color: var(--color-text-muted);
    font-style: italic;
}



/* 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,
.drafts-button,
.save-draft-button,
.publish-target-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border);
    padding: 0.5rem;
    font-size: 1.2rem;
    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),
.drafts-button:hover:not(:disabled),
.save-draft-button:hover:not(:disabled),
.publish-target-button:hover:not(:disabled) {
    background: var(--color-button-hover);
    border-color: var(--color-border-light);
}

.tags-toggle-button:disabled,
.image-upload-button:disabled,
.drafts-button:disabled,
.save-draft-button:disabled,
.publish-target-button: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);
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    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 {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 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;
}

@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: 0.75rem;
    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.loading {
    position: relative;
    opacity: 0.9;
}

.composer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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);
}

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

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

/* 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);
}

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

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

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

.tags-input {
    width: 100%;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem;
    font-size: 1rem;
    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: 0.85rem;
    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: 0.9rem;
}

/* 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: 1.1rem;
    color: var(--color-text);
    text-align: center;
    opacity: 0.8;
}

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

/* 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;
    }

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

/* 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: 1rem;
    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: 0.9rem;
}

.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 0.2s cubic-bezier(0.2, 1, 0.3, 1);
    user-select: none;
    pointer-events: auto;
}

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

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

/* Settings Page Styles */
.settings-page {
    color: var(--color-text);
    padding: 1.5rem;
    padding-top: 20dvh;
    padding-bottom: 20dvh;
    box-sizing: border-box;
    /* Scroll performance optimizations */
    contain: layout style;
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scrolling */
    overflow-x: hidden;
    max-width: 100vw;
}

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

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

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

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

.settings-description {
    font-family: adobe-jenson-pro, serif;
    font-size: 1.2rem;
    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: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    text-align: center;
    line-height: 2rem;
}
.section-description {
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    text-align: center;
}

.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: #4A9EFF;
    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: #4A9EFF;
    border-color: #4A9EFF;
    color: #fff;
}

.control-button-setting.disabled {
    opacity: 0.5;
    background: var(--color-background-secondary);
}

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

.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: 1rem;
    font-weight: bold;
    color: var(--color-text);
    flex: 1;
}

.control-button-description {
    font-family: adobe-jenson-pro, serif;
    font-size: 0.85rem;
    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: 1.2rem;
    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: none; /* Disable all touch gestures for drag elements */
}

.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: none; /* Disable touch gestures on drag zones */
    -webkit-user-select: none;
    user-select: none;
}

.preview-control-button,
.preview-control-button.library-button {
    touch-action: none;
    -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: 1rem;
        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: none;
    }
    
    .control-button-setting:hover .drag-handle {
        opacity: 1;
    }
    
    .control-button-setting {
        touch-action: none;
        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: 1rem;
    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: 0.9rem;
    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: 1.4rem;
    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: 1rem;
    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);
    color: var(--color-button-text);
    padding: 1rem 2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 1.1rem;
    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);
    color: var(--color-button-text);
    padding: 0.6rem 1.2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    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 {
    padding: 20px;
    background: var(--color-background-tertiary);
    border: 1px solid var(--color-border);
    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);
    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;
    background: var(--color-background-secondary);
    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 0.3s 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 0.3s 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-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: 3rem;
}

@media (min-width: 600px) {
    .modal-content {
        width: 60dvw;
        max-width: 600px;
    }
}

/* 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;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    flex-shrink: 0;
}

.modal-header-content {
    flex: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    font-family: adobe-jenson-pro, serif;
    color: var(--color-text);
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0 0;
    font-style: italic;
    font-family: adobe-jenson-pro, serif;
}

.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: 0.875rem;
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
}

.modal-header-extras {
    margin-top: 1rem;
}

.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: opacity 0.2s;
    font-family: adobe-jenson-pro, serif;
    align-self: flex-start;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
.modal-body::-webkit-scrollbar {
    display: none;
}

/* Reply modal container - simpler styling for post-composer */
.reply-modal-container {
    max-width: 430px;
    width: 100%;
    max-height: 90vh;
    animation: modalSlideIn 0.3s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

.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: 60dvh;
}

/* Post Composer Modal - specific styling for the global post composer modal */
.reply-modal-container:has(.post-card.modal-composer) {
    max-width: 430px;
    width: 100%;
    max-height: 85vh;
}

/* Override post-composer positioning when inside post composer modal */
.post-card.post-composer.modal-composer {
    position: relative;
    width: 100%;
    height: 60dvh;
    /* 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: 0.9rem;
    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: center;
    flex-shrink: 0;
}

.touch-menu-action-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0rem;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    width: 40px;
    height: 40px;
}

.touch-menu-action-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.touch-menu-logout-btn {
    color: var(--color-error);
}

.touch-menu-logout-btn:hover {
    color: var(--color-error);
}

.touch-menu-item {
    padding: 1rem 0rem;
    font-size: 1.2rem;
    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;
}

.touch-menu-item.disabled:hover {
    background: transparent;
}

.touch-menu-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0px;
}

.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: 1.1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.9;
}

.info-display p {
    font-size: 1rem;
    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);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    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: 0.8rem;
    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;
}

.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: 0.8rem;
    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-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: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Batched notifications */
.batched-notification {
    border-left-color: var(--color-link) !important;
    background: var(--color-card-background-hover) !important;
}

.batched-notification:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: var(--color-link-hover) !important;
}

.batched-notification .notification-type {
    color: var(--color-link);
    font-weight: 700;
}

/* 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: var(--color-link) !important;
    background: var(--color-card-background-hover) !important;
}

.notification-reply:hover {
    background: var(--color-card-background-active) !important;
    border-left-color: var(--color-link-hover) !important;
}

.notification-reply .notification-type {
    color: var(--color-link);
}

.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-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;
}

.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);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    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: 1.5rem;
    font-family: adobe-jenson-pro, serif;
}

.auth-required-message p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.login-button {
    background: var(--color-button-background);
    color: var(--color-button-text);
    border: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    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: 80dvh;
    height: auto;
    transition: height 0.3s ease;
}

.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: 0.85rem;
    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);
}

/* 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);
    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: 0.85rem;
    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: 1rem;
    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: 0.9rem;
    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 #4a9eff;
}

.range-preview {
    color: #4a9eff;
    font-size: 0.85rem;
    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: 1.2rem;
    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);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: 1.2rem;
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.2s;
}

.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;
}

/* 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;
}

.empty-state-text {
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
}

.empty-state-button {
    background: var(--color-button-background);
    border: 1px solid var(--color-border);
    color: var(--color-button-text);
    padding: 12px 20px;
    margin: 16px 0;
    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-footer {
    font-size: 1.2rem;
    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);
    }
    
    .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);
    }
    
    /* 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);
    }
    
    .post-card.post-composer.publish-target-both {
        animation: none !important;
        box-shadow: 
            0 0 20px rgba(74, 158, 255, 0.5),
            0 0 25px rgba(255, 149, 0, 0.5);
    }

    /* 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);
        }
    }
}

/* 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(10px) 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 {
    opacity: 0 !important; /* Use !important to override entrance animation */
    pointer-events: none !important;
    transition: opacity 0.3s ease-out;
}

/* Hide feed subtitle by default in fullscreen, but show it when control row is visible */
body.fullscreen-mode .feed-subtitle {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease-out;
}

/* 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 * {
    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;
}

/* Show feed subtitle in fullscreen when control row is visible */
body.fullscreen-mode.fullscreen-show-control-row .feed-subtitle {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Re-enable pointer events for feed subtitle children when shown */
body.fullscreen-mode.fullscreen-show-control-row .feed-subtitle * {
    pointer-events: auto !important;
}

/* 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;
}

/* 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: 0.8rem;
    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;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure fullscreen height expansion works on mobile too */
@media (max-width: 599px) {
    body.fullscreen-mode.fullscreen-height-expansion .card-stack-container {
        height: 70dvh !important;
    }
}

/* Ensure smooth transition when exiting fullscreen height expansion */
body:not(.fullscreen-mode) .card-stack-container {
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add transition to the base card-stack-container for smooth height changes */
.card-stack-container {
    transition: height 0.5s 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 0.3s ease-out;
} 

/* 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-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
    color: var(--color-text);
}

.settings-menu-info {
    flex: 1;
}

.settings-menu-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.settings-menu-description {
    font-size: 0.9rem;
    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: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.lists-menu-description {
    font-size: 0.9rem;
    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: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: var(--color-text);
}

.theme-description {
    font-size: 0.9rem;
    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: 0.7rem;
    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: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: var(--color-text);
}

.ui-toggle-description {
    font-size: 0.9rem;
    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: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.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: 1rem;
    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: 1.1rem;
    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: 1.3rem;
    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: 0.9rem;
    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: 0.95rem;
    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: 0.8rem;
    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: 0.9rem;
}



/* ===== WELCOME CARD STYLES ===== */

/* Welcome card text elements */
.welcome-description {
    color: var(--color-text-secondary);
    font-family: adobe-jenson-pro, serif;
    font-size: 1.2rem;
    line-height: 1.4;
}

.welcome-coming-soon {
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
    font-size: 1.1rem;
    line-height: 1.4;
}

.welcome-link {
    color: var(--color-link);
    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-card-delta {
    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 */
.profile-page {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
    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: 0.9rem;
    flex: auto;
    align-content: center;
  }

/* Override rich-content font size specifically for profile descriptions */
.post-card-text.profile-description .rich-content {
    font-size: 1.1rem !important;
}

/* ===== SEARCH MODAL STYLES ===== */

.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: 1rem;
    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: 0.9rem;
}

.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: 0.9rem;
}

.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: 0.9rem;
    font-style: italic;
    line-height: 1.4;
}

/* Profile display name styling */
.profile-display-name {
    font-size: 1.6rem !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: 1.1rem !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: 0.9rem;
  color: var(--color-text-secondary);
}

.profile-stat-number {
  font-weight: bold;
  color: var(--color-text);
}

.profile-stat-label {
  opacity: 0.7;
}

/* 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;
}

/* Profile page feed container adjustments */
.profile-page .feed-container {
    margin-top: 0;
    width: 100%;
    gap: 0rem;
    margin-bottom: 50px;
}

/* Profile page card stack adjustments - now matches feed page exactly since profile is in the card stack */
.profile-page .card-stack-container {
    /* Match the feed page card stack container exactly */
    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);
    isolation: isolate;
}

/* 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: 0.8rem;
    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: #4a9eff !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;
}

.post-card.publish-target-both:not(.liked):not(.reposted) .post-card-pin-indicator {
    background: linear-gradient(45deg, rgba(74, 158, 255, 0.2), rgba(255, 149, 0, 0.2)) !important;
    color: #4a9eff !important;
    border-bottom: 1px solid rgba(74, 158, 255, 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: 0.9rem;
    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;
}

/* Ensure all child elements in profile user info stack vertically */
.profile-page .post-card-user-info > * {
    display: block;
    width: 100%;
}

/* Profile page post times */
.profile-page .post-card-time {
    color: #888;
    font-size: 0.8rem;
}

/* 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: 0.85rem;
    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);
  border-bottom: 1px solid var(--color-border-dark);
  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: 0;
    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;
}

/* 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-backup {
  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);
  overflow: hidden;
  z-index: 0;
  opacity: 0; /* Always hidden since overlay should handle the display */
  /* 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;
}

.rich-text-backup::-webkit-scrollbar {
  display: none;
}

.rich-text-backup {
  -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: 1.2rem;
    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;
    margin-bottom: 1rem;
}

.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: #4a9eff;
    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: 0.9rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-last-used {
    color: #666;
    font-size: 0.8rem;
}

.current-indicator {
    color: #4a9eff;
    font-weight: bold;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.remove-account-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    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: 1rem;
    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: 1rem;
    box-sizing: border-box;
}

.add-account-input:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 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: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-account-confirm {
    background: #4a9eff;
    border: 1px solid #4a9eff;
    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: 0.9rem;
    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: 1.1rem;
  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: 0.9rem;
  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: 0.8rem;
  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);
  border-radius: 4px;
  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);
  border-radius: 4px;
  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);
  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;
}

.notification-item .notification-original-post,
.notification-item .notification-reply-content {
  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:hover,
.notification-item .notification-reply-content: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 {
  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 {
  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,
[data-theme="light"] .notification-item .notification-reply-content {
  border-left-color: rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .notification-item .notification-original-post:hover,
[data-theme="light"] .notification-item .notification-reply-content: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 {
  color: rgba(0, 0, 0, 0.5) !important;
}
[data-theme="light"] .notification-item .notification-reply-content {
  color: rgba(0, 0, 0, 0.75) !important;
}

/* 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: 1.2rem;
    color: var(--color-text-secondary);
    margin: 0 0 2rem 0;
}

.create-list-btn {
    background: var(--color-link);
    color: var(--color-text-inverse);
    border: none;
    padding: 1rem 2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.create-list-btn:hover {
    background: var(--color-link-hover);
}

.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: 1rem;
    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: 1.1rem;
    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;
}

.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);
    color: var(--color-button-text);
    width: 32px;
    height: 32px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.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-link);
    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: 1rem;
    color: var(--color-text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.tag-item {
    background: var(--color-accent);
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    font-size: 0.8rem;
    font-family: adobe-jenson-pro, serif;
    font-weight: 500;
}

.list-meta {
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    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: 0.9rem;
    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: 1rem;
    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: 1rem;
    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-link);
    color: var(--color-text-inverse);
    border-color: var(--color-link);
}

.save-btn:hover,
.create-btn:hover {
    background: var(--color-link-hover);
    border-color: var(--color-link-hover);
}

.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: 1rem;
    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: 1rem;
    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: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

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

.post-meta {
    font-family: adobe-jenson-pro, serif;
    font-size: 0.8rem;
    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-link);
  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;
}

.create-list-button:hover,
.create-new-list-button:hover {
  background: var(--color-link-hover);
}

.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 button {
  background: var(--color-button-background);
  border: 1px solid var(--color-border);
  color: var(--color-button-text);
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

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

.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;
}

.add-to-list-button {
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border);
  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-link);
  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;
}

.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;
}

.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-link);
  color: var(--color-text-inverse);
  border-color: var(--color-link);
}

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

.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-link);
  color: var(--color-text-inverse);
  border-color: var(--color-link);
}

.create-form .form-actions button[type="submit"]:hover:not(:disabled) {
  background: var(--color-link-hover);
  border-color: var(--color-link-hover);
}

.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)));
  min-height: 100vh;
  min-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-link);
  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;
  width: 100%;
  margin-top: 2rem;
}

.create-list-btn:hover:not(:disabled) {
  background: var(--color-link-hover);
  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;
}

.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: 1rem;
    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: none;
  border-radius: 0;
}

.cancel-btn {
  background: var(--color-button-background);
  color: var(--color-button-text);
  border: 1px solid var(--color-border);
}

.cancel-btn:hover:not(:disabled) {
  background: var(--color-button-hover);
}

.create-btn,
.save-btn {
  background: var(--color-link);
  color: var(--color-text-inverse);
}

.create-btn:hover:not(:disabled),
.save-btn:hover:not(:disabled) {
  background: var(--color-link-hover);
}

.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 {
  background: var(--color-error, #ef4444);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: adobe-jenson-pro, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 0;
}

.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: 1.2rem;
    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: 1.1rem;
    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: 0.9rem;
    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: 0.9rem;
    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: 0.8rem;
    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: 0.9rem;
    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: 0.9rem;
    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: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.thread-author {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.author-username {
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-username:hover {
    color: var(--color-primary);
}

.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: 0.9rem;
    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: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}

.list-view-info .list-description {
    margin: 0;
    font-size: 0.9rem;
    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: 0.9rem;
    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: 1rem;
    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 Modal Styles */
.delete-confirmation-modal .modal-content {
    max-width: 400px;
}

.delete-confirmation-content {
    padding: 1rem;
}

.delete-message {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-top: 0;
}

/* Draft Warning Modal Styles */
.draft-warning-modal .modal-content {
    max-width: 450px;
}

.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: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.dont-show-again-checkbox {
    margin: 0;
    cursor: pointer;
}

.dont-show-again-note {
    font-size: 0.8rem;
    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: 0.9rem;
    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: 0.9rem;
    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: 0.9rem;
    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);
}



/* 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;
}

/* Draft editor styles */
.draft-editor .post-card-header h3 {
  color: var(--color-warning);
}

/* 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: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
  
  .post-actions {
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: end;
  }
  
  .tags-toggle-button,
  .drafts-button, .image-upload-button,
  .save-draft-button,
  .publish-target-button {
    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;
    min-height: 100vh;
    min-height: 100dvh;
    opacity: 0;
    animation: pageEnterNoTransform 0.6s 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: 1.1rem;
    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 0.6s 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: 1rem;
    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: 1px dashed var(--color-notification-like) !important;
}

/* Smooth content transitions for notifications modal */
.notifications-list.notifications-entering {
    opacity: 0;
    animation: pageEnterNoTransform 0.6s ease-out forwards;
}

.notifications-list.notifications-ready {
    opacity: 1;
}

/* Staggered animation for notification items */
.notifications-list .notification-item {
    opacity: 0;
}

.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);
}

.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);
  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);
  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-both {
  border-color: rgba(74, 158, 255, 0.4);
  position: relative;
  animation: bothComposerPulse 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;
}

.post-card.post-composer.publish-target-both::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(74, 158, 255, 0.3), rgba(255, 149, 0, 0.3));
  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);
  }
}

@keyframes bothComposerPulse {
  0% {
    box-shadow: 
      0 0 15px rgba(74, 158, 255, 0.2),
      0 0 20px rgba(255, 149, 0, 0.2);
  }
  50% {
    box-shadow: 
      0 0 25px rgba(74, 158, 255, 0.4),
      0 0 30px rgba(255, 149, 0, 0.4);
  }
  100% {
    box-shadow: 
      0 0 15px rgba(74, 158, 255, 0.2),
      0 0 20px rgba(255, 149, 0, 0.2);
  }
}

/* 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;
}

.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: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  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);
}

.post-embed-remove:hover {
  background: rgba(255, 0, 0, 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: auto;
    /* 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 image upload button */
@media (max-width: 768px) {
    .image-upload-button {
        height: 2.2rem;
        width: 2.2rem;
        padding: 0.4rem;
    }
}

.image-upload-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-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: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    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);
}

.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: 1rem;
    font-weight: bold;
    transition: background 0.2s ease;
}

.image-remove-button:hover {
    background: rgba(220, 38, 38, 0.9);
}

.image-info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
}

/* Processing state for image upload button */
.image-upload-button:disabled.processing {
    position: relative;
    overflow: hidden;
}

.image-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 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 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: 1rem;
}

.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: 1rem;
    font-family: adobe-jenson-pro, serif;
    resize: vertical;
    box-sizing: border-box;
}
.image-alt-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.image-alt-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.image-alt-help {
    font-size: 0.85rem;
    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: 1.3rem !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: 1rem !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%;
}

.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: 0.7rem;
    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: 1rem;
    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: 0.875rem;
    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 - keep 4 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;
    }
}

/* =================================================================
   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 (#4a9eff)
      - Anisota (.publish-target-anisota): Orange (#ff9500)
      - Both (.publish-target-both): Gradient blue-orange
      - 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);
   }
*/
.post-card[style*="--glow-bg-color"]:not(.liked):not(.reposted):not(.publish-target-bluesky):not(.publish-target-anisota):not(.publish-target-both) .post-card-pin-indicator {
    background: var(--glow-bg-color, rgba(255, 193, 7, 0.2)) !important;
    color: var(--glow-text-color, #ffc107) !important;
    border-bottom: 1px solid var(--glow-border-color, rgba(255, 193, 7, 0.3)) !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);
}

.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;
}

/* =================================================================
   ITEM DETAIL MODAL STYLES
   ================================================================= */

/* Modal sizing to match post-card dimensions */
.item-detail-modal .modal-content {
    max-width: 400px;
    width: 100%;
    aspect-ratio: 1;
    max-height: 400px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.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: 1rem;
    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: 0.7rem;
    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: 0.9rem;
    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: 0.9rem;
    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: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
    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: 0.9rem;
    color: var(--color-text-muted);
    font-family: adobe-jenson-pro, serif;
}

.value-amount {
    font-size: 0.9rem;
    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: 0.9rem;
    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: 0.8rem;
    }
    
    .item-effects h4 {
        font-size: 0.8rem;
    }
    
    .item-effects li {
        font-size: 0.75rem;
    }
    
    .value-label,
    .value-amount {
        font-size: 0.8rem;
    }
    
    .use-item-btn {
        font-size: 0.8rem;
        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;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    font-size: 0.8rem;
    min-width: 100px;
    max-width: 170px;
    word-wrap: break-word;
}

.tooltip.tooltip-top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
}

.tooltip.tooltip-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
}

.tooltip.tooltip-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
}

.tooltip.tooltip-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
}

.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: 0.75rem;
    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: 0.75rem;
        max-width: 180px;
    }
    
    .tooltip-content {
        padding: 0.4rem 0.6rem;
    }
    
    .tooltip-stat-line {
        font-size: 0.7rem;
    }
}

/* 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(120px, 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-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 {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        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;
}

/* 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;
  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;
}

.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: 0.9rem;
    font-family: adobe-jenson-pro, serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--color-border);
    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);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: 0.9rem;
    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: 0.9rem;
    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;
    }
    
    .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: 2px 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);
    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: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.moderation-overlay__hide-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 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 {
    /* No special styling needed */
}

/* Animation for revealing content */
.moderation-overlay__blurred-content {
    transition: filter 0.3s ease, opacity 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;
}

/* 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;
    }
}

/* ==================== TUTORIAL ENHANCEMENTS ==================== */

/* Tutorial mode styling for disabled buttons */
.tutorial-mode .nav-control:disabled {
    opacity: 0.3;
    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;
}

/* ==================== 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;
}


.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: 1.1rem;
    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: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.daily-pack-available {
    color: var(--color-success);
    font-size: 0.9rem;
    font-weight: 500;
}

.daily-pack-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.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: 0.9rem;
    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: 0.9rem;
    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: 0.8rem;
    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-modal .modal-content {
    max-width: 450px;
}


.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: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.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: 0.9rem;
    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: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.open-pack-button:hover {
    background: linear-gradient(135deg, #45a049, #2d7831);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.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: 0.9rem;
    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;
    }
}

/* ==================== 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: 1.1rem;
}

.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: 1rem;
    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: 0.75rem;
    font-weight: 600;
    color: white;

    text-transform: capitalize;
}

.pack-header {
    margin-bottom: 1.5rem;
}

.pack-message {
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
}

.streak-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    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: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.pack-item-description {
    font-size: 0.9rem;
    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: 0.75rem;
    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: 0.7rem;
    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: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
}

.citation-text {
    font-size: 1rem;
    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: 1rem;
    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);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: 1rem;
    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);
}

.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: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: adobe-jenson-pro, serif;
}

.tech-item p {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    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);
    background: var(--color-button-background);
    color: var(--color-button-text);
    font-size: 0.9rem;
    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);
}

@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,
    .reset-button-small {
        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: 0.875rem;
    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: 0.875rem;
    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%;
}

.collection-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;
}

/* 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(--family-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: 1rem;
    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 Modal */
.species-detail-modal .modal-content {
    max-width: 600px;
}

/* 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: 0.75rem;
    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: 0.875rem;
    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: 0.875rem;
    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: 0.875rem;
    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: 0.8rem;
    }
    
}

@media (max-width: 480px) {

    .collection-stats {
        gap: 1rem;
        margin-top: 2rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* PWA-specific fixes for Safari iOS */
@media all and (display-mode: standalone) {
  body {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
  
  #root {
    overflow: hidden !important;
    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);
    color: var(--color-button-text);
    padding: 0.6rem 1.2rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    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: 0.9rem;
    margin: 0;
}

.health-stats .stat-value {
    color: var(--color-text);
    font-weight: 600;
    font-size: 1rem;
}

.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);
    color: var(--color-button-text);
    padding: 0.75rem 1rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    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: 1rem;
    color: var(--color-text);
    font-weight: 600;
}

.anomaly-count {
    font-family: inherit;
    font-size: 0.8rem;
    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);
    color: var(--color-button-text);
    padding: 0.75rem 1rem;
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    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);
    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: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: capitalize;
}

.timeline-time {
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-tid, .timeline-session {
    font-family: inherit;
    font-size: 0.75rem;
    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);
    color: var(--color-button-text);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: adobe-jenson-pro, serif;
    font-size: 0.9rem;
    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: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.detail-value {
    font-family: inherit;
    font-size: 0.85rem;
    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: 0.8rem;
    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: 1rem;
}

.timeline-time {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-tid,
.timeline-session {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: inherit;
}

.error-message {
    color: var(--color-error);
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
}

.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: 1.1rem;
}

.anomaly-severity-breakdown {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.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: 0.9rem;
    font-family: inherit;
}

.anomaly-severity {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    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: 0.875rem;
}

.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: 0.9rem;
    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: 0.8rem;
    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: 0.7rem;
    }
}

/* 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);
  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-notification-like);
  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: 600px;
  margin: 0 auto;
}

.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: 1rem;
}

.delete-all-button:hover:not(:disabled) {
  background: #c82333;
  border-color: #c82333;
}

.delete-all-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.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); }
}

/* Progressive loading for sections */
.settings-page.page-entering .developer-health-section,
.settings-page.page-entering .developer-timeline-section,
.settings-page.page-entering .developer-danger-section {
  animation: fadeInUp 0.3s ease forwards;
}

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

/* 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);
  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: var(--color-primary-subtle);
  color: var(--color-primary);
}

.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;
}

/* .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);
}

.tier-description {
  margin: 0 0 1rem 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.tier-price {
  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);
}

.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: rgb(34, 197, 94);
  flex-shrink: 0;
}

.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: flex-start;
  gap: 1.5rem;
  margin-bottom: 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);
}

.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;
}

.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: rgba(34, 197, 94, 0.9);
  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-width: 600px;
  max-height: 80vh;
  width: 90vw;
}

.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(120px, 1fr));
  gap: 0.5rem;
}

.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;
  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;
  }
}