Phonons vs Photons
by Chantal Roth
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Phonon ⟷ Photon Interactive</title>
<!-- ────────── Styling ────────── -->
<style>
:root {
--accent: #00d2ff;
--bg-overlay: rgba(15, 23, 36, 0.90);
--text-main: #e0e6ed;
}
body { margin: 0; overflow: hidden; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: #050505; color: var(--text-main); }
/* UI Button */
#infoButton {
position: fixed; top: 20px; left: 20px; width: 40px; height: 40px;
border: 2px solid var(--accent); border-radius: 50%; background: transparent;
color: var(--accent); font-weight: bold; font-size: 18px; cursor: pointer; z-index: 10;
transition: all 0.3s ease;
}
#infoButton:hover { background: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent); }
/* HUD (Heads Up Display) for Formulas */
#hud {
position: fixed; bottom: 20px; left: 20px;
background: var(--bg-overlay); padding: 15px 25px;
border-radius: 8px; border-left: 4px solid var(--accent);
backdrop-filter: blur(5px); pointer-events: none; user-select: none;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
transition: opacity 0.5s;
min-width: 280px;
}
#hud h3 { margin: 0 0 5px 0; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
#hud .math { font-size: 1.15rem; margin-top: 5px; }
#hud .desc { margin-top: 8px; font-size: 0.85rem; color: #ccc; line-height: 1.4; }
/* Info Panel */
#infoPanel {
position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
width: 600px; max-width: 90vw; max-height: 80vh;
background: #1a202c; color: #edf2f7;
padding: 40px; border-radius: 12px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
display: none; overflow-y: auto; z-index: 20;
border: 1px solid #2d3748;
}
#infoPanel h2 { margin-top: 0; color: var(--accent); border-bottom: 1px solid...