Length Contraction (How and Why)
by Chantal Roth
HTML
<!DOCTYPE html>
<html>
<head>
<style>
:root {
--bg: #0f172a;
--panel: #1e293b;
--text: #e2e8f0;
--accent: #38bdf8; /* Cyan */
--fwd: #60a5fa; /* Blue */
--bwd: #f472b6; /* Pink/Red */
--sum: #facc15; /* Yellow/Gold */
--atom: #f8fafc; /* White */
--overlay: rgba(15, 23, 42, 0.95);
--live-val: #4ade80; /* Bright Green */
--medium-unit: #a5b4fc; /* Indigo-ish for medium-frame units */
--local-unit: #fca5a5; /* Red-ish for Local Units */
}
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
overflow: auto;
padding: 20px 0;
}
.header { width: 1000px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
h2 { margin: 0; font-size: 1.2rem; color: var(--accent); }
.controls {
background: var(--panel); padding: 15px; border-radius: 8px;
display: flex; gap: 20px; align-items: center; width: 1000px;
box-sizing: border-box; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
margin-bottom: 20px;
}
.row { display: flex; align-items: center; gap: 10px; }
button {
background: var(--accent); color: var(--bg); border: none;
padding: 8px 16px; border-radius: 4px; font-weight: bold;
cursor: pointer; font-size: 0.9rem; transition: opacity 0.2s;
}
button:hover { opacity: 0.9; }
button.secondary { background: #475569; color: var(--text); }
input[type=range] { accent-color: var(--accent); cursor: pointer; }
canvas {
background: #020617; border-radius: 4px;
box-shadow: 0 10px 25px rgba(0,0,0,0.5); display: block;
}
.legend {
display: flex; gap: 25px; font-size: 0.9rem; color: #94a3b8;
...