/* Scales Page Styles */
.scales-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  margin: 2em 0 2em 0;
}

.scales-controls label {
  color: #c0a0a0;
  font-weight: bold;
  margin-right: 0.5em;
}

.scales-controls select {
  background: #1a1a1a;
  color: #c0a0a0;
  border: 2px solid #7a5a5a;
  padding: 0.5em 1em;
  font-size: 1rem;
  border-radius: 0;
}

.fretboard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #181818;
  border: 2px solid #5a3a3a;
  border-radius: 8px;
  padding: 1em 1.5em 1em 1em;
  margin: 0 auto 2em auto;
  max-width: 100vw;
  overflow-x: auto;
}

.string-row {
  display: flex;
  margin-bottom: 2px;
}

.fret {
  display: inline-block;
  width: 38px;
  height: 32px;
  margin-right: 2px;
  background: #222;
  color: #b0b0b0;
  border: 1px solid #444;
  border-radius: 4px;
  text-align: center;
  line-height: 32px;
  font-size: 1rem;
  position: relative;
  transition: background 0.2s, color 0.2s;
}

.fret.scale {
  background: #6a4a4a;
  color: #fff;
  font-weight: bold;
}

.fret.root {
  background: #d0a0a0;
  color: #181818;
  font-weight: bold;
  border: 2px solid #fff;
}

.fret-labels {
  display: flex;
  margin-top: 0.5em;
  margin-left: 38px;
}

.fret-label {
  display: inline-block;
  width: 38px;
  text-align: center;
  color: #9a7a7a;
  font-size: 0.95rem;
}

/* Fretboard Table Layout */
.fretboard-table {
  border-collapse: separate;
  border-spacing: 2px;
  margin: 0 auto 2em auto;
  background: #181818;
  border: 2px solid #5a3a3a;
  border-radius: 8px;
  font-family: monospace;
}
.fretboard-table th, .fretboard-table td {
  text-align: center;
  min-width: 32px;
  height: 32px;
  padding: 0;
}
.fretboard-table .string-label {
  color: #9a7a7a;
  font-weight: bold;
  background: #222;
  border-right: 2px solid #5a3a3a;
}
.fretboard-table .fret-label {
  color: #9a7a7a;
  font-size: 0.95rem;
  background: #222;
}
.fretboard-table .fret {
  background: #222;
  color: #b0b0b0;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.fretboard-table .fret.scale {
  background: #6a4a4a;
  color: #fff;
  font-weight: bold;
}
.fretboard-table .fret.root {
  background: #d0a0a0;
  color: #181818;
  font-weight: bold;
  border: 2px solid #fff;
}
.fretboard-table .string-label.scale {
  background: #6a4a4a;
  color: #fff;
  font-weight: bold;
}
.fretboard-table .string-label.root {
  background: #d0a0a0;
  color: #181818;
  font-weight: bold;
  border-right: 2px solid #fff;
}
@media (max-width: 600px) {
  .about-container {
    max-width: 100% !important;
    padding: 0 2px;
  }
  .scales-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5em !important;
    margin: 0.5em 0 0.5em 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .scales-controls label, .scales-controls select {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    margin-bottom: 0.2em !important;
    display: block !important;
  }
  .scales-controls select {
    margin-bottom: 0.8em !important;
  }
  #fretboard-container {
    width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .fretboard-table {
    display: block !important;
    overflow-x: auto !important;
    width: 100% !important;
    min-width: 340px !important;
    max-width: 100vw !important;
  }
  .fretboard-table th, .fretboard-table td {
    min-width: 18px !important;
    height: 18px !important;
    font-size: 0.7rem !important;
    padding: 0 !important;
  }
}

@media (max-width: 768px) {
  .scales-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
    margin: 1em 0 1em 0;
  }
  .fretboard-table th, .fretboard-table td {
    min-width: 22px;
    height: 22px;
    font-size: 0.8rem;
  }
  .fretboard-table {
    font-size: 0.8rem;
    padding: 0.5em;
    max-width: 100vw;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .about-container {
    padding: 0 4px;
  }
  .scales-controls label, .scales-controls select {
    font-size: 0.95rem;
  }
  .fretboard-table th, .fretboard-table td {
    min-width: 16px;
    height: 16px;
    font-size: 0.7rem;
  }
  .fretboard-table {
    font-size: 0.7rem;
    padding: 0.2em;
  }
}

.scales-responsive-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@media (max-width: 600px) {
  .scales-responsive-wrapper {
    transform: scale(0.85);
    transform-origin: top center;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;
  }
  .about-container {
    padding: 0;
  }
  body, html {
    overflow-x: hidden;
  }
}
