body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
            transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for dark mode */
            cursor: default; /* Default cursor for general content */
            /* padding-top will be set dynamically by JavaScript */
        }
        body.light {
            background-color: #f3f4f6; /* Light gray background */
            color: #374151; /* Dark gray text */
        }
        .light .gradient-bg {
            background: linear-gradient(to right, #833ab4, #fd1d1d, #fcb045); /* Vibrant gradient */
        }
        .light .news-card {
            background-color: white;
        }
        .light .modal-content {
            background-color: white;
        }
        .light .bg-gray-50 {
            background-color: #f9fafb; /* Lighter gray for comments form */
        }
        .light .bg-gray-100 {
            background-color: #f3f4f6; /* Slightly darker for comment bubbles */
        }
        .light .article-title-color {
            color: #6d28d9; /* Deep purple for article titles in light mode */
        }


        /* Dark Mode Styles */
        body.dark {
            background-color: #1a202c; /* Dark background */
            color: #e2e8f0; /* Light text */
        }
        .dark .gradient-bg {
            background: linear-gradient(to right, #2d3748, #4a5568, #2d3748); /* Darker, subtle gradient */
        }
        .dark .news-card {
            background-color: #2d3748; /* Dark card background */
            color: #e2e8f0;
        }
        .dark .news-card h2 {
            color: #edf2f7; /* Lighter title in dark mode */
        }
        .dark .news-card p {
            color: #cbd5e0; /* Lighter body text in dark mode */
        }
        .dark .modal-content {
            background-color: #2d3748;
            color: #e2e8f0;
        }
        .dark .modal-content h2,
        .dark .modal-content h3,
        .dark .modal-content h4 {
            color: #edf2f7;
        }
        .dark .bg-gray-50 {
            background-color: #2c3541; /* Darker gray for comments form */
        }
        .dark .bg-gray-100 {
            background-color: #384253; /* Slightly darker for comment bubbles */
        }
        .dark .border-gray-300 {
            border-color: #4a5568; /* Darker borders for inputs */
        }
        .dark .text-gray-800 {
            color: #e2e8f0;
        }
        .dark .text-gray-700 {
            color: #cbd5e0;
        }
        .dark .text-gray-600 {
            color: #a0aec0;
        }
        .dark .text-gray-500 {
            color: #718096;
        }
        .dark .bg-gray-200 { /* For pulse animation background */
             background-color: #4a5568;
        }
        .dark .animate-pulse div { /* For pulse animation bars */
            background-color: #2d3748;
        }
        .dark .focus\:ring-purple-500:focus {
            --tw-ring-color: #a78bfa; /* Lighter purple ring for dark mode */
        }
        .dark .news-card .text-purple-600, .dark .news-card .hover\:text-purple-800:hover {
            color: #c4b5fd; /* Lighter purple for links */
        }
        .dark .article-title-color {
            color: #c4b5fd; /* Lighter purple for article titles in dark mode */
        }

        /* News Card default styles (for md and larger screens) */
        .news-card {
            transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
            cursor: pointer; /* Indicate clickability */
            background-color: white; /* Default for larger screens */
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Default shadow */
            border-radius: 0.75rem; /* Default rounded-xl */
        }
        .news-card:hover {
            transform: translateY(-3px) scale(1.01); /* Slight scale on hover */
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        /* Mobile specific styles for news-card */
        @media (max-width: 767px) { /* Small screens specific styles */
            .news-card {
                background-color: transparent; /* Remove background for list feel */
                box-shadow: none; /* Remove shadow */
                border-radius: 0; /* Straight edges */
                padding: 0; /* Reduce padding to make it more list-like, if desired */
                border-bottom: 1px solid #e0e0e0; /* Add a subtle separator */
                margin-bottom: 1rem; /* Space between items */
            }
            .dark .news-card {
                border-bottom-color: #4a5568; /* Darker border for dark mode */
            }
            .news-card .p-6 { /* Adjust inner padding if needed */
                padding: 1rem; /* Smaller padding inside the card */
            }
            .news-card .news-image { /* Adjust image size for small screens */
                height: 128px; /* Reduced height (h-32) */
            }
            .news-card h2 { /* Adjust title size for small screens */
                font-size: 1.25rem; /* text-xl equivalent for h2 */
            }
            .news-card p { /* Adjust content font size for small screens */
                font-size: 0.875rem; /* text-sm equivalent */
            }
        }
        /* Image height defaults for larger screens */
        .news-image {
            height: 192px; /* h-48 equivalent */
        }


        /* Custom scrollbar for better aesthetics */
        ::-webkit-scrollbar {
            width: 8px;
        }
        ::-webkit-scrollbar-track {
            background: #e0e0e0;
            border-radius: 10px;
        }
        .dark::-webkit-scrollbar-track {
            background: #2d3748;
        }
        ::-webkit-scrollbar-thumb {
            background: #9333ea;
            border-radius: 10px;
        }
        .dark::-webkit-scrollbar-thumb {
            background: #a78bfa;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #6d28d9;
        }
        .dark::-webkit-scrollbar-thumb:hover {
            background: #8b5cf6;
        }

        /* Styles for Quill editor content (read-only display) */
        .article-full-content img, .article-full-content video {
            max-width: 100%;
            height: auto;
            border-radius: 0.5rem;
            margin-top: 1rem;
            margin-bottom: 1rem;
        }
        .article-full-content p, .article-full-content ol, .article-full-content ul, .article-full-content blockquote {
            margin-bottom: 0.75rem;
        }
        .article-full-content h1, .article-full-content h2, .article-full-content h3 {
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
            font-weight: 700;
        }
        .article-full-content h1 { font-size: 2.25rem; }
        .article-full-content h2 { font-size: 1.875rem; }
        .article-full-content h3 { font-size: 1.5rem; }
        .article-full-content a {
            color: #6d28d9;
            text-decoration: underline;
        }
        .dark .article-full-content a {
            color: #c4b5fd;
        }
        .article-full-content strong { font-weight: bold; }
        .article-full-content em { font-style: italic; }
        .article-full-content u { text-decoration: underline; }
        .article-full-content s { text-decoration: line-through; }
        .article-full-content pre {
            background-color: #e2e8f0; /* light gray */
            padding: 1rem;
            border-radius: 0.5rem;
            overflow-x: auto;
            font-family: monospace;
            margin-bottom: 1rem;
        }
        .dark .article-full-content pre {
            background-color: #4a5568;
            color: #edf2f7;
        }
        .article-full-content blockquote {
            border-left: 4px solid #9333ea;
            padding-left: 1rem;
            font-style: italic;
            color: #6b7280;
        }
        .dark .article-full-content blockquote {
            border-left-color: #c4b5fd;
            color: #a0aec0;
        }
        .article-full-content ul, .article-full-content ol {
            padding-left: 1.5rem;
        }
        .article-full-content li {
            margin-bottom: 0.25rem;
        }

        /* Modal specific styles */
        .modal-overlay {
            background-color: rgba(0, 0, 0, 0.75);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            overflow-y: auto; /* Allow scrolling within the modal content */
        }
        .modal-content {
            background-color: white;
            border-radius: 0.75rem;
            max-width: 90%;
            max-height: 90vh; /* Max height to fit viewport, enables internal scrolling */
            overflow-y: auto; /* Scroll modal content if it exceeds max-height */
            padding: 2rem;
            position: relative;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            animation: fadeIn 0.3s ease-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        .modal-close-btn {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #6b7280;
            cursor: pointer;
            transition: color 0.2s;
        }
        .modal-close-btn:hover {
            color: #ef4444; /* Red on hover */
        }

        /* Styles for mobile filter modal (now used for the slide-down bar) */
        #mobile-filter-bar {
            position: fixed;
            top: var(--header-height, 0px); /* Will be set by JS */
            left: 0;
            width: 100%;
            z-index: 40; /* Below fixed header */
            background-color: #f3f4f6; /* Light gray */
            border-bottom: 1px solid #e0e0e0;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transform: translateY(-100%); /* Start off-screen */
            transition: transform 0.3s ease-out;
            padding-top: 1rem;
            padding-bottom: 1.5rem;
        }
        .dark #mobile-filter-bar {
            background-color: #2d3748;
            border-bottom-color: #4a5568;
        }

        #mobile-filter-bar.is-visible {
            transform: translateY(0); /* Slide in */
        }
        #mobile-filter-bar .container {
            padding-left: 1.5rem; /* px-6 */
            padding-right: 1.5rem; /* px-6 */
        }


        /* Back to Top Button */
        #back-to-top-btn {
            display: none; /* Hidden by default */
            position: fixed; /* Fixed/sticky position */
            bottom: 20px; /* Place the button at the bottom of the page */
            z-index: 99; /* Make sure it does not overlap */
            border: none; /* Remove borders */
            outline: none; /* Remove outline */
            background-color: #9333ea; /* Purple background */
            color: white; /* White text */
            cursor: pointer; /* Add a mouse pointer on hover */
            padding: 15px; /* Some padding */
            border-radius: 50%; /* Rounded corners */
            font-size: 18px; /* Increase font size */
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow */
            transition: background-color 0.3s, opacity 0.3s; /* Smooth transition */
            opacity: 0.8;

            /* Default to right for larger screens */
            right: 30px;

            /* Mobile-specific centering */
            @media (max-width: 767px) { /* Tailwind's 'md' breakpoint is 768px */
                left: 50%;
                transform: translateX(-50%);
                right: auto; /* Override right for mobile */
            }
        }

        #back-to-top-btn:hover {
            background-color: #6d28d9; /* Darker purple on hover */
            opacity: 1;
        }

        /* New Badge */
        .new-badge {
            background-color: #ef4444; /* Red */
            color: white;
            font-size: 0.75rem;
            font-weight: bold;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            margin-left: 0.5rem;
            vertical-align: middle;
            display: inline-block;
        }

        /* Read Badge */
        .read-badge {
            background-color: #4CAF50; /* Green */
            color: white;
            font-size: 0.75rem;
            font-weight: bold;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            margin-left: 0.5rem;
            vertical-align: middle;
            display: inline-block;
        }
        .dark .read-badge {
            background-color: #66BB6A; /* Lighter green for dark mode */
        }

        /* Bookmark Icon Styles */
        .bookmark-icon {
            color: #9333ea; /* Purple for bookmarked state */
            cursor: pointer;
            transition: color 0.2s ease-in-out;
        }
        .dark .bookmark-icon {
            color: #c4b5fd; /* Lighter purple for dark mode */
        }
        .bookmark-icon.far { /* Outline state */
            color: #6b7280; /* Gray for unbookmarked */
        }
        .dark .bookmark-icon.far {
            color: #a0aec0;
        }

        /* Comment Like/Dislike */
        .comment-reaction-btn {
            font-size: 0.875rem; /* text-sm */
            padding: 0.25rem 0.5rem;
            border-radius: 0.375rem; /* rounded-md */
            transition: background-color 0.2s, color 0.2s;
        }
        .comment-reaction-btn:hover {
            background-color: rgba(147, 51, 234, 0.1); /* Light purple hover */
        }
        .comment-reaction-btn.liked {
            color: #10B981; /* Green */
            font-weight: bold;
        }
        .comment-reaction-btn.disliked {
            color: #EF4444; /* Red */
            font-weight: bold;
        }
        .dark .comment-reaction-btn.liked {
            color: #34D399;
        }
        .dark .comment-reaction-btn.disliked {
            color: #F87171;
        }


        /* Toast Notification Styles */
        #toast-container {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1001;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none; /* Allow clicks to pass through */
        }
        .toast {
            background-color: #333;
            color: white;
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 0.9rem;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
            transform: translateY(20px);
            pointer-events: auto; /* Re-enable clicks for the toast itself */
            min-width: 250px;
            text-align: center;
        }
        .toast.show {
            opacity: 1;
            transform: translateY(0);
        }
        .toast.success { background-color: #4CAF50; }
        .toast.error { background-color: #f44336; }
        .toast.info { background-color: #2196F3; }
