:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface-hover: #222240;
  --primary: #6c5ce7;
  --primary-hover: #5b4bd6;
  --text: #e0e0e8;
  --text-dim: #8888a0;
  --success: #00b894;
  --error: #e74c3c;
  --border: #2a2a45;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* Input */
.input-section {
  margin-bottom: 2rem;
}

.url-input-group {
  display: flex;
  gap: 0.75rem;
}

.url-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.url-input:focus {
  outline: none;
  border-color: var(--primary);
}

.url-input::placeholder {
  color: var(--text-dim);
}

.btn-primary {
  padding: 0.875rem 1.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Status */
.status-section {
  margin-bottom: 2rem;
}

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.status-icon {
  font-size: 2rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-content {
  flex: 1;
}

.status-message {
  color: var(--text-dim);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.progress-bar {
  margin-top: 0.75rem;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.5s ease;
}

/* Error */
.error-card {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error);
  padding: 1.5rem;
  border-radius: 12px;
}

.error-card h3 {
  color: var(--error);
  margin-bottom: 0.5rem;
}

/* Result */
.result-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.video-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.sheet-music-container {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
}

.sheet-music-container h3 {
  color: #333;
  margin-bottom: 1rem;
}

#sheetMusic {
  min-height: 200px;
}

/* Footer */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Utility */
.hidden {
  display: none !important;
}
