/* Define CSS variables for theming with Palette Support */
:root {
    /* Default Palette: Slate Pro (Blue) */
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --accent-tint: #eff6ff;
    
    /* Light Theme Base */
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --bg-hover: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-primary: #e5e7eb;
    --border-accent: var(--accent-primary);
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Palette Overrides */
[data-palette="emerald"] {
    --accent-primary: #10b981;
    --accent-secondary: #047857;
    --accent-tint: #ecfdf5;
}
[data-palette="violet"] {
    --accent-primary: #8b5cf6;
    --accent-secondary: #5b21b6;
    --accent-tint: #f5f3ff;
}
[data-palette="amber"] {
    --accent-primary: #f59e0b;
    --accent-secondary: #b45309;
    --accent-tint: #fffbeb;
}

html.dark {
    /* Dark Theme Base */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-hover: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-primary: #374151;
    --border-accent: var(--accent-primary);
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

html.dark[data-palette="emerald"] { --accent-tint: #064e3b; }
html.dark[data-palette="violet"] { --accent-tint: #2e1065; }
html.dark[data-palette="amber"] { --accent-tint: #451a03; }

/* Legacy Variable Mapping */
:root, html.dark {
    --bg-new-entry: var(--bg-secondary);
    --text-link: var(--accent-primary);
    --text-link-hover: var(--accent-secondary);
    --text-product: var(--accent-secondary);
    --text-product-hover: var(--accent-primary);
    --border-secondary: var(--border-primary);
    --details-bg: var(--bg-hover);
    --details-border: var(--accent-primary);
    --rss-bg: var(--bg-hover);
    --rss-text: var(--accent-secondary);
    --icon-link: var(--accent-primary);
    --icon-link-hover-bg: var(--accent-tint);
    --icon-link-hover-text: var(--accent-secondary);
    --tab-text: var(--text-secondary);
    --tab-active-border: var(--border-accent);
    --tab-active-text: var(--text-primary);
    --tab-hover-border: var(--border-primary);
    --tab-hover-text: var(--text-primary);
    --card-bg: var(--bg-secondary);
    --card-border: var(--border-primary);
    --card-hover-border: var(--border-accent);
    --card-hover-bg: var(--bg-hover);
    --card-shadow-hover: var(--shadow-md);
    --section-bg: var(--bg-secondary);
    --section-border: var(--border-primary);
    --section-shadow: var(--shadow);
    --section-heading-text: var(--text-primary);
    --section-paragraph-text: var(--text-secondary);
    --button-bg: var(--bg-secondary);
    --button-text: var(--text-primary);
    --button-border: var(--border-primary);
    --button-hover-bg: var(--bg-hover);
    --button-hover-text: var(--accent-primary);
}

/* Apply base styles & transitions */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Spinner */
.loader {
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--text-link);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Search Highlighting */
.highlight {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    font-weight: 600; /* Slightly bolder */
    padding: 1px 3px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px var(--highlight-bg); /* Subtle glow */
}

/* Expandable Details Paragraph */
.details-paragraph {
    background-color: var(--details-bg);
    border-left: 3px solid var(--details-border);
    color: var(--text-secondary);
    transition: all 0.3s ease-out; /* Smooth transition */
    overflow: hidden; /* Needed for smooth hide/show */
}
.details-paragraph.hidden {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    max-height: 0; /* Animate height */
    border-left-width: 0;
}
.details-paragraph strong {
    color: var(--text-primary);
}
.details-paragraph .border-t { /* Metadata separator */
    border-color: var(--border-primary);
}

/* Category Label Styling (Subtle & Right-justified) */
.category-label {
    opacity: 0.6;
    font-size: 0.7rem;
    font-style: italic;
    color: var(--text-secondary);
    transition: opacity 0.3s ease;
}
.category-label:hover {
    opacity: 1; /* Peek-a-boo effect on hover */
}

/* Clickable Summary (for expanding details) */
.summary-clickable {
    cursor: pointer;
    color: var(--text-primary);
    /* Add focus styles for accessibility */
    border-radius: 3px;
    outline: none;
}
.summary-clickable:focus-visible {
     box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link);
}

/* External Link Icon */
.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* Fixed size */
    height: 24px;
    color: var(--icon-link);
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    flex-shrink: 0; /* Prevent shrinking in flex layouts */
}
.link-icon svg {
    width: 1rem; /* 16px */
    height: 1rem;
}
.link-icon:hover:not(.link-icon-disabled) {
    background-color: var(--icon-link-hover-bg);
    color: var(--icon-link-hover-text);
}
.link-icon-disabled {
    color: var(--icon-link-disabled);
    cursor: default;
    opacity: 0.7;
}
/* Add focus styles for accessibility */
.link-icon:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link);
}

/* Product Links (in list items and product cards) */
.product-link {
    color: var(--text-product);
    transition: color 0.2s ease-in-out;
    text-decoration: none;
    font-weight: 500;
}
.product-link:hover, .product-link:focus-visible {
    color: var(--text-product-hover);
    text-decoration: underline;
    outline: none;
}

/* Visible RSS Feed Link */
#rssLinkContainer a.rss-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px; /* Slightly larger padding */
    border-radius: 6px;
    background-color: var(--rss-bg);
    border: 1px solid var(--rss-border);
    color: var(--rss-text);
    text-decoration: none;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    transition: all 0.2s ease-in-out; /* Smoother transition */
    box-shadow: var(--shadow);
}
#rssLinkContainer a.rss-link:hover {
    background-color: var(--rss-hover-bg);
    box-shadow: var(--shadow-md);
    color: var(--rss-hover-text);
    transform: translateY(-1px); /* Subtle lift */
}
#rssLinkContainer svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    fill: currentColor;
}
#rssDisclaimer { /* Disclaimer text below RSS link */
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem; /* text-xs */
    color: var(--text-secondary);
}

/* Feedback Link */
#feedbackLink {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem; /* text-sm */
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}
#feedbackLink:hover, #feedbackLink:focus-visible {
    color: var(--text-link);
    outline: none;
}

/* Pagination */
#paginationContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    margin-top: 1.5rem; /* More space above */
    gap: 0.75rem; /* Slightly more gap */
}
.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--button-border);
    border-radius: 0.375rem; /* rounded-md */
    background-color: var(--button-bg);
    color: var(--button-text);
    font-weight: 500;
    font-size: 0.875rem; /* text-sm */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow);
}
.pagination-button:hover:not(:disabled) {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    border-color: var(--border-secondary); /* Slightly darker border on hover */
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.pagination-button:disabled {
    background-color: var(--button-disabled-bg);
    color: var(--button-disabled-text);
    cursor: not-allowed;
    border-color: var(--button-disabled-border);
    box-shadow: none;
    opacity: 0.7;
}
/* Add focus styles for accessibility */
.pagination-button:focus-visible {
     outline: none;
     box-shadow: var(--shadow-md), 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link);
}
.pagination-info {
    font-size: 0.875rem; /* text-sm */
    color: var(--text-secondary);
    margin: 0 0.5rem;
    white-space: nowrap; /* Prevent wrapping */
}

/* Header */
header {
    padding-top: 0.5rem; /* Add some padding */
    padding-bottom: 0.5rem;
    /* Add padding to sides to prevent button overlap */
    padding-left: 4rem; /* Space for button */
    padding-right: 4rem; /* Space for button */
}
header h1 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
header h1 a:hover, header h1 a:focus-visible {
    color: var(--text-link);
    outline: none;
}

/* Stats Visualization */
.stats-container {
    padding: 1rem 0;
}

.stats-row {
    transition: transform 0.2s ease;
}

.stats-row:hover {
    transform: translateX(4px);
}

.category-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Tooltip custom style if needed, though we used tailwind-like logic */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Search Input */
#searchInput {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-secondary);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.2s ease;
    padding-left: 2.5rem; /* pl-10 for icon */
    appearance: none; /* Remove default appearance */
}
#searchInput::placeholder {
    color: var(--text-secondary);
    opacity: 1; /* Ensure placeholder is visible */
}
#searchInput:focus {
    border-color: var(--text-link);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link); /* Focus ring */
    outline: none; /* Remove default outline */
}
.search-icon-container { /* Container for the search icon */
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0.75rem; /* left-3 */
    display: flex;
    align-items: center;
    pointer-events: none;
    color: var(--text-secondary);
}

:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --border-color: #334155;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', 'Inter', sans-serif;
}

.sticky-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Skeleton Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-row {
    height: 80px;
    margin-bottom: 1px;
    background-color: var(--card-bg);
}

.feed-item {
    transition: transform 0.2s ease, background-color 0.2s ease;
    animation: slideUp 0.4s ease-out backwards;
}

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

.feed-item:hover {
    background-color: #243147;
    transform: translateX(4px);
}

/* Updates List Styling */
#updatesList {
    background-color: var(--bg-secondary);
    border-color: var(--border-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    list-style: none; /* Remove default list bullets */
    padding: 0;
    margin: 0;
}
#updatesList li {
    border-color: var(--border-primary);
    transition: border-color 0.3s ease, background-color 0.2s ease;
}
#updatesList .list-item-hover:hover {
    background-color: var(--bg-hover);
}
/* Text color overrides within list items */
#updatesList .text-gray-500 { color: var(--text-secondary); }
#updatesList .text-blue-700 { color: var(--text-product); }
#updatesList .text-gray-700 { color: var(--text-primary); }
#updatesList .text-gray-600 { color: var(--text-secondary); }
#updatesList .font-medium.text-gray-600 { color: var(--text-primary); }

/* Recent Entry Styling */
#updatesList li.new-entry > .list-item-hover {
    background-color: var(--bg-new-entry);
    border-left: 3px solid var(--text-link); /* Add indicator */
    margin-left: -3px; /* Adjust for border */
}
#updatesList li.new-entry > .list-item-hover:hover {
    background-color: var(--bg-hover); /* Standard hover */
}
.new-label { /* "(new)" label */
    color: var(--text-new-label);
    font-size: 0.7rem; /* Slightly smaller */
    font-weight: 600; /* Bolder */
    margin-left: 0.5rem; /* Space before label */
    display: inline-block;
    vertical-align: middle; /* Align better with text */
    text-transform: uppercase; /* Uppercase for emphasis */
    letter-spacing: 0.05em; /* Slight letter spacing */
}

/* Theme Toggle Button */
#themeToggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem; /* p-2 */
    border-radius: 9999px; /* rounded-full */
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
    /* Absolute positioning */
    position: absolute;
    top: 0.5rem; /* Adjust vertical position as needed */
    right: 0.75rem; /* Adjust horizontal position */
}
#themeToggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}
#themeToggle svg {
    width: 24px;
    height: 24px;
    display: block;
}
#themeToggle:focus-visible {
     outline: none;
     box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link);
}
/* Icon visibility based on theme */
.dark #themeToggle .sun-icon { display: block; }
.dark #themeToggle .moon-icon { display: none; }
html:not(.dark) #themeToggle .sun-icon { display: none; }
html:not(.dark) #themeToggle .moon-icon { display: block; }

/* --- Tab Styles --- */
.tab-container {
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 1.5rem; /* mb-6 */
    /* Use flex-wrap for smaller screens if tabs overflow */
    flex-wrap: wrap;
    /* Use justify-between to push groups apart */
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align buttons to the bottom border */
}
.tab-button {
    padding: 0.5rem 1rem; /* Base padding */
    margin-bottom: -1px; /* Overlap border */
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* Medium weight */
    color: var(--tab-text);
    border-bottom: 2px solid var(--tab-border);
    transition: border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    white-space: nowrap; /* Prevent wrapping */
    border-radius: 4px 4px 0 0; /* Slightly rounded top corners */
}
/* Style for the primary "Changelog" tab */
#changelogTabButton {
     padding: 0.6rem 1.2rem; /* Slightly larger padding */
     font-size: 0.95rem; /* Slightly larger font */
     font-weight: 600; /* Make it bolder */
}
 /* Style for the secondary tabs (Products, Bookmarks, About) */
.secondary-tab-group .tab-button {
     padding: 0.4rem 0.8rem; /* Slightly smaller padding */
     font-size: 0.8rem; /* Slightly smaller font */
     font-weight: 400; /* Lighter font weight */
}

.tab-button:hover:not(.active-tab) {
    color: var(--tab-hover-text);
    border-bottom-color: var(--tab-hover-border);
}
.tab-button.active-tab {
    color: var(--tab-active-text);
    border-bottom-color: var(--tab-active-border);
}
/* Ensure active styles override secondary styles */
#changelogTabButton.active-tab {
     font-weight: 600; /* Keep bolder weight when active */
     color: var(--tab-active-text);
     border-bottom-color: var(--tab-active-border);
}
 .secondary-tab-group .tab-button.active-tab {
     font-weight: 500; /* Medium weight when active */
     color: var(--tab-active-text);
     border-bottom-color: var(--tab-active-border);
}

.tab-button:focus-visible {
     outline: none;
     background-color: var(--bg-hover);
     border-bottom-color: var(--tab-hover-border);
     color: var(--tab-hover-text);
     box-shadow: inset 0 0 0 2px var(--text-link); /* Inset focus ring */
}
.tab-panel { /* Content area for each tab */
     outline: none; /* Remove focus outline if tabbing through panels */
}
/* Group for secondary tabs */
.secondary-tab-group {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem; /* space-x-1 equivalent */
}
/* --- End Tab Styles --- */


/* Generic Section Styles (About & Bookmarks) */
.section-content {
    padding: 1.5rem; /* p-6 */
    background-color: var(--section-bg);
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid var(--section-border);
    box-shadow: var(--section-shadow);
    color: var(--section-paragraph-text);
}
.section-content h2 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* semibold */
    margin-bottom: 1rem; /* mb-4 */
    color: var(--section-heading-text);
    border-bottom: 1px solid var(--border-primary); /* Add separator */
    padding-bottom: 0.5rem; /* pb-2 */
}
.section-content h3 {
    font-size: 1rem; /* text-base */
    font-weight: 600; /* semibold */
    margin-top: 1.5rem; /* mt-6 */
    margin-bottom: 0.75rem; /* mb-3 */
    color: var(--section-subheading-text);
}
.section-content p {
    font-size: 0.875rem; /* text-sm */
    line-height: 1.6; /* leading-relaxed */
    margin-bottom: 1rem; /* mb-4 */
}
.section-content a {
    color: var(--section-link-text);
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
    border-radius: 2px; /* For focus ring */
}
.section-content a:hover, .section-content a:focus-visible {
    color: var(--section-link-hover-text);
    outline: none;
}
.section-content a:focus-visible {
     box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link);
}
.section-content ul {
    margin-top: 0.5rem; /* mt-2 */
    margin-bottom: 1rem; /* mb-4 */
    padding-left: 1.25rem; /* pl-5 equivalent for list indent */
}
.section-content ul li {
    color: var(--section-list-text);
    font-size: 0.875rem; /* text-sm */
    list-style-type: disc;
    margin-bottom: 0.5rem; /* mb-2 */
    line-height: 1.6;
}
.section-content ul li a {
    color: inherit; /* Inherit list item color */
    text-decoration: underline;
}
.section-content ul li a:hover, .section-content ul li a:focus-visible {
    color: var(--section-link-hover-text); /* Use link hover color */
}
.section-content ul li strong {
    color: var(--section-subheading-text);
    font-weight: 600;
}

/* Products Tab - Cards */
#productsContent {
    padding-top: 1rem; /* Add space above grid */
}
#productsListContainer {
    display: grid;
    /* Responsive grid columns */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* More flexible */
    gap: 1rem; /* gap-4 */
}
.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem; /* p-4 */
    text-align: center;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow);
}
.product-card:hover {
    border-color: var(--card-hover-border);
    background-color: var(--card-hover-bg);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-3px); /* Slightly more lift */
}
.product-card a.product-filter-link {
    display: block; /* Make link fill card width */
    text-decoration: none;
    color: var(--text-link); /* Use link color */
    font-weight: 600; /* semibold */
    font-size: 1rem; /* text-base */
    margin-bottom: 0.25rem; /* mb-1 */
    transition: color 0.2s ease-in-out;
    border-radius: 3px; /* For focus */
}
.product-card a.product-filter-link:hover,
.product-card a.product-filter-link:focus-visible {
    color: var(--text-link-hover);
    text-decoration: underline;
    outline: none;
}
 .product-card a.product-filter-link:focus-visible {
     box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-link);
 }
.product-card .stats {
    font-size: 0.75rem; /* text-xs */
    color: var(--text-secondary);
    margin-top: 0.25rem; /* mt-1 */
}

/* Mobile Layout Adjustments */
@media (max-width: 767px) {
    .container { padding-left: 1rem; padding-right: 1rem; } /* px-4 */

    /* Adjust header layout */
     header {
         padding-left: 1rem; /* Reduce padding on mobile */
         padding-right: 4rem; /* Keep space for button */
     }
     header h1 { font-size: 1.25rem; } /* text-xl */


    /* Adjust tab layout for mobile - stack them */
    .tab-container {
         justify-content: flex-start; /* Align all left on mobile */
         flex-direction: row; /* Keep as row but allow wrap */
         gap: 0.25rem;
    }
    /* Reset specific tab styles for mobile if needed */
     #changelogTabButton {
         padding: 0.5rem 1rem; /* Reset padding */
         font-size: 0.875rem; /* Reset font size */
    }
     .secondary-tab-group .tab-button {
         padding: 0.5rem 0.75rem; /* Reset padding */
         font-size: 0.8rem; /* Reset font size */
    }
     .secondary-tab-group {
         gap: 0.25rem;
     }


    /* Adjust list item layout */
    #updatesList .md\:flex-row { flex-direction: column; }
    #updatesList .md\:items-center { align-items: flex-start; }
    #updatesList .md\:space-x-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0 * var(--tw-space-x-reverse)); margin-left: calc(0 * calc(1 - var(--tw-space-x-reverse))); } /* Remove desktop spacing */
    #updatesList .md\:hidden { display: flex; } /* Show mobile top row */
    #updatesList .hidden.md\:block, #updatesList .hidden.md\:inline-flex { display: none; } /* Hide desktop date/product */
    #updatesList .md\:w-24, #updatesList .md\:w-32 { width: auto; } /* Remove fixed widths */
    #updatesList .md\:text-right { text-align: left; }
    #updatesList .md\:flex-shrink-0 { flex-shrink: 1; } /* Allow shrinking */
    #updatesList .summary-clickable { margin-top: 0.25rem; } /* mt-1 */
    #updatesList .link-icon { align-self: flex-end; margin-top: 0.25rem; } /* Align link icon bottom right */

    /* Adjust details paragraph margin */
    .details-paragraph { margin-left: 1rem; margin-right: 1rem; }

    /* Adjust section padding */
    .section-content { padding: 1rem; } /* p-4 */
    .section-content h2 { font-size: 1.1rem; }
    .section-content h3 { font-size: 0.9rem; }
    .section-content p, .section-content ul li { font-size: 0.8rem; }
}

/* PWA Update Notification Bar */
#update-available-bar {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--pwa-update-bg);
    color: var(--pwa-update-text);
    padding: 1rem;
    text-align: center;
    z-index: 10000; /* High z-index */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.875rem; /* text-sm */
}
#update-available-bar button {
    margin-left: 1em;
    padding: 0.5em 1em;
    cursor: pointer;
    background-color: var(--pwa-update-button-bg);
    color: var(--pwa-update-text);
    border: none;
    border-radius: 0.375rem; /* rounded-md */
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
}
#update-available-bar button:hover {
    background-color: var(--pwa-update-button-hover-bg);
}
#update-available-bar button:focus-visible {
     outline: 2px solid var(--pwa-update-text);
     outline-offset: 2px;
}
/* Expanded Thumbnail Styles */
.expanded-thumbnail-container {
    width: 100%;
    max-width: 300px; /* Absolute cap */
    max-height: 300px; /* Absolute cap */
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.expanded-thumbnail {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain; /* Keep aspect ratio without stretching */
    display: block;
    transition: transform 0.2s ease-in-out;
}

.expanded-image-link {
    display: block;
    cursor: pointer;
}

.expanded-image-link:hover .expanded-thumbnail {
    transform: scale(1.02); /* Subtle lift on hover */
}

@media (max-width: 767px) {
    .expanded-thumbnail-container {
        max-width: 100%;
        height: auto;
    }
}
