* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #0f0f0f;
  border-bottom: 1px solid #2a2a2a;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.subtitle {
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Browser Warning */
.browser-warning {
  background: #3a3a00;
  color: #ffeb3b;
  padding: 8px 24px;
  text-align: center;
  font-size: 12px;
  border-bottom: 1px solid #555500;
}

/* Main Content */
.main-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Viewport */
.viewport-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #0a0a0a;
}

.fullscreen-toggle-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 120;
  width: 36px;
  height: 36px;
  border: 1px solid #3f506c;
  border-radius: 8px;
  background: rgba(11, 18, 30, 0.78);
  color: #dce8ff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.fullscreen-toggle-btn:hover {
  background: rgba(22, 36, 61, 0.92);
  border-color: #5b79a8;
  transform: translateY(-1px);
}

.fullscreen-toggle-btn:active {
  transform: translateY(0);
}

/*
  When the collapsed asset sidebar toggle is visible, shift fullscreen control
  left so both controls remain independently clickable.
*/
.viewport-container:has(.asset-sidebar-toggle.visible) .fullscreen-toggle-btn {
  right: 76px;
}

body.viewer-fullscreen .header,
body.viewer-fullscreen .browser-warning {
  display: none;
}

body.viewer-fullscreen #app,
body.viewer-fullscreen .main-content,
body.viewer-fullscreen .viewport-container {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
}

body.viewer-fullscreen .main-content {
  overflow: hidden;
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Upload Overlay */
.upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.upload-overlay.hidden {
  display: none;
}

.upload-box {
  text-align: center;
  padding: 48px;
  border: 2px dashed #444;
  border-radius: 12px;
  background: #1a1a1a;
  max-width: 500px;
  transition: all 0.3s ease;
}

.upload-box.drag-over {
  border-color: #4CAF50;
  background: #1a2a1a;
  transform: scale(1.02);
}

.upload-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.upload-box h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #ffffff;
}

.upload-box p {
  color: #888;
  margin-bottom: 24px;
  line-height: 1.5;
}

.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}

.portal-entry {
  width: auto;
  text-decoration: none;
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  background: #253046;
}

.portal-entry:hover {
  background: #2f3c59;
}

.upload-note {
  font-size: 12px;
  color: #666;
  margin-top: 16px;
  margin-bottom: 0;
}

.portal-entry-note {
  font-size: 11px;
  color: #6f7c90;
  margin-top: 8px;
  margin-bottom: 0;
}

.package-selector-box {
  width: min(500px, calc(100% - 32px));
}

.package-selector-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  margin: 8px 0 4px 0;
}

.package-selector-label {
  font-size: 12px;
  color: #8fa3c0;
  text-align: left;
}

.package-selector-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a4a66;
  background: #101722;
  color: #dce8ff;
  font-size: 14px;
}

.package-selector-select:focus {
  outline: 2px solid #4CAF50;
  outline-offset: 1px;
}

.package-selector-confirm {
  width: 100%;
}

.package-selector-status {
  font-size: 12px;
  color: #8a9ab3;
  margin-top: 10px;
  margin-bottom: 0;
  min-height: 1.2em;
}

.package-selector-status.error {
  color: #ff9ca8;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.loading-overlay.hidden {
  display: none;
}

.loading-box {
  text-align: center;
  padding: 48px;
  background: #1a1a1a;
  border-radius: 12px;
  min-width: 400px;
  border: 1px solid #2a2a2a;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #333;
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-box h3 {
  font-size: 20px;
  margin-bottom: 24px;
  color: #ffffff;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  width: 0;
  transition: width 0.3s ease;
}

#progress-text {
  font-size: 24px;
  font-weight: 600;
  color: #4CAF50;
  margin-bottom: 8px;
}

.loading-status {
  font-size: 14px;
  color: #888;
}

/* Controls Panel */
.controls-panel {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0);
  border: 1px solid #333;
  border-radius: 8px;
  width: calc(50% - 32px);
  max-width: 800px;
  z-index: 5;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.controls-header h3 {
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
}

.controls-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s ease;
  max-height: 400px;
  opacity: 1;
}

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

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

.controls-content::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.controls-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.controls-content.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.controls-section {
  padding: 12px;
  border-right: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
}

.controls-section:nth-child(2n) {
  border-right: none;
}

.controls-section:last-child,
.controls-section:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

.controls-section h4 {
  font-size: 12px;
  color: #4CAF50;
  margin-bottom: 10px;
  font-weight: 500;
}

/* Info Grid (Camera Position) */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
}

.info-label {
  font-size: 10px;
  color: #888;
  font-weight: 500;
}

.info-value {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 10px;
  color: #4CAF50;
  font-weight: 600;
}

/* Toggle Controls */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px;
  background: #1a1a1a;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  transition: background 0.2s;
}

.toggle-control:hover {
  background: #222;
}

.toggle-control input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.toggle-control span {
  font-size: 11px;
  color: #ccc;
}

/* Speed Controls */
.speed-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.speed-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.speed-label > span:first-child {
  font-size: 10px;
  color: #888;
  font-weight: 500;
}

.speed-label input[type="range"] {
  width: 100%;
  height: 3px;
  background: #2a2a2a;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.speed-label input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
}

.speed-label input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.speed-label > span:last-child {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 10px;
  color: #4CAF50;
  text-align: right;
}

/* Button Grid */
.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.control-btn {
  padding: 6px 10px;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #ccc;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover {
  background: #333;
  border-color: #4CAF50;
  color: #4CAF50;
}

.control-btn:active {
  transform: scale(0.98);
}

/* Control Items (Mouse & Keyboard) */
.control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #222;
}

.control-item:last-child {
  border-bottom: none;
}

.control-key {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
  font-size: 10px;
  background: #2a2a2a;
  padding: 4px 8px;
  border-radius: 3px;
  color: #4CAF50;
  white-space: nowrap;
  font-weight: 600;
  border: 1px solid #333;
  min-width: 55px;
  text-align: center;
}

.control-key.arrow-key {
  font-family: Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.control-desc {
  font-size: 10px;
  color: #888;
  text-align: right;
  flex: 1;
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shortcuts-grid .control-item {
  padding: 3px 0;
}

.shortcuts-grid .control-key {
  min-width: 50px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
}

/* ViewHelper Gizmo */
.viewhelper-container {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 128px;
  height: 128px;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
  display: none; /* Hidden - ViewHelper not rendering properly */
}

.viewhelper-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Error Toast */
.error-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #d32f2f;
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 100;
  min-width: 400px;
  max-width: 600px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.error-toast.hidden {
  display: none;
}

.error-content {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.error-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.error-message {
  flex: 1;
}

.error-message strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  font-weight: 600;
}

.error-message p {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
}

/* Version Info Display */
.version-info {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: rgba(15, 15, 15, 0.85);
  color: #999;
  font-size: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  opacity: 0.5;
  cursor: default;
  z-index: 150;
  transition: opacity 0.2s ease;
  line-height: 1.6;
  user-select: none;
}

.version-info:hover {
  opacity: 1.0;
}

.version-software-line,
.version-data-line {
  white-space: nowrap;
}

.version-data-invalid {
  color: #ff5555;
}

/* Version Modal */
.version-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.version-modal.hidden {
  display: none;
}

.version-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.version-modal-card {
  position: fixed;
  bottom: 70px;
  right: 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 24px;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  animation: thanosSnap 0.5s ease-out;
}

.version-modal-card.closing {
  animation: thanosSnapReverse 0.5s ease-out;
}

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

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

.version-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

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

.version-modal-content {
  color: #ccc;
}

.version-modal-section {
  margin-bottom: 20px;
}

.version-modal-section:last-child {
  margin-bottom: 0;
}

.version-modal-section h4 {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.version-modal-section p {
  font-size: 14px;
  color: #fff;
  margin: 0;
}

.version-changelog {
  font-size: 12px;
  color: #ccc;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 12px;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.6;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
}

/* Buttons */
.btn-primary {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #333;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
  margin-top: 8px;
}

.btn-secondary:hover {
  background: #444;
}

.btn-icon {
  background: transparent;
  color: #aaa;
  border: none;
  font-size: 20px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s ease;
  padding: 0;
}

.btn-icon:hover {
  background: #2a2a2a;
  color: #fff;
}

.hidden {
  display: none !important;
}

/* Floating Sidebar */
.sidebar {
  position: fixed;
  left: 20px;
  top: 80px;
  bottom: 20px;
  width: 340px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #333;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-icon {
  font-size: 16px;
  font-weight: 600;
  color: #4CAF50;
}

.sidebar-subtitle {
  font-size: 12px;
  color: #888;
}

.sidebar-collapse-btn {
  background: transparent;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.sidebar-collapse-btn:hover {
  color: #fff;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Sidebar Sections */
.sidebar-section {
  border-bottom: 1px solid #2a2a2a;
}

.sidebar-section:last-child {
  border-bottom: none;
}

.section-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.section-icon {
  font-size: 12px;
  color: #888;
  transition: transform 0.2s;
  width: 16px;
  text-align: center;
}

.section-header.collapsed .section-icon {
  transform: rotate(-90deg);
}

.section-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.section-content {
  padding: 12px 20px 16px;
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Inspection Details */
.detail-item {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary {
  background: #1976D2;
  color: white;
}

.badge-success {
  background: #4CAF50;
  color: white;
}

.badge-warning {
  background: #FF9800;
  color: white;
}

.badge-critical {
  background: #F44336;
  color: white;
  animation: pulse-critical 2s ease-in-out infinite;
}

@keyframes pulse-critical {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(244, 67, 54, 0);
  }
}

.detail-label {
  font-size: 12px;
  color: #ccc;
}

.detail-info {
  font-size: 12px;
  color: #888;
}

.detail-text {
  font-size: 13px;
  color: #aaa;
}

.detail-summary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #333;
  font-size: 12px;
  color: #888;
}

/* Filter Section */
.filter-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-control-btn {
  flex: 1;
  padding: 6px 12px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ccc;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-control-btn:hover {
  background: #333;
  border-color: #4CAF50;
  color: #4CAF50;
}

.filter-control-btn:active {
  transform: scale(0.98);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s;
}

.filter-checkbox:hover {
  color: #4CAF50;
}

.filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4CAF50;
}

.filter-checkbox span {
  font-size: 13px;
  color: #ccc;
}

/* Texture Layers Section */
.texture-surface-group {
  margin-bottom: 16px;
}

.texture-surface-header {
  font-size: 12px;
  font-weight: 600;
  color: #4CAF50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #333;
}

.texture-layers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.texture-layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  transition: all 0.2s;
}

.texture-layer-item:hover {
  border-color: #4CAF50;
  background: #222;
}

.texture-layer-item.visible {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
}

.texture-layer-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4CAF50;
  flex-shrink: 0;
}

.texture-layer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.texture-layer-name {
  font-size: 12px;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.texture-layer-details {
  font-size: 10px;
  color: #666;
}

.texture-layer-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.texture-order-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.texture-order-btn:hover:not(:disabled) {
  background: #333;
  border-color: #4CAF50;
  color: #4CAF50;
}

.texture-order-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.texture-order-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.texture-blend-select {
  padding: 2px 4px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ccc;
  font-size: 10px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.texture-blend-select:hover {
  border-color: #4CAF50;
}

.texture-blend-select:focus {
  border-color: #4CAF50;
}

/* Search Box */
.search-box {
  margin-bottom: 12px;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #4CAF50;
}

.search-input::placeholder {
  color: #666;
}

/* Clusters List */
.clusters-list {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

.clusters-list::-webkit-scrollbar {
  width: 4px;
}

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

.clusters-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 2px;
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.section-group-header {
  position: sticky;
  top: 0;
  background: rgba(20, 20, 20, 0.95);
  padding: 8px 12px;
  margin: 8px -12px 8px -12px;
  border-left: 3px solid #4CAF50;
  backdrop-filter: blur(5px);
  z-index: 1;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
}

.cluster-item {
  padding: 12px;
  margin-bottom: 8px;
  background: #222;
  border-radius: 6px;
  border-left: 3px solid #ffff00;
  cursor: pointer;
  transition: all 0.2s;
}

.cluster-item:hover {
  background: #2a2a2a;
  transform: translateX(2px);
}

.cluster-item.yellow {
  border-left-color: #ffff00;
}

.cluster-item.yellow.selected {
  background: #2a2310;
  border-left-color: #ffff00;
  box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.3);
}

.cluster-item.selected {
  background: #2a2a10;
  border-left-color: #ffff00;
  box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.3);
}

.cluster-item.purple {
  border-left-color: #9900ff;
}

.cluster-item.purple.selected {
  background: #2a1a3a;
  border-left-color: #9900ff;
  box-shadow: 0 0 0 2px rgba(153, 0, 255, 0.3);
}

.cluster-item.orange {
  border-left-color: #ffa500;
}

.cluster-item.orange.selected {
  background: #2a2310;
  border-left-color: #ffa500;
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.3);
}

.cluster-item.red {
  border-left-color: #dc3545;
}

.cluster-item.red.selected {
  background: #2a1010;
  border-left-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

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

.cluster-id {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.cluster-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffff00;
}

/* Cluster color indicator styles are dynamically generated - see ClusterColorConfig.js */

.cluster-details {
  font-size: 11px;
  color: #888;
  line-height: 1.6;
}

.cluster-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

/* Event Items */
.event-item {
  padding: 12px;
  margin-bottom: 8px;
  background: #222;
  border-radius: 6px;
  border-left: 3px solid #00aa00;
  cursor: pointer;
  transition: all 0.2s;
}

.event-item:hover {
  background: #2a2a2a;
  transform: translateX(2px);
}

.event-item.selected {
  background: #1a2a1a;
  border-left-color: #00aa00;
  box-shadow: 0 0 0 2px rgba(0, 170, 0, 0.3);
}

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

.event-id {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.event-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00aa00;
}

.event-details {
  font-size: 11px;
  color: #888;
  line-height: 1.6;
}

.event-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

/* Collapsed Sidebar Toggle Button */
.sidebar-toggle {
  position: fixed;
  left: 20px;
  top: 80px;
  width: 48px;
  height: 48px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #333;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.2s;
}

.sidebar-toggle:hover {
  background: rgba(36, 36, 36, 0.95);
  border-color: #4CAF50;
  transform: scale(1.05);
}

.sidebar-toggle span {
  font-size: 20px;
  font-weight: 600;
  color: #4CAF50;
}

.sidebar-toggle.visible {
  display: flex;
}

/* Section Headers */
.section-separator {
  height: 1px;
  background: #333;
  margin: 8px 20px;
}

/* Asset Viewer Sidebar (Right) */
.asset-sidebar {
  position: fixed;
  right: 20px;
  top: 80px;
  bottom: 20px;
  width: 320px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #333;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.asset-sidebar.collapsed {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.asset-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.asset-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.asset-sidebar-icon {
  font-size: 18px;
}

.asset-sidebar-collapse-btn {
  background: transparent;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.asset-sidebar-collapse-btn:hover {
  color: #fff;
}

.asset-sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}

.asset-sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.asset-sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.asset-sidebar-content::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.asset-sidebar-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Asset Sections */
.asset-section {
  border-bottom: 1px solid #2a2a2a;
}

.asset-section:last-child {
  border-bottom: none;
}

.asset-section-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.asset-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.asset-section-icon {
  font-size: 12px;
  color: #888;
  transition: transform 0.2s;
  width: 16px;
  text-align: center;
}

.asset-section-header.collapsed .asset-section-icon {
  transform: rotate(-90deg);
}

.asset-section-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.asset-section-content {
  padding: 12px 20px 16px;
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.asset-section-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Asset Image */
.asset-image-container {
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  border: 1px solid #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.asset-image-container:has(.asset-image[style*="cursor: pointer"]) {
  cursor: pointer;
}

.asset-image-container:hover {
  border-color: #4CAF50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.asset-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s, opacity 0.2s;
}

.asset-image[style*="cursor: pointer"]:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Asset Links */
.asset-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.asset-link:hover {
  background: #333;
  border-color: #4CAF50;
  transform: translateX(2px);
}

.asset-link-icon {
  font-size: 20px;
}

.asset-link-text {
  font-size: 13px;
  font-weight: 500;
}

.asset-document-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.asset-document-link:hover {
  background: #2a2a2a;
  border-color: #4CAF50;
  transform: translateX(2px);
}

.asset-doc-icon {
  font-size: 18px;
}

.asset-doc-title {
  font-size: 13px;
  font-weight: 500;
}

.no-asset-message {
  padding: 16px;
  text-align: center;
  color: #666;
  font-size: 12px;
}

/* Collapsed Asset Sidebar Toggle Button */
.asset-sidebar-toggle {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 48px;
  height: 48px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #333;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 130;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.2s;
}

.asset-sidebar-toggle:hover {
  background: rgba(36, 36, 36, 0.95);
  border-color: #4CAF50;
  transform: scale(1.05);
}

.asset-sidebar-toggle span {
  font-size: 20px;
}

.asset-sidebar-toggle.visible {
  display: flex;
}

/* ============================================================================
   HISTORY CARDS (Asset Sidebar)
   ============================================================================ */

.history-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.history-card:hover {
  border-color: #4CAF50;
  background: #2a2a2a;
}

.history-card.active {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
}

.history-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.history-card-title {
  font-size: 13px;
  color: #ccc;
  font-weight: 500;
}

.history-card-subtitle {
  font-size: 11px;
  color: #888;
  font-style: italic;
  line-height: 1.3;
}

.history-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
  margin-top: 8px;
}

.history-card-separator {
  height: 1px;
  background: linear-gradient(to right, transparent, #444, transparent);
  margin: 8px 0;
}

.history-pdf-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 4px;
  color: #2196F3;
  text-decoration: none;
  font-size: 12px;
  transition: all 0.2s;
}

.history-pdf-link:hover {
  background: rgba(33, 150, 243, 0.2);
  border-color: #2196F3;
  transform: translateX(2px);
}

.history-pdf-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.history-pdf-dropdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-pdf-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 4px;
  color: #2196F3;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-pdf-dropdown-header:hover {
  background: rgba(33, 150, 243, 0.2);
  border-color: #2196F3;
}

.history-pdf-dropdown-icon {
  font-size: 10px;
  transition: transform 0.2s;
}

.history-pdf-dropdown.expanded .history-pdf-dropdown-icon {
  transform: rotate(180deg);
}

.history-pdf-dropdown-list {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
  margin-top: 4px;
}

.history-pdf-dropdown.expanded .history-pdf-dropdown-list {
  display: flex;
}

.history-pdf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(33, 150, 243, 0.05);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 4px;
  color: #2196F3;
  text-decoration: none;
  font-size: 11px;
  transition: all 0.2s;
}

.history-pdf-item:hover {
  background: rgba(33, 150, 243, 0.15);
  border-color: #2196F3;
  transform: translateX(2px);
}

.history-texture-info {
  font-size: 10px;
  color: #666;
  padding-left: 24px;
  font-style: italic;
}

/* History Texture List */
.history-texture-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.history-texture-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s;
}

.history-texture-item:hover {
  color: #9C27B0;
}

.history-texture-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #9C27B0;
  flex-shrink: 0;
}


.history-texture-name {
  font-size: 13px;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ============================================================================
   DEV TOOLS SIDEBAR (Bottom) - Only shown when dev_tools.flag exists
   ============================================================================ */

.dev-tools-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: rgba(15, 15, 15, 0.95);
  border-bottom: 2px solid #ff6b00;
  backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.dev-tools-sidebar.collapsed {
  transform: translateY(-100%);
}

.dev-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 107, 0, 0.1);
  border-bottom: 1px solid rgba(255, 107, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s ease;
}

.dev-tools-header:hover {
  background: rgba(255, 107, 0, 0.15);
}

.dev-tools-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #ff9d4d;
}

.dev-tools-icon {
  font-size: 16px;
}

.dev-tools-collapse-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 107, 0, 0.2);
  color: #ff9d4d;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-tools-collapse-btn:hover {
  background: rgba(255, 107, 0, 0.3);
  color: #ffb366;
}

.dev-tools-content {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px;
  display: flex;
  gap: 16px;
}

.dev-tools-content::-webkit-scrollbar {
  height: 8px;
}

.dev-tools-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.dev-tools-content::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 0, 0.3);
  border-radius: 4px;
}

.dev-tools-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 0, 0.5);
}

.dev-tools-section {
  min-width: 280px;
  max-width: 350px;
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dev-tools-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 107, 0, 0.1);
  border-bottom: 1px solid rgba(255, 107, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.dev-tools-section-header:hover {
  background: rgba(255, 107, 0, 0.15);
}

.dev-tools-section-header.collapsed .dev-tools-section-icon {
  transform: rotate(0deg);
}

.dev-tools-section-icon {
  font-size: 10px;
  color: #ff9d4d;
  transition: transform 0.2s;
  transform: rotate(90deg);
}

.dev-tools-section-header h3 {
  font-size: 13px;
  color: #ff9d4d;
  font-weight: 600;
  margin: 0;
}

.dev-tools-section-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  max-height: 220px;
}

.dev-tools-section-content.collapsed {
  display: none;
}

.dev-tools-section-content::-webkit-scrollbar {
  width: 6px;
}

.dev-tools-section-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.dev-tools-section-content::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 0, 0.3);
  border-radius: 3px;
}

.dev-tools-section-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 0, 0.5);
}

/* Dev Tools - Texture Layers */
.texture-surface-group {
  margin-bottom: 12px;
}

.texture-surface-header {
  font-size: 11px;
  color: #ff9d4d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding: 4px 8px;
  background: rgba(255, 107, 0, 0.1);
  border-radius: 4px;
}

.texture-layers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.texture-layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 4px;
  transition: all 0.2s;
}

.texture-layer-item:hover {
  border-color: rgba(255, 107, 0, 0.5);
  background: rgba(0, 0, 0, 0.5);
}

.texture-layer-item.visible {
  border-color: rgba(76, 175, 80, 0.5);
}

.texture-layer-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4CAF50;
  flex-shrink: 0;
}

.texture-layer-info {
  flex: 1;
  min-width: 0;
}

.texture-layer-name {
  font-size: 11px;
  color: #ccc;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.texture-layer-details {
  font-size: 9px;
  color: #888;
  margin-top: 2px;
}

.texture-layer-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.texture-blend-select {
  padding: 2px 4px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #ccc;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 3px;
  cursor: pointer;
}

.texture-order-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 10px;
  background: rgba(255, 107, 0, 0.2);
  color: #ff9d4d;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.texture-order-btn:hover:not(:disabled) {
  background: rgba(255, 107, 0, 0.3);
  color: #ffb366;
}

.texture-order-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Dev Tools - Info and Status */
.dev-tool-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-size: 12px;
}

.dev-tool-label {
  color: #888;
  font-weight: 500;
}

.dev-status-active {
  color: #4CAF50;
  font-weight: 600;
}

.dev-status-inactive {
  color: #888;
}

/* Dev Tools - Buttons */
.dev-button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.dev-control-btn {
  padding: 8px 12px;
  font-size: 11px;
  background: rgba(255, 107, 0, 0.2);
  color: #ff9d4d;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.dev-control-btn:hover {
  background: rgba(255, 107, 0, 0.3);
  color: #ffb366;
  border-color: rgba(255, 107, 0, 0.5);
}

.dev-control-btn:active {
  transform: translateY(1px);
}

/* Dev Tools - Help Text */
.dev-tool-help {
  font-size: 11px;
  color: #888;
  line-height: 1.5;
}

.dev-tool-help p {
  margin: 4px 0;
}

.dev-tool-help strong {
  color: #ff9d4d;
}

/* Dev Tools - Shortcuts List */
.dev-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.dev-shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 8px;
  background: rgba(255, 107, 0, 0.2);
  color: #ff9d4d;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.dev-shortcut-desc {
  flex: 1;
  font-size: 11px;
  color: #ccc;
}

/* Dev Tools Toggle Button */
.dev-tools-toggle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 107, 0, 0.5);
  background: rgba(15, 15, 15, 0.9);
  border-radius: 50%;
  color: #ff9d4d;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-tools-toggle:hover {
  background: rgba(255, 107, 0, 0.2);
  border-color: #ff9d4d;
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.dev-tools-toggle span {
  display: block;
}

.dev-tools-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .controls-panel {
    left: auto;
    bottom: auto;
    transform: none;
    width: min(280px, calc(100vw - 16px));
    min-width: 240px;
    max-width: 280px;
    top: 8px;
    right: 8px;
    padding: 0;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .controls-content {
    grid-template-columns: 1fr;
    max-height: min(72vh, 560px);
    max-height: min(72dvh, 560px);
  }

  .controls-section {
    border-right: none;
  }

  .toggle-group,
  .button-grid {
    grid-template-columns: 1fr;
  }

  .control-item {
    align-items: flex-start;
  }

  .control-desc {
    text-align: left;
  }

  .viewhelper-container {
    width: 96px;
    height: 96px;
    bottom: 8px;
    right: 8px;
  }

  .upload-box {
    padding: 32px;
    margin: 16px;
  }

  .loading-box {
    min-width: 300px;
    padding: 32px;
    margin: 16px;
  }

  .error-toast {
    min-width: auto;
    left: 16px;
    right: 16px;
    transform: none;
  }

  /* Version Modal - Centered on Mobile */
  .version-modal-card {
    bottom: auto;
    right: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 32px);
  }

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