canvas {
  display: block;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1e1e2e;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  color: #333;
}

.control-panel {
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 8px;
  width: 280px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  margin-left: 20px;
  user-select: none;
}

.section {
  margin-bottom: 20px;
}

.section-title {
  font-weight: bold;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #ccc;
  color: #333;
  user-select: none;
}

button,
.button {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
  background-color: #fff;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #333;
  text-align: left;
  padding-left: 15px;
}

button:hover,
.button:hover {
  background-color: #f5f5f5;
  border-color: #aaa;
}

.button.active {
  background-color: #6495ed;
  color: white;
  border-color: #4169e1;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tool-specific buttons */
.buttonCreate,
.buttonTranslate,
.buttonScale {
  font-weight: 500;
}

/* Checkbox styling */
input[type="checkbox"] {
  margin-right: 8px;
}

/* checkboxe and labels align stuffs */
.section label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
}

/* space between sections */
.section + .section {
  margin-top: 30px;
}

/* hover effects to buttons */
.button:active {
  transform: translateY(1px);
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  background-color: #fff;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #333;
  text-align: left;
  padding-left: 15px;
  outline: none;
}

input[type="text"]:hover {
  background-color: #f5f5f5;
  border-color: #aaa;
}

input[type="text"]:focus {
  border-color: #6495ed;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Color button stuff */
.color-picker {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 2px solid #aaa;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.color-picker:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Textbox stuff */
.color-value-box {
  width: 80px;
  padding: 6px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background-color: #fafafa;
  text-align: center;
  font-size: 14px;
}

.color-value-box:focus {
  border-color: #6495ed;
  box-shadow: 0 0 5px rgba(100, 149, 237, 0.5);
  outline: none;
}

/* ------------------------------ ColorPickerUI Styles ------------------------------*/
.colorpicker-container {
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 8px;
  width: 260px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.colorpicker-wheel-container {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.colorpicker-sliders-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.colorpicker-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.colorpicker-slider-label {
  width: 80px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.colorpicker-slider-value-container {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
}

.colorpicker-slider {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  outline: none;
  border-radius: 4px;
}

.colorpicker-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4169e1;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.colorpicker-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4169e1;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.colorpicker-value-box {
  width: 50px;
  padding: 4px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  background-color: white;
  margin-left: 5px;
  font-family: monospace;
  font-weight: 500;
}

/* ------------------------------ Curves Panel Styles ------------------------------*/
.curves-panel {
  display: none; /* Hidden by default */
  z-index: 50;
}

/* Back to main panel button */
.curves-panel button:first-of-type {
  background-color: #f8f8f8;
  border-left: 4px solid #6495ed;
  margin-bottom: 15px;
  font-weight: 500;
}

.curves-panel button:first-of-type:hover {
  background-color: #e8e8e8;
}

/* Label styling for curve panel */
.curves-panel div:not(.section):not(.section-title) {
  font-size: 14px;
  color: #555;
}

/* Added styles from CurvesUI.ts */
.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider {
  width: 80%;
  flex: 1;
}

.resolution-container,
.animation-speed-container {
  margin-bottom: 10px;
}

.loop-container {
  margin: 0px 0 10px 0;
  display: flex;
  align-items: center;
}

.loop-container input[type="checkbox"] {
  margin-right: 8px;
}

/* ------------------------------ Animation time slider of bezier curves ------------------------------*/
.animation-time-container {
  margin-bottom: 10px;
}

/* Time value box for animation slider */
.animation-time-container .colorpicker-value-box {
  font-weight: bold;
  background: #f0f8ff;
  border-color: #b0c4de;
}

/* ------------------------------ Play/Pause buttons of bezier curves ------------------------------ */
.playback-controls-container {
  margin: 10px 0 0px 0;
}

.playback-buttons-container {
  display: flex;
  gap: 10px;
}

.play-button,
.reset-button {
  flex: 1;
  text-align: center;
  font-weight: bold !important;
  padding: 8px 5px;
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button {
  background-color: #e6f4ff;
  border-color: #4169e1;
}

.play-button:hover {
  background-color: #d0e5ff;
}

.reset-button {
  background-color: #f5f5f5;
  border-color: #a0a0a0;
}

.reset-button:hover {
  background-color: #e8e8e8;
}

/* ------------------------------ Zoom+/Zoom-/Home buttons ------------------------------ */
.zoom-buttons-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 100;
  gap: 2px;
}

.zoom-button {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: white;
  color: #333;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  padding: 0;
  margin-bottom: 2px;
  transition: all 0.2s ease;
  user-select: none;
}

.zoom-button:hover {
  background-color: #f5f5f5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.zoom-button:active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.zoom-in-button,
.zoom-out-button {
  font-size: 20px;
}

.home-button {
  font-size: 20px;
}

/* ------------------------------ Button with icons ------------------------------ */
.button-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 18px;
}

.tool-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
  overflow: visible;
  box-sizing: content-box;
}

.tool-label {
  flex: 1;
}

/* ----------------- */

.button.icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.button.auto-width {
  width: auto;
  min-width: 40px;
  display: inline-flex;
}

.button.icon-only .button-content {
  justify-content: center;
}

.button.icon-only .tool-icon {
  margin: 0;
  min-width: 24px;
}

.button.icon-only svg {
  width: 24px;
  height: 24px;
}

/* ----------------- */
/* Animation Panel Styles */

.animation-panel.playing .play-animation-button {
  background-color: #f5f5f5;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Timeline Styles */
.timeline-wrapper {
  position: relative;
  width: 100%;
  height: 40px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.timeline-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

.keyframe-indicators {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Timeline markers */
.timeline-marker {
  position: absolute;
  pointer-events: none;
}

.timeline-marker-label {
  font-family: monospace;
  pointer-events: none;
}

.current-frame-indicator {
  pointer-events: none;
}

.playhead {
  cursor: pointer;
  pointer-events: auto;
}

/* Playback Controls */
.playback-buttons-container {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 10px;
}

.playback-buttons-container .button {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 4px 8px;
}

.prev-keyframe-button,
.next-keyframe-button {
  font-size: 14px;
  font-weight: bold;
}

/* Keyframe Controls */
.keyframe-controls-container {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 10px;
}

.keyframe-controls-container .button {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
}

.add-keyframe-button {
  background-color: #4caf50;
  color: white;
}

.add-keyframe-button:hover {
  background-color: #45a049;
}

.delete-keyframe-button {
  background-color: #f44336;
  color: white;
}

.delete-keyframe-button:hover {
  background-color: #d32f2f;
}

/* Frame and Settings Sliders */
.frame-control-container,
.framerate-container,
.max-frames-container {
  margin-bottom: 10px;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider {
  flex: 1;
}
