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

body {
    font-family: Arial, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    display: flex;
    background: #fff;
    color: #222;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    z-index: 1000;
}

.theme-toggle:hover {
    background: #0056b3;
}

body.dark-mode .theme-toggle {
    background: #6c757d;
}

body.dark-mode .theme-toggle:hover {
    background: #545b62;
}

.user-info {
    transition: background-color 0.3s;
}

/* User Menu Styling */
.user-menu-container {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 1000;
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-trigger {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    font-weight: 500;
}

.user-menu-trigger:hover {
    background: #e9ecef;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 5px;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

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

.user-menu-item:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.menu-text {
    font-size: 14px;
}

/* Dark mode styles */
body.dark-mode .user-menu-trigger {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .user-menu-trigger:hover {
    background: #3a3a3a;
}

body.dark-mode .user-menu-dropdown {
    background: #2d2d2d;
    border-color: #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .user-menu-item {
    color: #e0e0e0;
    border-bottom-color: #444;
}

body.dark-mode .user-menu-item:hover {
    background: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .user-info {
    background: #2d2d2d !important;
    color: #e0e0e0;
}

.sidebar {
    width: 300px;
    border-right: 1px solid #eee;
    /*padding-right: 20px;*/
    padding: 30px;
    margin-right: 30px;
    min-height: 90vh;
    background: #f8f9fa;
    transition: background-color 0.3s, border-color 0.3s;
    border-radius: 8px;
}

body.dark-mode .sidebar {
    background: #2d2d2d;
    border-right-color: #444;
}

.sidebar h2 {
    font-size: 18px;
    margin-top: 0;
}

.query-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.query-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.query-item:hover {
    background: #f8f9fa;
}

body.dark-mode .query-item:hover {
    background: #4a4a4a;
}

.main-content {
    flex: 1;
    background: #fff;
    transition: background-color 0.3s;
}

/* Header section with logo and text */
.header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.header-text {
    flex: 1;
}

.header-text h1 {
    margin: 0 0 10px 0;
    color: #333;
}

.header-text p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Logo styling for header */
.header-section .logo {
    flex-shrink: 0;
    margin: 0;
}

body.dark-mode .main-content {
    background: #1a1a1a;
}

body.dark-mode .header-text h1 {
    color: #e0e0e0;
}

body.dark-mode .header-text p {
    color: #b0b0b0;
}

.search-container {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.search-button:hover {
    background-color: #0056b3;
}

/* Source Filter Styling */
.source-filter-dropdown {
    position: relative;
    display: inline-block;
}

.source-filter-trigger {
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.source-filter-trigger:hover {
    background: #e9ecef;
}

.source-filter-icon {
    font-size: 16px;
    color: #333;
}

.source-filter-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 5px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.source-filter-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.source-filter-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
    background: #f8f9fa;
}

.source-filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.source-filter-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.source-filter-list {
    padding: 8px 0;
}

.source-filter-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.source-filter-item:hover {
    background: #f8f9fa;
}

.source-filter-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    width: 100%;
}

.source-filter-item input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* Dark mode styles */
body.dark-mode .source-filter-trigger {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .source-filter-trigger:hover {
    background: #3a3a3a;
}

body.dark-mode .source-filter-icon {
    color: #e0e0e0;
}

body.dark-mode .source-filter-options {
    background: #2d2d2d;
    border-color: #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .source-filter-header {
    background: #3a3a3a;
    border-bottom-color: #444;
}

body.dark-mode .source-filter-checkbox,
body.dark-mode .source-filter-item label {
    color: #e0e0e0;
}

body.dark-mode .source-filter-item:hover {
    background: #3a3a3a;
}

.loading {
    display: none;
    color: #666;
    font-style: italic;
}

.answer {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    transition: background-color 0.3s;
}

body.dark-mode .answer {
    background-color: #2d2d2d;
}

/* Chunk styling for better contrast */
.chunk-container {
    margin-top: 20px;
}

.chunk-container h3 {
    margin-bottom: 15px;
}

.chunk-item {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f4f4f4;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: background-color 0.3s;
}

.chunk-item:hover {
    background: #e8e8e8;
}

.chunk-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.chunk-content {
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Dark mode chunk styling */
body.dark-mode .chunk-item {
    background: #3a3a3a;
    border: 1px solid #555;
}

body.dark-mode .chunk-item:hover {
    background: #4a4a4a;
}

body.dark-mode .chunk-content {
    color: #b0b0b0;
}

/* Sources and feedback styling */
.sources-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

body.dark-mode .sources-section {
    background: #2d2d2d;
    border-left-color: #007bff;
}

.sources-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #007bff;
}

.source-link {
    display: block;
    margin-bottom: 8px;
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

.source-link:hover {
    text-decoration: underline;
}

body.dark-mode .source-link {
    color: #66b3ff;
}

.source-link.referenced {
    color: #28a745;
    font-style: italic;
}

.source-link.non-clickable {
    cursor: default;
    color: #666;
    text-decoration: none;
    pointer-events: none;
}

.source-link.non-clickable:hover {
    color: #666;
    text-decoration: none;
}

body.dark-mode .source-link.non-clickable {
    color: #999;
}

body.dark-mode .source-link.non-clickable:hover {
    color: #999;
}

/* Vimeo source styling */
.vimeo-source {
    display: block !important;
    padding: 12px !important;
    border-radius: 8px !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease !important;
}

.vimeo-source:hover {
    background: #e9ecef !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.source-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.thumbnail-container {
    position: relative !important;
    width: 80px !important;
    height: 45px !important;
    flex-shrink: 0 !important;
}

.source-thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px !important;
}

.play-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
    pointer-events: none !important;
}

.vimeo-source:hover .play-button {
    background: rgba(0, 123, 255, 0.9) !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
}

.source-text {
    flex: 1 !important;
    min-width: 0 !important;
}

.source-title {
    font-weight: 500 !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
}

.source-meta {
    font-size: 0.85em !important;
    color: #666 !important;
    opacity: 0.8 !important;
}

/* Dark mode support for Vimeo sources */
body.dark-mode .vimeo-source {
    background: #2d2d2d !important;
    border-color: #444 !important;
}

body.dark-mode .vimeo-source:hover {
    background: #3a3a3a !important;
}

body.dark-mode .source-meta {
    color: #aaa !important;
}

body.dark-mode .play-button {
    background: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .vimeo-source:hover .play-button {
    background: rgba(102, 179, 255, 0.9) !important;
}

.referenced-badge {
    font-size: 0.8em;
    margin-left: 5px;
}

.source-group {
    margin-bottom: 15px;
}

.source-group h4 {
    margin: 10px 0 5px 0;
    font-size: 0.9em;
    color: #666;
}

body.dark-mode .source-group h4 {
    color: #b0b0b0;
}

.feedback-section {
    margin-top: 20px;
    text-align: center;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.feedback-btn {
    background: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.feedback-btn.thumbs-up:hover {
    border-color: #28a745;
    background: #d4edda;
}

.feedback-btn.thumbs-down:hover {
    border-color: #dc3545;
    background: #f8d7da;
}

body.dark-mode .feedback-btn {
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .feedback-btn:hover {
    border-color: #007bff;
    background: #2d2d2d;
}

body.dark-mode .feedback-btn.thumbs-up:hover {
    border-color: #28a745;
    background: #1e3a1e;
}

body.dark-mode .feedback-btn.thumbs-down:hover {
    border-color: #dc3545;
    background: #3a1e1e;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* AI Disclaimer styling */

/* Contact Information Styles */
.contact-section {
    margin-bottom: 8px !important;
    padding: 6px !important;
    border-left: 4px solid #007bff;
    background: #f8f9fa;
    border-radius: 4px;
}

body.dark-mode .contact-section {
    background: #2d2d2d;
    border-left-color: #6c757d;
}

.contact-section h3 {
    margin-top: 0 !important;
    margin-bottom: 3px !important;
    color: #007bff;
    font-size: 1.1em;
}

body.dark-mode .contact-section h3 {
    color: #6c757d;
}

.contact-section p {
    margin: 2px 0 !important;
    line-height: 1.2 !important;
}

.contact-section ul {
    margin: 2px 0 !important;
    padding-left: 12px !important;
}

.contact-section li {
    margin: 1px 0 !important;
    line-height: 1.1 !important;
}

.contact-section a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.contact-section a:hover {
    text-decoration: underline;
}

body.dark-mode .contact-section a {
    color: #6c757d;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 6px !important;
    margin-top: 6px !important;
}

.stat-item {
    text-align: center;
    padding: 6px !important;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

body.dark-mode .stat-item {
    background: #3a3a3a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-number {
    display: block;
    font-size: 1.4em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 2px !important;
}

body.dark-mode .stat-number {
    color: #6c757d;
}

.stat-label {
    font-size: 0.8em;
    color: #666;
    line-height: 1.1 !important;
}

body.dark-mode .stat-label {
    color: #b0b0b0;
}
 