body {
     background-image: url("/images/background.jpg");
     background-size: cover;
     background-position: center;
     background-repeat: no-repeat;
     overflow: auto;
     /* Base text color for light mode */
     color: #374151;
     /* gray-700 */
 }

 [data-theme="dark"] body {
    color: #d1d5db;
    background-image: url("/images/dark-background.jpg");
 }

 .pageTitle {
     background-color: #ffffff93;
     border-radius: 5px;
     padding: 3px 8px;
     margin: auto;
     margin-bottom: 10px;
     width: auto;
 }

 [data-theme="dark"] .pageTitle {
     /* Or @media (prefers-color-scheme: dark) if using media strategy and no class toggle */
     background-color: rgba(51, 65, 85, 0.75);
     /* slate-700 with opacity for dark mode */
 }

 /* Ensure body scroll is prevented when mobile menu is open */
 body.overflow-hidden {
    overflow: hidden;
 }
 
/* Mobile menu scrolling */
#mobile-menu {
    overflow-y: auto;
    max-height: 100%;
}

/* Notification content scrolling */
#mobile-notifications-content .max-h-60 {
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Forum Quote Enhancements */
.forum-quote {
    position: relative;
    transition: all 0.2s ease-in-out;
}

.forum-quote:hover {
    transform: translateX(2px);
}

.forum-quote .quoted-text {
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.forum-quote .quoted-text::-webkit-scrollbar {
    width: 6px;
}

.forum-quote .quoted-text::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.forum-quote .quoted-text::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.forum-quote .quoted-text::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark mode improvements for scrollbars */
@media (prefers-color-scheme: dark) {
    .forum-quote .quoted-text {
        scrollbar-color: #475569 #334155;
    }
    
    .forum-quote .quoted-text::-webkit-scrollbar-track {
        background: #334155;
    }
    
    .forum-quote .quoted-text::-webkit-scrollbar-thumb {
        background: #475569;
    }
    
    .forum-quote .quoted-text::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Forum reply animations */
@keyframes highlightComment {
    0% { background-color: rgba(255, 255, 0, 0.3); }
    100% { background-color: transparent; }
}

.highlight-comment {
    animation: highlightComment 2s ease-out;
}

/* Highlight animations for new comments */
@keyframes highlightNew {
    0% { 
        background-color: rgba(34, 197, 94, 0.2);
        transform: scale(1.02);
    }
    50% { 
        background-color: rgba(34, 197, 94, 0.1);
    }
    100% { 
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes highlightTarget {
    0% { 
        background-color: rgba(251, 191, 36, 0.3);
        transform: scale(1.01);
    }
    50% { 
        background-color: rgba(251, 191, 36, 0.15);
    }
    100% { 
        background-color: transparent;
        transform: scale(1);
    }
}

/* Comment highlighting animations */
.comment-highlight-new {
    animation: highlightNew 3s ease-out;
}

.comment-highlight-target {
    animation: highlightTarget 2s ease-out;
}

/* Enhanced forum layout responsiveness */
@media (max-width: 768px) {
    .forum-quote {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .forum-quote .quoted-text {
        font-size: 0.875rem;
    }
}

/* Improved typography for forum content */
.actual-display-content {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Enhanced button hover effects */
.forum-reply-btn {
    transition: all 0.15s ease-in-out;
}

.forum-reply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Better textarea styling for forum replies */
#reply-content {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

#reply-content:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
}

/* Loading animation improvements */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Toast notification styles for comment navigation */
.toast-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    font-size: 0.875rem;
    animation: slideInRight 0.3s ease-out forwards;
}

.toast-notification.loading {
    background-color: #3b82f6;
    color: white;
}

.toast-notification.error {
    background-color: #ef4444;
    color: white;
}

.toast-notification.success {
    background-color: #10b981;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


    .star-rating .star {
        color: #d1d5db;
        /* gray-300 */
        transition: color 0.2s;
    }

    /* Fix star selection - stars that are active */
    .star-rating .star.active,
    .star-rating .star.selected {
        color: #EAB308;
        /* yellow-500 */
    }

    /* Fix hover states to only affect the current star and those before it */
    /* Removing the old styles that caused the issue */

    /* When in RTL context but stars need LTR behavior */
    .star-rating {
        direction: ltr;
        display: inline-block;
    }

    .rating-popup {
        transform: translateY(-10px);
        opacity: 0;
        transition: transform 0.3s, opacity 0.3s;
        position: fixed;
        /* Change to fixed to maintain position during scrolling */
        z-index: 1000;
        /* Ensure it's above other elements */
    }

    .rating-popup.show {
        transform: translateY(0);
        opacity: 1;
    }

    .like-button[data-liked="true"] {
        background-color: rgba(248, 113, 113, 0.2);
        /* light red background */
    }

    .dark .like-button[data-liked="true"] {
        background-color: rgba(248, 113, 113, 0.3);
        /* slightly darker red for dark mode */
    }

    /* Loading spinner */
    .loading::after {
        content: "";
        display: inline-block;
        width: 12px;
        height: 12px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s ease-in-out infinite;
        margin-left: 5px;
    }

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