* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #1a1410;
  color: #e8d9c4;
}

.header {
  border-bottom: 2px solid #5a3a1a;
  line-height: 0;
}

.hero-banner {
  width: 100%;
  display: block;
  max-height: 300px;
  object-fit: contain;
  background: #000;
}

.header-text {
  line-height: normal;
  padding: 16px 20px 12px;
  background: linear-gradient(180deg, #2b1d12, #1a1410);
  text-align: center;
}

.header-text h1 {
  margin: 0;
  font-size: 2.2em;
  letter-spacing: 2px;
  color: #e8a33d;
  text-shadow: 0 0 12px rgba(232,163,61,0.4);
}

.tagline {
  color: #b89a6f;
  font-size: 0.95em;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .hero-banner {
    max-height: 160px;
  }

  .header-text h1 {
    font-size: 1.4em;
    letter-spacing: 1px;
  }
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.sidebar, .rightbar {
  flex: 1;
  min-width: 220px;
  background: #241b12;
  border: 1px solid #4a3520;
  border-radius: 8px;
  padding: 16px;
}

.player-panel {
  flex: 2;
  min-width: 320px;
  background: #241b12;
  border: 1px solid #4a3520;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.sidebar h3, .rightbar h3 {
  color: #e8a33d;
  border-bottom: 1px solid #4a3520;
  padding-bottom: 8px;
  margin-top: 0;
}

.station {
  padding: 10px 12px;
  margin: 6px 0;
  background: #2f2316;
  border: 1px solid #4a3520;
  border-radius: 6px;
  color: #e8d9c4;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.station:hover {
  background: #4a3520;
  transform: translateX(2px);
}

.station.active {
  background: #5a3a1a;
  border-left: 3px solid #e8a33d;
  color: #e8a33d;
}

/* Form elements */
label {
  display: block;
  color: #e8a33d;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 14px 0 6px;
}

input[type=text],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  background: #1a1410;
  border: 1px solid #4a3520;
  border-radius: 6px;
  color: #e8d9c4;
  font-size: 0.95em;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 4px;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.5;
}

input[type=text]:focus,
textarea:focus,
select:focus {
  border-color: #e8a33d;
}

select option {
  background: #1a1410;
}

code {
  display: inline-block;
  background: #111009;
  border: 1px solid #3a2a18;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.82em;
  color: #e8a33d;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Submit page */
.submit-container {
  max-width: 520px;
  margin: 0 auto;
}

.submit-panel {
  text-align: left !important;
}

.submit-instructions {
  color: #c8b090;
  font-size: 0.88em;
  line-height: 1.7;
  margin: 0 0 8px;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 11px 16px;
  margin: 12px 0 4px;
  background: #2f2316;
  border: 1px solid #6a4a28;
  border-radius: 6px;
  color: #e8d9c4;
  font-size: 0.95em;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.action-btn:hover:not(:disabled) {
  background: #4a3520;
  border-color: #e8a33d;
  color: #e8a33d;
}

.action-btn-primary {
  border-color: #e8a33d;
  color: #e8a33d;
  font-weight: bold;
}

.action-btn-primary:hover:not(:disabled) {
  background: #5a3a1a;
}

.preview-box {
  margin: 12px 0;
  padding: 14px;
  background: #111009;
  border: 1px solid #3a2a18;
  border-radius: 6px;
}

.preview-art {
  width: 100%;
  max-width: 160px;
  border-radius: 6px;
  margin-bottom: 10px;
  display: block;
}

.preview-title {
  font-weight: bold;
  font-size: 1.05em;
  color: #e8a33d;
  margin-bottom: 4px;
}

.preview-artist {
  color: #c8b090;
  font-size: 0.9em;
  margin-bottom: 4px;
}

.preview-meta {
  color: #8a6a48;
  font-size: 0.82em;
}

.status-text {
  color: #c8b090;
  font-size: 0.85em;
  min-height: 20px;
  margin: 4px 0;
}

.status-msg {
  margin-top: 14px;
  font-size: 0.9em;
  color: #e8a33d;
  min-height: 20px;
}

.meta-generator {
  margin: 4px 0 16px;
  border: 1px solid #4a3520;
  border-radius: 6px;
  overflow: hidden;
}

.meta-generator summary {
  padding: 10px 14px;
  background: #2f2316;
  color: #e8a33d;
  font-size: 0.88em;
  font-weight: bold;
  letter-spacing: 0.5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.meta-generator summary:hover { background: #4a3520; }
.meta-generator[open] summary { border-bottom: 1px solid #4a3520; }

.meta-fields {
  padding: 4px 14px 14px;
  background: #1e1510;
}

.how-to-steps {
  padding-top: 10px;
}

.how-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 0.88em;
  line-height: 1.65;
  color: #c8b090;
}

.how-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3a2510;
  border: 1px solid #e8a33d;
  color: #e8a33d;
  font-weight: bold;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.how-step strong {
  color: #e8d9c4;
}

.drop-zone {
  border: 2px dashed #4a3520;
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  background: #1e1510;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin: 12px 0;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #e8a33d;
  background: #251a0e;
}

.drop-icon {
  font-size: 2.4em;
  color: #5a3a1a;
  margin-bottom: 8px;
}

.drop-label {
  color: #c8b090;
  font-size: 0.95em;
  margin-bottom: 8px;
}

.progress-wrap {
  width: 100%;
  height: 8px;
  background: #2f2316;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #4a3520;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e8a33d, #c87820);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.norm-info-box {
  background: #111009;
  border: 1px solid #3a2a18;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 12px 0;
}

.norm-result {
  border-color: #4a3520;
  background: #1a1410;
}

.norm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #2a1e10;
  font-size: 0.85em;
}

.norm-row:last-child { border-bottom: none; }

.norm-label { color: #6a5238; text-transform: uppercase; font-size: 0.78em; letter-spacing: 0.5px; }

.norm-val { color: #c8b090; text-align: right; }

.file-pick-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.file-pick-row input[type=text] {
  flex: 1;
  margin-bottom: 0;
}

.file-pick-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.how-note {
  margin-top: 6px;
  padding: 10px 12px;
  background: #111009;
  border: 1px solid #3a2a18;
  border-radius: 6px;
  font-size: 0.82em;
  color: #8a6a48;
  line-height: 1.5;
}

.art-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
}

#art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111009;
  border-radius: 8px;
  border: 2px solid #5a3a1a;
}

.art-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 16, 9, 0.88);
  border-radius: 8px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #3a2510;
  border-top-color: #e8a33d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.now-playing-label {
  font-size: 0.75em;
  color: #e8a33d;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.song {
  font-size: 1.3em;
  font-weight: bold;
  color: #e8d9c4;
}

.artist {
  color: #b89a6f;
  margin-bottom: 16px;
}

audio {
  width: 100%;
  margin-top: 10px;
}

.stat-box {
  margin-bottom: 18px;
}

.stat-title {
  color: #b89a6f;
  font-size: 0.85em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

#listeners {
  font-size: 1.8em;
  color: #e8a33d;
  font-weight: bold;
}

.recent-song {
  padding: 6px 0;
  color: #d8c4a4;
  font-size: 0.9em;
  border-bottom: 1px solid #3a2a18;
}

.player-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.skip-btn,
.like-btn {
  flex: 1;
  padding: 8px 16px;
  background: #2f2316;
  border: 1px solid #4a3520;
  border-radius: 6px;
  color: #e8d9c4;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.skip-btn:hover,
.like-btn:hover {
  background: #4a3520;
}

.like-btn.liked {
  color: #e8a33d;
  border-color: #e8a33d;
}

.submit-link {
  display: block;
  margin-top: 16px;
  padding: 8px 12px;
  color: #b89a6f;
  font-size: 0.85em;
  text-decoration: none;
  border: 1px dashed #4a3520;
  border-radius: 6px;
  text-align: center;
  transition: color 0.2s, border-color 0.2s;
}

.submit-link:hover {
  color: #e8a33d;
  border-color: #e8a33d;
}

.footer {
  text-align: center;
  padding: 20px;
  color: #6a5238;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .header {
    padding: 20px 16px 10px;
  }

  .header h1 {
    font-size: 1.4em;
    letter-spacing: 1px;
  }

  .tagline {
    font-size: 0.85em;
  }

  .container {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .sidebar, .rightbar, .player-panel {
    min-width: unset;
    width: 100%;
  }

  .station {
    padding: 14px 12px;
    font-size: 1em;
  }

  .art-wrapper {
    width: 160px;
    height: 160px;
  }

  .submit-link {
    padding: 12px;
    font-size: 0.9em;
  }
}
