*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f0e0d;
  --accent: #e56b44;
  --text: #e8e6e1;
  --text-muted: #8b8882;
  --text-dim: #5c5a55;
}

body {
  background: radial-gradient(circle at 50% 40%, #1a1917 0%, #0f0e0d 100%);
  color: var(--text);
  font-family: "Instrument Sans", sans-serif;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  cursor: none;
  user-select: none;
  touch-action: none;
}

.lines-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.cursor {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
  transition:
    transform 0.15s ease,
    opacity 0.2s ease;
  mix-blend-mode: difference;
}

.cursor.pressing {
  transform: translate(-50%, -50%) scale(3);
  background: transparent;
  border: 1px solid var(--text-muted);
}

.header {
  position: fixed;
  top: 36px;
  left: 40px;
  z-index: 100;
}

.header-title {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-title span {
  color: var(--text);
  font-weight: bold;
}

.follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  transform: translate(-50%, -50%);
  box-shadow:
    inset -4px -4px 10px rgba(0, 0, 0, 0.3),
    inset 2px 2px 8px rgba(255, 255, 255, 0.2);
}

.controls {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 360px;
  background: rgba(20, 20, 22, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: auto;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.control-label {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 65px;
}

.control-value {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: var(--text);
  width: 28px;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  flex-grow: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(229, 107, 68, 0.5);
}

.count-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 12px;
  border-radius: 12px;
}

.count-btn {
  font-family: "Space Mono", monospace;
  font-size: 16px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.count-btn:hover {
  color: var(--text);
}

.count-input {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  width: 48px;
  text-align: center;
  padding: 4px 0;
  outline: none;
  cursor: text;
  -moz-appearance: textfield;
}

.count-input::-webkit-inner-spin-button,
.count-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.count-input:focus {
  border-color: var(--accent);
  background: rgba(229, 107, 68, 0.08);
}

.hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  color: var(--text-dim);
  pointer-events: none;
  transition: opacity 1s ease;
  text-align: center;
  line-height: 1.5;
}

.hint.hidden {
  opacity: 0;
}
