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

body {
  overflow: hidden;
  background: #000;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e0e0e0;
}

#rtx-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

#loading-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.8s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-content h1 {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, #76b900, #00b4d8, #7b2ff7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.progress-bar {
  width: 300px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #76b900, #00b4d8);
  border-radius: 2px;
  transition: width 0.3s ease;
}

#loading-text {
  color: #888;
  font-size: 0.9rem;
}

#ui-panel {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 260px;
  background: rgba(10, 10, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  z-index: 100;
  font-size: 0.82rem;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none;
}

.toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.3s;
}

.panel-body {
  padding: 6px 14px 14px;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.panel-body.collapsed {
  max-height: 0 !important;
  padding: 0 14px;
}

.section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #76b900;
  margin-bottom: 8px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: #aaa;
}

input[type="range"] {
  width: 100%;
  margin-top: 3px;
  accent-color: #76b900;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.checkbox-label input {
  accent-color: #76b900;
}

select {
  width: 100%;
  padding: 5px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.btn {
  display: block;
  width: 100%;
  padding: 7px 10px;
  background: rgba(118, 185, 0, 0.15);
  border: 1px solid rgba(118, 185, 0, 0.3);
  border-radius: 5px;
  color: #76b900;
  cursor: pointer;
  text-align: center;
  font-size: 0.78rem;
  margin-bottom: 6px;
  transition: background 0.2s;
}

.btn:hover {
  background: rgba(118, 185, 0, 0.3);
}

.file-btn {
  cursor: pointer;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  color: #aaa;
}

.stat-row span:last-child {
  color: #76b900;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#controls-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 30, 0.7);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: #888;
  z-index: 100;
  pointer-events: none;
  transition: opacity 2s ease 5s;
}
