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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #3c4c5c;
  min-height: 100vh;
  padding: 0;
  color: #1d1d1d;
}

.container {
  max-width: 100%;
  height: 100vh;
  margin: 0;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  background: #2e3d4d;
  color: #e0e0e0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

h1 {
  font-size: 1.3em;
  font-weight: 500;
  margin: 0;
  color: #fff;
}

.subtitle {
  font-size: 0.85em;
  opacity: 0.7;
  margin-left: 20px;
}

.tabs {
  display: flex;
  background: #3c4c5c;
  border-bottom: 1px solid #2a3a4a;
  flex-shrink: 0;
}

.tab {
  padding: 12px 24px;
  text-align: center;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 400;
  transition: all 0.2s;
  border: none;
  background: transparent;
  color: #b0b0b0;
  border-bottom: 2px solid transparent;
}

.tab:hover {
  background: #47596b;
  color: #e0e0e0;
}

.tab.active {
  background: #f5f5f5;
  border-bottom: 2px solid #1a73e8;
  color: #1d1d1d;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  background: #f5f5f5;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 320px;
  background: #ffffff;
  border-right: 1px solid #d0d0d0;
  padding: 20px;
  overflow-y: auto;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toolbar {
  background: #ffffff;
  border-bottom: 1px solid #d0d0d0;
  padding: 10px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.score-area {
  flex: 1;
  background: #ffffff;
  overflow: auto;
  padding: 40px;
}

.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.9em;
}

textarea,
input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  font-size: 0.95em;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.btn {
  padding: 8px 16px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  line-height: 1.5;
  vertical-align: middle;
}

.btn:hover {
  background: #1557b0;
}

.btn:active {
  background: #0d47a1;
}

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

.btn-secondary {
  background: #5f6368;
}

.btn-secondary:hover {
  background: #4a4d50;
}

.btn-success {
  background: #1e8e3e;
}

.play-btn {
  padding: 10px 20px;
  font-size: 1em;
  background: #1e8e3e;
}

.play-btn:hover {
  background: #137333;
}

#playback-status {
  color: #5f6368;
  font-size: 0.9em;
}

.loading {
  display: none;
  margin-top: 20px;
  text-align: center;
  color: #5f6368;
  font-weight: 500;
  font-size: 0.9em;
}

.loading.active {
  display: block;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1a73e8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.result {
  margin-top: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.result h3 {
  margin-bottom: 12px;
  color: #1d1d1d;
  font-size: 1.1em;
  font-weight: 500;
}

.sheet-music-container {
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding-left: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sheet-music-container h4 {
  font-size: 0.95em;
  font-weight: 500;
  color: #5f6368;
  margin-bottom: 20px;
}

#vexflow-output {
  min-height: 200px;
}

.vf-stavenote {
  transition: fill 0.2s ease;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

.theory-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  line-height: 1.6;
}

.theory-content h2 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 500;
  color: #1d1d1d;
}

.theory-content h3 {
  font-size: 1.1em;
  margin-top: 30px;
  margin-bottom: 12px;
  font-weight: 500;
  color: #333;
}

.theory-content p {
  margin-bottom: 16px;
  color: #5f6368;
  font-size: 0.95em;
}

#phoneme-staff {
  margin: 20px 0;
  padding: 20px;
  background: white;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  overflow-x: auto;
}

.drop-zone {
  border: 2px dashed #c0c0c0;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 20px;
}

.drop-zone:hover {
  border-color: #1a73e8;
  background: #f0f7ff;
}

.drop-zone.drag-over {
  border-color: #1a73e8;
  background: #e8f0fe;
  border-style: solid;
}

.drop-zone-text {
  color: #5f6368;
  font-size: 1em;
  margin-bottom: 8px;
}

.drop-zone-subtext {
  color: #9aa0a6;
  font-size: 0.85em;
}
