/* Sheet Music Harmony Analyzer - Frontend Styles */
.smha-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #2D2D2D;
}

.smha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E8E3DA;
}

.smha-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.smha-logo-icon {
  font-size: 32px;
  color: #1E3A5F;
}

.smha-title {
  font-family: Georgia, 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 600;
  color: #1A1A1A;
  margin: 0;
}

.smha-subtitle {
  font-size: 13px;
  color: #6B6B6B;
  margin: 2px 0 0;
}

.smha-actions {
  display: flex;
  gap: 10px;
}

.smha-btn {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #D4D0C8;
  background: #FAFAF7;
  color: #2D2D2D;
}

.smha-btn:hover {
  background: #F0EDE6;
}

.smha-btn-primary {
  background: #1E3A5F;
  color: #fff;
  border-color: #1E3A5F;
}

.smha-btn-primary:hover {
  background: #152A45;
}

.smha-btn-outline {
  background: transparent;
}

/* Upload Section */
.smha-upload-section {
  text-align: center;
}

.smha-upload-intro h3 {
  font-family: Georgia, 'Noto Serif SC', serif;
  font-size: 20px;
  margin-bottom: 8px;
}

.smha-upload-intro p {
  color: #6B6B6B;
  margin-bottom: 24px;
}

.smha-dropzone {
  border: 2px dashed #D4D0C8;
  border-radius: 12px;
  padding: 48px 24px;
  cursor: pointer;
  transition: all 0.2s;
  background: #FAFAF7;
  margin-bottom: 32px;
}

.smha-dropzone:hover,
.smha-dropzone.dragging {
  border-color: #1E3A5F;
  background: #F5F3EE;
}

.smha-dropzone-content svg {
  color: #8B8B8B;
  margin-bottom: 12px;
}

.smha-dropzone-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.smha-dropzone-desc {
  font-size: 14px;
  color: #6B6B6B;
  margin-bottom: 4px;
}

.smha-dropzone-hint {
  font-size: 12px;
  color: #8B8B8B;
}

.smha-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.smha-feature-card {
  padding: 20px;
  border-radius: 10px;
  background: #FAFAF7;
  border: 1px solid #E8E3DA;
  text-align: center;
}

.smha-feature-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.smha-feature-card h4 {
  font-size: 15px;
  margin-bottom: 6px;
}

.smha-feature-card p {
  font-size: 13px;
  color: #6B6B6B;
  margin: 0;
}

/* Progress Section */
.smha-progress-section {
  display: flex;
  gap: 24px;
}

.smha-progress-preview {
  flex: 1;
  max-width: 400px;
}

.smha-progress-preview img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #E8E3DA;
}

.smha-progress-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.smha-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #FAFAF7;
  border: 1px solid #E8E3DA;
  transition: all 0.3s;
}

.smha-step-running {
  border-color: #1E3A5F;
  background: #F5F3EE;
}

.smha-step-completed {
  border-color: #2D6A4F;
  background: #F0F7F4;
}

.smha-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  background: #E8E3DA;
  color: #6B6B6B;
  flex-shrink: 0;
}

.smha-step-running .smha-step-icon {
  background: #1E3A5F;
  color: #fff;
  animation: smha-pulse 1.5s infinite;
}

.smha-step-completed .smha-step-icon {
  background: #2D6A4F;
  color: #fff;
}

.smha-step-name {
  font-weight: 600;
  font-size: 14px;
  display: block;
}

.smha-step-status {
  font-size: 12px;
  color: #8B8B8B;
}

.smha-step-status.analyzing {
  color: #1E3A5F;
}

.smha-step-status.done {
  color: #2D6A4F;
}

@keyframes smha-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Result Section */
.smha-result-section {
  margin-top: 0;
}

.smha-result-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

@media (max-width: 1024px) {
  .smha-result-layout {
    grid-template-columns: 1fr;
  }
}

.smha-score-panel {
  background: #FAFAF7;
  border: 1px solid #E8E3DA;
  border-radius: 10px;
  padding: 16px;
}

.smha-panel-title {
  font-family: Georgia, 'Noto Serif SC', serif;
  font-size: 16px;
  margin-bottom: 12px;
}

.smha-annotation-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.smha-toggle {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #D4D0C8;
  background: #fff;
  color: #6B6B6B;
  transition: all 0.2s;
}

.smha-toggle.active {
  background: color-mix(in srgb, var(--toggle-color) 10%, white);
  border-color: var(--toggle-color);
  color: var(--toggle-color);
  font-weight: 600;
}

.smha-canvas-container {
  overflow: auto;
  border-radius: 6px;
  border: 1px solid #E8E3DA;
  background: #fff;
  max-height: 70vh;
}

.smha-canvas-container canvas {
  display: block;
}

/* Harmony Panel */
.smha-harmony-panel {
  background: #FAFAF7;
  border: 1px solid #E8E3DA;
  border-radius: 10px;
  padding: 16px;
  max-height: 80vh;
  overflow-y: auto;
}

.smha-panel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #E8E3DA;
  padding-bottom: 8px;
}

.smha-tab {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #6B6B6B;
  transition: all 0.2s;
}

.smha-tab.active {
  background: #1E3A5F;
  color: #fff;
}

.smha-score-display {
  text-align: center;
  margin-bottom: 20px;
}

.smha-score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.smha-score-label {
  font-size: 13px;
  color: #6B6B6B;
}

.smha-info-card {
  background: #fff;
  border: 1px solid #E8E3DA;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.smha-info-card h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #1A1A1A;
}

.smha-info-card p {
  font-size: 13px;
  color: #4A4A4A;
  line-height: 1.5;
  margin: 0;
}

.smha-info-card ul {
  margin: 0;
  padding-left: 16px;
}

.smha-info-card li {
  font-size: 13px;
  color: #4A4A4A;
  margin-bottom: 4px;
}

.smha-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid #F0EDE6;
}

.smha-info-row:last-child {
  border-bottom: none;
}

.smha-info-row span:first-child {
  color: #6B6B6B;
}

.smha-info-row span:last-child {
  font-weight: 600;
  color: #1A1A1A;
}

.smha-chord-card {
  background: #fff;
  border: 1px solid #E8E3DA;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.smha-chord-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.smha-chord-name {
  font-size: 16px;
  font-weight: 700;
  color: #1E3A5F;
}

.smha-chord-type {
  font-size: 12px;
  color: #6B6B6B;
  background: #F0EDE6;
  padding: 2px 8px;
  border-radius: 4px;
}

.smha-chord-detail {
  font-size: 12px;
  color: #4A4A4A;
  margin-bottom: 4px;
}

.smha-chord-pos {
  font-size: 11px;
  color: #8B8B8B;
}

.smha-progression-card {
  background: #fff;
  border: 1px solid #E8E3DA;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.smha-prog-measures {
  font-size: 11px;
  color: #8B8B8B;
  margin-bottom: 4px;
}

.smha-prog-roman {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #8B2252;
  margin-bottom: 4px;
}

.smha-prog-func {
  font-size: 12px;
  color: #6B6B6B;
  margin-bottom: 4px;
}

.smha-prog-desc {
  font-size: 12px;
  color: #4A4A4A;
  margin: 0;
}

.smha-error-card {
  background: #fff;
  border: 1px solid #E8E3DA;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.smha-error-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.smha-severity {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.smha-error-type {
  font-size: 13px;
  font-weight: 600;
}

.smha-error-pos {
  font-size: 11px;
  color: #8B8B8B;
  margin-left: auto;
}

.smha-error-desc {
  font-size: 13px;
  color: #4A4A4A;
  margin-bottom: 6px;
}

.smha-error-fix {
  font-size: 12px;
  color: #2D6A4F;
  margin: 0;
}

.smha-no-errors {
  text-align: center;
  padding: 32px;
  color: #2D6A4F;
}

/* Error */
.smha-error {
  background: #FEF2F0;
  border: 1px solid #F5D5CE;
  border-radius: 8px;
  padding: 14px 18px;
  color: #C4521C;
  font-size: 14px;
  margin-top: 16px;
}
