:root {
  --bg: #b9d7f4;
  --card: #cfe4f7;
  --accent: #800000;
  --text: #011d35;
  --muted: #353f49;
}

    :root { --ink:#e8ecf1; --mutedb:#9aa7b1; --accentb:#7dd3fc; }
    .viewer-wrap { display:grid; grid-template-rows:auto auto 1fr; gap:8px; background:#0b0e1d; border:1px solid #222844; border-radius:14px; padding:8px; }
    .viewer-top { display:flex; gap:8px; align-items:center }
    .pill { font-size:12px; color:#0b0e1d; background: var(--accentb); padding: 2px 8px; border-radius:9999px; font-weight:700 }
    .stat{ font-size:12px; color: var(--mutedb) }
    .viewer-canvas { position:relative; min-height:420px }
    #viewport { display:block; width:100%; height:100%; image-rendering: pixelated; }
    #slider{ width:100% }
    .hud { position:absolute; right:10px; top:10px; width:280px; background: rgba(9,12,28,.85); border:1px solid #223; border-radius:12px; padding:10px; backdrop-filter: blur(6px); }
    .hud h3{ margin:0 0 6px 0; font-size:13px; color:#b9c6d2 }
    .bar { height:14px; background:#0e1328; border:1px solid #253056; border-radius:8px; overflow:hidden }
    .bar > div { height:100%; background: linear-gradient(90deg, #60a5fa, #7dd3fc); width:0% }
    .barrow{ display:grid; grid-template-columns: 1fr 40px; align-items:center; gap:8px; margin:6px 0 }
    .controls .row{ display:flex; gap:10px; align-items:center; }
    .controls .row > *{ flex:1 }
    .controls .divider{ height:1px; background:#1e2238; margin:12px 0 }
    .controls .toggle{ display:flex; gap:8px; align-items:center; font-size:12px; color:#b9c6d2 }
    .controls input[type="number"], .controls select { width:100%; box-sizing:border-box }
    .btn{ background:#131839; color: var(--ink); border:1px solid #2b3566; border-radius: 12px; padding:8px 10px; cursor:pointer; font-weight:600 }
    .btn.primary{ background: linear-gradient(180deg,#19204d,#12173a); border-color:#2d3a7a; }
    .controls-table { margin-top:12px }
  
* {
    box-sizing: border-box;
}


html,body {
    height:100%;
    margin:0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color:var(--text); background:var(--bg);
}


.site-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 18px;
  background:var(--card);
  border-bottom:1px solid #ffffff;
  position:sticky;
  top:0;
  z-index:10;
}


.site-header h1 {
    margin:0;
    font-size:1.1rem;
    color:var(--accent);
}


.top-nav a {
    margin-left:12px;
    color:var(--muted);
    text-decoration:none;
    font-weight:600;
}


.top-nav a:hover {
    color:var(--accent);
}


main {
    max-width:1100px;
    margin:18px auto;
    padding:0 16px;
}


.panel {
    background:var(--card);
    padding:18px;
    border-radius:8px;
    box-shadow:0 1px 0 rgba(0,0,0,0.03);
    margin-bottom:18px;
}


.play-area {
    display:flex;
    gap:16px;
    align-items:flex-start;
}
#mycanvas {
    border:1px solid #ddd;
    background:#000;
    display:block;
    max-width:100%;
    width:800px;
    height:600px
}


.controls {
    min-width:200px;
    display:flex;
    flex-direction:column;
    gap:8px;
    font-size:0.95rem;
}


.controls-table {
  width: 100%;
  max-width: 400px;
  border-collapse: collapse;
  margin: 12px 0;
  background: #aac9e4;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.95rem;
}


.controls-table th {
  background: #4f81ad;
  color: #fff;
  padding: 8px;
  text-align: center;
  font-weight: 600;
}


.controls-table td {
  border-top: 1px solid #eee;
  padding: 6px 10px;
}


.controls-table tr:nth-child(even) td {
  background: #d2e1ee;
}




.note {
    font-size:0.85rem;
    color:var(--muted);
    margin-top:8px;
}


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


.site-footer {
    text-align:center;
    padding:12px;
    color:var(--muted);
    font-size:0.9rem;
    margin-top:8px;
}
