:root{
  --bg:#06152b;
  --panel:#0c2342;
  --panel2:#102f59;
  --text:#eef7ff;
  --muted:#a9c3dd;
  --blue:#31a8ff;
  --gold:#ffe26a;
  --line:rgba(255,255,255,.16);
  --shadow:0 18px 55px rgba(0,0,0,.32);
}

*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(49,168,255,.22), transparent 32%),
    radial-gradient(circle at 80% 5%, rgba(255,226,106,.16), transparent 30%),
    linear-gradient(180deg,#041126,#06152b 50%,#020814);
  color:var(--text);
  font:16px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.app{
  max-width:1040px;
  margin:0 auto;
  padding:22px;
}

.hero{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  padding:26px 0 14px;
}

.eyebrow{
  margin:0 0 6px;
  color:var(--gold);
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

h1{
  margin:0;
  font-size:clamp(2.3rem,6vw,4.8rem);
  line-height:1;
}

h2{
  margin:0 0 14px;
  color:var(--gold);
}

.subhead{
  max-width:68ch;
  color:var(--muted);
  font-size:1.1rem;
}

.status{
  border:1px solid var(--line);
  background:rgba(255,255,255,.08);
  border-radius:999px;
  padding:10px 14px;
  color:var(--gold);
  font-weight:800;
  white-space:nowrap;
}

.panel{
  margin:18px 0;
  padding:18px;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.04));
  box-shadow:var(--shadow);
  backdrop-filter:blur(8px);
}

.preset-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
}

@media (min-width:720px){
  .preset-grid{grid-template-columns:repeat(5,1fr);}
}

button{
  cursor:pointer;
  border:1px solid var(--line);
  border-radius:16px;
  background:#0b1f3d;
  color:var(--text);
  padding:12px;
  font-weight:900;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}

button span{
  color:var(--muted);
  font-weight:700;
  font-size:.86rem;
}

button:hover,
button.active{
  border-color:rgba(49,168,255,.85);
  box-shadow:0 0 0 3px rgba(49,168,255,.15), 0 12px 25px rgba(0,0,0,.28);
}

button.primary{
  background:linear-gradient(180deg,#31a8ff,#1269d3);
  border-color:transparent;
}

.button-row{
  display:flex;
  gap:10px;
  margin-top:14px;
}

.field{
  display:block;
  margin-top:14px;
}

.field span{
  display:block;
  color:var(--muted);
  font-weight:800;
  margin-bottom:6px;
}

input[type="number"],
input[type="range"]{
  width:100%;
}

input[type="number"]{
  border:1px solid var(--line);
  border-radius:14px;
  background:#071a33;
  color:var(--text);
  padding:12px;
  font-size:1.1rem;
}

canvas{
  width:100%;
  height:auto;
  display:block;
  border-radius:18px;
  background:#020814;
  border:1px solid var(--line);
}

.light-panel{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.light-stage{
  display:grid;
  place-items:center;
}

.light-box{
  width:min(360px,80vw);
  aspect-ratio:1/1;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.28);
  background:rgb(255,90,40);
  box-shadow:
    0 0 45px rgba(255,90,40,.55),
    inset 0 0 35px rgba(255,255,255,.18);
  transition:background .35s ease, box-shadow .35s ease, filter .25s ease;
}

.readout{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

@media (min-width:720px){
  .readout{grid-template-columns:repeat(4,1fr);}
}

.readout div{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(0,0,0,.18);
}

.readout span{
  display:block;
  color:var(--muted);
  font-size:.86rem;
  font-weight:800;
}

.readout strong{
  display:block;
  margin-top:3px;
  color:var(--text);
}

.toggle{
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-weight:800;
}

.small{
  color:var(--muted);
  font-size:.92rem;
}

.warning{
  color:#ffd88a;
}

footer{
  padding:24px 0 8px;
  text-align:center;
  color:var(--muted);
}
