Vibrating Diamond Structure

by Chantal Roth

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Diamond Lattice</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
  :root{ --bg1:#0b0f17; --bg2:#121a26; --panel:#0e1522cc; --accent:#7bdff6; --accent2:#f6ae2d; --text:#e8f0ff; }
  html,body{height:100%; margin:0; overflow:hidden; background: radial-gradient(1200px 800px at 20% -10%, #1b2a41 0%, #0b0f17 55%, #05070c 100%);}
#container3d{ position:fixed; inset:0; z-index:0; }

  /* ===== Compact one-line UI (unchanged layout) ===== */
  #ui{
    position: fixed; top: 18px; left: 18px; width: 360px; color: var(--text);
    font: 14px/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,sans-serif;
    background: linear-gradient(180deg,#0f1a2acc,#0a1220cc);
    z-index:10;
    border: 1px solid #25344ccc; border-radius: 16px; backdrop-filter: blur(8px);
    box-shadow: 0 10px 40px rgba(0,0,0,.35); padding: 12px 12px 10px 12px;
  }
  .title{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
  .dot{ width:10px; height:10px; border-radius:50%; background: radial-gradient(circle at 35% 35%, var(--accent), #57c3e2 60%, #2a8fb1 100%); box-shadow: 0 0 10px #7bdff677, 0 0 24px #7bdff644; }
  .title h1{font-size:16px; margin:0; letter-spacing:.4px}
  .subtitle{opacity:.75; font-size:12px; margin:0 0 6px 20px}
  .row{ display:grid; grid-template-columns: 1fr 170px 56px; gap:8px; align-items:center; margin:6px 0; }
  label{opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  select, input[type="range"], input[type="checkbox"]{ accent-color: var(--accent); font:inherit; }
  select, .pill{ background:#0b1320; color:var(--text); border:1px solid #23344c; padding:6px 8px; border-radius:10px; width:100%; }
  input[type="range"]{ width:100%; }
  .pill{ display:inline-flex; gap:8px; align-items:center; justify-content:flex-start }
  .pill span{ opacity:.8 }
  .value{ min-width:56px;...