* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: white;
}

.container {
  width: 100%;
  max-width: 1100px;
  background: #111827;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  text-align: center;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.desc {
  margin: 0 0 28px;
  color: white;
  font-size: 15px;
}

.upload-box {
  display: block;
  width: 100%;
  border: 2px dashed #8b7cf6;
  border-radius: 16px;
  padding: 28px;
  background: #f7f5ff;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.upload-box:hover {
  background: #eeeaff;
}

.upload-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 10px;
}

.upload-text {
  font-weight: bold;
  margin: 10px 0;
}

.upload-hint {
  font-size: 13px;
  color: #777;
}

input[type="file"] {
  display: none;
}

.file-info {
  margin-top: 20px;
  padding: 10px;
  background: #f3f4f6;
  border-radius: 10px;
  display: none;
}

audio {
  width: 100%;
  margin-top: 20px;
  display: none;
}

.status {
  margin-top: 15px;
  font-size: 14px;
}

.error {
  color: red;
}

.success {
  color: green;
}

/* audio visualisation */
.visualisation {
  margin-top: 32px;
  text-align: left;
}

.visualisation h2 {
  color: #cbd5e1;
  letter-spacing: 4px;
  font-size: 18px;
  margin-bottom: 18px;
}

.visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.visual-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 14px;
  height: 220px;
}

.visual-card p {
  color: white;
  margin: 0 0 10px;
  font-size: 14px;
}

canvas {
  width: 100%;
  height: 160px;
  display: block;
}

@media (max-width: 768px) {
  .visual-grid {
    grid-template-columns: 1fr;
  }
}

/* Apply filters */
.filter-section {
  margin-top: 32px;
  text-align: left;
}

.filter-section h2 {
  color: #cbd5e1;
  letter-spacing: 4px;
  font-size: 18px;
  margin-bottom: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.filter-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 18px;
  color: white;
}

.filter-card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: normal;
}

.filter-card label {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.filter-card input[type="range"] {
  width: 100%;
  margin-top: 8px;
}

.filter-card span {
  display: block;
  margin-top: 4px;
  color: #93c5fd;
  font-size: 12px;
}

.filter-card button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.filter-card button.active {
  background: #dc2626;
}

@media (max-width: 900px) {
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Apply Effects */
.effect-section {
  margin-top: 32px;
  text-align: left;
}

.effect-section h2 {
  color: #cbd5e1;
  letter-spacing: 4px;
  font-size: 18px;
  margin-bottom: 18px;
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.effect-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 18px;
  color: white;
}

.effect-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: normal;
}

.effect-card input[type="range"] {
  width: 100%;
}

.effect-card span {
  display: block;
  margin: 8px 0 12px;
  color: #93c5fd;
  font-size: 12px;
}

.effect-card button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.effect-card button.active {
  background: #dc2626;
}

@media (max-width: 1100px) {
  .effect-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .effect-grid {
    grid-template-columns: 1fr;
  }
}

/* Pitch Shift Section */
.pitch-section {
  margin-top: 32px;
  text-align: left;
}

.pitch-section h2 {
  color: #cbd5e1;
  letter-spacing: 4px;
  font-size: 18px;
  margin-bottom: 18px;
}

.pitch-grid {
  display: flex;
  justify-content: center;
}

.pitch-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 18px;
  color: white;
  width: 100%;
}

.pitch-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: normal;
}

.pitch-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pitch-control span {
  flex: none !important;
  text-align: center;
  margin: 0;
  white-space: nowrap;
}

.pitch-control button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #334155;
  color: white;
  cursor: pointer;
}

.pitch-control button:hover {
  background: #475569;
}

.pitch-card > button {
  width: 50%;
  border: none;
  border-radius: 10px;
  padding: 10px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

.pitch-card > button.active {
  background: #dc2626;
}

/* reset button */
.reset-btn {
  margin-top: 16px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  background: #22c55e;
  color: white;
  cursor: pointer;
  font-size: 15px;
}

.reset-btn:hover {
  background: #16a34a;
}

.reset-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* stop button */
.stop-btn {
  margin-top: 16px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  background: #ef4444;
  color: white;
  cursor: pointer;
  font-size: 15px;
}

.stop-btn:hover {
  background: #dc2626;
}

.stop-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* download button */
.download-btn {
  margin-top: 16px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  background: #8b5cf6;
  color: white;
  cursor: pointer;
  font-size: 15px;
}

.download-btn:hover {
  background: #7c3aed;
}

.download-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* pitch shift control */
.pitch-control {
  display: flex;
  align-items: center;
  justify-content: center
  gap: 8px;
  margin-bottom: 12px;
}

.pitch-control button {
  width: 44px;
  border: none;
  border-radius: 8px;
  padding: 8px;
  background: #334155;
  color: white;
  cursor: pointer;
}

.pitch-control button:hover {
  background: #475569;
}

.pitch-control span {
  flex: 1;
  text-align: center;
  margin: 0;
}