One way speed of light

by Chantal Roth

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>One-Way Speed of Light</title>
<style>
    :root { --bg: #0d1117; --panel: #161b22; --text: #c9d1d9; --accent: #58a6ff; --green: #3fb950; --red: #ff7b72; --orange: #d29922; }
    body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Segoe UI', monospace; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
    
    /* Layout */
    #container { display: grid; grid-template-rows: 72px 1fr 240px; height: 100%; }
    
    /* Header/Controls */
    header { background: var(--panel); border-bottom: 1px solid #30363d; display: flex; align-items: center; padding: 0 20px; gap: 20px; z-index: 10; }
    h1 { font-size: 18px; margin: 0; color: #fff; margin-right: auto; }
    .control-group { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
    input[type="range"] { accent-color: var(--accent); cursor: pointer; }
    button { background: var(--green); color: #fff; border: none; padding: 8px 16px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.2s; }
    button:hover { opacity: 0.9; }
    button:disabled { background: #333; cursor: not-allowed; }

    /* Visualization Stage */
    #stage { position: relative; overflow: hidden; background: #0d1117; }
    canvas { display: block; width: 100%; height: 100%; }
    
    /* Overlays */
    #phase-indicator { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); padding: 8px 16px; border-radius: 20px; border: 1px solid #30363d; font-size: 14px; color: var(--accent); font-weight: bold; text-align: center; pointer-events: none; }
    #lab-computer { position: absolute; bottom: 20px; right: 20px; width: 280px; background: rgba(22, 27, 34, 0.95); border: 1px solid #3fb950; border-radius: 6px; padding: 15px; font-family: 'Courier New',...