@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg: #f6efe3;
  --bg-accent: #e7d6c0;
  --ink: #1e1b16;
  --muted: rgba(30, 27, 22, 0.62);
  --panel: rgba(250, 245, 236, 0.86);
  --panel-strong: rgba(250, 245, 236, 0.95);
  --accent: #1f7a63;
  --accent-warm: #c76836;
  --accent-gold: #c9a635;
  --border: rgba(30, 27, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff7ea 0%, var(--bg) 45%, var(--bg-accent) 100%);
}

#hydra {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.ui {
  position: relative;
  z-index: 2;
  padding: 2.5rem clamp(1.25rem, 3vw, 3rem) 4rem;
  display: grid;
  gap: 1.75rem;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  margin: 0.4rem 0 0;
  font-weight: 600;
}

h2 {
  font-family: "Fraunces", serif;
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  background: var(--panel);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #c8c8c8;
  box-shadow: 0 0 0 4px rgba(200, 200, 200, 0.2);
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(30, 27, 22, 0.12);
  backdrop-filter: blur(12px);
  animation: panelIn 0.6s ease both;
}

.panel.master {
  background: var(--panel-strong);
}

.remix-panel {
  background: linear-gradient(135deg, rgba(236, 246, 255, 0.95), rgba(218, 233, 248, 0.92));
}

.remix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.remix-tag {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  background: rgba(30, 27, 22, 0.08);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.remix-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 1.4fr;
  gap: 1.4rem;
  align-items: stretch;
}

.remix-canvas-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f151d;
  min-height: 220px;
}

#remixCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.remix-text {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.remix-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.remix-line {
  font-weight: 600;
}

.remix-greek {
  font-family: "Fraunces", serif;
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  white-space: pre-line;
}

.remix-english {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.remix-cast {
  font-size: 0.85rem;
  color: var(--muted);
}

.progress {
  margin-top: 0.9rem;
  height: 6px;
  background: rgba(30, 27, 22, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transition: width 0.1s ease;
}

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

.transport {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.transport-zoom {
  flex: 1 1 100%;
  display: grid;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.transport-slider {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.transport-slider input[type="range"] {
  width: 100%;
}

.transport-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 27, 22, 0.15);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

.grid {
  display: grid;
  gap: 0.9rem 1rem;
}

.master-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

label span {
  color: var(--ink);
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

output {
  font-size: 0.8rem;
  color: var(--muted);
}

.instruments {
  display: grid;
  gap: 1.5rem;
}

.instrument-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.instrument {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1rem 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.65);
}

.instrument header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.meter {
  height: 6px;
  background: rgba(30, 27, 22, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.meter span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-gold));
  transition: width 0.1s ease;
}

.instrument:nth-child(2) .meter span {
  background: linear-gradient(90deg, #2c6a5d, #9bbf59);
}

.instrument:nth-child(3) .meter span {
  background: linear-gradient(90deg, #b56a2a, #d8b156);
}

.instrument:nth-child(4) .meter span {
  background: linear-gradient(90deg, #4a6e3c, #94b579);
}

.instrument .grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .transport {
    flex-direction: column;
    align-items: stretch;
  }

}

@media (max-width: 600px) {
  .ui {
    padding: 1.5rem 1rem 2.5rem;
  }

  .panel {
    padding: 1.1rem;
  }

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

  .remix-layout {
    grid-template-columns: 1fr;
  }
}
