:root {
  --color-head: #e6e617; /* Bright yellow for head */
  --color-arms: #17e67e; /* Bright green for arms */
  --color-torso: #1717e6; /* Bright blue for torso */
  --color-legs: #e6177e; /* Bright pink for legs */
  --color-accent: #00ffff; /* Cyan for general accents */
}

* {
  box-sizing: border-box;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  font-family: "Roboto Mono", monospace !important;
}

body {
  font-family: "Roboto Mono", monospace;
  background: #000;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.onboarding-overlay.active {
  opacity: 1;
  visibility: visible;
}

.onboarding-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.onboarding-modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 255, 0.6) rgba(255, 255, 255, 0.05);
}

.onboarding-modal::-webkit-scrollbar {
  width: 12px;
}

.onboarding-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin: 10px 0;
}

.onboarding-modal::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00ffff, #0099cc);
  border-radius: 10px;
  border: 2px solid rgba(26, 26, 46, 0.8);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.onboarding-modal::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.5),
    0 0 20px rgba(0, 255, 255, 0.3);
  transform: scale(1.1);
}

.onboarding-modal::-webkit-scrollbar-thumb:active {
  background: linear-gradient(45deg, #ff00ff, #00ffff);
  box-shadow: inset 0 0 20px rgba(255, 0, 255, 0.4),
    0 0 25px rgba(255, 0, 255, 0.2);
}

.onboarding-header {
  text-align: center;
  margin-bottom: 30px;
}

.onboarding-title {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.onboarding-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.experience-selector {
  display: grid;
  gap: 15px;
  margin: 30px 0;
}

.experience-option {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.experience-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.experience-option:hover::before {
  transform: translateX(100%);
}

.experience-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #00ffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.experience-option.selected {
  background: rgba(0, 255, 255, 0.1);
  border-color: #00ffff;
}

.experience-option h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.experience-option p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.tutorial-steps {
  margin: 30px 0;
}

.tutorial-step {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 3px solid #00ffff;
}

.tutorial-step h4 {
  color: #00ffff;
  font-size: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-number {
  background: #00ffff;
  color: #000;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
}

.tutorial-step p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

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

.onboarding-btn {
  padding: 12px 30px;
  border-radius: 25px;
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: linear-gradient(45deg, #00ffff, #0099cc);
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Progress indicator */
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: #00ffff;
  width: 24px;
  border-radius: 4px;
}

.tour-tooltip {
  position: absolute;
  background: linear-gradient(135deg, #00ffff, #0099cc);
  color: #000;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  max-width: 300px;
  z-index: 10001;
  animation: tooltipPulse 2s ease infinite;
  display: none;
}

@keyframes tooltipPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 255, 255, 0);
  }
}

.tour-tooltip::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 8px solid transparent;
}

.tour-tooltip.top::before {
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: #0099cc;
}

.tour-tooltip.bottom::before {
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: #00ffff;
}

.tour-tooltip.left::before {
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: #0099cc;
}

.tour-tooltip.right::before {
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: #00ffff;
}

.tour-tooltip h5 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.tour-tooltip p {
  margin: 0;
  line-height: 1.4;
}

.tour-tooltip-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.tour-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.2);
  color: #000;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tour-btn:hover {
  background: rgba(0, 0, 0, 0.3);
}

.tour-highlight {
  position: fixed;
  border: 2px solid #00ffff;
  border-radius: 8px;
  pointer-events: none;
  z-index: 9999;
  animation: highlightPulse 2s ease infinite;
  display: none;
}

@keyframes highlightPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 255, 255, 0);
  }
}

.unlock-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #00ff00, #00cc00);
  color: #000;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10002;
  animation: slideInRight 0.5s ease;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 255, 0, 0.3);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.unlock-notification h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
}

.unlock-notification p {
  margin: 0;
  font-size: 13px;
}

.status-overlay {
  position: fixed;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.02em;
  display: none;
  z-index: 1050;
}

.app-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #000 0%, #0a0a0a 100%);
  transition: flex-direction 0.3s ease;
}

.app-container.landscape-right {
  flex-direction: row;
}

.app-container.landscape-left {
  flex-direction: row-reverse;
}

.app-container.portrait-bottom {
  flex-direction: column;
}

.app-container.fullscreen {
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.app-container.landscape-right .header,
.app-container.landscape-left .header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header h1 {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
}

.header .version {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.camera-container {
  flex: 1;
  position: relative;
  background: #111;
  overflow: hidden;
  transition: width 0.3s ease;
  min-height: 0;
}

.app-container.landscape-right .camera-container,
.app-container.landscape-left .camera-container {
  flex: 1;
  height: 100vh;
  margin-top: 60px;
}

.app-container.portrait-bottom .camera-container {
  width: 80vh;
  height: 60vh;
  max-width: 100vw;
  max-height: calc(100vh - 200px);
  margin: 0 auto;
  flex-shrink: 0;
}

.app-container.fullscreen .camera-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.camera-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-overlay {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.02em;
  display: none;
  z-index: 1050;
}

.status-overlay.ready {
  display: block;
}

.recording-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(220, 38, 38, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  display: none;
  align-items: center;
  gap: 8px;
}

.recording-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.controls-panel {
  background: rgba(0, 0, 0, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  width: 420px;
}

.controls-panel::-webkit-scrollbar {
  width: 6px;
}

.controls-panel::-webkit-scrollbar-track {
  background: transparent;
}

.controls-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.app-container.landscape-right .controls-panel,
.app-container.landscape-left .controls-panel {
  width: 420px;
  height: 100vh;
  border-top: none;
  padding-top: 80px;
}

.app-container.portrait-bottom .controls-panel {
  width: 80vh;
  max-width: 100vw;
  margin: 0 auto;
  height: auto;
  max-height: 40vh;
  flex-shrink: 0;
}

.app-container.fullscreen .controls-panel {
  position: fixed;
  right: 20px;
  top: 20px;
  bottom: 20px;
  width: 420px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  z-index: 100;
  max-height: calc(100vh - 40px);
}

.app-container.landscape-right .camera-container,
.app-container.landscape-left .camera-container {
  width: calc(100vw - 420px);
  height: 100vh;
  flex: none;
}

.controls-panel.collapsed {
  transform: translateX(380px);
}

.control-section {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  margin-top: 0;
}

.section-description {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 15px;
  margin-top: -10px;
  font-style: normal;
}

.control-group {
  margin-bottom: 18px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}

.slider-container {
  position: relative;
}

.slider {
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: all 0.15s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.threshold-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.threshold-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.threshold-slider label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 120px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.threshold-slider.disabled label {
  color: rgba(255, 255, 255, 0.3);
}

.threshold-value {
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  color: var(--color-accent);
  background: rgba(0, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
  transition: all 0.2s ease;
}

.threshold-slider.disabled .threshold-value {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.slider.threshold {
  flex: 1;
}

.slider.threshold:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
}

.movement-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.movement-indicator.active {
  background: #00ff00;
  border-color: #00ff00;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
  animation: pulseGreen 0.3s ease;
}

.movement-indicator.triggered {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.8);
  animation: pulseBlue 0.2s ease;
}

.threshold-slider.disabled .movement-indicator {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  opacity: 0.5;
}

@keyframes pulseGreen {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulseBlue {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseHead {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseArms {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseTorso {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseLegs {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.02em;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
}

.tooltip-container:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.mode-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  min-width: 40px;
  text-align: center;
}

.mode-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.mode-button.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.control-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 20px;
  backdrop-filter: blur(10px);
}

.control-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.control-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.control-button.recording {
  background: rgba(220, 38, 38, 0.9);
  border-color: rgba(220, 38, 38, 1);
  color: #fff;
}

.control-button.recording:hover {
  background: rgba(220, 38, 38, 1);
}

.accessibility-controls,
.layout-controls {
  margin-top: 12px;
}

.mode-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
}

.mode-select:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.mode-select:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

.mode-select option {
  background: #000;
  color: #fff;
}

.metrics-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 500px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(20px);
  z-index: 100;
  overflow-y: auto;
}

.app-container.landscape-left .metrics-panel {
  left: 20px;
  right: auto;
}

.metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metrics-header h3 {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #fff;
}

.metrics-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-item label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-item span {
  font-family: "Roboto Mono", monospace;
  font-size: 16px;
  color: #00ffff;
}

.breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
}

.breakdown div {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: space-between;
}

.breakdown span {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}

.control-button-small {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-family: "Roboto Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 12px;
}

.control-button-small:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.control-button-small .material-icons {
  font-size: 16px;
}

.recording-settings {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-select.compact {
  padding: 6px 10px;
  font-size: 11px;
  margin-top: 8px;
}

.recording-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.info-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-style: normal;
}

.countdown-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: none;
}

.countdown-content {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px 60px;
  text-align: center;
  animation: countdownPulse 1s ease-in-out;
}

.countdown-number {
  font-size: 72px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  animation: countdownScale 1s ease-in-out;
}

.countdown-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes countdownPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes countdownScale {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.recording-overlay.warning {
  background: rgba(255, 193, 7, 0.9);
  animation: warningPulse 1s ease-in-out infinite;
}

@keyframes warningPulse {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
}

.mobile-block-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mobile-block-content {
  text-align: center;
  max-width: 400px;
  padding: 40px 20px;
}

.mobile-block-icon {
  font-size: 64px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
  display: block;
}

.mobile-block-content h2 {
  font-size: 24px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.mobile-block-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
  line-height: 1.6;
}

.mobile-block-content p:last-child {
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}
.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-black {
  background: #000;
}
.text-white {
  color: #fff;
}
.rounded {
  border-radius: 12px;
}
.transition {
  transition: all 0.3s ease;
}

.onboarding-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1200px) {
  .app-container.portrait-bottom .camera-container {
    width: 50vh !important;
    height: 50vh !important;
    max-width: calc(100vw - 360px);
  }

  .app-container.landscape-right .camera-container,
  .app-container.landscape-left .camera-container {
    width: calc(100vw - 360px);
  }

  .controls-panel {
    width: 360px;
  }

  .app-container.landscape-right .controls-panel,
  .app-container.landscape-left .controls-panel {
    width: 360px;
  }

  .metrics-panel {
    right: 380px;
  }
}

@media (max-width: 768px) {
  .button-row {
    gap: 6px;
  }

  .mode-button {
    padding: 6px 8px;
    font-size: 9px;
    min-width: 36px;
  }

  .metrics-panel {
    width: 280px;
    right: 10px;
    bottom: 10px;
  }

  .app-container.landscape-right .controls-panel,
  .app-container.landscape-left .controls-panel {
    width: 320px;
  }

  .app-container.landscape-right .camera-container,
  .app-container.landscape-left .camera-container {
    width: calc(100vw - 320px);
  }

  .app-container.portrait-bottom .camera-container {
    width: 40vh !important;
    height: 40vh !important;
    max-width: calc(100vw - 320px);
  }

  .controls-panel.collapsed {
    transform: translateX(340px);
  }
}

@media (max-width: 480px) {
  .header {
    padding: 16px 20px;
  }

  .controls-panel {
    padding: 20px;
  }

  .control-group {
    margin-bottom: 16px;
  }

  .button-row {
    gap: 4px;
  }

  .mode-button {
    padding: 6px 8px;
    font-size: 8px;
    min-width: 32px;
  }

  .control-button {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

.keyboard-info {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.keyboard-info details {
  margin-top: 10px;
}

.keyboard-info summary {
  cursor: pointer;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 0;
  user-select: none;
  transition: color 0.2s ease;
}

.keyboard-info summary:hover {
  color: rgba(255, 255, 255, 0.7);
}

.keyboard-info div {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 8px;
  line-height: 1.6;
  padding-left: 12px;
}

.controls-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  transition: all 0.2s ease;
}

.controls-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.controls-toggle .material-icons {
  font-size: 20px;
}

.app-container.fullscreen .controls-toggle {
  display: flex;
}

.app-container.fullscreen .controls-panel.collapsed {
  transform: translateX(440px);
  opacity: 0;
  pointer-events: none;
}

.app-container.fullscreen .header {
  position: fixed;
  top: 20px;
  left: 20px;
  width: auto;
  height: auto;
  padding: 12px 20px;
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 12px;
  z-index: 1000;
  border-bottom: none;
}

.app-container.fullscreen .header .version {
  display: none;
}

.performance-indicator {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  display: none;
  z-index: 10;
}

.performance-indicator.visible {
  display: block;
}

.status-overlay.error {
  background: rgba(220, 38, 38, 0.9);
  border-color: rgba(220, 38, 38, 1);
}

.status-overlay.warning {
  background: rgba(255, 193, 7, 0.9);
  border-color: rgba(255, 193, 7, 1);
}

#volumeValue,
#tempoValue {
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  color: #00ffff;
  background: rgba(0, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
  transition: all 0.2s ease;
}

.preset-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
}

.preset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.preset-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.preset-btn.active {
  background: rgba(0, 255, 255, 0.2);
  border-color: #00ffff;
  color: #00ffff;
}

.preset-btn .preset-name {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}

.preset-btn .preset-desc {
  display: block;
  font-size: 9px;
  opacity: 0.7;
}

.custom-preset-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-preset-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: "Roboto Mono", monospace;
}

.custom-preset-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.icon-btn .material-icons {
  font-size: 18px;
}

.threshold-slider-enhanced {
  position: relative;
}

.sensitivity-label {
  position: absolute;
  top: -20px;
  right: 0;
  font-size: 9px;
  color: #00ffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
}

.modal-close:hover {
  color: #fff;
}

.modal-textarea {
  width: 100%;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #00ff00;
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  padding: 12px;
  border-radius: 8px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.modal-btn-primary {
  background: linear-gradient(45deg, #00ffff, #0099cc);
  color: #000;
  font-weight: 500;
}

.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
}

.modal-btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #000 0%, #0a0a0a 100%);
}

.mobile-view-content {
  max-width: 400px;
}

.mobile-icon {
  font-size: 64px;
  color: #00ffff;
  margin-bottom: 24px;
}

.mobile-title {
  font-size: 24px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

.mobile-message {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 24px;
}

.mobile-features {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.mobile-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.mobile-feature:last-child {
  margin-bottom: 0;
}

.mobile-feature-icon {
  color: #00ff00;
  font-size: 20px;
}

.mobile-feature-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-action-btn {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 20px;
  cursor: default;
}

.saved-presets-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.saved-presets-list::-webkit-scrollbar {
  width: 6px;
}

.saved-presets-list::-webkit-scrollbar-track {
  background: transparent;
}

.saved-presets-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.saved-preset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.saved-preset-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.saved-preset-name {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.saved-preset-actions {
  display: flex;
  gap: 6px;
}

.saved-preset-btn {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saved-preset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.saved-preset-btn .material-icons {
  font-size: 14px;
}

/* Mobile view fallback - CSS only detection */
@media screen and (max-width: 768px),
  screen and (max-height: 600px),
  screen and (orientation: portrait) and (max-width: 1024px) {
  .mobile-view-container {
    display: flex !important;
  }
  .app-container {
    display: none !important;
  }
  /* Hide level badge and status overlay on mobile */
  experience-badge,
  .status-overlay {
    display: none !important;
  }
}
