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

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: #0f0f1a;
  color: #fff;
  overflow-x: hidden;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #e94560, #7b2cbf);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: #e94560;
  box-shadow: 0 0 15px rgba(233, 69, 96, 0.3);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Transport controls */
.transport-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.transport-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.transport-btn-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e94560, #7b2cbf);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-btn-main:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(233, 69, 96, 0.6);
}

.transport-btn-main:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Waveform container */
.waveform-container {
  background: #0f0f1a;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.waveform-container.drag-over {
  border-color: #e94560;
  background: rgba(233, 69, 96, 0.1);
  box-shadow: 0 0 30px rgba(233, 69, 96, 0.3);
}

.waveform-container:not(.empty) {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.1);
}

.waveform-scroll {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.waveform-canvas {
  display: block;
  cursor: crosshair;
}

.waveform-canvas:hover {
  filter: brightness(1.1);
}

.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Region items */
.region-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.region-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.region-color {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e94560, #7b2cbf);
}

/* Berry bounce animation */
.berry-bounce {
  animation: berryBounce 0.5s ease infinite;
}

@keyframes berryBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Snip effect */
.snip-effect {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  animation: snip 0.6s ease-out forwards;
  z-index: 1000;
  pointer-events: none;
}

@keyframes snip {
  0% { transform: translate(-50%, -50%) scale(0.5) rotate(-20deg); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.5) rotate(20deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2) rotate(0deg); opacity: 0; }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(233, 69, 96, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e94560;
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  height: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e94560;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .waveform-container {
    min-height: 180px;
  }
  
  .transport-btn {
    width: 40px;
    height: 40px;
  }
  
  .transport-btn-main {
    width: 52px;
    height: 52px;
  }
}