:root {
  --bg: #171717;
  --panel: #242424;
  --text: #f2eee7;
  --accent: #d9b66f;
  --danger: #8f3434;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #101010;
  border-bottom: 1px solid #333;
}
h1 { font-size: 1.25rem; margin: 0; }
a { color: var(--accent); }
main { max-width: 1280px; margin: 0 auto; padding: 1rem; }
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: var(--panel);
  border-radius: 0.75rem;
}
button {
  border: 0;
  border-radius: 0.45rem;
  padding: 0.55rem 0.8rem;
  color: #111;
  background: var(--accent);
  cursor: pointer;
  font-weight: 650;
}
button.danger { color: white; background: var(--danger); }
button:hover { filter: brightness(1.1); }
#status { opacity: 0.8; }
.canvasWrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #050505;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
canvas {
  display: block;
  touch-action: none;
  max-width: 100%;
  height: auto;
}
#cursorPreview {
  display: none;
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.75);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
}
.hint { opacity: 0.75; }
.player header { justify-content: center; flex-direction: column; gap: 0.2rem; }
.player main { max-width: none; padding: 0; }
.playerCanvas { min-height: calc(100vh - 78px); align-items: center; border-radius: 0; }

.layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.controls {
    width: 260px;
    min-width: 260px;

    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #222;

    border-radius: 8px;
    padding: 15px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.controls h2 {
    margin-top: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.controls label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.controls hr {
    width: 100%;
}