* { box-sizing: border-box; }
html {
    background-color: #1c1c1e;
    height: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}
body { 
    margin: 0; 
    background-color: #1c1c1e; 
    color: #d6d6d6; 
    font-family: monospace;
    padding: 90px 0 0px 0; 
    min-height: 100vh;
    word-spacing: -2px;
    overflow-x: hidden;
    max-width: 100vw;
}
#feed { 
    padding: 10px; 
    margin-bottom: 20px;
}
a { color: #d2a679; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 16px; color: #d2a679; margin-top: 0; }
#feed p { font-size: 12px; margin-bottom: 10px; line-height: 1.3; word-spacing: -1px; }
#feed small { color: #999; font-size: 12px; }
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 5px 10px;
    z-index: 1000;
    background-color: #2c2c2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
}

.curl-api-banner {
    display: flex;
    align-items: center;
}

.curl-api-text {
    color: #d2a679;
    font-family: monospace;
    font-size: 8px;
    border-left: 3px solid #d2a679;
    padding-left: 8px;
    display: inline-block;
}

.status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#status {
    color: #d2a679;
    font-family: monospace;
    font-size: 12px;
    display: flex;
    align-items: center;
    padding-right: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

#status .status-dot {
    background-color: #f0ad4e;
}

#status.connected .status-dot {
    background-color: #5cb85c;
}

#status.queued .status-dot {
    background-color: #ffa500;
    animation: pulse-queue 1.5s ease-in-out infinite;
}

#status.failed .status-dot {
    background-color: #d9534f;
}

@keyframes pulse-queue {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#refresh-button {
    background: none;
    border: none;
    color: #d2a679;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}

#refresh-button.refreshing svg {
    animation: spin 1s linear infinite;
}

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

#refresh-button svg {
    width: 12px;
    height: 12px;
}

#timestamp {
    position: fixed;
    top: 0;
    left: 0;
    font-size: 10px;
    color: #d6d6d6;
    z-index: 1001;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#timestamp:hover {
    opacity: 0.8;
}
#user-icon {
    font-size: 14px;
    color: #1c1c1e;
    background-color: #d2a679;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: underline;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    border: none;
    outline: none;
    display: inline-block;
    text-align: center;
    line-height: normal;
    font-family: inherit;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#user-icon:hover {
    background-color: #e6bf99;
}

@media (max-width: 768px) {
    #search-input {
        width: calc(100% - 50px);
    }
    
    #feed-content {
        flex-direction: column;
    }
    
    #news-feed, #research-feed {
        width: 100%;
        max-height: none;
    }
    
    .item-date {
        font-size: 7px;  /* Even smaller on mobile */
        opacity: 0.8;  /* Slightly less prominent */
    }
    
    .item-provenance small {
        max-width: calc(100% - 40px);
    }
    
    /* Search results mobile fixes */
    .search-results {
        padding: 10px;
        overflow-x: hidden;
    }
    
    .search-results-content {
        overflow-x: hidden;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .search-result-item {
        max-width: 100%;
        padding: 10px;
        overflow-x: hidden;
    }
    
    .result-title,
    .result-description,
    .result-source {
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .result-source {
        max-width: 100%;
    }
    
}
#feed-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: hidden;
}
#news-feed, #research-feed {
    width: calc(50% - 5px);
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    max-height: calc(100vh - 140px);
    padding-right: 2px;
    box-sizing: border-box;
}
#word-cloud-section {
    display: flex;
    flex-direction: column;
    height: 50vh;
}

#word-cloud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1c1c1e;
}

.word-cloud-nav {
    color: #333;
    font-size: 16px;
    cursor: pointer;
    line-height: 32px;
}

#word-cloud-header h1 {
    margin: 0;
    font-size: 16px;
    line-height: 32px;
    padding: 0;
}

#word-cloud-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.category-titles-container {
    display: flex;
    justify-content: flex-start;
    padding: 5px 0;
    position: sticky;
    top: 0;
    background-color: #1c1c1e;
    z-index: 1;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.category-title {
    font-size: 12px;
    padding: 0 10px;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.category-header.error {
    color: #ff6b6b;
}

.error-message {
    color: #ff6b6b;
    font-size: 12px;
}

.category-name {
    font-size: 14px;
    color: #d2a679;
}

.category-toggle {
    color: #d2a679;
    font-size: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.word-cloud-elements-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.category-container {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 100%;
    overflow-y: auto;
}

#wordcloud-all, [id^="wordcloud-"] {
    width: 100%;
    padding: 10px;
    height: 100%;
}

.section-title {
    font-size: 16px;
    color: #d2a679;
    margin: 0;
    line-height: 32px;
    background: linear-gradient(to bottom, rgba(28, 28, 30, 1) 0%, rgba(28, 28, 30, 0.8) 100%);
    border-bottom: 1px solid rgba(156, 220, 254, 0.3);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 9;
}

#research-items, #news-items {
    padding: 0;
    margin: 0;
}

#feed-list {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2c2c2e;
    color: #d6d6d6;
    z-index: 1000;
    max-height: 60vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: none;
    padding: 10px;
    padding-bottom: 60px;
    border-top: 1px solid #3c3c3e;
}

#feed-list.expanded {
    display: block;
}
.category-wrapper {
    margin-bottom: 5px;
}

.aggregate-link {
    font-size: 12px;
    color: #888;
    text-decoration: none;
}

.category-header {
    padding: 8px 0;
    border-bottom: 1px solid #3c3c3e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #2c2c2e;
    margin-bottom: 5px;
}

.category-items {
    display: none;
    padding-left: 15px;
    margin-bottom: 10px;
}

.provenance-item {
    margin: 5px 0;
}

.provenance-link {
    font-size: 12px;
    color: #d6d6d6;
    text-decoration: none;
    display: block;
    padding: 3px 0;
}

.category-items.expanded {
    display: block;
}
#toggle-feed-list {
    position: fixed;
    bottom: 10px;
    right: 20px;
    background-color: #d2a679;
    color: #1c1c1e;
    border: none;
    padding: 2px 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
    font-size: 12px;
}
.news-item, .research-item {
    display: block;
    margin: 0;
    padding: 0;
}

.item-title {
    font-size: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    gap: 2px;  /* Minimal gap */
    min-width: 0;  /* For proper flex behavior */
    width: 100%;  /* Ensure full width */
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.item-title > a, .item-title > span {
    flex-grow: 1;  /* Let title take up available space */
    width: 100%;
    white-space: normal;  /* Allow title to wrap */
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}
.item-date {
    font-size: 8px;  /* Smaller font size */
    color: #888;
    font-weight: normal;
    white-space: nowrap;  /* Prevent date from wrapping */
    text-overflow: ellipsis;
    margin-left: auto; /* Push to the right */
    padding-left: 10px; /* Add some spacing from the provenance text */
}
.item-provenance {
    font-size: 12px;
    color: #9a9a9a;  /* Darker grey that contrasts with #1c1c1e background */
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    width: 100%; /* Ensure it takes full width */
    justify-content: space-between; /* Space between provenance and date */
}
.item-provenance a {
    font-size: 10px;
    color: #9a9a9a;
    text-transform: lowercase;
}

.item-provenance small {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
    display: inline-block;
    white-space: nowrap;
    font-size: 9px;  /* Smaller font size */
}

#back-nav {
    font-size: 18px;
    color: #d2a679;
    cursor: pointer;
    padding: 10px 0;
    margin-bottom: 20px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

#back-nav:hover {
    color: #4b3e2a;
}

#back-nav span {
    margin-right: 10px;
}

/* Breadcrumb Navigation Styles */
.breadcrumb-nav {
    font-size: 14px;
    color: #d2a679;
    padding: 8px 0;
    margin-bottom: 16px;
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    max-width: 150px;
}

.breadcrumb-item a {
    color: #d2a679;
    text-decoration: underline;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.breadcrumb-item a:hover {
    color: #4b3e2a;
}

.breadcrumb-current {
    color: #ffffff;
    font-weight: bold;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.breadcrumb-separator {
    color: #666;
    margin: 0 8px;
}

/* Two-column layout styles already defined above */

.category-titles-container {
    display: flex;
    justify-content: flex-start; 
    padding: 5px 0;
    position: sticky;
    top: 0;
    background-color: #1c1c1e;
    z-index: 1;
    overflow-x: auto; 
    white-space: nowrap;  
    -webkit-overflow-scrolling: touch;  
}

.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.expand-provenance {
    background: none;
    border: none;
    color: #d2a679;
    cursor: pointer;
    font-size: 12px;
    padding: 0 3px;
    margin-left: 3px;
    align-self: flex-start;
}

.item-provenance small {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.first-provenance, .all-provenances {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.item-provenance a {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.item-container {
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.item-content {
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-right: 5px;
    box-sizing: border-box;
}

.category-container {
    position: relative;
}

#switch-to-grid-view {
    position: fixed;
    bottom: 10px;
    left: 10px;
    padding: 2px 10px;
    background-color: #d2a679;
    color: #1c1c1e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

.word-cloud-toggle {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #d2a679;
    transition: color 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0px;
    text-decoration: underline;
}

.word-cloud-toggle:hover {
    color: #e6bf99;
}

.item-title.odd-item {
    color: #d2a679;
}

.item-title.even-item {
    color: #c09569;
}

#user-icon {
    position: fixed;
    right: 10px;
    font-size: 14px;
    color: #1c1c1e;
    background-color: #d2a679;
    cursor: pointer;
    z-index: 1001;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: underline;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

#user-icon:hover {
    background-color: #e6bf99;
}

.item-container {
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.item-content {
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-right: 5px;
    box-sizing: border-box;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 35px;
}

.pagination-controls button {
    background-color: #d2a679;
    color: #1c1c1e;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    margin: 0 5px;
}

.pagination-controls button:hover {
    background-color: #e6bf99;
}

.pagination-controls span {
    margin: 0 10px;
}

.loading-placeholder-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.loading-placeholder {
    text-align: left;
    padding: 10px;
    font-size: 14px;
    color: #a0a0a0;
}

.loading-dots:after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

#nav-container {
    position: fixed;
    top: 72px;
    right: 0;
    width: 100%;
    padding: 5px;
    z-index: 999;
    background-color: #1c1c1e;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

#nav-container::-webkit-scrollbar {
    display: none;
}

#nav-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#nav-container a {
    margin-right: 15px;
    color: #999; 
    text-decoration: none;
    font-weight: normal;
    font-size: 10px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

#nav-container a:hover {
    color: #d2a679; 
}

#nav-container a#tts-radio-button.active {
    color: #d2a679;
    font-weight: bold;
}

/* TTS Speed Dropdown Styles */
#tts-button-wrapper {
    position: relative;
    display: inline-block;
}

#tts-speed-dropdown {
    display: none;
    position: fixed;
    background-color: #2c2c2e;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px;
    min-width: 180px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    font-family: inherit;
}

#tts-speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #444;
    outline: none;
    border-radius: 2px;
    transition: background 0.3s ease;
    margin: 0;
}

#tts-speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #d2a679;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

#tts-speed-slider::-webkit-slider-thumb:hover {
    background: #c09569;
}

#tts-speed-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #d2a679;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: background 0.3s ease;
}

#tts-speed-slider::-moz-range-thumb:hover {
    background: #c09569;
}

#tts-start-button {
    transition: background-color 0.3s ease, color 0.3s ease;
}

#tts-start-button:hover {
    background-color: #c09569 !important;
}

/* Search container and input styles from old_index.php */
#search-container {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: #2c2c2e;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-input-wrapper {
    position: relative;
    width: calc(100% - 40px);
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #d2a679;
    border-radius: 4px;
    background-color: #1c1c1e;
    color: #d6d6d6;
    font-size: 16px; /* Increase font size to prevent zoom */
    -webkit-appearance: none; /* Disable default iOS styling */
    -moz-appearance: none;
    appearance: none;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(210, 166, 121, 0.5);
}

/* Star and copy buttons for feed items from old_index.php */
.star-button, .copy-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1px;
    margin: 0;
    line-height: 1;
    color: #333; /* Default color */
    transition: color 0.3s ease;
}

.star-button:hover, .star-button:focus,
.copy-button:hover, .copy-button:focus {
    color: #d2a679; /* Hover color */
}

.star-button.bookmarked {
    color: #d2a679; /* Bookmarked color */
}

.star-button.bookmarked:hover,
.star-button.bookmarked:focus {
    color: #c09569; /* Bookmarked hover color */
}

.star-icon, .copy-icon {
    fill: currentColor;
}

.star-button svg, .copy-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Plus icon for bookmarking animation */
.plus-icon {
    position: absolute;
    top: 100%;
    left: 95%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #d2a679;
    opacity: 0;
    transition: opacity 500ms ease-in-out;
    pointer-events: none;
}

/* Bookmark notification */
.bookmark-notification {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #444;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: top 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.bookmark-notification.show {
    top: 20px;
    opacity: 1;
}

/* Search results styles */
.search-results {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #2c2c2e;
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-results.show {
    opacity: 1;
    visibility: visible;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: #2c2c2e;
    padding: 10px 0;
    z-index: 2;
}

.search-results-header h2 {
    color: #d2a679;
    margin: 0 0 5px 0;
    font-size: 18px;
}

.search-query-display {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.search-results-header .close-button {
    background: none;
    border: none;
    color: #d2a679;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#search-results-content {
    overflow-x: hidden;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    background-color: #1c1c1e;
    border: 1px solid #3c3c3e;
    border-radius: 4px;
    padding: 12px;
    transition: background-color 0.2s;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.search-result-item:hover {
    background-color: #252527;
}

.result-title {
    display: block;
    font-size: 14px;
    color: #d2a679;
    margin-bottom: 5px;
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.result-title:hover {
    text-decoration: underline;
}

.result-description {
    font-size: 12px;
    color: #b0b0b0;
    margin: 5px 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    gap: 10px;
    flex-wrap: wrap;
}

.result-source {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.result-date {
    white-space: nowrap;
    flex-shrink: 0;
}

.no-results, .search-error {
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

#vector-results, #keyword-results {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    overflow-y: auto;
    height: 100%;
}

#vector-results {
    border-right: 1px solid #3c3c3e;
}

#vector-results h3, #keyword-results h3 {
    color: #d2a679;
    font-size: 16px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background-color: #2c2c2e;
    padding: 10px 0;
    z-index: 1;
}

#vector-results ul, #keyword-results ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#vector-results li, #keyword-results li {
    background-color: #1c1c1e;
    border: 1px solid #3c3c3e;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 10px;
}

#vector-results a, #keyword-results a {
    color: #d6d6d6;
    text-decoration: none;
}

#vector-results h4, #keyword-results h4 {
    color: #d2a679;
    margin: 0 0 5px 0;
    font-size: 14px;
}

#vector-results p, #keyword-results p {
    color: #a0a0a0;
    margin: 5px 0;
    font-size: 12px;
}

#vector-results .similarity, #keyword-results .date {
    color: #888;
    font-size: 0.9em;
    margin-top: 5px;
}

mark {
    background-color: rgba(210, 166, 121, 0.3);
    color: #d6d6d6;
    padding: 0 2px;
    border-radius: 2px;
}

/* Custom tooltip styles */
[title] {
    position: relative;
    transition: all 0.3s ease;
}

[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: rgba(44, 44, 46, 0.95);
    color: #d6d6d6;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    max-width: 300px;
    width: max-content;
    white-space: pre-wrap;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3e;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

[title]:hover::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: #3c3c3e transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
}

[title]:hover::before,
[title]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s; /* No delay for tooltip */
}

/* Feed item - Brutalist style */
.feed-item {
    margin: 0;
    padding: 5px 0px 5px 5px;
    border-bottom: 1px solid #2c2c2e;
    background-color: #1c1c1e;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Highlight style for new broadcast items */
.new-broadcast-item {
    background-color: rgba(210, 166, 121, 0.15);
    border-left: 3px solid #d2a679;
    transition: background-color 0.3s ease, border-left-color 0.3s ease;
}

/* Remove highlight on hover */
.new-broadcast-item:hover {
    background-color: #1c1c1e;
    border-left-color: transparent;
}

/* Word cloud modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #1c1c1e;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.close-button {
    color: #aaa;
    align-self: flex-end;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.breadcrumb {
    color: #ffffff;
    margin-bottom: 10px;
}

.modal-word {
    color: #ffffff;
    margin-bottom: 10px;
}

.modal-sections {
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
    overflow: auto;
}

.modal-section {
    width: 48%;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.word-cloud-order {
    color: #ffffff;
    flex-grow: 1;
    overflow-y: auto;
    border-radius: 5px;
    padding: 10px;
}

.modal-provenance {
    color: #ffffff;
    flex-grow: 1;
    overflow-y: auto;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .modal-sections {
        flex-direction: column;
    }
    
    .modal-section {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Error and available options styles */
.error {
    color: #ff6b6b;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    background-color: rgba(255, 107, 107, 0.1);
}

.available-options {
    margin: 15px 0;
    padding: 10px;
    background-color: rgba(210, 166, 121, 0.1);
    border-radius: 5px;
}

.available-options h3 {
    color: #d2a679;
    margin-top: 0;
    margin-bottom: 10px;
}

.available-options ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.available-options li {
    margin: 5px 0;
}

.available-options a {
    color: #d2a679;
    text-decoration: none;
    display: block;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.available-options a:hover {
    background-color: rgba(210, 166, 121, 0.2);
}
