TLC-Search/static/style.css
knight c4e9e952a5 Add pseudo-dark mode while maintaining XP aesthetic
- Create CSS variables for theme customization
- Define light and dark XP color schemes
- Dark mode uses darker backgrounds, lighter text
- Maintain classic XP beveled borders and shadows
- Add moon/sun toggle button in title bar
- Implement theme switching with localStorage
- Support system color scheme preference
- Smooth transitions between themes

The dark mode keeps the Windows XP look with:
- Dark teal/navy desktop background
- Dark gray window and button faces
- Lighter text colors
- Darker gradient title bars
- All original XP styling preserved

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 23:49:38 -05:00

441 lines
8.3 KiB
CSS

/* Custom styles for XP.css integration */
/* Theme variables - Light mode (default) */
:root {
--xp-bg-desktop: teal;
--xp-bg-window: #ece9d8;
--xp-bg-white: white;
--xp-text-primary: black;
--xp-text-secondary: #666;
--xp-border-light: white;
--xp-border-dark: #0a0a0a;
--xp-border-shadow: grey;
--xp-border-highlight: #dfdfdf;
--xp-button-face: #ece9d8;
--xp-titlebar-bg: linear-gradient(to right, #0054e3, #1591e6);
--xp-titlebar-text: white;
--xp-selection-bg: #0a246a;
--xp-selection-text: white;
--xp-field-bg: white;
--xp-field-border: #7f9db9;
}
/* Dark mode theme */
[data-theme="dark"] {
--xp-bg-desktop: #1a1a2e;
--xp-bg-window: #2d2d44;
--xp-bg-white: #1e1e2e;
--xp-text-primary: #e0e0e0;
--xp-text-secondary: #a0a0a0;
--xp-border-light: #4a4a5e;
--xp-border-dark: #0a0a0a;
--xp-border-shadow: #1a1a1a;
--xp-border-highlight: #3a3a4e;
--xp-button-face: #2d2d44;
--xp-titlebar-bg: linear-gradient(to right, #1a3a5e, #2a4a6e);
--xp-titlebar-text: #e0e0e0;
--xp-selection-bg: #2a4a7e;
--xp-selection-text: white;
--xp-field-bg: #1e1e2e;
--xp-field-border: #4a5a6e;
}
/* Apply theme variables */
body {
background: var(--xp-bg-desktop);
color: var(--xp-text-primary);
}
.window {
background: var(--xp-bg-window);
}
.window-body {
background: var(--xp-bg-window);
color: var(--xp-text-primary);
}
.title-bar {
background: var(--xp-titlebar-bg);
color: var(--xp-titlebar-text);
}
button {
background: var(--xp-button-face);
color: var(--xp-text-primary);
box-shadow: inset -1px -1px var(--xp-border-dark),
inset 1px 1px var(--xp-border-light),
inset -2px -2px var(--xp-border-shadow),
inset 2px 2px var(--xp-border-highlight);
}
button:active {
box-shadow: inset -1px -1px var(--xp-border-light),
inset 1px 1px var(--xp-border-dark),
inset -2px -2px var(--xp-border-highlight),
inset 2px 2px var(--xp-border-shadow);
}
input[type="text"],
textarea,
select {
background: var(--xp-field-bg);
color: var(--xp-text-primary);
border-color: var(--xp-field-border);
}
fieldset {
border-color: var(--xp-border-shadow) var(--xp-border-light) var(--xp-border-light) var(--xp-border-shadow);
}
.status-bar {
background: var(--xp-bg-window);
}
.status-bar-field {
color: var(--xp-text-primary);
}
/* Fix blurry text rendering - override XP.css font smoothing */
.window,
.window *,
button,
input,
select,
textarea {
-webkit-font-smoothing: none !important;
-moz-osx-font-smoothing: unset !important;
font-smooth: auto !important;
text-rendering: optimizeSpeed !important;
}
/* Use classic Windows fonts for crisp rendering */
button {
font-family: "Tahoma", "MS Sans Serif", sans-serif;
font-size: 11px;
line-height: normal;
transform: none !important;
filter: none !important;
backface-visibility: visible !important;
perspective: none !important;
}
/* Ensure all form controls use same font */
input,
select,
textarea,
label {
font-family: "Tahoma", "MS Sans Serif", sans-serif;
font-size: 11px;
}
/* Smooth theme transitions */
body,
.window,
.window-body,
button,
input,
select,
textarea,
.status-bar,
.channel-dropdown summary,
.channel-options {
transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* Channel dropdown custom styling */
.channel-dropdown {
position: relative;
display: inline-block;
}
.channel-dropdown summary {
list-style: none;
cursor: pointer;
padding: 3px 4px;
background: var(--xp-button-face);
color: var(--xp-text-primary);
border: 1px solid;
border-color: var(--xp-border-light) var(--xp-border-shadow) var(--xp-border-shadow) var(--xp-border-light);
min-width: 180px;
text-align: left;
}
.channel-dropdown summary::-webkit-details-marker {
display: none;
}
.channel-dropdown summary::after {
content: ' ▼';
font-size: 8px;
float: right;
}
.channel-dropdown[open] summary::after {
content: ' ▲';
}
.channel-options {
position: absolute;
margin-top: 2px;
padding: 4px;
background: var(--xp-bg-window);
color: var(--xp-text-primary);
border: 1px solid;
border-color: var(--xp-border-light) var(--xp-border-shadow) var(--xp-border-shadow) var(--xp-border-light);
max-height: 300px;
overflow-y: auto;
box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
z-index: 100;
min-width: 220px;
}
.channel-option {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
font-size: 11px;
}
.channel-option:last-child {
margin-bottom: 0;
}
/* Layout helpers */
.summary-row {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin-top: 12px;
}
.summary-left {
flex: 0 1 280px;
max-width: 360px;
}
.summary-right {
flex: 1 1 0%;
min-width: 300px;
}
/* Results styling */
#results .item {
border-bottom: 1px solid var(--xp-border-shadow);
padding: 12px 0;
margin-bottom: 8px;
}
#results .item:last-child {
border-bottom: none;
}
/* Badges */
.badge-row {
margin-top: 6px;
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.badge {
background: #0b6efd;
color: #fff;
border-radius: 3px;
padding: 2px 6px;
font-size: 10px;
font-weight: bold;
}
/* Transcript and highlights */
.transcript {
background: var(--xp-field-bg);
color: var(--xp-text-primary);
border: 1px solid;
border-color: var(--xp-border-shadow) var(--xp-border-light) var(--xp-border-light) var(--xp-border-shadow);
padding: 8px;
margin-top: 6px;
max-height: 200px;
overflow-y: auto;
font-size: 11px;
}
.highlight-list {
display: flex;
flex-direction: column;
gap: 6px;
max-height: none;
overflow: visible;
}
.highlight-row {
padding: 4px;
cursor: pointer;
border: 1px solid transparent;
}
.highlight-row:hover {
background: var(--xp-selection-bg);
color: var(--xp-selection-text);
border: 1px dotted var(--xp-text-primary);
}
mark {
background: yellow;
color: black;
padding: 0 2px;
}
.transcript-toggle {
margin-top: 8px;
}
.full-transcript {
margin-top: 12px;
padding: 8px;
background: var(--xp-field-bg);
color: var(--xp-text-primary);
border: 2px solid;
border-color: var(--xp-border-shadow) var(--xp-border-light) var(--xp-border-light) var(--xp-border-shadow);
max-height: 400px;
overflow-y: auto;
font-size: 11px;
}
.transcript-segment {
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid var(--xp-border-shadow);
}
.transcript-segment:last-child {
border-bottom: none;
margin-bottom: 0;
}
.transcript-segment.focused {
background: #ffffe0;
padding: 6px;
border: 2px dotted #000;
animation: pulse-highlight 1s ease-in-out;
}
@keyframes pulse-highlight {
0%, 100% {
background: #ffffe0;
}
50% {
background: #ffffa0;
}
}
.timestamp-link {
display: inline-block;
color: #0000ff;
text-decoration: none;
font-weight: bold;
font-size: 10px;
font-family: 'Courier New', monospace;
margin-right: 8px;
padding: 1px 3px;
background: #e0e0e0;
border: 1px solid #808080;
}
.timestamp-link:hover {
background: #c0c0c0;
text-decoration: underline;
}
.transcript-text {
color: var(--xp-text-primary);
line-height: 1.4;
}
.transcript-header {
font-weight: bold;
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: space-between;
background: var(--xp-titlebar-bg);
color: var(--xp-titlebar-text);
padding: 2px 4px;
}
.transcript-close {
cursor: pointer;
font-size: 16px;
padding: 0 4px;
font-weight: bold;
}
.transcript-close:hover {
background: var(--xp-selection-bg);
color: var(--xp-selection-text);
}
/* Chart styling */
#frequencyChart {
margin-top: 8px;
}
#frequencyChart svg {
max-width: 100%;
}
#frequencyChart .axis path,
#frequencyChart .axis line {
stroke: #808080;
}
#frequencyChart .axis text {
fill: var(--xp-text-primary);
font-size: 10px;
}
#frequencyChart .freq-layer rect {
stroke: #fff;
stroke-width: 0.5px;
}
.freq-legend {
margin-top: 8px;
display: flex;
flex-wrap: wrap;
gap: 8px;
font-size: 10px;
}
.freq-legend-item {
display: flex;
align-items: center;
gap: 4px;
}
.freq-legend-swatch {
width: 12px;
height: 12px;
border: 1px solid #000;
display: inline-block;
}
/* Metrics content */
#metricsContent {
font-size: 11px;
}
/* Pager */
.pager {
margin-top: 12px;
display: flex;
gap: 8px;
}
/* Loading text */
.loading-text {
font-style: italic;
color: GrayText;
}