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

body {
  font-family: "Roboto Mono", monospace;
  background: radial-gradient(circle at top, #181818 0, #060606 55%, #000 100%);
  color: #e0e0e0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 24px 20px 40px;
}

@media (min-width: 768px) {
  .container {
    padding: 32px 32px 48px;
  }
}

.app-header {
  margin-bottom: 24px;
}

.app-title {
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app-subtitle {
  margin-top: 8px;
  font-size: 12px;
  color: #a0a0a0;
  line-height: 1.5;
  max-width: 640px;
}

.file-input-wrapper {
  background: #1a1a1a;
  border: 2px dashed #4a1a1a;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  margin-bottom: 10px;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

.file-input-wrapper:hover {
  border-color: #8a2a2a;
  background: #221010;
  transform: translateY(-1px);
}

.file-input-wrapper.drag-over {
  border-color: #c43a3a;
  background: #2a1515;
}

.btn {
  background: #3a1515;
  border: 1px solid #6a2020;
  color: #fff;
  padding: 10px 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn:hover {
  background: #5a1a1a;
  border-color: #8a2a2a;
}

#file-name {
  font-size: 12px;
  color: #c43a3a;
  margin-top: 8px;
  font-weight: 500;
}

#status {
  font-size: 12px;
  color: #999;
  text-align: left;
  margin: 12px 0 4px;
  min-height: 18px;
}

#status.active {
  color: #c43a3a;
}

.progress-container {
  background: #1a1a1a;
  height: 3px;
  margin: 4px 0 10px;
  overflow: hidden;
  border-radius: 999px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8a2020, #c43a3a);
  transition: width 0.1s linear;
}

#progress-text {
  font-size: 12px;
  color: #777;
  text-align: left;
  margin-top: 2px;
}

#spectrogram-wrapper {
  background: #000;
  border: 1px solid #3a1515;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

#metadata-header {
  background: #0a0a0a;
  border-bottom: 1px solid #3a1515;
  padding: 16px;
}

.metadata-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metadata-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metadata-file {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #aaa;
}

.metadata-file-name {
  font-weight: 500;
  color: #e0e0e0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.metadata-file-extra {
  font-size: 10px;
  color: #777;
}

.metadata-technical {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 10px;
  color: #888;
}

.metadata-item {
  display: flex;
  flex-direction: column;
}

.metadata-label {
  color: #666;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.metadata-value {
  color: #ccc;
  font-weight: 500;
}

.audio-player {
  background: #1a1a1a;
  border: 1px solid #3a1515;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
}

.play-button {
  background: #3a1515;
  border: 1px solid #6a2020;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
  font-family: inherit;
}

.play-button:hover {
  background: #5a1a1a;
  border-color: #8a2a2a;
}

.play-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.audio-progress {
  flex: 1;
  height: 4px;
  background: #2a1515;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.audio-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8a2020, #c43a3a);
  width: 0%;
  transition: width 0.1s linear;
}

.audio-time {
  font-size: 10px;
  color: #888;
  min-width: 80px;
  text-align: right;
}

.tutorial-section {
  background: #1a1a1a;
  border: 1px solid #3a1515;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
}

.tutorial-header {
  background: #2a1515;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.tutorial-header:hover {
  background: #3a1a1a;
}

.tutorial-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tutorial-toggle {
  color: #888;
  font-size: 10px;
  transition: transform 0.2s;
}

.tutorial-toggle.expanded {
  transform: rotate(180deg);
}

.tutorial-content {
  padding: 16px;
  display: none;
  font-size: 12px;
  line-height: 1.5;
  color: #ccc;
}

.tutorial-content.expanded {
  display: block;
}

.quality-indicator {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 4px;
}

.quality-high {
  background: #1a4a1a;
  color: #4a8a4a;
  border: 1px solid #2a5a2a;
}

.quality-medium {
  background: #4a3a1a;
  color: #8a7a4a;
  border: 1px solid #5a4a2a;
}

.quality-low {
  background: #4a1a1a;
  color: #8a4a4a;
  border: 1px solid #5a2a2a;
}

#spectrogram-container {
  position: relative;
  background-color: #000;
  padding: 0 60px 35px 70px;
  margin-top: 40px;
  margin-left: 10px;
  margin-right: 10px;
}

.freq-marker {
  position: absolute;
  left: 10px;
  width: 55px;
  text-align: right;
  font-size: 10px;
  color: #aaa;
  padding-right: 8px;
  font-weight: 400;
}

.freq-line {
  position: absolute;
  left: 70px;
  right: 60px;
  height: 1px;
  background: rgba(255, 60, 60, 0.12);
  pointer-events: none;
}

.db-scale {
  position: absolute;
  right: 5px;
  top: 0;
  height: 512px;
  width: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 9px;
  color: #aaa;
  padding: 5px 0;
}

#spectrogram-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  width: calc(100% - 80px);
  height: 512px;
  background: #000;
  margin-left: 40px;
}

.hidden {
  display: none;
}
