/* kafka — clean, minimal search engine CSS */ :root { --color-base: #f5f5f5; --color-base-font: #444; --color-base-background: #fff; --color-header-background: #f7f7f7; --color-header-border: #ddd; --color-search-border: #bbb; --color-search-focus: #3498db; --color-result-url: #1a0dab; --color-result-url-visited: #609; --color-result-content: #545454; --color-result-title: #1a0dab; --color-result-title-visited: #609; --color-result-engine: #666; --color-result-border: #eee; --color-link: #3498db; --color-link-visited: #609; --color-sidebar-background: #f7f7f7; --color-sidebar-border: #ddd; --color-infobox-background: #f9f9f9; --color-infobox-border: #ddd; --color-pagination-current: #3498db; --color-pagination-border: #ddd; --color-error: #c0392b; --color-error-background: #fdecea; --color-suggestion: #666; --color-footer: #888; --color-btn-background: #fff; --color-btn-border: #ddd; --color-btn-hover: #eee; --radius: 4px; --max-width: 800px; } @media (prefers-color-scheme: dark) { :root { --color-base: #222; --color-base-font: #dcdcdc; --color-base-background: #2b2b2b; --color-header-background: #333; --color-header-border: #444; --color-search-border: #555; --color-search-focus: #5dade2; --color-result-url: #8ab4f8; --color-result-url-visited: #b39ddb; --color-result-content: #b0b0b0; --color-result-title: #8ab4f8; --color-result-title-visited: #b39ddb; --color-result-engine: #999; --color-result-border: #3a3a3a; --color-link: #5dade2; --color-link-visited: #b39ddb; --color-sidebar-background: #333; --color-sidebar-border: #444; --color-infobox-background: #333; --color-infobox-border: #444; --color-pagination-current: #5dade2; --color-pagination-border: #444; --color-error: #e74c3c; --color-error-background: #3b1a1a; --color-suggestion: #999; --color-footer: #666; --color-btn-background: #333; --color-btn-border: #555; --color-btn-hover: #444; } } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--color-base-font); background: var(--color-base); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; } main { flex: 1; max-width: var(--max-width); width: 100%; margin: 0 auto; padding: 1rem; } footer { text-align: center; padding: 1.5rem; color: var(--color-footer); font-size: 0.85rem; } footer a { color: var(--color-link); text-decoration: none; } footer a:hover { text-decoration: underline; } /* Index / Homepage */ .index { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; } .index .title h1 { font-size: 2rem; font-weight: 300; margin-bottom: 2rem; letter-spacing: 0.05em; } /* Search form */ #search { width: 100%; max-width: 600px; margin-bottom: 2rem; } #search form { display: flex; gap: 0.5rem; } #search input[type="text"], #q { flex: 1; padding: 0.7rem 1rem; font-size: 1rem; border: 1px solid var(--color-search-border); border-radius: var(--radius); background: var(--color-base-background); color: var(--color-base-font); outline: none; transition: border-color 0.2s; } #search input[type="text"]:focus, #q:focus { border-color: var(--color-search-focus); box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15); } #search button[type="submit"] { padding: 0.7rem 1.2rem; font-size: 1rem; border: 1px solid var(--color-search-border); border-radius: var(--radius); background: var(--color-btn-background); color: var(--color-base-font); cursor: pointer; transition: background 0.2s; } #search button[type="submit"]:hover { background: var(--color-btn-hover); } /* Results page search bar (compact) */ .search_on_results #search { max-width: 100%; margin-bottom: 1rem; } /* Results area */ #results { display: flex; gap: 1.5rem; } #sidebar { flex: 0 0 200px; font-size: 0.85rem; } #sidebar p { margin-bottom: 0.5rem; } #urls { flex: 1; min-width: 0; } /* Result count */ #result_count { margin-bottom: 1rem; } /* Individual result */ .result { padding: 0.8rem 0; border-bottom: 1px solid var(--color-result-border); word-wrap: break-word; } .result:last-child { border-bottom: none; } .result_header { margin-bottom: 0.2rem; } .result_header a { font-size: 1.1rem; font-weight: 400; color: var(--color-result-title); text-decoration: none; } .result_header a:visited { color: var(--color-result-title-visited); } .result_header a:hover { text-decoration: underline; } .result_url { font-size: 0.85rem; color: var(--color-result-url); margin-bottom: 0.2rem; } .result_url a { color: var(--color-result-url); text-decoration: none; } .result_url a:visited { color: var(--color-result-url-visited); } .result_content { font-size: 0.9rem; color: var(--color-result-content); max-width: 600px; } .result_content p { margin: 0; } .result_engine { font-size: 0.75rem; color: var(--color-result-engine); margin-top: 0.3rem; } .engine { display: inline-block; padding: 0.1rem 0.4rem; background: var(--color-sidebar-background); border: 1px solid var(--color-sidebar-border); border-radius: 2px; font-size: 0.7rem; color: var(--color-result-engine); } /* No results */ .no_results { text-align: center; padding: 3rem 1rem; color: var(--color-suggestion); } /* Suggestions */ #suggestions { margin-bottom: 1rem; } .suggestion { display: inline-block; margin: 0.2rem; } .suggestion a { display: inline-block; padding: 0.3rem 0.6rem; font-size: 0.85rem; border: 1px solid var(--color-pagination-border); border-radius: var(--radius); color: var(--color-link); text-decoration: none; background: var(--color-btn-background); transition: background 0.2s; } .suggestion a:hover { background: var(--color-btn-hover); } /* Infoboxes */ #infoboxes { margin-bottom: 1rem; } .infobox { background: var(--color-infobox-background); border: 1px solid var(--color-infobox-border); border-radius: var(--radius); padding: 0.8rem; margin-bottom: 0.5rem; } .infobox .title { font-weight: 600; margin-bottom: 0.5rem; } /* Errors */ .dialog-error { background: var(--color-error-background); color: var(--color-error); border: 1px solid var(--color-error); border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 1rem; } /* Unresponsive engines */ .unresponsive_engines { font-size: 0.8rem; color: var(--color-suggestion); margin-top: 0.5rem; } .unresponsive_engines li { margin: 0.1rem 0; } /* Corrections */ .correction { font-size: 0.9rem; margin-bottom: 0.5rem; } /* Pagination */ #pagination { display: flex; align-items: center; justify-content: center; gap: 0.3rem; padding: 1.5rem 0; flex-wrap: wrap; } #pagination button, #pagination .page_number, #pagination .page_number_current { padding: 0.4rem 0.8rem; font-size: 0.9rem; border: 1px solid var(--color-pagination-border); border-radius: var(--radius); background: var(--color-btn-background); color: var(--color-base-font); cursor: pointer; text-decoration: none; transition: background 0.2s; } #pagination button:hover, #pagination .page_number:hover { background: var(--color-btn-hover); } #pagination .page_number_current { background: var(--color-pagination-current); color: #fff; border-color: var(--color-pagination-current); cursor: default; } .previous_page, .next_page { font-weight: 500; } /* Back to top */ #backToTop { text-align: center; margin: 1rem 0; } #backToTop a { color: var(--color-link); text-decoration: none; font-size: 0.85rem; } /* HTMX loading indicator */ .htmx-indicator { display: none; text-align: center; padding: 2rem; color: var(--color-suggestion); } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; } /* Autocomplete dropdown */ #search { position: relative; } #autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-base-background); border: 1px solid var(--color-search-border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); z-index: 100; max-height: 320px; overflow-y: auto; display: none; } #autocomplete-dropdown.open { display: block; } .autocomplete-suggestion { padding: 0.6rem 1rem; cursor: pointer; font-size: 0.95rem; color: var(--color-base-font); border-bottom: 1px solid var(--color-result-border); transition: background 0.15s; } .autocomplete-suggestion:last-child { border-bottom: none; } .autocomplete-suggestion:hover, .autocomplete-suggestion.active { background: var(--color-header-background); } .autocomplete-suggestion mark { background: none; color: var(--color-link); font-weight: 600; } .autocomplete-footer { padding: 0.4rem 1rem; font-size: 0.75rem; color: var(--color-suggestion); border-top: 1px solid var(--color-result-border); background: var(--color-header-background); } /* Responsive */ @media (max-width: 768px) { #results { flex-direction: column-reverse; } #sidebar { flex: none; border-top: 1px solid var(--color-sidebar-border); padding-top: 0.5rem; } .index .title h1 { font-size: 1.5rem; } main { padding: 0.5rem; } } /* Print */ @media print { footer, #pagination, #search button, #backToTop, .htmx-indicator { display: none; } body { background: #fff; color: #000; } .result a { color: #000; } } /* ============================================ Settings Panel ============================================ */ /* Header */ .site-header { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; background: var(--color-header-background); border-bottom: 1px solid var(--color-header-border); } .site-title { font-size: 1rem; font-weight: 600; color: var(--color-base-font); } /* Gear trigger button */ .settings-trigger { background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: var(--radius); color: var(--color-base-font); opacity: 0.7; transition: opacity 0.2s, background 0.2s; line-height: 1; } .settings-trigger:hover, .settings-trigger[aria-expanded="true"] { opacity: 1; background: var(--color-sidebar-background); } /* Popover panel */ .settings-popover { position: absolute; top: 100%; right: 0; width: 280px; max-height: 420px; overflow-y: auto; background: var(--color-base-background); border: 1px solid var(--color-sidebar-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); z-index: 200; display: none; flex-direction: column; } .settings-popover[data-open="true"] { display: flex; animation: settings-slide-in 0.2s ease; } @keyframes settings-slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } } .settings-popover-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-sidebar-border); font-weight: 600; font-size: 0.9rem; flex-shrink: 0; } .settings-popover-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--color-base-font); opacity: 0.6; padding: 0 0.25rem; line-height: 1; } .settings-popover-close:hover { opacity: 1; } .settings-popover-body { padding: 0.8rem; display: flex; flex-direction: column; gap: 1rem; } .settings-section-title { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-suggestion); margin-bottom: 0.5rem; } /* Theme buttons */ .theme-buttons { display: flex; gap: 0.4rem; } .theme-btn { flex: 1; padding: 0.35rem 0.5rem; border: 1px solid var(--color-sidebar-border); border-radius: var(--radius); background: var(--color-btn-background); color: var(--color-base-font); cursor: pointer; font-size: 0.75rem; text-align: center; transition: background 0.15s, border-color 0.15s; } .theme-btn:hover { background: var(--color-btn-hover); } .theme-btn.active { background: var(--color-link); color: #fff; border-color: var(--color-link); } /* Engine toggles — 2-column grid */ .engine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; } .engine-toggle { display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.5rem; border-radius: var(--radius); background: var(--color-sidebar-background); font-size: 0.78rem; cursor: pointer; } .engine-toggle input[type="checkbox"] { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--color-link); } .engine-toggle span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Search defaults */ .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; } .setting-row label { font-size: 0.85rem; flex: 1; } .setting-row select { width: 110px; padding: 0.3rem 0.4rem; font-size: 0.8rem; border: 1px solid var(--color-sidebar-border); border-radius: var(--radius); background: var(--color-base-background); color: var(--color-base-font); cursor: pointer; } /* Mid-search notice */ .settings-notice { font-size: 0.72rem; color: var(--color-suggestion); margin-top: 0.3rem; font-style: italic; } /* Dark theme via data-theme attribute */ html[data-theme="dark"] { --color-base: #222; --color-base-font: #dcdcdc; --color-base-background: #2b2b2b; --color-header-background: #333; --color-header-border: #444; --color-search-border: #555; --color-search-focus: #5dade2; --color-result-url: #8ab4f8; --color-result-url-visited: #b39ddb; --color-result-content: #b0b0b0; --color-result-title: #8ab4f8; --color-result-title-visited: #b39ddb; --color-result-engine: #999; --color-result-border: #3a3a3a; --color-link: #5dade2; --color-link-visited: #b39ddb; --color-sidebar-background: #333; --color-sidebar-border: #444; --color-infobox-background: #333; --color-infobox-border: #444; --color-pagination-current: #5dade2; --color-pagination-border: #444; --color-error: #e74c3c; --color-error-background: #3b1a1a; --color-suggestion: #999; --color-footer: #666; --color-btn-background: #333; --color-btn-border: #555; --color-btn-hover: #444; } /* Light theme via data-theme attribute - explicit reset */ html[data-theme="light"] { --color-base: #f5f5f5; --color-base-font: #444; --color-base-background: #fff; --color-header-background: #f7f7f7; --color-header-border: #ddd; --color-search-border: #bbb; --color-search-focus: #3498db; --color-result-url: #1a0dab; --color-result-url-visited: #609; --color-result-content: #545454; --color-result-title: #1a0dab; --color-result-title-visited: #609; --color-result-engine: #666; --color-result-border: #eee; --color-link: #3498db; --color-link-visited: #609; --color-sidebar-background: #f7f7f7; --color-sidebar-border: #ddd; --color-infobox-background: #f9f9f9; --color-infobox-border: #ddd; --color-pagination-current: #3498db; --color-pagination-border: #ddd; --color-error: #c0392b; --color-error-background: #fdecea; --color-suggestion: #666; --color-footer: #888; --color-btn-background: #fff; --color-btn-border: #ddd; --color-btn-hover: #eee; } /* Mobile: Bottom sheet + FAB trigger */ @media (max-width: 768px) { /* Hide desktop trigger, show FAB */ .settings-trigger-desktop { display: none; } .settings-trigger-mobile { display: block; } .settings-popover { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 70vh; border-radius: var(--radius) var(--radius) 0 0; border-bottom: none; } /* FAB: fixed bottom-right button visible only on mobile */ .settings-trigger-mobile { display: block; position: fixed; bottom: 1.5rem; right: 1.5rem; width: 48px; height: 48px; border-radius: 50%; background: var(--color-link); color: #fff; border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-size: 1.2rem; z-index: 199; opacity: 1; } } /* Video result cards */ .video-result { display: flex; gap: 1rem; align-items: flex-start; } .video-result .result_thumbnail { flex-shrink: 0; width: 180px; } .video-result .result_thumbnail img { width: 100%; height: auto; border-radius: var(--radius); } .video-result .result_content_wrapper { flex: 1; min-width: 0; }