/* Layout */

.app {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: #121113;
}

/* Camera */

.camera-view {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-error {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-error p {
  color: #ffffff;
  border-left: 2px solid #ffffff;
  padding-left: 0.5rem;
  font-size: 13px;
  opacity: 0.8;
}

/* Fullscreen Button */

.fullscreen-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 32px;
  height: 32px;
  background: #121113;
  color: #ffffff;
  border: 1px solid #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0;
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.15s, border-color 0.15s;
}

.fullscreen-btn:hover {
  opacity: 1;
  border-color: #ffffff;
}

/* Control Panel */

.control-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 320px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 10;
  display: flex;
}

.control-panel.open {
  transform: translateX(0);
}

.panel-toggle {
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 64px;
  background: #121113;
  color: #ffffff;
  border: 1px solid #333;
  border-right: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0;
}

.panel-toggle:hover {
  opacity: 0.7;
}

.panel-content {
  flex: 1;
  background: #121113;
  border-left: 1px solid #333;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: none;
}

.panel-content::-webkit-scrollbar {
  display: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.reset-btn {
  background: #121113;
  color: #ffffff;
  border: 1px solid white;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0;
}

.reset-btn:hover {
  opacity: 0.7;
}

/* Randomize */

.randomize-section {
  display: flex;
  gap: 0.5rem;
}

.randomize-btn {
  flex: 1;
  background: #121113;
  color: #ffffff;
  border: 1px solid #555;
  padding: 0.4rem 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0;
}

.randomize-btn:hover {
  border-color: #ffffff;
}

.fluid-toggle {
  background: #121113;
  color: #ffffff;
  border: 1px solid #555;
  padding: 0.4rem 0.75rem;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0;
  opacity: 0.5;
  transition: opacity 0.15s, border-color 0.15s;
}

.fluid-toggle:hover {
  opacity: 0.7;
}

.fluid-toggle.active {
  opacity: 1;
  border-color: #ffffff;
}

.panel-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Sections */

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-label {
  font-size: 12px;
  opacity: 0.5;
  text-transform: uppercase;
  font-weight: 700;
}

/* Slider */

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-header label {
  font-size: 12px;
  opacity: 0.7;
}

.slider-value {
  font-size: 12px;
  opacity: 0.5;
}

/* Range Input Styling */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: #555;
  outline: none;
  border: none;
  border-radius: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb:hover {
  opacity: 0.7;
}

input[type="range"]::-moz-range-thumb:hover {
  opacity: 0.7;
}

/* Curves Editor */

.curves-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.curves-tabs {
  display: flex;
  gap: 0;
}

.curves-tab {
  flex: 1;
  background: #121113;
  color: #ffffff;
  border: 1px solid #333;
  padding: 0.3rem 0;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0;
  opacity: 0.5;
}

.curves-tab + .curves-tab {
  border-left: none;
}

.curves-tab.active {
  opacity: 1;
  border-color: #ffffff;
}

.curves-tab:hover {
  opacity: 0.7;
}

.curves-canvas {
  cursor: crosshair;
  border: 1px solid #333;
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
}
