html, body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #2c2c2c;
}

#toolbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10;
  box-sizing: border-box;
}

#toolbar button {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: #444;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  user-select: none;
}

#toolbar button:hover {
  background: #555;
}

#toolbar button:active {
  background: #333;
  transform: scale(0.95);
}

#move-counter {
  color: #fff;
  font-size: 15px;
  user-select: none;
}

#current-notation {
  font-family: 'SF Mono', Consolas, monospace;
  color: #4fc3f7;
  font-size: 14px;
  padding: 4px 10px;
  background: #1a2a3a;
  border-radius: 4px;
  min-width: 50px;
  text-align: center;
  margin-left: auto;
}

#btn-undo,
#btn-redo {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #444;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  user-select: none;
}

#btn-undo:hover,
#btn-redo:hover {
  background: #555;
}

#btn-undo:active,
#btn-redo:active {
  background: #333;
  transform: scale(0.95);
}

#btn-undo:disabled,
#btn-redo:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

#app-layout {
  display: flex;
  height: calc(100vh - 52px);
  margin-top: 52px;
}

#scene-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#celebration {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.celebration-content {
  animation: celebrationAnim 3s ease-out forwards;
}

.celebration-text {
  font-size: 64px;
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 215, 0, 0.6),
    0 0 80px rgba(255, 215, 0, 0.4);
  letter-spacing: 8px;
}

@keyframes celebrationAnim {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  15% {
    opacity: 1;
    transform: scale(1.2);
  }
  30% {
    transform: scale(1);
  }
  70% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}
