BareGit

model-switcher: implement retro sci-fi CRT terminal styling

Author: MetroWind <chris.corsair@gmail.com>
Date: Tue Jan 6 22:10:58 2026 -0800
Commit: 9c543b05c329a2b0e70e2b42ac4ca3781558d4fe

Changes

diff --git a/model-switcher/static/style.css b/model-switcher/static/style.css
index 0387917..9b5307f 100644
--- a/model-switcher/static/style.css
+++ b/model-switcher/static/style.css
@@ -1,67 +1,149 @@
 :root {
-    --bg-color: #f4f7f6;
-    --card-bg: #ffffff;
-    --text-color: #333;
-    --primary-color: #2563eb;
-    --primary-hover: #1d4ed8;
-    --secondary-color: #64748b;
-    --success-color: #10b981;
-    --error-color: #ef4444;
-    --info-color: #3b82f6;
-    --border-color: #e2e8f0;
-    --log-bg: #1e293b;
-    --log-text: #e2e8f0;
+    --bg-color: #051005; /* Very dark green background */
+    --card-bg: #0a150a;
+    --text-color: #33ff33; /* Classic Terminal Green */
+    --primary-color: #33ff33;
+    --primary-hover: #22cc22;
+    --secondary-color: #446644;
+    --success-color: #33ff33;
+    --error-color: #ff3333;
+    --info-color: #33ffff;
+    --border-color: #33ff33;
+    --log-bg: #000500;
+    --log-text: #33ff33;
+    --glow: 0 0 10px rgba(51, 255, 51, 0.7);
 }
 
 body {
-    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
+    font-family: monospace; /* Respect browser settings */
     background-color: var(--bg-color);
     color: var(--text-color);
     margin: 0;
     display: flex;
     justify-content: center;
     padding: 2rem 1rem;
+    min-height: 100vh;
+    overflow-x: hidden;
+    text-shadow: 0 0 4px rgba(51, 255, 51, 0.5); /* Phosphor Glow */
+    position: relative;
+}
+
+/* CRT Scanlines Overlay */
+body::before {
+    content: " ";
+    display: block;
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    background: linear-gradient(
+        to bottom,
+        rgba(18, 16, 16, 0) 50%,
+        rgba(0, 0, 0, 0.25) 50%
+    );
+    background-size: 100% 4px;
+    z-index: 999;
+    pointer-events: none;
+    animation: scanline 10s linear infinite;
+}
+
+/* CRT Vignette */
+body::after {
+    content: " ";
+    display: block;
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.7) 100%);
+    z-index: 999;
+    pointer-events: none;
+}
+
+@keyframes scanline {
+    0% { background-position: 0 0; }
+    100% { background-position: 0 100%; }
+}
+
+/* Subtle Flicker */
+@keyframes flicker {
+    0% { opacity: 0.97; }
+    5% { opacity: 0.95; }
+    10% { opacity: 0.9; }
+    15% { opacity: 0.95; }
+    20% { opacity: 0.99; }
+    25% { opacity: 0.95; }
+    30% { opacity: 0.9; }
+    35% { opacity: 0.96; }
+    40% { opacity: 0.98; }
+    45% { opacity: 0.95; }
+    50% { opacity: 0.99; }
+    55% { opacity: 0.93; }
+    60% { opacity: 0.9; }
+    65% { opacity: 0.96; }
+    70% { opacity: 1; }
+    75% { opacity: 0.97; }
+    80% { opacity: 0.95; }
+    85% { opacity: 0.92; }
+    90% { opacity: 0.98; }
+    95% { opacity: 0.99; }
+    100% { opacity: 0.94; }
 }
 
 .container {
     width: 100%;
-    max-width: 600px;
+    max-width: 700px;
     background: var(--card-bg);
     padding: 2rem;
-    border-radius: 12px;
-    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
+    border: 2px solid var(--border-color);
+    border-radius: 4px;
+    box-shadow: var(--glow), inset 0 0 20px rgba(51, 255, 51, 0.2);
+    position: relative;
+    z-index: 10;
+    animation: flicker 0.15s infinite;
 }
 
 header {
-    border-bottom: 1px solid var(--border-color);
+    border-bottom: 2px dashed var(--border-color);
     margin-bottom: 1.5rem;
     padding-bottom: 1rem;
 }
 
 h1 {
     margin: 0;
-    font-size: 1.5rem;
+    font-size: 1.8rem;
     color: var(--primary-color);
+    text-transform: uppercase;
+    letter-spacing: 2px;
+    text-shadow: 0 0 10px var(--primary-color);
 }
 
 code {
-    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
-    background: #f1f5f9;
+    font-family: inherit;
+    background: transparent;
+    border: 1px solid var(--border-color);
     padding: 0.2rem 0.4rem;
-    border-radius: 4px;
-    font-size: 0.9em;
+    color: var(--info-color);
 }
 
 .status {
     margin-top: 0.5rem;
     font-size: 0.9rem;
-    color: var(--secondary-color);
+    color: var(--primary-color);
+    opacity: 0.8;
+}
+
+.status strong {
+    color: var(--info-color);
+    text-shadow: 0 0 5px var(--info-color);
 }
 
 .model-list {
     display: flex;
     flex-direction: column;
-    gap: 0.75rem;
+    gap: 1rem;
     margin-bottom: 1.5rem;
 }
 
@@ -69,8 +151,9 @@ code {
     display: flex;
     align-items: center;
     padding: 1rem;
-    border: 2px solid var(--border-color);
-    border-radius: 8px;
+    border: 1px solid var(--secondary-color);
+    background-color: rgba(0,0,0,0.5);
+    border-radius: 0;
     cursor: pointer;
     transition: all 0.2s;
     position: relative;
@@ -78,36 +161,39 @@ code {
 
 .model-item:hover {
     border-color: var(--primary-color);
-    background-color: #eff6ff;
+    box-shadow: inset 0 0 10px rgba(51, 255, 51, 0.3);
 }
 
 .model-item.selected {
     border-color: var(--primary-color);
-    background-color: #eff6ff;
+    background-color: rgba(51, 255, 51, 0.1);
+    box-shadow: 0 0 10px rgba(51, 255, 51, 0.4);
 }
 
 .model-item.active {
-    background-color: #f0fdf4;
-    border-color: var(--success-color);
+    border: 2px solid var(--primary-color);
 }
 
 .model-item input {
     margin-right: 1rem;
+    accent-color: var(--primary-color);
 }
 
 .model-name {
-    font-weight: 500;
+    font-weight: bold;
     flex-grow: 1;
+    letter-spacing: 1px;
 }
 
 .badge {
-    background-color: var(--success-color);
-    color: white;
+    background-color: var(--primary-color);
+    color: black;
     font-size: 0.7rem;
     padding: 2px 8px;
-    border-radius: 12px;
+    border-radius: 0;
     text-transform: uppercase;
     font-weight: bold;
+    box-shadow: 0 0 5px var(--primary-color);
 }
 
 .actions {
@@ -118,64 +204,78 @@ code {
 
 button {
     flex: 1;
-    padding: 0.75rem;
-    border: none;
-    border-radius: 6px;
-    font-weight: 600;
+    padding: 1rem;
+    border: 2px solid var(--primary-color);
+    background: transparent;
+    color: var(--primary-color);
+    border-radius: 0;
+    font-weight: bold;
+    font-family: inherit;
+    text-transform: uppercase;
     cursor: pointer;
-    transition: background-color 0.2s;
+    transition: all 0.2s;
+    box-shadow: 0 0 5px rgba(51, 255, 51, 0.2);
 }
 
-button:not(.secondary) {
+button:not(.secondary):hover:not(:disabled) {
     background-color: var(--primary-color);
-    color: white;
+    color: black;
+    box-shadow: 0 0 15px var(--primary-color);
 }
 
-button:not(.secondary):hover:not(:disabled) {
-    background-color: var(--primary-hover);
+button.secondary {
+    border-color: var(--secondary-color);
+    color: var(--secondary-color);
 }
 
-button.secondary {
-    background-color: var(--secondary-color);
-    color: white;
+button.secondary:hover {
+    border-color: var(--text-color);
+    color: var(--text-color);
+    box-shadow: 0 0 10px var(--text-color);
 }
 
 button:disabled {
-    opacity: 0.5;
+    opacity: 0.3;
     cursor: not-allowed;
+    border-color: #555;
+    color: #555;
+    box-shadow: none;
 }
 
 .message {
     margin-top: 1.5rem;
     padding: 1rem;
-    border-radius: 6px;
+    border: 1px solid currentColor;
+    border-radius: 0;
     font-size: 0.9rem;
+    background: rgba(0,0,0,0.8);
 }
 
-.message.info { background-color: #dbeafe; color: #1e40af; }
-.message.success { background-color: #dcfce7; color: #166534; }
-.message.error { background-color: #fee2e2; color: #991b1b; }
+.message.info { border-color: var(--info-color); color: var(--info-color); box-shadow: 0 0 8px var(--info-color); }
+.message.success { border-color: var(--primary-color); color: var(--primary-color); box-shadow: 0 0 8px var(--primary-color); }
+.message.error { border-color: var(--error-color); color: var(--error-color); box-shadow: 0 0 8px var(--error-color); }
 
 @keyframes spin {
     to { transform: rotate(360deg); }
 }
 
 .loading::after {
-    content: "";
-    display: inline-block;
-    width: 12px;
-    height: 12px;
-    border: 2px solid rgba(255,255,255,0.3);
-    border-radius: 50%;
-    border-top-color: #fff;
-    animation: spin 1s linear infinite;
-    margin-left: 8px;
+    content: " [PROCESSING]";
+    animation: blink 1s steps(2, start) infinite;
+    display: inline;
+    border: none;
+    width: auto;
+    height: auto;
+}
+
+@keyframes blink {
+    to { visibility: hidden; }
 }
 
 /* Log Viewer Styles */
 .log-section {
     margin-top: 2rem;
-    border-top: 1px solid var(--border-color);
+    border-top: 2px dashed var(--border-color);
     padding-top: 1rem;
 }
 
@@ -183,45 +283,55 @@ button:disabled {
     display: flex;
     justify-content: space-between;
     align-items: center;
-    margin-bottom: 0.5rem;
+    margin-bottom: 1.5rem; /* Increased margin */
+    gap: 2rem; /* Added gap between title and button */
 }
 
 .log-header h2 {
     font-size: 1.2rem;
     color: var(--text-color);
     margin: 0;
+    text-transform: uppercase;
+    white-space: nowrap; /* Keep heading on one line */
 }
 
 .log-viewer {
     background-color: var(--log-bg);
     color: var(--log-text);
     padding: 1rem;
-    border-radius: 8px;
-    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
-    font-size: 0.85rem;
+    border: 1px solid var(--border-color);
+    border-radius: 0;
+    font-family: inherit;
+    font-size: 0.8rem;
     height: 300px;
     overflow-y: auto;
     white-space: pre-wrap;
     word-break: break-all;
     display: flex;
-    flex-direction: column-reverse; /* Since we get logs reverse (newest first), but typically logs are read top-to-bottom or bottom-to-top. 
-                                      The user said "newest line first". So top of the container should be newest.
-                                      Wait, if I get a list ["newest", "2nd newest", ...], simply rendering them in order will put newest at top.
-                                      So column-reverse might NOT be needed if I just render them in the order I receive them.
-                                      Actually, usually log viewers put newest at the bottom and auto-scroll. 
-                                      But the user specifically requested "newest line first".
-                                      This implies:
-                                      Line 1: (Newest)
-                                      Line 2: (Older)
-                                      ...
-                                      So I should render them in the order I receive them (since journalctl -r gives newest first).
-                                   */
-    flex-direction: column; 
+    flex-direction: column;
+    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
+}
+
+/* Custom Scrollbar */
+.log-viewer::-webkit-scrollbar {
+    width: 10px;
+    background: #111;
+}
+
+.log-viewer::-webkit-scrollbar-thumb {
+    background: var(--primary-color);
+    border: 1px solid #000;
 }
 
 .log-entry {
-    padding: 2px 0;
-    border-bottom: 1px solid rgba(255,255,255,0.1);
+    padding: 4px 0; /* Slightly more padding */
+    border-bottom: 1px solid rgba(51, 255, 51, 0.1);
+    opacity: 0.8;
+}
+
+.log-entry:hover {
+    opacity: 1;
+    background: rgba(51, 255, 51, 0.1);
 }
 
 .log-entry:last-child {