/*
File: styles.css
Purpose:
This file defines the visual layout and styling for the PDF-to-piano MVP UI.
Primary Responsibility:
Provide responsive and readable styling for controls, text areas, and canvas preview.
Design Intent:
A clean, high-contrast interface is used so users can validate extraction output quickly during iterative tuning.
Non-Goals:
This file does not encode business logic, animation-heavy branding, or component-level state logic.
Dependencies:
index.html
Constraints & Assumptions:
- Must remain legible on both desktop and mobile.
- Avoids framework-specific class systems.
Extension Points:
- Add theme variants.
- Add staff overlay and debugging visualization palette.
*/

:root {
  --bg-a: #f7f2e7;
  --bg-b: #e4efe6;
  --ink: #1f1e1a;
  --ink-soft: #4a483f;
  --accent: #0f766e;
  --accent-2: #b45309;
  --panel: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.15);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --space: 14px;
  --font-ui: "IBM Plex Sans", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(130% 130% at 0% 0%, var(--bg-a), var(--bg-b));
  font-family: var(--font-ui);
}

.app-shell {
  width: min(1100px, 95vw);
  margin: 0 auto;
  padding: 18px 0 36px;
}

.hero {
  margin-bottom: var(--space);
}

h1,
h2 {
  margin: 0 0 8px;
  line-height: 1.2;
}

p {
  margin: 4px 0;
  color: var(--ink-soft);
}

.caution {
  color: #7c2d12;
  font-weight: 600;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space);
  margin-bottom: var(--space);
}

.grid-2 {
  display: grid;
  gap: var(--space);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

input[type="file"] {
  max-width: 340px;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-ui);
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover:enabled {
  filter: brightness(1.06);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#stopBtn {
  background: var(--accent-2);
}

canvas {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.score-stage {
  position: relative;
}

.playhead-line {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0;
  width: 3px;
  background: #e11d48;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.45);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.16s linear, top 0.08s linear, height 0.08s linear;
}

.playhead-line.is-visible {
  opacity: 1;
}

.guide-hint {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #334155;
}

textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-family: var(--font-mono);
}

#statusBox {
  margin: 0;
  min-height: 120px;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  color: #0b3b3a;
}

@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
