* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  overflow: hidden;
}

#container {
  display: flex;
  height: 100vh;
}

#canvas {
  flex: 1;
  display: block;
}

#controls {
  width: 360px;
  padding: 20px;
  background: #1a1a2e;
  border-left: 1px solid #2a2a4a;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2a4a;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 13px;
  color: #888;
}

.control-group .hint {
  font-size: 11px;
  color: #666;
}

input[type="file"] {
  font-size: 13px;
  color: #ccc;
}

input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #3a3a5a;
  border-radius: 6px;
  background: #0f0f1a;
  color: #fff;
  font-size: 13px;
}

input[type="text"]::placeholder {
  color: #555;
  font-size: 11px;
}

input[type="text"]:focus {
  outline: none;
  border-color: #6366f1;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: #6366f1;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover:not(:disabled) {
  background: #4f46e5;
}

button:disabled {
  background: #3a3a5a;
  color: #666;
  cursor: not-allowed;
}

#currentViseme {
  font-size: 24px;
  font-weight: 700;
  color: #6366f1;
  font-family: monospace;
}

#visemeDisplay {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #0f0f1a;
  border-radius: 8px;
}

.viseme-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.viseme-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 32px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 600;
  color: #666;
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  transition: all 0.1s;
}

.viseme-item.active {
  color: #fff;
  background: #6366f1;
  border-color: #6366f1;
  transform: scale(1.1);
}

#log {
  flex: 1;
  min-height: 150px;
  padding: 12px;
  background: #0a0a14;
  border-radius: 8px;
  font-family: monospace;
  font-size: 11px;
  line-height: 1.6;
  color: #888;
  overflow-y: auto;
}

/* 响应式 */
@media (max-width: 800px) {
  #container {
    flex-direction: column;
  }

  #canvas {
    height: 50vh;
  }

  #controls {
    width: 100%;
    border-left: none;
    border-top: 1px solid #2a2a4a;
  }
}
