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

body {
  font-family: 'Arial', sans-serif;
  overflow: hidden;
  background: #1a1a2e;
  color: white;
}

.container {
  display: flex;
  height: 100vh;
}

.visualizer {
  flex: 1;
  background: #0f0f1e;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#canvas {
  width: 100%;
  height: 100%;
  display: none;
}

#instructions {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

#instructions h2 {
  font-size: 5em;
  margin-bottom: 20px;
}

#instructions p {
  font-size: 1.5em;
}

.sidebar {
  width: 400px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h2 {
  font-size: 1.8em;
}

.back-btn {
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.upload-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.btn-primary {
  width: 100%;
  padding: 15px 30px;
  font-size: 1.1em;
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

#file-info {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.file-name {
  font-weight: bold;
  margin-bottom: 5px;
  word-break: break-all;
}

.file-size {
  font-size: 0.9em;
  opacity: 0.8;
}

#processing-status {
  margin-top: 20px;
}

.status-text {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  width: 0%;
  transition: width 0.3s ease;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

#processed-info {
  margin-top: 20px;
  text-align: center;
}

.success-msg {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #4CAF50;
  font-weight: bold;
}

.beats-count {
  margin-bottom: 20px;
  font-size: 0.9em;
  opacity: 0.9;
}

.btn-success {
  width: 100%;
  padding: 15px 30px;
  font-size: 1.2em;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-success:active {
  transform: translateY(0);
}

.settings-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.settings-section h3 {
  margin-bottom: 20px;
  font-size: 1.3em;
}

.setting-group {
  margin-bottom: 20px;
}

.setting-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9em;
  opacity: 0.9;
}

.setting-group input[type="range"] {
  width: calc(100% - 50px);
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  cursor: pointer;
  border-radius: 50%;
}

.setting-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: white;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

.setting-group span {
  display: inline-block;
  width: 40px;
  text-align: right;
  margin-left: 10px;
  font-weight: bold;
}

.info-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  font-size: 0.85em;
  opacity: 0.8;
}

.info-section h4 {
  margin-bottom: 10px;
  font-size: 1em;
}

.info-section p {
  line-height: 1.5;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    max-height: 50vh;
  }
  
  .visualizer {
    height: 50vh;
  }
}
