/* Gravity Drops - CRT Aesthetic */

:root {
  --gd-bg: #0c0c10;
  --gd-surface: #141418;
  --gd-text: #c8d8c8;
  --gd-text-dim: #707878;
  --gd-accent: #cc66ff;
  --gd-cyan: #00ffcc;
  --gd-border: rgba(255, 255, 255, 0.15);
}

.gravity-drops-container {
  position: fixed;
  top: 48px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 48px);
  background: var(--gd-bg);
  overflow: hidden;
}

/* Subtle scanlines - lighter for canvas-heavy page */
.gravity-drops-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

.main-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.toolbar {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--gd-surface);
  border: 2px solid var(--gd-border);
  border-radius: 4px;
  z-index: 100;
}

.tool-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--gd-border);
  border-radius: 2px;
  color: var(--gd-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.tool-btn.active {
  background: rgba(204, 102, 255, 0.2);
  border-color: var(--gd-accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(204, 102, 255, 0.3);
}

.tool-btn.play-btn {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.4);
}

.tool-btn.play-btn:hover {
  background: rgba(0, 255, 136, 0.25);
}

.tool-btn.play-btn.playing {
  background: rgba(255, 51, 51, 0.15);
  border-color: rgba(255, 51, 51, 0.4);
}

.tool-btn.preview-btn.active {
  background: rgba(0, 255, 204, 0.2);
  border-color: var(--gd-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.note-selector {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--gd-surface);
  border: 2px solid var(--gd-border);
  border-radius: 4px;
  z-index: 100;
}

.size-hint {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--gd-border);
}

.size-hint span {
  color: var(--gd-text-dim);
  font-size: 9px;
  white-space: nowrap;
}

.note-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.note-btn.active {
  color: #fff;
  border-width: 2px;
  box-shadow: 0 0 12px var(--note-color, rgba(204, 102, 255, 0.5));
}

.note-btn.silent {
  width: 32px;
  background: rgba(100, 100, 100, 0.2);
  border-color: rgba(100, 100, 100, 0.4);
  color: #888;
  border-style: dashed;
}

.note-btn.silent.active {
  background: rgba(100, 100, 100, 0.4);
  color: #ccc;
  border-color: #666;
}

.controls-right {
  position: fixed;
  top: 56px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.tempo-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--gd-surface);
  border: 2px solid var(--gd-border);
  border-radius: 4px;
}

.tempo-control label {
  color: var(--gd-text-dim);
  font-size: 12px;
}

.tempo-control input {
  width: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--gd-border);
  border-radius: 2px;
  color: var(--gd-text);
  padding: 4px 8px;
  font-size: 14px;
  text-align: center;
}

.help-text {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gd-text-dim);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

/* Bar glow animation */
@keyframes barGlow {
  0% {
    filter: drop-shadow(0 0 20px var(--glow-color)) brightness(1.5);
  }
  100% {
    filter: none;
  }
}

.tool-btn.share-btn {
  background: rgba(0, 255, 204, 0.15);
  border-color: rgba(0, 255, 204, 0.4);
}

.tool-btn.share-btn:hover {
  background: rgba(0, 255, 204, 0.25);
  border-color: var(--gd-cyan);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--gd-surface);
  border: 2px solid var(--gd-border);
  border-radius: 4px;
  padding: 24px 32px;
  max-width: 400px;
  text-align: center;
}

.modal h3 {
  color: var(--gd-text);
  margin-bottom: 12px;
  font-size: 18px;
}

.modal p {
  color: var(--gd-text-dim);
  margin-bottom: 24px;
  font-size: 14px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 10px 24px;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.1s;
}

.modal-btn.cancel {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--gd-border);
  color: var(--gd-text);
}

.modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-btn.confirm {
  background: rgba(255, 51, 51, 0.2);
  border: 2px solid rgba(255, 51, 51, 0.4);
  color: #fff;
}

.modal-btn.confirm:hover {
  background: rgba(255, 51, 51, 0.3);
  border-color: #ff3333;
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.toy-top-bar {
  z-index: 200;
}

.single-drop-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--gd-border);
  padding: 8px 12px;
  font-size: 12px;
}

.single-drop-btn.active {
  background: rgba(204, 102, 255, 0.2);
  border-color: var(--gd-accent);
  box-shadow: 0 0 10px rgba(204, 102, 255, 0.3);
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--gd-surface);
  border: 2px solid var(--gd-border);
  border-radius: 4px;
}

.zoom-control label {
  color: var(--gd-text-dim);
  font-size: 12px;
}

.zoom-btn {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--gd-border);
  border-radius: 2px;
  color: var(--gd-text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--gd-cyan);
}

.zoom-val {
  color: var(--gd-text);
  font-size: 12px;
  min-width: 40px;
  text-align: center;
}

.instrument-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--gd-surface);
  border: 2px solid var(--gd-border);
  border-radius: 4px;
}

.instrument-selector label {
  color: var(--gd-text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.instrument-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 140px;
}

.instrument-btn {
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--gd-border);
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.1s;
}

.instrument-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.instrument-btn.active {
  background: rgba(204, 102, 255, 0.2);
  border-color: var(--gd-accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(204, 102, 255, 0.3);
}
