:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Additional color variables for consistency */
    --color-surface: var(--bg-secondary);
    --color-background: var(--bg-primary);
    --color-border: var(--border-color);
    --color-text-primary: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-text-muted: var(--text-tertiary);
    --color-error: #ef4444;
}

/* Embed mode - hide navigation when page is embedded in iframe */
body.embed-mode .navbar {
    display: none !important;
}

body.embed-mode #mainContent {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.embed-mode .mobile-bottom-nav {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Disable selection globally on mobile */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Disable selection on all elements by default */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

/* Allow selection only on specific text elements */
.selectable {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Navigation */
.navbar {
    position: relative;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: 56px;
}

.nav-container {
    width: 100%;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 1600px) {
    .nav-container {
        padding: 0 4%;
    }
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

/* Super Menu Navigation - Category Tabs */
.nav-categories {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-category-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.nav-category-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-category-tab.active {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.nav-category-tab .material-icons-outlined {
    font-size: 20px;
}

.tab-label {
    font-size: 14px;
    font-weight: 500;
}

/* Standalone Creators Button */
.nav-browse-creators {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;
}

.nav-browse-creators:hover {
    background: var(--accent-light);
}

.nav-browse-creators.active {
    background: var(--accent-light);
}

.nav-browse-creators .material-icons-outlined {
    font-size: 20px;
}

/* Mega Menu Panel */
.mega-menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 100000;
}

.mega-menu.active {
    display: block;
}

.mega-menu-container {
    display: flex;
    justify-content: center;
    max-width: 340px;
    margin: 0 auto;
    padding: 16px;
}

.mega-menu-column {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.mega-menu-column.active {
    display: flex;
}

/* 2-column layout when space allows (desktop/wide tablet) */
@media (min-width: 900px) {
    .mega-menu-container {
        max-width: 700px;
    }

    .mega-menu-column.active {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px 16px;
    }

    .mega-menu-column .mega-menu-heading {
        grid-column: 1 / -1;
    }
}

.mega-menu-heading {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 0 12px;
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
}

.mega-menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mega-menu-item:hover .mega-menu-item-title {
    color: var(--text-primary);
}

.mega-menu-item.active {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.mega-menu-item.active .mega-menu-item-title {
    color: var(--accent-primary);
}

.mega-menu-item > .material-icons-outlined {
    font-size: 22px;
    margin-top: 2px;
    flex-shrink: 0;
}

.mega-menu-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.mega-menu-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.mega-menu-item-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.3;
}

/* Auth lock icon for non-logged-in users */
.mega-menu-item .auth-lock {
    font-size: 16px;
    color: var(--text-tertiary);
    margin-top: 4px;
    flex-shrink: 0;
}

body.authenticated .auth-lock {
    display: none;
}

/* Admin-only items - hidden by default, shown for admins */
.admin-only {
    display: none !important;
}

body.is-admin .admin-only {
    display: flex !important;
}

/* Messages badge in mega menu */
.mega-menu-item .messages-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #f44336;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Creator CTA Area in Earn column */
.mega-menu-cta-area {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.mega-menu-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.mega-menu-cta:hover {
    background: rgba(99, 102, 241, 0.2);
}

.mega-menu-cta .material-icons-outlined {
    font-size: 24px;
    color: var(--accent-primary);
}

.mega-menu-cta strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.mega-menu-cta small {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Creator Mini Card (when user is a creator) */
.mega-menu-creator-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.creator-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mega-menu-creator-card strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.mega-menu-creator-card a {
    font-size: 12px;
    color: var(--accent-primary);
    text-decoration: none;
}

.mega-menu-creator-card a:hover {
    text-decoration: underline;
}

/* Tier Badge (subtle indicator) */
.tier-badge-wrapper {
    margin-right: 8px;
}

.tier-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tier-badge:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tier-badge.t1 {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.tier-badge.t2 {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

/* Hide mega menu and nav categories on mobile only */
@media (max-width: 768px) {
    .nav-categories,
    .mega-menu {
        display: none !important;
    }

    .tier-badge-wrapper {
        display: none;
    }
}

/* Mobile Menu Section Styles */
.mobile-menu-section {
    padding: 4px 0;
}

.mobile-menu-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.mobile-menu-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 1rem 4px 1rem;
    margin: 0;
}

.mobile-menu-section .mobile-menu-items {
    gap: 0;
}

.mobile-menu-section .mobile-menu-item {
    padding: 0.75rem 1rem;
}

.mobile-menu-cta {
    margin: 8px 1rem;
    padding: 10px;
    background: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.mobile-menu-cta a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
}

.mobile-menu-cta .material-icons-outlined {
    font-size: 20px;
    color: var(--accent-primary);
}

.mobile-menu-cta strong {
    display: block;
    font-size: 13px;
}

.mobile-menu-cta small {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Make mobile menu scrollable when content is tall */
.mobile-menu {
    max-height: 85vh;
    overflow-y: auto;
}

/* Smaller header when using sections */
.mobile-menu-section ~ .mobile-menu-section,
.mobile-menu-header + .mobile-menu-section {
    /* Reduce header margin when sections are present */
}

.mobile-menu:has(.mobile-menu-section) .mobile-menu-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.mobile-menu:has(.mobile-menu-section) {
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
}

/* Legacy nav-icons support (keep for backwards compatibility) */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.nav-icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-icon-btn.active {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.nav-icon-btn .material-icons-outlined {
    font-size: 22px;
}

/* Text labels for nav buttons - always visible on desktop/tablet */
.nav-label {
    font-size: 14px;
    font-weight: 500;
}

/* More Dropdown (legacy) */
.nav-more-wrapper {
    position: relative;
}

.nav-more-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    display: none;
}

.nav-more-dropdown.active {
    display: block;
}

.nav-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.nav-more-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-more-item.active {
    color: var(--accent-primary);
}

.nav-more-item .material-icons-outlined {
    font-size: 20px;
}

.nav-more-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* Search Container */
.nav-center {
    flex: 1;
    max-width: 600px;
}

/* Search functionality removed */

/* Navigation Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 15px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.breadcrumb-item i {
    font-size: 14px;
    flex-shrink: 0;
}

.breadcrumb-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
}

.breadcrumb-item.active:hover {
    background: transparent;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    margin: 0 2px;
    flex-shrink: 0;
    font-size: 12px;
}

.breadcrumb-extra {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* Mobile breadcrumb styles */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        gap: 0.25rem;
        top: 0; /* Position at the very top on mobile since navbar is hidden */
    }
    
    .breadcrumb-item {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Show only last 2 breadcrumb items on mobile */
    .breadcrumb-item:not(:nth-last-child(-n+4)) {
        display: none;
    }
    
    .breadcrumb-separator:not(:nth-last-child(-n+3)) {
        display: none;
    }
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Notifications */
.notifications-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 8px;
}

.notifications-bell:hover {
    background: var(--bg-tertiary);
}

.notifications-bell .material-icons-outlined {
    font-size: 24px;
    color: var(--text-secondary);
}

.notifications-bell:hover .material-icons-outlined {
    color: var(--text-primary);
}

.notifications-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #f44336;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 360px;
    max-height: 480px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.notifications-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.notifications-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.mark-all-read-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.mark-all-read-btn:hover {
    background: var(--bg-tertiary);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.notifications-empty .material-icons-outlined {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notifications-empty p {
    margin: 0;
    font-size: 14px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item.unread {
    background: rgba(74, 158, 255, 0.08);
}

.notification-item.unread:hover {
    background: rgba(74, 158, 255, 0.12);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.warning {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.notification-icon.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.notification-icon.info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.notification-icon.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

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

.notification-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    opacity: 0.8;
}

.notification-item .unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

@media (max-width: 480px) {
    .notifications-dropdown {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
}

/* Notification Detail Modal */
.notification-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-modal {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.notification-modal-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.notification-modal-body {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.notification-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    margin-bottom: 16px;
}

.notification-modal-icon .material-icons-outlined {
    font-size: 28px;
    color: var(--text-secondary);
}

.notification-modal-icon.warning {
    background: rgba(255, 152, 0, 0.15);
}

.notification-modal-icon.warning .material-icons-outlined {
    color: #ff9800;
}

.notification-modal-icon.error {
    background: rgba(244, 67, 54, 0.15);
}

.notification-modal-icon.error .material-icons-outlined {
    color: #f44336;
}

.notification-modal-icon.success {
    background: rgba(76, 175, 80, 0.15);
}

.notification-modal-icon.success .material-icons-outlined {
    color: #4caf50;
}

.notification-modal-icon.info {
    background: rgba(33, 150, 243, 0.15);
}

.notification-modal-icon.info .material-icons-outlined {
    color: #2196f3;
}

.notification-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.notification-modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.notification-modal-time {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.notification-modal-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.notification-goto-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.notification-goto-btn:hover {
    background: #3a8eef;
}

.notification-dismiss-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.notification-dismiss-btn:hover {
    background: var(--bg-secondary);
}

@media (max-width: 480px) {
    .notification-modal {
        width: 100%;
        max-width: calc(100vw - 32px);
    }

    .notification-modal-actions {
        flex-direction: column;
    }

    .notification-goto-btn,
    .notification-dismiss-btn {
        width: 100%;
    }
}

/* Message Box Modal */
.message-box-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 360px;
    max-width: 90vw;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.message-box-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.message-box-icon .material-icons-outlined {
    font-size: 28px;
}

.message-box-icon.error {
    background: rgba(239, 68, 68, 0.15);
}

.message-box-icon.error .material-icons-outlined {
    color: #ef4444;
}

.message-box-icon.warning {
    background: rgba(245, 158, 11, 0.15);
}

.message-box-icon.warning .material-icons-outlined {
    color: #f59e0b;
}

.message-box-icon.info {
    background: rgba(59, 130, 246, 0.15);
}

.message-box-icon.info .material-icons-outlined {
    color: #3b82f6;
}

.message-box-icon.success {
    background: rgba(34, 197, 94, 0.15);
}

.message-box-icon.success .material-icons-outlined {
    color: #22c55e;
}

.message-box-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.message-box-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.message-box-btn {
    padding: 10px 32px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 100px;
}

.message-box-btn.error {
    background: #ef4444;
    color: white;
}

.message-box-btn.error:hover {
    background: #dc2626;
}

.message-box-btn.warning {
    background: #f59e0b;
    color: white;
}

.message-box-btn.warning:hover {
    background: #d97706;
}

.message-box-btn.info {
    background: #3b82f6;
    color: white;
}

.message-box-btn.info:hover {
    background: #2563eb;
}

.message-box-btn.success {
    background: #22c55e;
    color: white;
}

.message-box-btn.success:hover {
    background: #16a34a;
}

@media (max-width: 480px) {
    .message-box {
        width: 100%;
        max-width: calc(100vw - 32px);
    }
}

/* Activity Feed */
.activity-feed-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 8px;
}

.activity-feed-bell:hover {
    background: var(--bg-tertiary);
}

.activity-feed-bell .material-icons-outlined {
    font-size: 24px;
    color: var(--text-secondary);
}

.activity-feed-bell:hover .material-icons-outlined {
    color: var(--text-primary);
}

.activity-feed-dropdown {
    position: absolute;
    top: 100%;
    right: 52px;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 380px;
    max-height: 520px;
    opacity: 0;
    visibility: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.activity-feed-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.activity-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.activity-feed-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.activity-feed-list {
    flex: 1;
    overflow-y: auto;
    max-height: 460px;
}

.activity-feed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.activity-feed-empty .material-icons-outlined {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.activity-feed-empty p {
    margin: 0;
    font-size: 14px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.activity-item:hover {
    background: var(--bg-tertiary);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(74, 158, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon .material-icons-outlined {
    font-size: 18px;
    color: var(--accent-primary);
}

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

.activity-header {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-user {
    font-weight: 500;
    color: var(--text-primary);
}

.activity-action {
    color: var(--text-secondary);
}

.activity-community {
    color: var(--accent-primary);
}

.activity-preview {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.7;
}

@media (max-width: 480px) {
    .activity-feed-dropdown {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
}

/* Post Modal */
.post-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.post-modal-overlay.active {
    display: block;
}

.post-modal-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Post modal header buttons */
.post-modal-header-buttons {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10001;
    display: flex;
    gap: 8px;
}

.post-modal-close,
.post-modal-fullscreen {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-modal-close:hover,
.post-modal-fullscreen:hover {
    background: rgba(0, 0, 0, 0.8);
}

.post-modal-close .material-icons-outlined,
.post-modal-fullscreen .material-icons-outlined {
    font-size: 24px;
}


/* Post modal view adjustments */
.post-modal-overlay .view-post-page {
    padding-top: 0;
}

.post-modal-overlay .view-post-images {
    max-height: 70vh;
}

.post-modal-overlay .view-post-carousel {
    max-height: 70vh;
}

.post-modal-overlay .carousel-image-container {
    max-height: 70vh;
}

.post-modal-overlay .carousel-image-container img {
    max-height: 70vh;
    object-fit: contain;
    opacity: 1 !important;
}

/* Comment styles for modal */
.post-modal-overlay .comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.post-modal-overlay .comment-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.post-modal-overlay .comment-author {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.post-modal-overlay .comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-modal-overlay .comment-body {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.post-modal-overlay .loading-comments,
.post-modal-overlay .no-comments,
.post-modal-overlay .error-comments {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.post-modal-overlay .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.post-modal-overlay .error-state .material-icons-outlined {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.post-modal-overlay .error-state h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.post-modal-overlay .error-state p {
    margin: 0 0 20px 0;
}

@media (max-width: 768px) {
    .post-modal-container {
        margin: 0;
        border-radius: 0;
    }

    .post-modal-close {
        top: 8px;
        right: 8px;
    }

    .post-modal-overlay .view-post-images {
        max-height: 50vh;
    }

    .post-modal-overlay .view-post-carousel {
        max-height: 50vh;
    }

    .post-modal-overlay .carousel-image-container {
        max-height: 50vh;
    }

    .post-modal-overlay .carousel-image-container img {
        max-height: 50vh;
    }
}

/* ================================
   Modern Post View Styles
   ================================ */

/* Post details card - matches image width */
.post-details-card {
    max-width: 100%;
    padding: 0 24px 24px;
    background: var(--bg-primary);
}

/* Author header */
.post-author-header {
    display: flex;
    align-items: center;
    padding: 14px 0;
    gap: 12px;
}

.post-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-author-avatar-fallback {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.post-author-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
}

.post-author-name:hover {
    text-decoration: underline;
}

.post-community-tag {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.post-more-menu {
    position: relative;
}

.post-more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-more-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.post-more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.post-more-dropdown.open-upward {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

.post-menu-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
}

.post-menu-option:hover {
    background: var(--bg-tertiary);
}

.post-menu-option .material-icons {
    font-size: 18px;
    color: var(--text-secondary);
}

.post-menu-option.delete {
    color: var(--color-error);
}

.post-menu-option.delete .material-icons {
    color: var(--color-error);
}

.post-menu-option.delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Post content */
.post-content {
    padding: 0 0 12px;
}

.post-content .post-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.4;
}

.post-content .post-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Action bar */
.post-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.post-actions-left,
.post-actions-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
}

.post-action-btn:hover {
    background: var(--surface-hover);
}

.post-action-btn .material-icons-outlined,
.post-action-btn .material-icons {
    font-size: 22px;
}

.post-action-btn .action-count {
    font-size: 14px;
    font-weight: 500;
}

.post-action-btn.liked .material-icons-outlined {
    font-family: 'Material Icons';
    color: #ef4444;
}

.post-action-btn.bookmarked .material-icons-outlined {
    font-family: 'Material Icons';
    color: var(--accent-primary);
}

/* Reactions summary */
.post-reactions-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 32px;
}

.post-reactions-summary:empty {
    display: none;
}

.reaction-avatars {
    display: flex;
    margin-right: 4px;
}

.reaction-avatars img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    margin-left: -8px;
}

.reaction-avatars img:first-child {
    margin-left: 0;
}

.reaction-text {
    color: var(--text-secondary);
}

.reaction-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Enhanced Reactions Display */
.reactions-display {
    padding: 12px 0;
}

/* Existing reactions bubbles (shows counts) */
.reactions-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.reaction-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.reaction-bubble:hover {
    background: var(--surface-hover);
    border-color: var(--accent-primary);
}

.reaction-bubble.user-reacted {
    background: rgba(74, 158, 255, 0.15);
    border-color: var(--accent-primary);
}

.reaction-bubble .reaction-emoji {
    font-size: 16px;
}

.reaction-bubble .reaction-count {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Quick reaction bar (always visible) */
.reactions-quick-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.quick-react-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}

.quick-react-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent-primary);
}

.quick-react-btn.user-reacted {
    background: rgba(74, 158, 255, 0.15);
    border-color: var(--accent-primary);
}

.reaction-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px dashed var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
}

.reaction-add-btn:hover {
    background: var(--surface-hover);
    border-style: solid;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.reactions-summary-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.reactions-summary-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Timestamp */
.post-timestamp {
    font-size: 12px;
    color: var(--text-tertiary);
    padding: 4px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Comments section */
.post-comments-section {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Individual comment */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
}

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

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-body {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action-btn:hover {
    color: var(--text-primary);
}

.comment-action-btn .material-icons-outlined {
    font-size: 16px;
}

/* Comment input */
.comment-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
}

.comment-input-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.comment-input:focus {
    border-color: var(--accent-primary);
}

.comment-input::placeholder {
    color: var(--text-tertiary);
}

.comment-post-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 4px;
    opacity: 0.5;
}

.comment-post-btn:hover {
    opacity: 1;
}

/* Loading/empty states for comments */
.loading-comments,
.no-comments,
.error-comments {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Modal-specific adjustments for modern view */
.post-modal-overlay .post-details-card {
    padding-bottom: 40px;
}

.post-modal-overlay .view-post-page.modern {
    padding: 0;
}

/* Mobile responsive for modern post view */
@media (max-width: 768px) {
    .post-details-card {
        padding: 0 12px 24px;
    }

    .post-author-header {
        padding: 12px 0;
    }

    .post-action-btn {
        padding: 8px;
    }

    .post-action-btn .action-count {
        display: none;
    }

    .comments-list {
        max-height: 300px;
    }
}

/* Buttons */
.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-oauth:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

.btn-oauth img {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    margin-top: 0;
    min-height: 100vh;
    padding: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Desktop: account for navbar height to prevent scroll */
@media (min-width: 769px) {
    .main-content {
        min-height: calc(100vh - 53px);
    }
}

/* Breadcrumb container positioning */
.breadcrumb {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Adjust main content when breadcrumb is visible */
.main-content.with-breadcrumb {
    margin-top: 0;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    animation: fadeIn var(--transition-slow);
}

.video-item {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    transform: translateY(20px);
    transition: transform var(--transition-fast);
}

.video-item:hover .video-info {
    transform: translateY(0);
}

.video-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Library Grid */
.library-container {
    width: 100%;
    padding: 0;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.library-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.library-stats {
    display: flex;
    gap: 2rem;
    margin-left: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-item .material-icons-outlined {
    font-size: 1.25rem;
}

.library-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

/* Library Tabs */
.library-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.library-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.library-tab:hover {
    color: var(--text-primary);
}

.library-tab.active {
    color: var(--text-primary);
}

.library-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.library-content {
    min-height: 500px;
}

.library-view {
    display: none;
    animation: fadeIn var(--transition-medium);
}

.library-view.active {
    display: block;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.folder-item {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.folder-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.folder-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.folder-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.folder-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 10;
    padding: 0.5rem;
    line-height: 1;
    user-select: none;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Auth requirement message */
.auth-message {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Required auth modal styles */
.modal[data-required="true"] {
    background: rgba(0, 0, 0, 0.8);
}

.modal[data-required="true"] .modal-close {
    display: none !important;
}

/* Coming Soon Styles */
.coming-soon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.coming-soon-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.coming-soon-icon {
    margin-bottom: 1.5rem;
}

.coming-soon-icon .material-icons-outlined {
    font-size: 4rem;
    color: var(--accent-primary);
}

.coming-soon-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.coming-soon-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.coming-soon-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    position: relative;
}

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

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Authentication Tabs */
.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--text-primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.help-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.help-text a {
    color: var(--accent-primary);
    text-decoration: none;
}

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

.btn-link {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
    transition: opacity var(--transition-fast);
}

.btn-link:hover {
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Loading States */
.skeleton {
    background: var(--bg-secondary);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 2s infinite;
}

.media-item.skeleton {
    background: var(--color-surface);
}

.skeleton-box {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Account Page */
.account-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Account Header Card */
.account-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    margin-bottom: 20px;
}

.account-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a9eff 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #3a3a3a;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-avatar i {
    font-size: 28px;
    color: #ffffff;
}

.account-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-username {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.account-email {
    margin: 0;
    font-size: 14px;
    color: #808080;
}

/* Avatar Upload UI */
.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-upload-box {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px dashed #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-upload-box:hover {
    border-color: #4a9eff;
}

.avatar-upload-box:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.avatar-upload-placeholder i {
    font-size: 36px;
    color: #555;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    color: #fff;
    gap: 4px;
}

.avatar-upload-overlay i {
    font-size: 20px;
}

.avatar-upload-overlay span {
    font-size: 12px;
}

.avatar-upload-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.avatar-upload-info p {
    margin: 0;
    color: #ccc;
    font-size: 14px;
}

.avatar-upload-hint {
    color: #666 !important;
    font-size: 12px !important;
}

.avatar-upload-box .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #333;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.account-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.account-tier-badge.free {
    background: rgba(255, 255, 255, 0.08);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.account-tier-badge.premium {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.account-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.account-role-badge.admin {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Account Tabs */
.account-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 20px;
}

.account-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #888;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.account-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
}

.account-tab.active {
    background: #2a2a2a;
    color: #ffffff;
}

.account-tab i {
    font-size: 14px;
}

/* Account Cards */
.account-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-bottom: 16px;
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.account-card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.account-card-header h2 i {
    color: #4a9eff;
    font-size: 16px;
}

.account-card-body {
    padding: 20px;
}

/* Profile Tab */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-field-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-field-value {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 15px;
    color: #ffffff;
}

.profile-field-value .btn-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4a9eff;
}

/* Account Quick Links */
.account-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.account-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.account-link-card:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.account-link-card .material-icons-outlined {
    font-size: 20px;
    color: var(--text-secondary);
}

.account-link-card:hover .material-icons-outlined {
    color: var(--accent-primary);
}

/* Role badges (keep existing) */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
}

.role-badge.role-admin {
    background: #FFD70020;
    color: #FFD700;
    border: 1px solid #FFD70040;
}

.role-badge.role-user {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
    border: 1px solid rgba(74, 158, 255, 0.2);
}

/* Billing Tab */
.billing-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.billing-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
}

.billing-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
}

.billing-stat-icon.real {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.billing-stat-icon.bonus {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.billing-stat-icon.tier {
    background: rgba(255, 255, 255, 0.08);
    color: #888;
}

.billing-stat-icon.tier.premium {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.billing-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.billing-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.billing-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #888;
}

.billing-stat-desc {
    font-size: 12px;
    color: #666;
}

.billing-stat-desc.warning {
    color: #f59e0b;
}

.billing-stat-desc.expired {
    color: #ef4444;
}

/* Subscription section */
.subscription-active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
    font-weight: 500;
}

.subscription-status i {
    font-size: 18px;
}

.subscription-expiry {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.subscription-actions {
    margin-top: 8px;
}

.subscription-actions .btn {
    width: auto;
}

.subscription-upgrade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.subscription-upgrade .btn {
    flex-shrink: 0;
    width: auto;
}

.upgrade-message {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.upgrade-message > i {
    font-size: 24px;
    color: #4a9eff;
    margin-top: 2px;
}

.upgrade-message h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.upgrade-message p {
    margin: 0;
    font-size: 14px;
    color: #888;
}

/* Redeem Code Section */
.redeem-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

.redeem-form {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 450px;
}

.redeem-form input {
    flex: 1;
    max-width: 300px;
    padding: 10px 14px;
    font-size: 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ffffff;
    text-transform: uppercase;
}

.redeem-form .btn {
    flex-shrink: 0;
    width: auto;
}

.redeem-form input::placeholder {
    text-transform: none;
    color: #666;
}

.redeem-form input:focus {
    outline: none;
    border-color: #4a9eff;
}

.redeem-result {
    margin-top: 12px;
    font-size: 14px;
    min-height: 20px;
}

.redeem-result.success {
    color: #10b981;
}

.redeem-result.error {
    color: #ef4444;
}

/* Transaction History */
.transaction-filters {
    display: flex;
    gap: 8px;
}

.transaction-filter-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
}

.transaction-filter-btn:hover {
    border-color: #4a9eff;
    color: #fff;
}

.transaction-filter-btn.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #fff;
}

.transaction-loading,
.transaction-empty,
.transaction-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
    gap: 12px;
}

.transaction-loading i,
.transaction-empty i,
.transaction-error i {
    font-size: 32px;
}

.transaction-error {
    color: #ef4444;
}

.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #222;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon.credit {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.transaction-icon.debit {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

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

.transaction-description {
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transaction-type {
    font-size: 12px;
    color: #666;
}

.transaction-balance-type {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.transaction-balance-type.real {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.transaction-balance-type.bonus {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.transaction-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.transaction-amount {
    font-size: 14px;
    font-weight: 600;
}

.transaction-amount.credit {
    color: #10b981;
}

.transaction-amount.debit {
    color: #ef4444;
}

.transaction-date {
    font-size: 11px;
    color: #666;
}

@media (max-width: 600px) {
    .transaction-filters {
        display: none;
    }

    .transaction-item {
        flex-wrap: wrap;
    }

    .transaction-details {
        width: calc(100% - 54px);
    }

    .transaction-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 8px;
        padding-left: 54px;
    }
}

/* Security Tab */
.security-desc {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

.connected-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connected-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.connected-account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.connected-account-info > i {
    font-size: 24px;
    color: #888;
}

.connected-account.connected .connected-account-info > i {
    color: #4285f4;
}

.connected-account-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.connected-account-status {
    display: block;
    font-size: 12px;
    color: #666;
}

.connected-account.connected .connected-account-status {
    color: #10b981;
}

.connected-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    color: #10b981;
    font-size: 12px;
}

/* Danger zone */
.account-card.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
}

.account-card.danger-zone .account-card-header h2 i {
    color: #ef4444;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .account-header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .account-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .billing-cards-grid {
        grid-template-columns: 1fr;
    }

    .subscription-upgrade {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-tabs {
        overflow-x: auto;
    }

    .account-tab span {
        display: none;
    }

    .account-tab {
        padding: 12px 16px;
    }
}

.text-secondary {
    color: var(--text-secondary);
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
    width: 100%;
    text-align: left;
}

.settings-item:hover {
    background: var(--bg-primary);
    border-color: var(--text-tertiary);
}

.settings-item.danger {
    color: #ef4444;
}

.settings-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.settings-item span:last-child {
    margin-left: auto;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
}

/* Mobile menu overlay styles moved to line 5770+ for unified mobile/desktop menu */

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 0;
    z-index: 1100;
    height: 50px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
    color: var(--accent-primary);
}

.bottom-nav-item .material-icons-outlined {
    font-size: 22px;
    font-weight: 300;
    pointer-events: none;
}

.bottom-nav-label {
    font-size: 10px;
    font-weight: 500;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .navbar {
        display: none;
    }
    
    /* Hide desktop hamburger menu toggle */
    .mobile-menu-toggle {
        display: none;
    }

    /* Mobile menu overlay is now used for both desktop and mobile hamburger menus */

    /* Show mobile bottom nav */
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Fix breadcrumb positioning on mobile */
    .breadcrumb {
        position: fixed !important; /* Fixed at top */
        top: 0 !important;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        z-index: 1050;
        height: 45px;
        box-sizing: border-box;
    }
    
    /* Adjust main content */
    .main-content {
        margin-top: 0;
        padding: 0;
        padding-bottom: calc(50px + env(safe-area-inset-bottom, 0));
        min-height: 100vh;
    }
    
    /* Override for when breadcrumb is visible on mobile */
    .main-content.with-breadcrumb {
        margin-top: 45px; /* Height of mobile breadcrumb */
    }
    
    /* But not for view post page */
    .view-post-page .main-content.with-breadcrumb,
    .main-content.with-breadcrumb .view-post-page {
        margin-top: 0;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    /* Adjust modals for mobile */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Account page adjustments */
    .account-container {
        padding: 1rem;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
    }
    
    /* Library container adjustments */
    .library-container {
        padding: 1rem;
    }
    
    /* View post page adjustments moved to end of file to prevent override */
    
    
    
    /* Remove any top padding/margin that might create gaps */
    #app > *:first-child {
        margin-top: 0;
        padding-top: 0;
    }
}

/* View Post Page */
.view-post-page {
    position: relative;
    min-height: calc(100vh - 60px);
    background: black;
    display: flex;
    flex-direction: column;
    z-index: 100;
    margin-top: 0;
}

/* Adjust for breadcrumb */
.with-breadcrumb .view-post-page {
    margin-top: 0;
    min-height: calc(100vh - 60px);
}


/* View Post Modal - Removed (now using page) */

/* View Post Header - Removed in favor of breadcrumb navigation */

.view-post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.view-post-images {
    flex-shrink: 0;
    position: relative;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y; /* Allow vertical scrolling, handle horizontal swipe and zoom in JS */
    height: calc(100vh - 120px); /* Account for navbar and some padding */
    max-height: calc(100vh - 120px);
}

.view-post-carousel {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform var(--transition-medium);
    overflow: visible; /* Allow content to overflow when zoomed */
}

.carousel-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Allow image to overflow when zoomed */
}

.carousel-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform-origin: center center;
    display: block;
    /* Transition will be added via JS only when needed */
}

/* Image loader */
.image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-loader p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.image-loader.error {
    color: #ef4444;
}

.image-loader.error p {
    color: #ef4444;
}

/* Only show carousel navigation on desktop */
@media (min-width: 769px) {
    .carousel-prev,
    .carousel-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.5);
        border: none;
        color: white;
        cursor: pointer;
        padding: 1rem;
        border-radius: 50%;
        transition: background var(--transition-fast), opacity var(--transition-fast);
        z-index: 10;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
    }
    
    .view-post-images:hover .carousel-prev,
    .view-post-images:hover .carousel-next {
        opacity: 1;
    }
}

/* Completely hide on mobile */
@media (max-width: 768px) {
    .carousel-prev,
    .carousel-next {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Modal-specific carousel styles removed */


.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 1150; /* Above mobile bottom nav */
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Hide carousel indicators when image is zoomed */
.view-post-images.has-zoomed-image .carousel-indicators {
    display: none !important;
}

/* Hide prev/next buttons when image is zoomed */
.view-post-images.has-zoomed-image .carousel-prev,
.view-post-images.has-zoomed-image .carousel-next {
    display: none !important;
}

/* Ensure zoomed image appears above everything */
.view-post-carousel img.zoomed {
    position: relative;
    z-index: 9999 !important;
}

/* Alternative: make carousel slide take full z-index when zoomed */
.view-post-images.has-zoomed-image .view-post-carousel {
    z-index: 9999 !important;
}

/* Zoom controls styles */


.zoom-btn .material-icons-outlined {
    font-size: 20px;
}

.zoom-level {
    color: white;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
    user-select: none;
}

/* Zoomed image styles */
.view-post-carousel img.zoomed {
    cursor: move;
    transition: none !important;
    z-index: 1501; /* Above fullscreen container */
    position: relative;
}

/* Prevent overflow when not zoomed */
.view-post-images {
    overflow: hidden;
}

/* Make container fullscreen when image is zoomed */
.view-post-images {
    transition: background-color 0.3s ease;
}

.view-post-images.has-zoomed-image {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1500 !important; /* Above navbar (1000) and breadcrumb (1050) */
    background: rgba(0, 0, 0, 0.95) !important;
    overflow: visible !important;
}

.view-post-images.has-zoomed-image .carousel-wrapper {
    height: 100% !important;
    overflow: visible !important;
}

.view-post-images.has-zoomed-image .view-post-carousel {
    height: 100% !important;
    overflow: visible !important;
}

/* Hide other UI elements when zoomed */
.view-post-images.has-zoomed-image ~ * {
    display: none !important;
}

/* Removed duplicate - overflow already set above */

/* Mobile zoom controls */
@media (max-width: 1199px) {
    .zoom-controls {
        top: auto;
        /* Position above bottom nav (50px) + carousel indicators (~2rem) + padding */
        bottom: calc(50px + 3rem + env(safe-area-inset-bottom, 0px));
        right: 1rem;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .zoom-controls .zoom-btn {
        padding: 0.5rem;
    }
    
    .zoom-controls .material-icons-outlined {
        font-size: 24px;
    }
}

/* Desktop sidebar removed - using mobile-style layout */

/* Sidebar removed - no toggle needed */

.view-post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.community-name {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.875em;
}

/* Instagram-style card components */
.ig-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface);
}

.ig-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ig-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ig-user-details .author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 18px;
}

.ig-location {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 400;
    line-height: 16px;
}

.ig-more-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.ig-more-btn:hover {
    background: var(--surface-hover);
}

/* Instagram-style carousel */
.ig-carousel {
    position: relative;
    background: #000;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.ig-carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ig-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ig-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.ig-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.ig-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
    z-index: 2;
}

.ig-nav:hover {
    opacity: 0.8;
}

.ig-nav.ig-nav-prev {
    left: 12px;
}

.ig-nav.ig-nav-next {
    right: 12px;
}

.ig-nav.hidden {
    display: none;
}

.ig-nav .material-icons-outlined {
    font-size: 18px;
    color: #000;
}

.ig-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.ig-dots-inside {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: none; /* Hide dots inside image on all screen sizes */
}

.ig-dots-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex; /* Always show dots in center of actions */
    align-items: center;
    height: 100%;
}

/* Mobile: hide arrows */
@media (max-width: 768px) {
    .ig-nav {
        display: none !important;
    }
}

.ig-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s;
}

.ig-dot.active {
    background: #fff;
}

/* Instagram-style actions */
.ig-actions {
    display: flex;
    justify-content: space-between;
    padding: 0px 16px;
    position: relative;
}

.ig-actions-left {
    display: flex;
    gap: 16px;
}

.ig-action-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 0;
    transition: opacity 0.2s;
}

.ig-action-btn:hover {
    opacity: 0.6;
}

.ig-action-btn .material-icons,
.ig-action-btn .material-icons-outlined {
    font-size: 24px;
}

.ig-action-btn.liked .material-icons {
    color: #ed4956;
}

/* Instagram-style content */
.ig-content {
    padding: 0 16px 16px;
}

.ig-likes {
    margin-bottom: 8px;
}

.ig-likes-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.ig-caption {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 18px;
}

.ig-caption-author {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.ig-caption-title {
    font-weight: 600;
    margin-right: 8px;
}

.ig-caption-text {
    color: var(--text-primary);
}

.ig-more-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 14px;
}

.ig-comments-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin-bottom: 8px;
    font-size: 14px;
    display: block;
    text-align: left;
}

.ig-timestamp {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* Instagram-style text post */
.ig-text-post {
    padding: 16px;
    background: var(--surface);
}


/* Instagram-style post card */
.post-card.ig-style {
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Fix video overlay for Instagram style */
.ig-carousel-slide .video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ig-carousel-slide .video-play-overlay .material-icons-outlined {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.post-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.view-post-body {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.post-message {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.view-post-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.action-btn.active {
    color: var(--accent-primary);
}

.action-count {
    font-size: 0.875rem;
}

.view-post-comments {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* Scroll container for mobile */
.view-post-scroll-container {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow-y: visible;
    -webkit-overflow-scrolling: auto;
    min-height: 100%;
}

.view-post-mobile-details {
    display: block;
    background: var(--bg-primary);
    padding: 1.5rem;
    min-height: 100%;
    position: relative;
    z-index: 0;
}

/* Reply box styles */
.view-post-reply-box {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.reply-input {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: var(--bg-secondary);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.reply-submit {
    float: right;
}

/* Reactions section */
.view-post-reactions-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.reactions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    user-select: none;
}

.reactions-header:hover {
    opacity: 0.8;
}

.reactions-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.toggle-indicator {
    font-size: 20px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.reactions-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.reaction-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    font-size: 0.875rem;
}

.reaction-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

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

.reaction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.reaction-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Comments styles */
.comment-thread {
    margin-left: 0;
    padding-left: 0;
    border-left: 2px solid var(--border-color);
}

.comment-item {
    padding: 1rem 0 1rem 1rem;
    position: relative;
}

.comment-item.nested {
    margin-left: 2rem;
}

.comment-replies {
    margin-top: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
}

/* Small button styles */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

/* Avatar gradients */
.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-content {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-action {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.comment-action:hover {
    color: var(--text-primary);
}

.comment-reply-box {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-small);
}

.comment-reply-input {
    width: 100%;
    min-height: 40px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}


/* Add cursor pointer to carousel slides */
.carousel-slide {
    cursor: pointer;
}

/* Community Card Styles - Compact & Immersive */
.community-card {
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.community-card:hover {
    background: var(--bg-tertiary);
}

.community-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.community-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-card-content {
    padding: 0.5rem;
}

.community-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-description {
    display: none;
}

.community-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.community-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.community-stats .stat-item .material-icons-outlined {
    font-size: 0.75rem;
}

.community-stats .stat-value {
    display: inline;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Badge for locked communities */
.community-card .badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 1;
}

.carousel-slide.video-slide {
    position: relative;
}

.carousel-slide.video-slide video,
.carousel-slide.video-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play-overlay .material-icons-outlined {
    font-size: 48px;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.carousel-slide.video-slide:hover .video-play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

/* View Post Modal Scrollbar Styling */
.view-post-scroll-container::-webkit-scrollbar,
.view-post-comments::-webkit-scrollbar,
.reaction-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.view-post-scroll-container::-webkit-scrollbar-track,
.view-post-comments::-webkit-scrollbar-track,
.reaction-list::-webkit-scrollbar-track {
    background: transparent;
}

.view-post-scroll-container::-webkit-scrollbar-thumb,
.view-post-comments::-webkit-scrollbar-thumb,
.reaction-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.view-post-scroll-container::-webkit-scrollbar-thumb:hover,
.view-post-comments::-webkit-scrollbar-thumb:hover,
.reaction-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar support */
.view-post-scroll-container,
.view-post-comments,
.reaction-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Scroll indicator */
.scroll-indicator {
    display: block;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    animation: bounce 2s infinite;
    z-index: 10;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Fix for fast swipe triggering double-tap zoom in view post modal */
.view-post-carousel img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* View Image Page - Image-Focused Minimal UI */
.view-image-page {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
}

/* Top Bar */
.view-image-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 1rem;
    z-index: 2010;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.view-image-topbar > * {
    pointer-events: auto;
}

.view-image-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-image-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.view-image-info-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-image-info-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.view-image-info-toggle.active {
    background: var(--accent-primary);
}

.view-image-nav-info {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Main Image Area */
.view-image-main {
    width: 100%;
    height: 100%;
    position: relative;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y;
}

.view-image-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Allow touch events for swipe navigation */
    touch-action: pan-y pinch-zoom;
}

.view-image-display img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    /* Remove transition - will be handled by JavaScript */
    cursor: default;
    /* Enable hardware acceleration */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.view-image-display img.zoomed {
    cursor: grab;
}

.view-image-display img.zoomed:active {
    cursor: grabbing;
}

/* Disable touch scrolling when image is zoomed */
.view-image-display.has-zoomed-image {
    touch-action: none;
}

/* Swipe navigation container */
.swipe-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.swipe-wrapper {
    position: relative;
    width: 300%;
    height: 100%;
    display: flex;
    transform: translateX(-33.3333%);
    transition: none;
    will-change: transform;
}

.swipe-wrapper.transitioning {
    transition: transform 0.25s linear;
}

.swipe-slide {
    width: 33.333%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #000;
}

.swipe-slide img,
.swipe-slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
}

/* Ensure video controls are interactive */
.swipe-slide video::-webkit-media-controls {
    pointer-events: auto !important;
}

.swipe-slide video::-webkit-media-controls-enclosure {
    pointer-events: auto !important;
}


/* Image navigation */
.image-nav-prev,
.image-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: all var(--transition-fast);
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.view-image-main:hover .image-nav-prev:not(:disabled),
.view-image-main:hover .image-nav-next:not(:disabled) {
    opacity: 0.8;
}

.image-nav-prev:disabled,
.image-nav-next:disabled {
    cursor: not-allowed;
    opacity: 0.3 !important;
}

.image-nav-prev {
    left: 2rem;
}

.image-nav-next {
    right: 2rem;
}

.image-nav-prev:hover,
.image-nav-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Hide navigation on mobile */
@media (max-width: 768px) {
    .image-nav-prev,
    .image-nav-next {
        display: none !important;
    }
}

/* Zoom Controls (bottom-left) */
.view-image-zoom-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    padding: 0.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
    width: fit-content;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.zoom-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.zoom-btn .material-icons-outlined {
    font-size: 1.25rem;
}

.zoom-level {
    min-width: 50px;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    padding: 0 0.25rem;
}

/* Floating Action Bar (bottom-right) */
.view-image-fab {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.fab-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 30, 30, 0.9);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.fab-btn:hover {
    background: rgba(60, 60, 60, 0.95);
}

.fab-btn.fab-primary {
    width: 56px;
    height: 56px;
    background: var(--accent-primary);
}

.fab-btn.fab-primary:hover {
    background: var(--accent-hover, #5558e8);
}

/* View Image Menu Dropdown */
.view-image-menu-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: rgba(30, 30, 30, 0.98);
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.view-image-menu-dropdown.show {
    display: block;
}

.view-image-menu-dropdown .menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
}

.view-image-menu-dropdown .menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.view-image-menu-dropdown .menu-item.danger {
    color: #ef4444;
}

.view-image-menu-dropdown .menu-item .material-icons-outlined {
    font-size: 20px;
    color: var(--text-secondary);
}

.view-image-menu-dropdown .menu-item.danger .material-icons-outlined {
    color: #ef4444;
}

.view-image-menu-dropdown .menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

.view-image-menu-dropdown .owner-only {
    display: none;
}

.view-image-menu-dropdown.show-owner-actions .owner-only {
    display: flex;
}

.view-image-menu-dropdown .menu-divider.owner-only {
    display: none;
}

.view-image-menu-dropdown.show-owner-actions .menu-divider.owner-only {
    display: block;
}

/* Slide-in Details Panel */
.view-image-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 2020;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
}

.view-image-panel.open {
    transform: translateX(0);
    visibility: visible;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 1rem;
}

.panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.panel-section {
    margin-bottom: 1.5rem;
}

.panel-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.panel-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.panel-section .section-header h3 {
    margin: 0;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.icon-btn .material-icons-outlined {
    font-size: 1rem;
}

/* Panel Metadata Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.meta-item {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: 8px;
}

.meta-label {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

/* Workflow Badge Section */
.panel-section.workflow-highlight {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.panel-section.workflow-highlight h3 {
    margin-bottom: 0.5rem;
}

.workflow-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.625rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.workflow-badge .material-icons-outlined {
    font-size: 1rem;
    color: var(--accent-primary);
}

.workflow-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.workflow-version {
    font-size: 0.75rem !important;
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

.workflow-model {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    margin-top: 0.25rem;
}

/* Panel Prompt Text */
.panel-section .prompt-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    word-break: break-word;
}

.panel-section .prompt-text.secondary {
    color: var(--text-secondary);
}

/* Panel Parameters Grid */
.panel-section .parameters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
}

.panel-section .parameter-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.8125rem;
}

.panel-section .parameter-key {
    color: var(--text-tertiary);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.panel-section .parameter-value {
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.8125rem;
}

/* Danger Zone */
.panel-section.danger-zone {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-danger-outline {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Mobile Responsive for View Image */
@media (max-width: 768px) {
    .view-image-panel {
        width: 100%;
        top: auto;
        height: 80vh;
        border-left: none;
        border-top: 1px solid var(--border-color);
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        z-index: 2200; /* Above mega-menu (2100) and mobile-bottom-nav (1100) */
    }

    .view-image-panel.open {
        transform: translateY(0);
    }

    .view-image-fab {
        bottom: 1rem;
        right: 1rem;
    }

    .view-image-zoom-controls {
        bottom: 0.5rem;
        left: 1rem;
    }

    .zoom-level {
        min-width: 40px;
        font-size: 0.75rem;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    .panel-section .parameters-grid {
        grid-template-columns: 1fr;
    }
}

/* Image info panel - Legacy (keeping for compatibility) */
.view-image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 2rem;
    color: white;
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.view-image-page.show-info .view-image-info {
    transform: translateY(0);
}

.image-info-toggle {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition-fast);
    z-index: 10;
}

.image-info-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.image-metadata {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.image-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.image-meta-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.image-meta-value {
    font-weight: 500;
}

/* Image actions */
.view-image-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.image-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* Thumbnails strip */
.view-image-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    overflow-x: auto;
    justify-content: center;
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.view-image-page.show-thumbnails .view-image-thumbnails {
    transform: translateY(0);
}

.image-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.image-thumbnail:hover {
    opacity: 0.8;
}

.image-thumbnail.active {
    opacity: 1;
    border-color: var(--accent-primary);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading state */
.view-image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: white;
}

.view-image-loader .loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Video Play Overlay */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    pointer-events: all;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.video-play-overlay:hover {
    opacity: 0.9;
}

.video-container {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent selection highlight on carousel */
.carousel-image-container {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.carousel-image-container * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Hide native video overlay controls (play/pause button in center) */
.carousel-image-container video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

.carousel-image-container video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.carousel-image-container video::-webkit-media-controls-overlay-enclosure {
    display: none !important;
}

/* For Firefox */
.carousel-image-container video::-moz-media-controls-overlay-play-button {
    display: none !important;
}

/* Keep the control bar but hide the big play button */
.carousel-image-container video::-webkit-media-controls-panel {
    /* Keep this visible for scrubbing and volume */
}

.carousel-image-container video::-webkit-media-controls-play-button {
    /* This is the play button in the control bar - keep it */
}

.video-container .image-loader {
    z-index: 5;
}

/* View Image Details Section */
.view-image-details {
    background: var(--bg-secondary);
    min-height: 100%;
    padding: 2rem;
}

/* Toast Notifications */
.error-toast,
.success-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateY(1rem);
    transition: all var(--transition-medium);
    max-width: 400px;
}

.error-toast {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--bg-tertiary));
}

.error-toast .material-icons-outlined {
    color: #ef4444;
}

.success-toast {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), var(--bg-tertiary));
}

.success-toast .material-icons-outlined {
    color: #22c55e;
}

.error-toast.show,
.success-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Global Loading Overlay */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium);
}

.global-loader.show {
    opacity: 1;
    pointer-events: all;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Loading state for body */
body.is-loading {
    pointer-events: none;
    user-select: none;
}

/* Render error fallback */
.render-error {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.image-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.image-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.image-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.generation-details {
    margin-bottom: 2rem;
}

.generation-details h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.generation-details h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Compact parameters grid */
.parameters-section {
    margin-top: 1.5rem;
}

.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
}

.parameter-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.parameter-key {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.parameter-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    word-break: break-word;
}

.no-params {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Pinterest-style Feed Component Styles */
.feed-page {
    padding: 0 0 2rem 0; /* Remove top padding to eliminate gap */
    max-width: 100%; /* Full width */
    margin: 0;
}

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

.feed-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feed-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.feed-masonry-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.feed-masonry-grid {
    display: grid;
    grid-template-columns: var(--grid-columns, repeat(auto-fill, minmax(300px, 1fr)));
    gap: 4px;
    width: 100%;
    overflow: visible;
}

.feed-masonry-item {
    cursor: pointer;
    content-visibility: auto;
    min-width: 0;
    min-height: 0;
}

.feed-item-card {
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.feed-item-image {
    width: 100%;
    line-height: 0;
    background: #000;
    position: relative;
}

.feed-item-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Feed Carousel Styles */
.feed-item-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

.feed-carousel-track {
    display: flex;
    transition: transform 0.3s ease-out;
    will-change: transform;
    height: 100%;
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.feed-carousel-slide {
    min-width: 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable tap highlight */
    -webkit-tap-highlight-color: transparent;
}

.feed-carousel-slide img,
.feed-carousel-slide video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Disable selection and drag */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    user-drag: none;
    /* Disable tap highlight */
    -webkit-tap-highlight-color: transparent;
    /* Disable touch callout on iOS */
    -webkit-touch-callout: none;
}

.feed-carousel-slide video {
    cursor: pointer;
    /* Additional mobile-specific fixes */
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove focus outline on video */
.feed-carousel-slide video:focus {
    outline: none !important;
}

/* Progressive image loading for modal */
.progressive-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.progressive-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.progressive-thumbnail {
    z-index: 1;
    /* Slightly blur thumbnail to show it's lower quality */
    filter: blur(0.5px);
}

.progressive-fullres {
    z-index: 2;
    /* Will transition opacity from 0 to 1 */
}

/* Static background for loading indicator */
.feed-carousel-slide[data-loading="true"]::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

/* Spinning cog icon for loading */
.feed-carousel-slide[data-loading="true"]::after {
    content: '\e8b8'; /* Material Icons settings/cog icon */
    font-family: 'Material Icons';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
    line-height: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    z-index: 11; /* Above the background */
    pointer-events: none;
    animation: spin 3s linear infinite;
}

/* Prevent selection on the entire feed item card */
.feed-item-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.feed-item-card * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Video slide indicator */
/* Removed persistent play icon overlay - now using dynamic play/pause button */

/* Hide the play icon background when video is loading */
.feed-carousel-slide[data-is-video="true"][data-loading="true"]::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

/* When video is loading, show spinning cog instead of play icon */
.feed-carousel-slide[data-is-video="true"][data-loading="true"]::after {
    content: '\e8b8'; /* Material Icons settings/cog icon - same as image loading */
    font-family: 'Material Icons';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
    line-height: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    background: none; /* No background on the spinning element */
    background-image: none; /* Remove the play icon SVG */
    z-index: 11; /* Above the background */
    animation: spin 3s linear infinite;
}

/* Carousel Navigation */
.feed-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    
    z-index: 2;
    /* Disable selection and highlights */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.feed-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.feed-carousel-prev {
    left: 10px;
}

.feed-carousel-next {
    right: 10px;
}

.feed-carousel-nav .material-icons {
    color: white;
    font-size: 24px;
}

/* Page Counter in Footer */
.feed-carousel-counter {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* Feed Item Reactions Overlay - Vertical Stack on Right */
.feed-item-reactions-overlay {
    position: absolute;
    right: 8px; /* Add more padding to prevent count cutoff */
    bottom: 40px; /* Start above the footer */
    display: flex;
    flex-direction: column-reverse; /* Stack from bottom up */
    gap: 3px;
    z-index: 10;
}

.feed-reaction-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    cursor: pointer;
}

.feed-reaction-emoji {
    font-size: 16px;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.feed-reaction-count {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.feed-reaction-more {
    /* No specific size needed */
}

.feed-reaction-more-icon {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Make carousel container relative for absolute positioning */
.feed-item-carousel {
    position: relative;
}

.feed-item-image {
    position: relative;
}

/* Video container for play button positioning */
.feed-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Play/Pause button overlay - matches loading cog style */
.feed-video-play-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    outline: none;
}

/* Hide play button when video is loading (cog is showing) */
.feed-carousel-slide[data-loading="true"] .feed-video-play-btn {
    display: none;
}

.feed-video-play-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}

.feed-video-play-btn .material-icons {
    font-family: 'Material Icons';
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    display: block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    pointer-events: none;
}

/* Reaction Button */
.feed-item-reaction-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-item-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4a9eff;
}

.feed-item-reaction-btn .material-icons {
    font-size: 20px;
}

/* Feed Item Menu (Modal Only) */
.feed-item-menu {
    position: relative;
    margin-left: 8px;
}

.feed-item-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.feed-item-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.feed-item-menu-btn .material-icons {
    font-size: 18px;
}

.feed-item-menu-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.feed-item-menu-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
}

.feed-item-menu-option:hover {
    background: var(--bg-tertiary);
}

.feed-item-menu-option .material-icons {
    font-size: 18px;
    color: var(--text-secondary);
}

.feed-item-menu-option.delete {
    color: var(--color-error);
}

.feed-item-menu-option.delete .material-icons {
    color: var(--color-error);
}

.feed-item-menu-option.delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Report Dialog Styles */
.report-dialog {
    min-width: 400px;
    max-width: 500px;
}

.report-header {
    margin-bottom: 20px;
}

.report-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.report-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.report-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 20px;
}

.report-preview-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.report-preview-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.report-preview-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.report-section {
    margin-bottom: 20px;
}

.report-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-option {
    display: block;
    cursor: pointer;
}

.report-option input[type="radio"] {
    display: none;
}

.report-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.report-option:hover .report-option-content {
    background: var(--bg-primary);
    border-color: var(--text-tertiary);
}

.report-option input:checked + .report-option-content {
    background: var(--accent-light);
    border-color: var(--accent-primary);
}

.report-option-content .material-icons {
    color: var(--text-secondary);
    font-size: 20px;
}

.report-option input:checked + .report-option-content .material-icons {
    color: var(--accent-primary);
}

.report-option-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.report-option-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.report-textarea {
    width: 100%;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.report-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.report-char-count {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.report-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--accent-light);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.report-notice .material-icons {
    font-size: 16px;
    color: var(--accent-primary);
}

.feed-item-footer {
    padding: 2px 8px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.9));
    color: white;
    z-index: 10;
    cursor: pointer;
}

.feed-item-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.feed-item-avatar.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.feed-item-avatar.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.feed-item-avatar.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.feed-item-avatar.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.feed-item-avatar.gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.feed-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0; /* Allow text truncation */
}

.feed-item-community {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    line-height: 1;
}

.feed-item-text {
    color: white;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.feed-loading-indicator {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.feed-loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feed-page {
        padding: 0 0 1rem 0; /* Remove top padding on mobile too */
    }
    
    .feed-header h1 {
        font-size: 1.5rem;
    }
    
    .feed-masonry-grid {
        gap: 2px;
    }
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.prompt-text,
.negative-prompt-text {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.detail-item {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.detail-item span {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.image-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.image-actions button {
    flex: 1;
    min-width: 150px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .view-image-header {
        padding: 1rem;
    }
    
    .view-image-details {
        padding: 1.5rem 1rem;
    }
    
    .image-title {
        font-size: 1.25rem;
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .parameters-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .parameter-item {
        font-size: 0.8125rem;
    }
    
    /* View image page adjustments moved to end of file to prevent override */
    
    .image-actions {
        flex-direction: column;
    }
    
    .image-actions button {
        width: 100%;
    }
    
    .view-image-zoom-controls {
        top: auto;
        bottom: 60px;
        right: 1rem;
    }
}

/* ===== New Generation & Library Styles ===== */

/* Page Container */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Library page uses full width */
.library-page.page-container {
    max-width: 100%;
    padding: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.page-subtitle {
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* Workflow Browser */
.workflow-container {
    min-height: 400px;
}

.workflow-browser-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.workflow-categories {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    overflow-x: auto;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-tab:hover {
    color: var(--color-text-primary);
}

.category-tab.active {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.workflow-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.workflow-card:hover {
    border-color: var(--accent-primary);
}

.workflow-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.workflow-card.disabled:hover {
    border-color: var(--color-border);
}

.workflow-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--color-background);
}

.workflow-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workflow-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
}

.workflow-placeholder .material-icons-outlined {
    font-size: 48px;
    color: var(--color-text-muted);
}

.workflow-card-content {
    padding: 1rem;
}

.workflow-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.workflow-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.workflow-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.workflow-category,
.workflow-type,
.workflow-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.workflow-category {
    color: var(--primary, #4a9eff);
    font-weight: 500;
    text-transform: capitalize;
}

.workflow-type .material-icons-outlined,
.workflow-time .material-icons-outlined {
    font-size: 16px;
}

.cluster-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.cluster-badge.unavailable {
    background: var(--color-error);
}

.popularity-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.popularity-badge .material-icons-outlined {
    font-size: 16px;
}

.workflow-runs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.workflow-runs .material-icons-outlined {
    font-size: 14px;
}

.workflow-empty,
.workflow-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.workflow-empty .material-icons-outlined,
.workflow-error .material-icons-outlined {
    font-size: 64px;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* Workflow Form */
.workflow-form {
    max-width: 800px;
    margin: 0 auto;
}

.workflow-form-header {
    margin-bottom: 2rem;
}

.workflow-form-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.workflow-form-header p {
    color: var(--color-text-secondary);
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-field small {
    display: block;
    margin-top: 0.25rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.slider-field .slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-field input[type="range"] {
    flex: 1;
}

.slider-value {
    min-width: 3ch;
    text-align: right;
    font-weight: 500;
}

.workflow-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

/* Library Page */
.library-page .page-header {
    margin-bottom: 0;
}

/* Media Gallery Wrapper */
.media-gallery-wrapper {
    width: 100%;
    min-height: 100vh;
}

/* View mode toggle */
.view-mode-toggle {
    display: flex;
    gap: 0.25rem;
    margin-left: 1rem;
}

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

.folder-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Removed old folder sidebar styles - now using dropdown */

/* Page Header Dropdown */
.page-header-dropdown-container {
    display: inline-block;
    position: relative;
}

.page-header-dropdown {
    position: relative;
    min-width: 200px;
}

.page-header-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    justify-content: space-between;
}

.page-header-dropdown-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.page-header-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: auto;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.page-header-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.page-header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
    color: var(--text-primary);
    justify-content: space-between;
    text-align: left;
}

.page-header-dropdown-item .category-count {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.page-header-dropdown-item:hover {
    background: var(--bg-tertiary);
}

.page-header-dropdown-item.active {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.page-header-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 0;
}

.folder-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Gallery Toolbar */
.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
}

/* Mobile adjustments moved to media query */

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selection-count {
    font-weight: 500;
    color: var(--accent-primary);
}

.input-field.compact {
    padding: 0.5rem 1rem;
    min-width: 120px;
}

/* Media Gallery Grid */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    padding: 0;
    align-content: start;
    width: 100%;
}

/* Responsive grid adjustments for edge-to-edge layout */
@media (min-width: 640px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (min-width: 768px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 1024px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1280px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (min-width: 1600px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

.media-gallery.list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Media Item - Grid View */
.media-item {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: var(--color-surface);
    cursor: pointer;
    border: 0;
    transition: all 0.2s ease;
    width: 100%;
    padding-bottom: 100%; /* Creates 1:1 aspect ratio */
}

/* Media item has no hover effects to maximize visibility */

.media-item.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary);
    transform: scale(0.98);
}

.media-item img,
.media-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.media-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 3;
}

.media-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.media-overlay {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-action {
    background: rgba(0, 0, 0, 0.7);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-action:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.media-action .material-icons-outlined {
    font-size: 18px;
}

.media-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Media Item - List View */
.media-item-list {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.media-item-list:hover {
    background: var(--bg-tertiary);
}

.media-item-list.selected {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.media-item-list .media-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

.media-item-list .media-thumbnail img,
.media-item-list .media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item-list .media-info {
    flex: 1;
}

.media-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.media-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.media-item-list .media-actions {
    display: flex;
    gap: 0.5rem;
}

/* Gallery Empty State */
.gallery-empty,
.gallery-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    text-align: center;
}

.gallery-empty .material-icons-outlined,
.gallery-error .material-icons-outlined {
    font-size: 64px;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* Media Viewer */
.media-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.5);
}

.viewer-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.viewer-info span {
    color: var(--color-text-secondary);
}

.viewer-actions {
    display: flex;
    gap: 1rem;
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.viewer-media {
    max-width: 90%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-media img,
.viewer-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.viewer-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.viewer-nav.prev {
    left: 2rem;
}

.viewer-nav.next {
    right: 2rem;
}

.viewer-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    justify-content: center;
}

.viewer-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
}

.viewer-thumbnail:hover {
    opacity: 0.8;
}

.viewer-thumbnail.active {
    opacity: 1;
    border-color: var(--accent-primary);
}

.viewer-thumbnail img,
.viewer-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Button Variants */
.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
}

/* Settings Styles */
.settings-page {
    max-width: 600px;
}

.settings-page .page-header {
    margin-bottom: 1.5rem;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.settings-tab:hover {
    color: #aaa;
    background: rgba(255, 255, 255, 0.05);
}

.settings-tab.active {
    background: #2a2a2a;
    color: #fff;
}

.settings-tab .material-icons-outlined {
    font-size: 1.1rem;
}

.settings-content {
    margin-top: 0;
}

.settings-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: #888;
}

.settings-loading .spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.settings-section {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.settings-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #fff;
}

.settings-section-desc {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.settings-items {
    margin-top: 1rem;
    border-top: 1px solid #2a2a2a;
    padding-top: 0.75rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

.settings-item:first-child {
    padding-top: 0;
}

.settings-item:last-child {
    padding-bottom: 0;
}

.settings-item + .settings-item {
    border-top: 1px solid #2a2a2a;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.settings-item.disabled {
    opacity: 0.5;
}

.settings-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
}

.settings-item-desc {
    font-size: 0.75rem;
    color: #888;
}

.settings-check {
    color: #4caf50;
    font-size: 1.25rem;
}

/* Toggle Switch */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3a3a3a;
    border-radius: 22px;
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #888;
    border-radius: 50%;
}

.settings-toggle input:checked + .settings-toggle-slider {
    background-color: #6c5ce7;
}

.settings-toggle input:checked + .settings-toggle-slider:before {
    transform: translateX(18px);
    background-color: white;
}

/* Settings Actions */
.settings-actions {
    margin-top: 0.5rem;
}

.settings-actions .btn {
    padding: 0.625rem 1.5rem;
    display: inline-flex;
    width: auto;
}

/* Cache Clear Buttons */
.settings-cache-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.settings-cache-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.settings-cache-buttons .btn .material-icons-outlined {
    font-size: 1rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3a3a3a;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #888;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4a9eff;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .library-container {
        flex-direction: column;
    }
    
    .folder-sidebar {
        width: 100%;
    }
    
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .workflow-browser {
        grid-template-columns: 1fr;
    }
    
    /* Gallery Mobile Styles */
    .gallery-toolbar {
        padding: 0.5rem;
        gap: 0.5rem;
        margin-bottom: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        z-index: 100;
    }
    
    .media-gallery-wrapper {
        padding-top: 48px; /* Height of toolbar */
        padding-left: 0;
        padding-right: 0;
        margin: 0;
        width: 100%;
    }
    
    .media-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        padding: 0;
        margin: 0;
    }
    
    .gallery-toolbar {
        flex-direction: row;
        align-items: center;
    }
    
    .toolbar-left {
        flex: 1;
        display: flex;
        gap: 0.5rem;
    }
    
    .toolbar-right {
        width: auto;
        gap: 0.5rem;
    }
    
    
    /* Make folder dropdown expand on mobile */
    .page-header-dropdown-container {
        flex: 1;
        display: flex;
    }
    
    .page-header-dropdown {
        flex: 1;
        display: flex;
        min-width: unset;
    }
    
    .page-header-dropdown-toggle {
        flex: 1;
        font-size: 0.8125rem;
        padding: 0.375rem 0.5rem;
        gap: 0.25rem;
        justify-content: space-between;
        text-align: left;
    }
    
    .folder-dropdown-toggle .material-icons-outlined {
        font-size: 18px;
    }
    
    .page-header-dropdown-toggle .dropdown-current-name {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .view-mode-toggle {
        margin-left: 0;
    }
    
    .view-mode-toggle button {
        padding: 0.375rem;
    }
    
    .view-mode-toggle .material-icons-outlined {
        font-size: 20px;
    }
    
    /* Hide the My Library header on mobile */
    .library-page .page-header {
        display: none;
    }
    
    /* Remove padding from page container */
    .library-page.page-container {
        padding: 0;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .library-container {
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    /* Make dropdown menu more compact */
    .page-header-dropdown-menu {
        top: calc(100% + 2px);
        margin-top: 0;
        min-width: 180px;
        left: 0;
        right: auto;
    }
    
    .page-header-dropdown-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    
    /* Compact selection count */
    .selection-count {
        font-size: 0.8125rem;
    }
    
    /* Compact action buttons in toolbar */
    .gallery-toolbar .btn-secondary,
    .gallery-toolbar .btn-danger {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
        gap: 0.25rem;
    }
    
    .gallery-toolbar .btn-secondary .material-icons-outlined,
    .gallery-toolbar .btn-danger .material-icons-outlined {
        font-size: 18px;
    }
    
    .media-viewer-overlay {
        padding: 0;
    }
    
    .viewer-header,
    .viewer-thumbnails {
        padding: 1rem;
    }
    
    .viewer-nav {
        width: 40px;
        height: 40px;
    }
    
    .viewer-nav.prev {
        left: 0.5rem;
    }
    
    .viewer-nav.next {
        right: 0.5rem;
    }
}

/* Post error states */
.post-not-found,
.post-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    height: 100%;
    min-height: 400px;
}

.post-not-found .material-icons-outlined,
.post-error .material-icons-outlined {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-not-found h3,
.post-error h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.post-not-found p,
.post-error p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
}

.post-not-found .btn-primary,
.post-error .btn-primary {
    margin-top: 1rem;
}

/* Mobile overrides for view pages - must come after main styles */
@media (max-width: 768px) {
    /* Adjust view-post-page to not go behind bottom navigation */
    .view-post-page {
        margin-top: 0 !important; /* Start at top since navbar is hidden on mobile */
        min-height: calc(100vh - 50px - env(safe-area-inset-bottom, 0)) !important;
        padding-bottom: calc(50px + env(safe-area-inset-bottom, 0));
    }
    
    /* Adjust for breadcrumb on mobile */
    .with-breadcrumb .view-post-page {
        margin-top: 45px !important; /* Height of mobile breadcrumb */
        min-height: calc(100vh - 45px - 50px - env(safe-area-inset-bottom, 0)) !important;
    }
    
    /* Adjust view-image-page to not go behind bottom navigation */
    .view-image-page {
        bottom: calc(50px + env(safe-area-inset-bottom, 0)) !important;
        z-index: 1200; /* Above mobile-bottom-nav (1100) so info panel can overlay */
    }
    
    /* Community card mobile adjustments - already has no borders from main style */
    
    .community-card-content {
        padding: 0.5rem;
    }
    
    .community-card-title {
        font-size: 1rem;
    }
    
    .community-description {
        font-size: 0.8125rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .community-stats {
        font-size: 0.6875rem;
        gap: 0.5rem;
    }
    
    .community-stats span:last-child {
        display: none; /* Hide "Created" date on mobile to save space */
    }
}

/* Swipe container styles */
.swipe-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.swipe-wrapper {
    display: flex;
    width: 300%; /* Three slides */
    height: 100%;
    will-change: transform;
}

.swipe-wrapper.transitioning {
    transition: transform 0.25s linear;
}

.swipe-slide {
    width: 33.3333%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #000;
}

.swipe-slide img,
.swipe-slide video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Community Page Styles */
.community-page {
    width: 100%;
}

.community-container {
    padding: 0;
    max-width: none;
}

/* Community View Dropdown - matches feed header presets dropdown */
.community-view-dropdown {
    position: relative;
}

.community-view-dropdown .feed-header-btn .material-icons:last-child {
    font-size: 16px;
    margin-left: -0.125rem;
}

.community-view-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    z-index: 200;
    display: none;
    padding: 0.25rem 0;
}

.community-view-menu.show {
    display: block;
}

.community-view-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    text-align: left;
}

.community-view-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.community-view-option.active {
    color: var(--accent-primary);
}

.community-view-option .material-icons {
    font-size: 18px;
}

/* Community Content */
.community-content {
    position: relative;
}

.community-view {
    display: none;
}

.community-view.active {
    display: block;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border-color);
}

/* Tablet */
@media (min-width: 600px) {
    .community-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 900px) {
    .community-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .community-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra Large */
@media (min-width: 1600px) {
    .community-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 599px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* View post page mobile adjustments */
    .view-post-page {
        position: relative;
        margin-top: 0;
        min-height: 100vh;
        background: black;
        padding-bottom: 50px; /* Space for bottom nav */
    }
    
    /* Position main content below fixed breadcrumb */
    .main-content.with-breadcrumb {
        margin-top: 45px !important; /* Start below fixed breadcrumb */
    }
    
    /* Adjust image container for exact fit */
    .view-post-page .view-post-images {
        /* Fixed height that accounts for breadcrumb and bottom nav */
        height: calc(100vh - 45px - 50px - env(safe-area-inset-bottom, 0px)) !important;
        max-height: calc(100vh - 45px - 50px - env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Move carousel indicators up on mobile to be visible */
    .view-post-page .carousel-indicators {
        bottom: 1rem !important; /* Move up from default 2rem */
    }
    
    /* Feed carousel mobile adjustments */
    .feed-carousel-nav {
        width: 35px;
        height: 35px;
    }
    
    .feed-carousel-nav .material-icons {
        font-size: 20px;
    }
    
    .feed-carousel-prev {
        left: 5px;
    }
    
    .feed-carousel-next {
        right: 5px;
    }
    
    .view-post-page .carousel-image-container {
        padding: 0 !important;
    }
    
    .view-post-page .carousel-image-container img {
        max-height: 100% !important;
        max-width: 100% !important;
    }
    
    /* Remove any gaps in the view post structure */
    .view-post-page,
    .view-post-content,
    .view-post-scroll-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Remove gap between breadcrumb and content on mobile - only for view-post-page */
    #mainContent:has(.view-post-page) {
        margin-top: 0 !important;
    }

    /* Ensure breadcrumb sits flush against content */
    .breadcrumb + #mainContent .view-post-page {
        margin-top: 0 !important;
    }
}

.posts-feed {
    max-width: 800px;
    margin: 0 auto;
}

.load-more-container {
    text-align: center;
    padding: 2rem 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hide Google sign-in button and divider */
#googleSignIn {
    display: none !important;
}

.divider {
    display: none !important;
}

/* Job Queue Styles */
.job-queue-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Completed jobs feed styling */
.completed-jobs-feed {
    max-width: 800px;
    margin: 0 auto;
}

.completed-job-card {
    margin-bottom: 2rem;
}

.job-completion-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.ig-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ig-stat {
    white-space: nowrap;
}

.job-section {
    margin-bottom: 3rem;
}

.job-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.job-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.job-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all var(--transition-fast);
}

.job-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.job-card.queued {
    border-left: 3px solid #f59e0b;
}

.job-card.preparing {
    border-left: 3px solid #8b5cf6;
}

.job-card.running {
    border-left: 3px solid #3b82f6;
}

.job-card.complete {
    border-left: 3px solid #10b981;
}

.job-card.error {
    border-left: 3px solid #ef4444;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.job-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.job-model {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.job-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.job-status {
    margin-bottom: 1rem;
}

.job-queued,
.job-preparing,
.job-complete,
.job-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-queued {
    color: #f59e0b;
}

.job-preparing {
    color: #8b5cf6;
}

.job-complete {
    color: #10b981;
}

.job-error {
    color: #ef4444;
}

.job-running {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
    transition: width var(--transition-medium);
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 3rem;
    text-align: right;
}

.job-progress-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.job-outputs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.job-output-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.job-output-thumb:hover {
    transform: scale(1.05);
}

.job-output-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-sm .material-icons-outlined {
    font-size: 1rem;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.last-update {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Empty state */
.job-queue-container .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.job-queue-container .empty-state .material-icons-outlined {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.job-queue-container .empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.job-queue-container .empty-state p {
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .job-queue-container {
        padding: 1rem;
    }
    
    .job-grid {
        grid-template-columns: 1fr;
    }
    
    .job-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px; /* Leave space for bottom nav */
    bottom: calc(50px + env(safe-area-inset-bottom, 0));
    background: rgba(0, 0, 0, 0.8);
    z-index: 1075; /* Above mobile-generate-bar (1050), below bottom nav (1100) */
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 1.5rem;
    padding-bottom: 1rem;
    max-height: 100%;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mobile-menu-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 1rem;
    border-radius: var(--radius-medium);
    text-align: left;
    font-size: 1rem;
    width: 100%;
}

.mobile-menu-item:hover {
    background: var(--bg-secondary);
}

.mobile-menu-item span:first-child {
    color: var(--text-secondary);
}

/* Mobile Menu Content Panels */
.mobile-menu-content {
    max-height: 60vh;
    overflow-y: auto;
}

.mobile-menu-panel {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-panel.active {
    display: flex;
}

.mobile-menu-panel-heading {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px 4px;
    margin-top: 8px;
}

.mobile-menu-panel-heading:first-child {
    margin-top: 0;
}

/* Mobile Menu Items with Descriptions */
.mobile-menu-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.mobile-menu-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.mobile-menu-item-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.3;
}

/* Mobile Menu CTA in Panels */
.mobile-menu-panel .mobile-menu-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-top: 8px;
    background: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.mobile-menu-panel .mobile-menu-cta:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Auth lock icon for mobile */
.mobile-menu-item .auth-lock {
    margin-left: auto;
    font-size: 16px;
    color: var(--text-tertiary);
}

body.authenticated .mobile-menu-item .auth-lock {
    display: none;
}

/* Feed Header Panel Styles */
.feed-header-panel {
    background: var(--bg-secondary, #1a1a1a);
    border-bottom: 1px solid var(--border-color, #2a2a2a);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: height 300ms ease-out;
    overflow: visible;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.feed-header-collapsed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: background-color 200ms ease;
}

.feed-header-collapsed:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feed-header-expanded {
    padding: 0 0.75rem 0.75rem 0.75rem;
    animation: fadeIn 300ms ease-out;
    overflow-y: auto;
    max-height: 80vh;
    overflow-x: hidden;
    word-wrap: break-word;
}

.feed-header-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    
}

.feed-header-toggle:hover {
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-primary);
}

.feed-header-toggle .material-icons {
    font-size: 18px;
}

.feed-header-title {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.feed-header-status {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary, #2a2a2a);
    border-radius: 10px;
}

.feed-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.25rem;
    margin: -0.25rem -0.25rem 0.75rem -0.25rem;
    cursor: pointer;
    transition: background-color 200ms ease;
    border-radius: 4px;
}

.feed-header-top:hover {
    background: rgba(255, 255, 255, 0.03);
}

.feed-header-top h3 {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feed-header-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.feed-settings-section,
.feed-filters-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.feed-settings-section h4,
.feed-filters-section h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feed-setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.feed-setting-group label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.feed-setting-hint {
    color: var(--text-tertiary, #666);
    font-size: 0.625rem;
    font-style: italic;
    margin-top: 0.125rem;
}

/* ============================================ */
/* FILTER PRESET STYLES */
/* ============================================ */

/* Preset Controls */
.preset-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.preset-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: var(--bg-hover, #3a3a3a);
    border-color: var(--primary, #4a9eff);
}

.preset-btn .material-icons {
    font-size: 16px;
}

/* Active Preset Indicator */
.active-preset-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 4px;
    color: var(--primary, #4a9eff);
    font-size: 0.75rem;
}

.active-preset-info .material-icons {
    font-size: 16px;
}

.preset-modified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 12px;
    color: #ff9800;
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 500;
}

.preset-modified .material-icons {
    font-size: 14px;
}

/* Favorite Presets Bar */
.favorite-presets-bar {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary, #2a2a2a);
    border-radius: 8px;
}

.favorites-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.favorites-header .material-icons {
    font-size: 16px;
    color: #ffd700;
}

.favorite-presets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.favorite-preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.favorite-preset-chip:hover {
    background: var(--bg-hover, #3a3a3a);
    border-color: var(--primary, #4a9eff);
}

.favorite-preset-chip.active {
    background: rgba(74, 158, 255, 0.2);
    border-color: var(--primary, #4a9eff);
    color: var(--primary, #4a9eff);
}

.favorite-preset-chip .remove-favorite {
    display: none;
    font-size: 14px;
    margin-left: 0.25rem;
    color: var(--text-tertiary);
}

.favorite-preset-chip:hover .remove-favorite {
    display: inline;
}

.add-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px dashed var(--border-color, #3a3a3a);
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-favorite-btn:hover {
    background: var(--bg-hover, #3a3a3a);
    border-color: var(--primary, #4a9eff);
    color: var(--primary, #4a9eff);
}

/* Preset Manager Modal */
.preset-manager-modal {
    width: 800px;
    max-width: 90vw;
}

.preset-tabs {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-color, #3a3a3a);
}

.preset-tab {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-tab:hover {
    color: var(--text-primary);
}

.preset-tab.active {
    color: var(--primary, #4a9eff);
    border-bottom-color: var(--primary, #4a9eff);
}

.preset-tab-content {
    padding: 1rem;
}

.presets-list {
    max-height: 400px;
    overflow-y: auto;
}

.preset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.preset-item:hover {
    background: var(--bg-hover, #3a3a3a);
    border-color: rgba(74, 158, 255, 0.3);
}

.preset-info {
    flex: 1;
}

.preset-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.preset-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.preset-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.625rem;
    color: var(--text-tertiary);
}

.preset-actions {
    display: flex;
    gap: 0.5rem;
}

.preset-action-btn {
    padding: 0.375rem 0.625rem;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.preset-action-btn:hover {
    background: var(--bg-hover, #3a3a3a);
    border-color: var(--primary, #4a9eff);
}

.preset-action-btn.danger:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff4444;
    color: #ff4444;
}

.preset-action-btn .material-icons {
    font-size: 16px;
}

/* Browse Controls */
.browse-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preset-search-input {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.preset-sort-select {
    padding: 0.5rem;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Enter Code Section */
.enter-code-section {
    text-align: center;
    padding: 2rem;
}

.enter-code-section h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.enter-code-section p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.preset-code-input {
    width: 200px;
    padding: 0.75rem;
    margin: 0 auto 1rem;
    display: block;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1.25rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Save Preset Modal */
.save-preset-modal {
    width: 600px;
    max-width: 90vw;
}

/* Edit Preset Modal */
.edit-preset-modal {
    width: 700px;
    max-width: 90vw;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.preset-preview {
    padding: 1rem;
    background: var(--bg-tertiary, #2a2a2a);
    border-radius: 4px;
    margin-top: 1rem;
}

.preset-preview h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.preset-preview-section {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.preset-meta-info {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.preset-meta-info span:empty {
    display: none;
}

/* Share Modal */
.share-preset-modal {
    width: 500px;
    max-width: 90vw;
}

.share-success {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.share-section {
    margin-bottom: 1.5rem;
}

.share-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.share-code-box, .share-url-box {
    display: flex;
    gap: 0.5rem;
}

.share-input {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.copy-btn {
    padding: 0.5rem;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--bg-hover, #3a3a3a);
    border-color: var(--primary, #4a9eff);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state .material-icons {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Button Styles */
.btn-primary {
    padding: 0.5rem 1rem;
    background: var(--primary, #4a9eff);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #3a8eef;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-hover, #3a3a3a);
}

.feed-setting-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--accent-primary, #00a8ff);
}

.feed-select {
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #2a2a2a);
    color: var(--text-primary);
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    
}

.feed-select:hover {
    border-color: var(--accent-primary, #00a8ff);
}

.feed-select:focus {
    outline: none;
    border-color: var(--accent-primary, #00a8ff);
    box-shadow: 0 0 0 2px rgba(0, 168, 255, 0.2);
}

.feed-header-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.feed-apply-btn,
.feed-reset-btn {
    padding: 0.25rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    
}

.feed-apply-btn {
    background: var(--accent-primary, #00a8ff);
    color: white;
    flex: 1;
}

.feed-apply-btn:hover {
    background: var(--accent-primary-hover, #0090e0);
}

.feed-reset-btn {
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-primary);
}

.feed-reset-btn:hover {
    background: var(--bg-hover, #3a3a3a);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feed-header-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feed-header-collapsed {
        padding: 0.375rem 0.375rem;
    }
    
    .feed-header-title {
        font-size: 0.6875rem;
    }
    
    .feed-header-status {
        font-size: 0.6875rem;
        padding: 0.125rem 0.375rem;
    }
    
    .feed-header-actions {
        flex-direction: column;
    }
    
    .feed-apply-btn,
    .feed-reset-btn {
        width: 100%;
    }
}

/* Communities Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

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

.modal-container {
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    
    position: relative;
}

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

.communities-modal {
    width: 98vw;
    height: 98vh;
    max-width: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-secondary);
}

.modal-header h2 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-subheader {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.communities-search-bar {
    position: relative;
    flex: 0 0 180px;
}

.communities-search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.communities-search-input {
    width: 100%;
    padding: 0.25rem 0.5rem 0.25rem 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
    
}

.communities-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.communities-quick-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.selection-count {
    padding: 0.2rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-primary);
    min-height: 0; /* Important for flex overflow */
}

.communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.4rem;
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface-secondary, #0f0f0f);
    background-color: #0f0f0f; /* Ensure solid opaque background */
}

.modal-footer-actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.btn-primary {
    padding: 0.5rem 1rem;
    background: var(--primary, #4a9eff);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover, #3a8eef);
}

.btn-secondary {
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

/* Modal footer button styles - matching panel */
.modal-footer .feed-apply-btn {
    flex: 2;  /* Take up more space than other buttons */
    background: var(--accent-primary, #00a8ff);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.modal-footer .feed-apply-btn:hover {
    background: var(--accent-primary-hover, #0090e0);
}

.modal-footer .feed-reset-btn,
.modal-footer .feed-cancel-btn {
    flex: 1;  /* Take up less space than Save button */
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.modal-footer .feed-reset-btn:hover,
.modal-footer .feed-cancel-btn:hover {
    background: var(--bg-hover, #3a3a3a);
}

/* Updated Communities Button Style */
.feed-communities-toggle {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.feed-communities-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

/* Keep old dropdown styles for backwards compatibility */
.feed-communities-dropdown {
    position: relative;
}

.filter-mode-toggle {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0 0.5rem;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.filter-mode-toggle .mode-option {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.65rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.filter-mode-toggle .mode-option:hover {
    color: var(--text-primary);
}

.filter-mode-toggle input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 12px;
    height: 12px;
}

.filter-mode-toggle input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 500;
}

.feed-communities-toggle {
    width: 100%;
    padding: 0.375rem 0.5rem;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    
}

.feed-communities-toggle:hover {
    background: var(--bg-hover, #3a3a3a);
}

.feed-communities-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    width: max-content;
    min-width: 100%;
    max-width: min(450px, calc(100vw - 2rem));
    margin-top: 4px;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Modal compact button styles */
.modal-subheader button {
    padding: 0.2rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.65rem;
    cursor: pointer;
    
    white-space: nowrap;
}

.modal-subheader button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.modal-subheader .btn-ghost {
    background: transparent;
    border: none;
    padding: 0.2rem 0.4rem;
}

.modal-subheader .btn-ghost:hover {
    background: var(--bg-tertiary);
}

/* Mobile-specific button adjustments */
@media (max-width: 768px) {
    .modal-subheader button {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
    
    .communities-quick-actions button {
        padding: 0.2rem 0.3rem;
    }
    
    .modal-footer .btn-primary {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .modal-footer .btn-secondary {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feed-communities-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        width: auto;
        max-width: none;
    }
    
    .filter-mode-toggle {
        gap: 0.3rem;
    }
    
    .filter-mode-toggle .mode-option span {
        display: none;
    }
    
    .filter-mode-toggle .mode-reset {
        width: 100%;
    }
    
    .communities-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .modal-container {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-overlay {
        padding: 0;
    }
    
    .modal-subheader {
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.3rem 0.5rem;
    }
    
    .communities-search-bar {
        flex: 1 1 100%;
        order: 1;
    }
    
    .filter-mode-toggle {
        order: 2;
    }
    
    .communities-quick-actions {
        order: 3;
    }
    
    .selection-count {
        order: 4;
        margin-left: auto;
    }
    
    .communities-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 0.3rem;
    }
    
    .community-item {
        padding: 0.3rem;
    }
    
    .community-thumbnail {
        width: 32px;
        height: 32px;
    }
    
    .community-name {
        font-size: 0.7rem;
    }
    
    .community-stats {
        font-size: 0.55rem;
    }
    
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--surface-secondary, #0f0f0f);
        background-color: #0f0f0f !important; /* Ensure opaque background */
        z-index: 10;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
        padding: 0.75rem 0.5rem;
    }
    
    .modal-footer .feed-apply-btn,
    .modal-footer .feed-reset-btn,
    .modal-footer .feed-cancel-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }
}

.communities-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color, #3a3a3a);
}

.communities-search input {
    width: 100%;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
}

.communities-list {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.community-item {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem;
    padding-right: 2rem;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 6px;
    cursor: pointer;
    
    position: relative;
    min-height: 60px;
}

.community-item:hover {
    background: var(--bg-tertiary, #2a2a2a);
    border-color: var(--primary);
}

.community-item.selected {
    background: var(--bg-tertiary, #2a2a2a);
    border-color: var(--primary);
}

.community-checkbox {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
}

.community-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-right: 0.5rem;
    background: var(--bg-tertiary, #2a2a2a);
    object-fit: cover;
    flex-shrink: 0;
}

.community-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.community-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    margin-bottom: 0.1rem;
    word-break: break-word;
}

.community-stats {
    font-size: 0.6rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.4rem;
}

.communities-actions {
    padding: 0.5rem;
    border-top: 1px solid var(--border-color, #3a3a3a);
    display: flex;
    justify-content: space-between;
}

.communities-actions button {
    font-size: 0.75rem;
    color: var(--accent-primary, #00a8ff);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: opacity 200ms;
}

.communities-actions button:hover {
    opacity: 0.8;
}

.loading-communities {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Community Card in Modal - New Grid Layout */
.communities-modal .community-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;

    position: relative;
}

.communities-modal .community-card:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.communities-modal .community-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.communities-modal .community-card-header {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.communities-modal .community-card-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    margin-top: 2px;
}

.communities-modal .community-card-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.communities-modal .community-card-info {
    flex: 1;
    min-width: 0;
}

.communities-modal .community-card-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.communities-modal .community-card-description {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.communities-modal .community-card-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.communities-modal .community-stat {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.communities-modal .community-stat .material-icons {
    font-size: 12px;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Feed Item Modal Styles */
.feed-item-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Modal is purely overlay - doesn't affect parent scrolling */
    touch-action: none; /* Prevent touch scrolling through modal */
    pointer-events: auto; /* Modal captures all pointer events */
}

.feed-item-modal-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-item-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override feed item styles when in modal */
.feed-item-modal-content .feed-masonry-item {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.feed-item-modal-content .feed-item-card {
    height: 100%;
    max-height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.feed-item-modal-content .feed-item-carousel {
    height: 100%; /* Full height - footer floats over */
}

.feed-item-modal-content .feed-carousel-slide {
    height: 100%;
}

.feed-item-modal-content .feed-carousel-slide img,
.feed-item-modal-content .feed-carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feed-item-modal-content .progressive-image-container {
    width: 100%;
    height: 100%;
}

/* Float footer over media in modal - no gradient */
.feed-item-modal-content .feed-item-footer {
    position: absolute;
    bottom: 0;
    bottom: env(safe-area-inset-bottom, 0); /* Account for device safe areas */
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6); /* Subtle semi-transparent background */
    z-index: 10;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); /* Add safe area to padding */
}

/* Adjust reactions position in modal to avoid footer overlap */
.feed-item-modal-content .feed-item-reactions-overlay {
    right: 8px; /* Same spacing as non-modal view */
    bottom: 60px; /* Move reactions above the modal footer */
    z-index: 11; /* Ensure reactions appear above footer */
}

/* Adjust navigation buttons for modal */
.feed-item-modal-content .feed-carousel-nav {
    background: rgba(0, 0, 0, 0.5);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-item-modal-content .feed-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .feed-item-modal-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
    }

    .feed-item-modal-content .feed-item-card {
        border-radius: 0;
    }
}

/* ========================================
   Content Video Modal Styles
   ======================================== */

.content-video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.content-video-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content-video-player {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    background: #000;
}

.content-video-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.content-video-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--accent-primary);
}

.content-video-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.content-video-modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.content-video-modal-prev {
    left: 1rem;
}

.content-video-modal-next {
    right: 1rem;
}

.content-video-modal-info {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10001;
    pointer-events: none;
}

.content-video-title {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-video-counter {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .content-video-modal-content {
        padding: 1rem;
    }

    .content-video-modal-close,
    .content-video-modal-nav {
        width: 40px;
        height: 40px;
    }

    .content-video-modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .content-video-modal-prev {
        left: 0.5rem;
    }

    .content-video-modal-next {
        right: 0.5rem;
    }

    .content-video-modal-info {
        bottom: 0.5rem;
    }
}

/* ========================================
   Content Page Styles
   ======================================== */

/* Content page container - mirrors feed-page */
.content-page {
    min-height: calc(100vh - 64px);
    padding: 0;
    background: var(--bg-primary);
}

/* Content Item Card Styles */
.feed-masonry-item {
    container-type: inline-size;
    container-name: feed-item;
    min-width: 0;
}

.content-item-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
}

.content-item-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.content-item-counter {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    z-index: 10;
}

.content-item-counter .material-icons {
    font-size: 16px;
}

/* Video Preview Styles */
.content-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.content-preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-video-play-overlay {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    pointer-events: none;
    z-index: 5;
}

.content-video-play-overlay .material-icons {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.content-video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.content-video-progress.visible {
    opacity: 1;
}

.content-video-progress-bar {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.2s ease;
}

/* Image Preview Styles */
.content-image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.content-image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-item-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Content Item Metadata Styles */
.content-item-metadata {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content-item-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.content-item-performer {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.content-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Hide badges and metadata when items are very small (< 150px) */
@container feed-item (max-width: 150px) {
    .content-item-counter,
    .content-video-play-overlay,
    .content-item-metadata {
        display: none;
    }

    .content-item-card {
        border-radius: 4px;
    }
}

.content-item-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.content-item-tag-artist {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.content-item-tag-category {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

.content-item-tag-more {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.content-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.content-item-detail {
    opacity: 0.7;
}

.content-item-detail:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
    opacity: 0.5;
}

/* Content header panel - similar to feed header */
.content-header-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.content-header-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
}

.content-header-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.content-header-folder-status-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 0.25rem 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
    margin-left: auto;
}

.content-header-folder-status-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
}

.content-header-folder-status-btn .material-icons {
    font-size: 18px;
    color: var(--accent-primary);
}

.content-header-folder-status-btn .content-header-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
}

.content-header-settings-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.content-header-settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.content-header-settings-btn .material-icons {
    font-size: 18px;
}

/* Content empty state */
.content-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.content-empty-state .material-icons {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content-empty-state h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.content-empty-state p {
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   Folder Browser Styles
   ======================================== */

.folder-browser {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Breadcrumb navigation */
.folder-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.breadcrumb-item:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    cursor: default;
}

.breadcrumb-item .material-icons {
    font-size: 18px;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Folder list */
.folder-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.folder-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.folder-item.is-directory {
    cursor: pointer;
}

.folder-item.is-file {
    cursor: default;
    opacity: 0.6;
}

.folder-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.folder-item-icon .material-icons {
    font-size: 24px;
    color: var(--accent-primary);
}

.folder-item-info {
    flex: 1;
    min-width: 0;
}

.folder-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-item-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.folder-item-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.folder-item-arrow {
    color: var(--text-secondary);
    font-size: 20px;
}

/* Loading and error states */
.folder-list-loading,
.folder-list-empty,
.folder-browser-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.folder-list-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.folder-list-loading p,
.folder-list-empty p,
.folder-browser-error p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.folder-list-empty .material-icons,
.folder-browser-error .material-icons {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.folder-browser-error button {
    margin-top: 1rem;
}

/* Mobile responsiveness for content page */
@media (max-width: 768px) {
    .content-header-content {
        gap: 1rem;
    }

    .content-settings-section,
    .content-browser-section {
        padding: 0.75rem;
    }

    .folder-item {
        padding: 0.5rem;
    }

    .folder-item-icon {
        width: 36px;
        height: 36px;
    }

    .folder-item-icon .material-icons {
        font-size: 20px;
    }
}

/* Folder Selector Modal Styles */
.folder-selector-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.folder-selector-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    height: 80vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

/* Modal Header */
.folder-modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 12px 12px 0 0;
}

.folder-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.folder-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.folder-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.folder-modal-close .material-icons {
    font-size: 24px;
}

/* Search Section */
.folder-modal-search {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
}

.folder-modal-search-icon {
    color: var(--text-secondary);
    font-size: 20px;
}

.folder-modal-search-input {
    flex: 1;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.folder-modal-search-input::placeholder {
    color: var(--text-tertiary);
}

.folder-modal-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Breadcrumb */
.folder-modal-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.folder-modal-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.folder-modal-breadcrumb-item:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.folder-modal-breadcrumb-item.active {
    color: var(--text-primary);
    cursor: default;
}

.folder-modal-breadcrumb-item .material-icons {
    font-size: 18px;
}

.folder-modal-breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Modal Content */
.folder-modal-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.folder-modal-list {
    padding: 0.5rem;
}

.folder-modal-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

.folder-modal-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent-primary);
}

.folder-modal-item.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
}

.folder-modal-item.current {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}

.folder-modal-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    flex-shrink: 0;
}

.folder-modal-item-icon .material-icons {
    font-size: 24px;
    color: var(--accent-primary);
}

.folder-modal-item-info {
    flex: 1;
    min-width: 0;
}

.folder-modal-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-modal-item-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-modal-item-badge {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.folder-modal-item-badge.abr-badge {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.folder-modal-item.abr-folder .folder-modal-item-icon {
    color: #ff6b6b;
}

.folder-modal-item.abr-folder {
    cursor: pointer;
}

.folder-modal-item.abr-folder:hover {
    background: rgba(255, 107, 107, 0.05);
}

/* Loading State */
.folder-modal-loading,
.folder-modal-empty,
.folder-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.folder-modal-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.folder-modal-loading p,
.folder-modal-empty p,
.folder-modal-error p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.folder-modal-empty .material-icons,
.folder-modal-error .material-icons {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modal Footer */
.folder-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0 0 12px 12px;
}

.folder-modal-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.folder-modal-btn-current {
    flex: 1;
    background: var(--accent-primary);
    color: #ffffff;
}

.folder-modal-btn-current:hover {
    background: var(--accent-hover);
}

.folder-modal-btn-current .material-icons {
    font-size: 18px;
}

.folder-modal-btn-cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.folder-modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .folder-selector-modal {
        max-width: 100%;
        height: 95vh;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .folder-modal-header,
    .folder-modal-search,
    .folder-modal-breadcrumb {
        padding: 0.75rem 1rem;
    }

    .folder-modal-item {
        padding: 0.625rem;
    }

    .folder-modal-item-icon {
        width: 36px;
        height: 36px;
    }

    .folder-modal-item-icon .material-icons {
        font-size: 20px;
    }

    .folder-modal-footer {
        flex-direction: column-reverse;
    }

    .folder-modal-btn-current {
        width: 100%;
        justify-content: center;
    }

    .folder-modal-btn-cancel {
        width: 100%;
    }
}

/* ABR Video Preview Styling */
.content-abr-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
}

.content-abr-video-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ABR Frame Placeholder (for missing frames) */
.abr-frame-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.abr-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.abr-placeholder-icon {
    margin-bottom: 8px;
}

.abr-placeholder-icon .material-icons {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.95);
}

.abr-placeholder-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ABR Loading Spinner */
.abr-loading-spinner {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    z-index: 20;
}

.spinner-icon {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ABR Embedded Preview (full-frame overlay) */
.abr-embedded-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

.abr-embedded-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ABR Seek Indicator (vertical white line on timeline) */
.abr-seek-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: white;
    z-index: 25;
    pointer-events: none;
    display: none;
}

/* ABR Seek Spinner - small, top-right corner */
.abr-seek-spinner {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    z-index: 25;
    display: none;
    pointer-events: none;
    animation: abr-spinner-rotate 0.8s linear infinite;
}

@keyframes abr-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Content Settings Modal */
.content-settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.content-settings-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.content-settings-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.content-settings-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.content-settings-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.content-settings-modal-close .material-icons {
    font-size: 24px;
}

.content-settings-modal-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.content-settings-group {
    margin-bottom: 1.5rem;
}

.content-settings-group:last-child {
    margin-bottom: 0;
}

.content-settings-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.content-settings-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.content-settings-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.content-settings-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

.content-settings-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.content-settings-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.content-settings-description {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

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

.content-settings-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.content-settings-btn .material-icons {
    font-size: 18px;
}

.content-settings-btn-apply {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.content-settings-btn-apply:hover {
    background: #5b5fc7;
    border-color: #5b5fc7;
}

.content-settings-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.content-settings-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* ========================================
   Feed Header Toolbar (simplified UX)
   ======================================== */

.feed-header-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.feed-header-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: auto;
}

.feed-header-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    white-space: nowrap;
}

.feed-header-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.feed-header-btn .material-icons {
    font-size: 18px;
}

.feed-header-btn-status {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Auto-play toggle button - neutral styling */
.feed-autoplay-toggle.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hide label on smaller screens */
@media (max-width: 768px) {
    .feed-autoplay-label {
        display: none;
    }
}

/* Presets dropdown trigger */
.feed-header-presets-btn {
    position: relative;
}

.feed-header-presets-btn .material-icons:last-child {
    font-size: 16px;
    margin-left: -0.125rem;
}

/* Presets Dropdown Menu */
.feed-presets-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.feed-presets-dropdown.open {
    display: block;
}

.feed-presets-dropdown-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feed-presets-dropdown-section:last-child {
    border-bottom: none;
}

.feed-presets-dropdown-label {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feed-presets-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.feed-presets-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feed-presets-dropdown-item .material-icons {
    font-size: 18px;
    color: var(--text-secondary);
}

.feed-presets-dropdown-item.favorite .material-icons {
    color: #fbbf24;
}

/* ========================================
   Feed Display Settings Modal
   ======================================== */

.feed-display-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.feed-display-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.feed-display-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.feed-display-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.feed-display-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.feed-display-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.feed-display-modal-close .material-icons {
    font-size: 22px;
}

.feed-display-modal-content {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.feed-display-group {
    margin-bottom: 1.25rem;
}

.feed-display-group:last-child {
    margin-bottom: 0;
}

.feed-display-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feed-display-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.feed-display-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.feed-display-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

.feed-display-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.feed-display-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.feed-display-description {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.feed-display-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.feed-display-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid transparent;
}

.feed-display-btn .material-icons {
    font-size: 18px;
}

.feed-display-btn-apply {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.feed-display-btn-apply:hover {
    background: #5b5fc7;
    border-color: #5b5fc7;
}

.feed-display-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.feed-display-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* ========================================
   Feed Filters Modal
   ======================================== */

.feed-filters-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 10000;
    padding: 0;
}

.feed-filters-modal {
    background: var(--bg-secondary);
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.feed-filters-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.feed-filters-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.feed-filters-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.feed-filters-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.feed-filters-modal-close .material-icons {
    font-size: 22px;
}

.feed-filters-modal-content {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Filter Mode Section */
.feed-filters-mode-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.feed-filters-mode-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.feed-filters-mode-options {
    display: flex;
    gap: 1.25rem;
}

.feed-filters-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.feed-filters-radio-label input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Controls Section */
.feed-filters-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feed-filters-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 0.75rem;
}

.feed-filters-search .material-icons {
    font-size: 20px;
    color: var(--text-secondary);
}

.feed-filters-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    outline: none;
}

.feed-filters-search-input::placeholder {
    color: var(--text-secondary);
}

.feed-filters-quick-actions {
    display: flex;
    gap: 0.375rem;
}

.feed-filters-btn-small {
    padding: 0.375rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
}

.feed-filters-btn-small:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Communities Grid */
.feed-filters-communities-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 0.5rem;
    align-content: start;
}

.feed-filters-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Community Card */
.feed-filters-community-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.feed-filters-community-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feed-filters-community-card.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
}

.feed-filters-community-image-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
}

.feed-filters-community-checkbox {
    position: absolute;
    top: 6px;
    left: 6px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    z-index: 2;
}

.feed-filters-community-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.feed-filters-community-image-wrapper.no-image .feed-filters-community-thumb {
    display: none;
}

.feed-filters-community-info {
    flex: 1;
    min-width: 0;
}

.feed-filters-community-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-filters-community-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-filters-community-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Selection Count */
.feed-filters-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* Footer */
.feed-filters-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.feed-filters-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid transparent;
}

.feed-filters-btn .material-icons {
    font-size: 18px;
}

.feed-filters-btn-apply {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.feed-filters-btn-apply:hover {
    background: #5b5fc7;
    border-color: #5b5fc7;
}

.feed-filters-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.feed-filters-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.feed-filters-btn-clear {
    background: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
    border-color: rgba(255, 100, 100, 0.3);
}

.feed-filters-btn-clear:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff8080;
    border-color: rgba(255, 100, 100, 0.5);
}

.feed-filters-footer-spacer {
    flex: 1;
}

/* Mobile styles for Feed Filters Modal */
@media (max-width: 768px) {
    .feed-filters-modal-overlay {
        padding: 0;
        align-items: stretch;
    }

    .feed-filters-modal {
        max-width: 100%;
        max-height: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        border: none;
    }

    .feed-filters-modal-header {
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        background: var(--bg-secondary);
        z-index: 10;
    }

    .feed-filters-modal-title {
        font-size: 1.1rem;
    }

    .feed-filters-modal-content {
        flex: 1;
        overflow-y: auto;
        padding: 0.5rem 0.25rem;
        padding-bottom: 100px;
    }

    .feed-filters-mode-section {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .feed-filters-mode-label {
        margin-bottom: 0;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .feed-filters-mode-options {
        flex-direction: row;
        gap: 0.5rem;
        flex: 1;
    }

    .feed-filters-radio-label {
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 6px;
        font-size: 0.85rem;
        flex: 1;
        justify-content: center;
    }

    .feed-filters-controls {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .feed-filters-search {
        width: 100%;
    }

    .feed-filters-quick-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .feed-filters-communities-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.5rem;
        max-height: none;
        padding: 0.25rem 0.125rem;
    }

    .feed-filters-community-card {
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
    }

    .feed-filters-community-image-wrapper {
        position: relative;
        width: 100%;
        aspect-ratio: 1;
        margin-bottom: 0.375rem;
    }

    .feed-filters-community-checkbox {
        position: absolute;
        top: 4px;
        left: 4px;
        width: 20px;
        height: 20px;
        z-index: 2;
        margin: 0;
    }

    .feed-filters-community-thumb {
        width: 100%;
        height: 100%;
        border-radius: 4px;
    }

    .feed-filters-community-info {
        padding-left: 0;
        text-align: center;
    }

    .feed-filters-community-name {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .feed-filters-community-desc {
        display: none;
    }

    .feed-filters-community-stats {
        display: flex;
        justify-content: center;
        padding-left: 0;
        margin-top: 0.25rem;
        font-size: 0.65rem;
        gap: 0.5rem;
    }

    .feed-filters-count {
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 0.5rem 1rem;
        border-top: 1px solid var(--border-color);
        text-align: center;
        z-index: 10;
    }

    .feed-filters-modal-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        z-index: 10;
    }

    .feed-filters-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .feed-filters-btn-clear {
        padding: 0.75rem 0.75rem;
    }

    .feed-filters-btn-clear span:last-child {
        display: none;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .feed-filters-modal-content {
        padding: 0.25rem 0.125rem;
        padding-bottom: 100px;
    }

    .feed-filters-communities-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.25rem;
        padding: 0.125rem 0;
    }

    .feed-filters-community-card {
        padding: 0.25rem;
    }

    .feed-filters-community-checkbox {
        width: 18px;
        height: 18px;
    }

    .feed-filters-community-name {
        font-size: 0.7rem;
    }
}

/* Mobile styles for Feed Display Settings Modal */
@media (max-width: 768px) {
    .feed-display-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .feed-display-modal {
        max-width: 100%;
        width: 100%;
        border-radius: 16px 16px 0 0;
        border: none;
        border-top: 1px solid var(--border-color);
        max-height: 80vh;
    }

    .feed-display-modal-header {
        padding: 1rem;
    }

    .feed-display-modal-content {
        padding: 1rem;
    }

    .feed-display-group {
        margin-bottom: 1.25rem;
    }

    .feed-display-select {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .feed-display-checkbox-label {
        padding: 0.75rem 0;
    }

    .feed-display-checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .feed-display-modal-footer {
        padding: 1rem;
    }

    .feed-display-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Mobile styles for Feed Header Toolbar */
@media (max-width: 768px) {
    .feed-header-toolbar {
        padding: 0.5rem;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .feed-header-title {
        display: none;
    }

    .feed-header-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .feed-header-btn .material-icons {
        font-size: 1.1rem;
    }

    .feed-header-btn-status {
        display: none;
    }

    .feed-presets-dropdown {
        left: 0;
        right: 0;
        min-width: auto;
    }
}

/* =========================================
   SOCIAL MEDIA SYNC STYLES
   ========================================= */

/* Social Tab Description */
.social-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Social Accounts List */
.social-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-account-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    gap: 1rem;
}

.social-account-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.social-platform-icon {
    font-size: 1.5rem;
    width: 36px;
    text-align: center;
}

.social-platform-icon.instagram {
    color: #E4405F;
}

.social-platform-icon.twitter,
.social-platform-icon.x {
    color: #1DA1F2;
}

.social-platform-icon.onlyfans {
    color: #00AFF0;
}

.social-platform-icon.fansly {
    color: #0099FE;
}

.social-account-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.social-account-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-account-platform {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.social-account-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-badge.paused {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.status-badge.error,
.status-badge.revoked {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sync-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.social-account-actions {
    display: flex;
    gap: 0.5rem;
}

/* Social Platforms List */
.social-platforms-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-platform-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.social-platform-card button {
    flex: 0 0 auto;
    width: auto;
}

.social-platform-card.disabled {
    opacity: 0.6;
}

.social-platform-card.linked {
    border-color: rgba(34, 197, 94, 0.3);
}

.social-platform-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-platform-name {
    font-weight: 500;
}

.platform-linked-badge {
    color: #22c55e;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.platform-coming-soon {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* Drive Tree - Social Icon */
.tree-icon-social {
    color: #6366f1;
}

.tree-icon-instagram {
    color: #E4405F;
}

.tree-icon-twitter,
.tree-icon-x {
    color: #1DA1F2;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    animation: none !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
}

.loading-spinner i {
    margin-right: 0.5rem;
    display: inline-block;
}

/* Error Text */
.error-text {
    color: var(--color-error);
    text-align: center;
    padding: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .social-account-card {
        flex-wrap: wrap;
    }

    .social-account-info {
        flex: 1 1 100%;
    }

    .social-account-status {
        flex: 1;
        align-items: flex-start;
    }

    .social-account-actions {
        flex: 0;
    }
}

/* =========================================
   DEBUG TAB STYLES
   ========================================= */

.debug-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.debug-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.debug-tool-item:hover {
    background: #222222;
    border-color: #3a3a3a;
}

.debug-tool-item i {
    font-size: 24px;
    color: #4a9eff;
}

.debug-tool-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debug-tool-title {
    font-weight: 500;
    font-size: 14px;
}

.debug-tool-desc {
    font-size: 12px;
    color: #888;
}

/* Admin tool items - special styling */
.debug-tool-item.admin-tool {
    border-color: rgba(88, 101, 242, 0.3);
    background: rgba(88, 101, 242, 0.05);
}

.debug-tool-item.admin-tool:hover {
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(88, 101, 242, 0.1);
}

.debug-tool-item.admin-tool i {
    color: #5865f2;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100000;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.toast.error {
    background: #dc2626;
    color: #fff;
}

.toast.success {
    background: #16a34a;
    color: #fff;
}

.toast.info {
    background: #2563eb;
    color: #fff;
}

.toast.warning {
    background: #d97706;
    color: #fff;
}

/* ========================================
   Admin Dashboard Page (/admin)
   ======================================== */

.admin-dashboard-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
}

.admin-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-dashboard-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.admin-dashboard-header h1 i {
    color: #5865f2;
}

.admin-dashboard-header p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.admin-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.admin-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
}

.admin-tool-card:hover {
    border-color: #5865f2;
    background: #252525;
}

.admin-tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-tool-icon i {
    font-size: 20px;
    color: #5865f2;
}

.admin-tool-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.admin-tool-info p {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .admin-dashboard-page {
        padding: 24px 16px;
    }

    .admin-tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PROMO MODAL STYLES
   ============================================ */

.promo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.promo-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    max-width: 440px;
    width: 100%;
    padding: 32px;
    position: relative;
    border: 1px solid var(--border-color);
}

.promo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.promo-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.promo-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.promo-modal-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.promo-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.promo-modal-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* Progress Bar with FOMO styling */
.promo-modal-progress {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.promo-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-align: center;
}

.promo-progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.promo-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 5px;
}

/* Urgency states */
.promo-urgency-high .promo-progress-text {
    color: #f59e0b;
}

.promo-urgency-high .promo-progress-fill {
    background: #f59e0b;
}

.promo-urgency-critical .promo-progress-text {
    color: #ef4444;
}

.promo-urgency-critical .promo-progress-fill {
    background: #ef4444;
}

/* Coupon Code Display */
.promo-modal-coupon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px dashed var(--border-color);
}

.promo-coupon-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.promo-coupon-code {
    font-size: 20px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.promo-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.promo-copy-btn:hover {
    background: var(--accent-hover);
}

.promo-copy-btn.promo-copy-success {
    background: #22c55e;
}

/* Benefits List */
.promo-modal-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.promo-modal-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.promo-modal-benefits li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Actions */
.promo-modal-actions {
    display: flex;
    justify-content: center;
}

.promo-learn-more-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.promo-learn-more-btn:hover {
    background: var(--accent-hover);
}

.promo-modal-expires {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 16px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .promo-modal {
        padding: 24px 20px;
    }

    .promo-modal-title {
        font-size: 20px;
    }

    .promo-modal-subtitle {
        font-size: 14px;
    }

    .promo-coupon-code {
        font-size: 16px;
    }

    .promo-modal-coupon {
        flex-wrap: wrap;
    }
}

/* =============================================
   BONUS PAGE - Enhanced Holiday Promo Styles
   ============================================= */

.bonus-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* Loading State */
.bonus-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    color: var(--text-secondary);
    gap: 16px;
}

.bonus-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: bonus-spin 0.8s linear infinite;
}

@keyframes bonus-spin {
    to { transform: rotate(360deg); }
}

/* Hero Section */
.bonus-hero {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.bonus-hero-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.bonus-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    border-radius: 14px;
    flex-shrink: 0;
}

.bonus-hero-icon svg {
    color: white;
}

.bonus-hero-titles {
    flex: 1;
}

.bonus-hero-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.bonus-hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.bonus-hero-subtitle strong {
    color: var(--text-primary);
}

/* Progress Section - Two Cards Side by Side */
.bonus-progress-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bonus-progress-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
}

.bonus-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.bonus-expires-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: none;
    letter-spacing: 0;
}

.bonus-progress-bar-container {
    position: relative;
    margin-bottom: 10px;
}

.bonus-progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.bonus-progress-fill {
    height: 100%;
    border-radius: 5px;
}

.bonus-progress-fill.earned-fill {
    background: linear-gradient(90deg, #22c55e, #10b981);
}

.bonus-progress-fill.claimed-fill {
    background: var(--accent-primary);
}

.bonus-progress-values {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.bonus-value-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.bonus-your-progress .bonus-value-current {
    color: #22c55e;
}

.bonus-value-max {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.bonus-progress-percent {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 4px;
}

/* Urgency States */
.bonus-campaign-progress.urgency-high .bonus-progress-fill.claimed-fill {
    background: #f59e0b;
}

.bonus-campaign-progress.urgency-high .bonus-progress-percent {
    color: #f59e0b;
}

.bonus-campaign-progress.urgency-critical .bonus-progress-fill.claimed-fill {
    background: #ef4444;
}

.bonus-campaign-progress.urgency-critical .bonus-progress-percent {
    color: #ef4444;
}

/* Legacy - Keep for compatibility but these classes are no longer used */
.bonus-availability {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.bonus-availability-info {
    flex: 1;
}

.bonus-availability-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bonus-availability-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bonus-availability-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px;
}

.bonus-availability-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.bonus-availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Urgency States */
.bonus-availability.bonus-urgency-high .bonus-availability-fill {
    background: #f59e0b;
}

.bonus-availability.bonus-urgency-high .bonus-availability-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.bonus-availability.bonus-urgency-critical .bonus-availability-fill {
    background: #ef4444;
}

.bonus-availability.bonus-urgency-critical .bonus-availability-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* CTA Sections */
.bonus-cta {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
}

.bonus-cta h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.bonus-cta p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.bonus-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.bonus-cta-btn:hover {
    background: var(--accent-hover);
}

.bonus-cta-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.bonus-cta-btn.redeemed {
    background: #22c55e;
    cursor: default;
}

/* Coupon Box in CTA */
.bonus-coupon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.bonus-coupon-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.bonus-coupon-code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 8px;
    letter-spacing: 2px;
}

/* Redeem Status */
.bonus-redeem-status {
    margin-top: 16px;
    font-size: 14px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bonus-redeem-status.success {
    color: #22c55e;
}

.bonus-redeem-status.error {
    color: #ef4444;
}

/* Small spinner for button */
.bonus-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: bonus-spin 0.6s linear infinite;
}

/* Coupon Redemption Form */
.bonus-redeem-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
}

.bonus-redeem-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    text-align: center;
}

.bonus-redeem-section > p {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 24px 0;
}

.bonus-coupon-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto 16px;
}

.bonus-coupon-form input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.bonus-coupon-form input::placeholder {
    color: var(--text-tertiary);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.bonus-coupon-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.bonus-coupon-form button {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.bonus-coupon-form button:hover {
    background: var(--accent-hover);
}

.bonus-coupon-form button:disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.bonus-coupon-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.bonus-coupon-code-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 600;
    color: var(--accent-primary);
}

.bonus-copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bonus-copy-btn:hover {
    color: var(--text-primary);
}

/* Milestones Section */
.bonus-milestones-section {
    margin-bottom: 32px;
}

.bonus-milestones-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.bonus-milestones-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Milestone Card */
.bonus-milestone-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border-left: 4px solid var(--milestone-color, var(--border-color));
}

.bonus-milestone-card.is-complete {
    --milestone-color: #22c55e;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.05), transparent);
}

.bonus-milestone-card.is-progress {
    --milestone-color: #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05), transparent);
}

.bonus-milestone-card.is-locked {
    --milestone-color: var(--border-color);
    opacity: 0.7;
}

.bonus-milestone-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--action-color, rgba(99, 102, 241, 0.15));
}

.bonus-milestone-icon-wrapper svg {
    color: var(--action-color-text, var(--accent-primary));
}

.bonus-milestone-card.is-complete .bonus-milestone-icon-wrapper {
    background: rgba(34, 197, 94, 0.15);
}

.bonus-milestone-card.is-complete .bonus-milestone-icon-wrapper svg {
    color: #22c55e;
}

.bonus-milestone-card.is-locked .bonus-milestone-icon-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

.bonus-milestone-card.is-locked .bonus-milestone-icon-wrapper svg {
    color: var(--text-tertiary);
}

.bonus-milestone-body {
    flex: 1;
    min-width: 0;
}

.bonus-milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 12px;
}

.bonus-milestone-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.bonus-milestone-reward {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.bonus-milestone-card.is-complete .bonus-milestone-reward {
    color: #22c55e;
}

.bonus-milestone-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.bonus-milestone-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bonus-milestone-progress-wrapper {
    flex: 1;
    min-width: 120px;
}

.bonus-milestone-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.bonus-milestone-progress-fill {
    height: 100%;
    background: var(--milestone-color, var(--accent-primary));
    border-radius: 3px;
}

.bonus-milestone-progress-text {
    font-size: 12px;
    color: var(--text-tertiary);
}

.bonus-milestone-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--action-color, var(--accent-primary));
    color: var(--action-color, var(--accent-primary));
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.bonus-milestone-action:hover {
    background: var(--action-color, var(--accent-primary));
    color: white;
}

.bonus-milestone-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

/* No Active Campaign */
.bonus-no-campaign {
    text-align: center;
    padding: 80px 24px;
}

.bonus-no-campaign-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 24px;
    color: var(--text-tertiary);
}

.bonus-no-campaign h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.bonus-no-campaign p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .bonus-page {
        padding: 24px 16px 48px;
    }

    .bonus-hero {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .bonus-hero-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .bonus-hero-title {
        font-size: 22px;
    }

    .bonus-hero-subtitle {
        font-size: 14px;
    }

    .bonus-progress-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bonus-progress-card {
        padding: 16px;
    }

    .bonus-value-current {
        font-size: 16px;
    }

    .bonus-milestone-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .bonus-milestone-header {
        flex-direction: column;
        gap: 4px;
    }

    .bonus-milestone-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bonus-milestone-action,
    .bonus-milestone-complete-badge {
        justify-content: center;
    }

    .bonus-coupon-form {
        flex-direction: column;
    }
}

/* ==========================================================================
   Release Notes Modal
   ========================================================================== */

.release-notes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.release-notes-modal-container {
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 12px;
    width: 90vw;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.release-notes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.release-notes-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary, #fff);
}

.release-notes-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary, #a0a0a0);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.release-notes-modal-close:hover {
    color: var(--text-primary, #fff);
}

.release-notes-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Override release notes container styles inside modal */
.release-notes-modal-content .release-notes-container {
    max-width: 100%;
    padding: 20px 24px;
}

.release-notes-modal-content .release-notes-header {
    display: none;
}

.release-notes-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.release-notes-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #a0a0a0);
    font-size: 14px;
    cursor: pointer;
}

.release-notes-checkbox input {
    cursor: pointer;
}

.release-notes-modal-dismiss {
    background: var(--accent-primary, #4a9eff);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.release-notes-modal-dismiss:hover {
    background: var(--accent-hover, #3a8eef);
}

@media (max-width: 600px) {
    .release-notes-modal-container {
        width: 95vw;
        max-height: 90vh;
    }

    .release-notes-modal-header {
        padding: 16px 20px;
    }

    .release-notes-modal-content .release-notes-container {
        padding: 16px 20px;
    }

    .release-notes-modal-footer {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
    }

    .release-notes-modal-dismiss {
        width: 100%;
    }
}
