body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background-color: #f0f2f5;
  color: #1c1e21;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 1200px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 20px 40px;
}

header {
  text-align: center;
  border-bottom: 1px solid #dddfe2;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

header h1 {
  font-size: 2.2rem;
  color: #333;
  margin: 0;
}

header p {
  font-size: 1.1rem;
  color: #606770;
}

main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.video-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.player-wrapper,
.camera-wrapper {
  background: #f7f8fa;
  border: 1px solid #dddfe2;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
  text-align: center;
}

.main-video,
#output_canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background-color: #000;
}

.video-controls {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #606770;
}

.camera-feed {
  position: relative;
}

.controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 15px;
}

.button {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.button:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
  opacity: 0.7;
}

#start-camera {
  background-color: #1877f2;
  color: white;
}

#start-camera:not(:disabled):hover {
  background-color: #166fe5;
}

#stop-camera {
  background-color: #e4e6eb;
  color: #4b4f56;
}

#stop-camera:not(:disabled):hover {
  background-color: #d8dade;
}

.setup-container {
  background: #f7f8fa;
  border: 1px solid #dddfe2;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.setup-container h2 {
  margin: 0;
  text-align: center;
}

.setup-container p {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: #606770;
}

#gesture-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.gesture-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccd0d5;
}

.gesture-info strong {
  display: block;
  font-size: 1rem;
  color: #333;
}

.gesture-status {
  font-size: 0.85rem;
  color: #e53e3e; /* Red for not recorded */
  font-weight: 500;
}

.gesture-status.recorded {
  color: #38a169; /* Green for recorded */
}

.record-button {
  background-color: #38a169;
  color: white;
}

.record-button.recording {
  background-color: #f56565;
}

.status {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #dddfe2;
}

.status p {
  margin: 5px 0;
}

.status strong {
  color: #606770;
}

footer {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dddfe2;
  color: #606770;
}

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }
}
