@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,650;9..144,800&family=Atkinson+Hyperlegible:wght@400;700&display=swap");

:root {
  --ink: #101511;
  --paper: #fbf7ed;
  --panel: #fffaf0;
  --field: #f2eadb;
  --muted: #6d756b;
  --line: #262f26;
  --lime: #c7f464;
  --teal: #11a7a3;
  --coral: #ff6b57;
  --shadow: 8px 8px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
  background:
    linear-gradient(90deg, rgba(16, 21, 17, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(16, 21, 17, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(199, 244, 100, 0.42), transparent 34%),
    linear-gradient(150deg, #fff7e4 0%, var(--paper) 48%, #e4f1e9 100%);
  background-size: 24px 24px, 24px 24px, auto, auto;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -8deg,
    rgba(16, 21, 17, 0.035) 0,
    rgba(16, 21, 17, 0.035) 1px,
    transparent 1px,
    transparent 9px
  );
  mix-blend-mode: multiply;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.topbar,
.account-bar,
.button-row,
.upload-row,
.download-row,
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  animation: rise 520ms ease both;
}

.topbar-actions {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  justify-items: stretch;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(38px, 13vw, 88px);
  line-height: 0.86;
}

h2 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 0.95;
}

h3 {
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

.card,
.upload-panel,
.jobs-panel,
.player-panel {
  border: 2px solid var(--ink);
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
  animation: rise 600ms ease 80ms both;
}

.upload-panel,
.jobs-panel,
.player-panel {
  padding: 16px;
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}

.split-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.input-block {
  display: flex;
  flex-direction: column;
  position: relative;
}

.or-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  margin: 6px 0;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 2px dashed var(--line);
  opacity: 0.25;
}

.or-divider::before {
  margin-right: 12px;
}

.or-divider::after {
  margin-left: 12px;
}

.future-card {
  display: grid;
  gap: 10px;
  background:
    linear-gradient(145deg, rgba(17, 167, 163, 0.2), transparent 65%),
    rgba(255, 250, 240, 0.9);
}

.future-card p {
  margin-bottom: 0;
}

.upload-panel {
  display: grid;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(199, 244, 100, 0.42), transparent 52%),
    var(--panel);
  animation: rise 600ms ease 80ms both;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 13px 12px;
}

.language-switcher {
  display: flex;
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  gap: 6px;
  padding: 5px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 240, 0.72);
}

.flag-button {
  min-width: 0;
  flex: 1 1 0;
  min-height: 38px;
  padding: 5px 9px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.flag-button:hover,
.flag-button.active {
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  transform: none;
}

input:focus {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

input[type="file"] {
  padding: 12px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  background: var(--field);
  border: 2px solid var(--ink);
  outline: none;
  cursor: pointer;
}

/* WebKit (Chrome, Safari, Edge, Opera) */
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--teal);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  margin-top: -8px; /* Center thumb on track */
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* Firefox */
input[type="range"]::-moz-range-track {
  height: 10px;
  background: transparent;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--teal);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

input[type="range"]::-moz-range-thumb:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

#seek::-webkit-slider-thumb {
  background: var(--lime);
}

#seek::-moz-range-thumb {
  background: var(--lime);
}

#seek {
  background: linear-gradient(
    to right,
    var(--lime) 0%,
    var(--lime) var(--seek-percent, 0%),
    var(--field) var(--seek-percent, 0%),
    var(--field) 100%
  );
}

#instrumentalVolume,
#vocalsVolume {
  background: linear-gradient(
    to right,
    var(--teal) 0%,
    var(--teal) var(--volume-percent, 100%),
    var(--field) var(--volume-percent, 100%),
    var(--field) 100%
  );
}

button,
a {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--lime);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  white-space: nowrap;
}

button:hover,
a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--lime);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.secondary {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--teal);
}

.danger {
  background: var(--coral);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.status,
.empty {
  margin: 10px 0 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.button-row,
.download-row {
  flex-wrap: wrap;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

.button-row button,
.download-row a {
  flex: 1 1 160px;
}

.account-bar {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  flex-wrap: wrap;
}

.account-bar span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 2px solid var(--ink);
  background: var(--lime);
  padding: 8px 10px;
  font-weight: 700;
}



.upload-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.upload-row input {
  flex: 999 1 220px;
}

.upload-row button {
  flex: 1 1 120px;
}

.mode-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 240, 0.64);
  cursor: pointer;
}

.mode-toggle input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--coral);
}

.mode-toggle strong,
.mode-toggle small {
  display: block;
}

.mode-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.jobs-layout {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 14px;
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.job-item {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(16, 21, 17, 0.18);
  text-align: left;
}

.job-item:hover,
.job-item.active {
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
}

.job-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job-meta strong,
.job-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-meta strong {
  font-size: 16px;
}

.job-meta span {
  color: var(--muted);
  font-size: 13px;
}

.job-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.job-actions button {
  min-height: 40px;
  padding: 8px 10px;
}

.player-panel {
  background:
    linear-gradient(160deg, rgba(17, 167, 163, 0.22), transparent 58%),
    var(--panel);
}

.controls-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

#timeLabel {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 700;
}

.mix-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mix-grid > div {
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.48);
  padding: 12px;
}

.download-row {
  margin-top: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .container {
    padding: 28px 22px 46px;
  }

  .topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .topbar-actions {
    width: auto;
    grid-template-columns: none;
    justify-items: end;
  }

  .language-switcher {
    width: auto;
    min-width: initial;
    justify-content: initial;
  }

  .flag-button {
    min-width: 46px;
    flex: 0 0 auto;
  }

  .account-bar {
    width: auto;
    min-width: initial;
    justify-content: flex-end;
  }

  .account-bar span {
    max-width: 240px;
  }

  .card,
  .upload-panel,
  .jobs-panel,
  .player-panel {
    box-shadow: 10px 10px 0 var(--ink);
  }

  .auth-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .button-row {
    display: flex;
    width: auto;
    align-self: end;
  }

  .jobs-layout {
    grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
    align-items: start;
  }

  .player-panel {
    position: sticky;
    top: 18px;
  }

  .controls-row {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  #timeLabel {
    grid-column: auto;
  }

  .mix-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 20px;
  }

  .or-divider {
    flex-direction: column;
    height: 100%;
    margin: 0;
    align-self: stretch;
  }

  .or-divider::before,
  .or-divider::after {
    border-bottom: 0;
    border-left: 2px dashed var(--line);
    flex: 1;
    height: 100%;
    width: 0;
  }

  .or-divider::before {
    margin-right: 0;
    margin-bottom: 8px;
  }

  .or-divider::after {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Chords Visualizer panel */
.chords-panel-inner {
  margin-top: 18px;
  border-top: 2px dashed var(--line);
  padding-top: 14px;
  min-width: 0;
  max-width: 100%;
}

.chords-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chords-actions {
  display: flex;
  gap: 8px;
}

.chords-header .eyebrow {
  margin-bottom: 0;
}

.chords-header button {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 14px;
}

.chords-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 6px 14px 6px;
  background: var(--field);
  border: 2px solid var(--ink);
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Custom Scrollbars for the chords track */
.chords-track::-webkit-scrollbar {
  height: 8px;
}
.chords-track::-webkit-scrollbar-track {
  background: var(--field);
  border-top: 2px solid var(--ink);
}
.chords-track::-webkit-scrollbar-thumb {
  background: var(--ink);
}

.chord-block {
  flex: 0 0 76px;
  height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  user-select: none;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

.chord-block:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.chord-block.active {
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  transform: scale(1.05) translate(-1px, -1px);
  z-index: 2;
}

.chord-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.chord-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
}

/* Mobile responsive adjustments */
@media (max-width: 500px) {
  .chord-block {
    flex: 0 0 68px;
    height: 60px;
  }
  
  .chord-name {
    font-size: 16px;
  }
  
  .chord-time {
    font-size: 9px;
  }
}





