:root {
  --bg: #050814;
  --bg-soft: #0a0f1f;
  --bg-panel: rgba(10, 15, 31, 0.92);
  --accent: #fb6c00;
  --accent-soft: rgba(251, 108, 0, 0.12);
  --text: #e9edf7;
  --muted: #8c93aa;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.55);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.24s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(circle at top, #151b33 0, #050814 55%);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
}

/* ========== UTILITY CLASSES ========== */

/* ✅ NEU: Verstecken-Klasse */
.hidden {
  display: none !important;
}

/* ========== LAYOUT ========== */

.app-shell {
  display: grid;
  grid-template-columns: minmax(380px, 420px) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ========== SIDEBAR ========== */

.sidebar {
  padding: 24px;
  background: linear-gradient(145deg, #050814, #080c19 60%, #120c1a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.sidebar__header {
  margin-bottom: 12px;
}

.brand {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand__accent {
  color: var(--accent);
  font-size: 24px;
}

.subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

/* ========== PANELS ========== */

.panel {
  padding: 20px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.panel--highlight {
  background: linear-gradient(145deg, rgba(251, 108, 0, 0.08), rgba(10, 15, 31, 0.92));
  border-color: rgba(251, 108, 0, 0.25);
}

.panel__title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== FORM FIELDS ========== */

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field span[id$="Label"] {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.field--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

/* ========== COLOR PICKER FIELDS ========== */

.field--color {
  margin-bottom: 14px;
}

.field--color label {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  display: block;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.color-picker-group:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.color-hex {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ========== RANGE INPUTS ========== */

input[type="range"] {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

input[type="range"]:hover {
  background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffaa4f);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 6px var(--accent-soft), 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 10px var(--accent-soft), 0 6px 16px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffaa4f);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 6px var(--accent-soft), 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* ========== COLOR INPUTS ========== */

input[type="color"] {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
}

input[type="color"]:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

/* ========== SELECT INPUTS ========== */

select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23e9edf7' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select option {
  background: var(--bg-soft);
  color: var(--text);
}

/* ========== CHECKBOXES ========== */

.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 10px;
}

.checkbox:last-child {
  margin-bottom: 0;
}

.checkbox:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox input[type="checkbox"]:hover {
  border-color: var(--accent);
}

.checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox span {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* ========== BUTTONS ========== */

.btn {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #ff8833);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(251, 108, 0, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #ff7a00, #ff9944);
  box-shadow: 0 12px 28px rgba(251, 108, 0, 0.4);
  transform: translateY(-2px);
}

/* ========== PRICE DISPLAY ========== */

.price-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.price-label {
  font-size: 14px;
  color: var(--muted);
}

.price-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* ========== 3D VIEWER ========== */

.viewer {
  position: relative;
  background: radial-gradient(circle at top, #172132, #050814 75%);
  overflow: hidden;
}

.viewer__canvas-wrap {
  position: absolute;
  inset: 0;
}

#canvas3d {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#canvas3d:active {
  cursor: grabbing;
}

/* ========== OVERLAY ========== */

.viewer__overlay {
  position: absolute;
  inset: 24px 24px auto auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.viewer__badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(251, 108, 0, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

.viewer__info {
  padding: 14px 18px 16px;
  border-radius: var(--radius-lg);
  background: rgba(5, 8, 20, 0.75);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 340px;
  box-shadow: var(--shadow-soft);
}

.viewer__info h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.viewer__info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .sidebar {
    max-height: 40vh;
    overflow-y: auto;
  }
  
  .viewer {
    min-height: 60vh;
  }
}

<!-- ✅ NEU: Montage-Typ Panel -->
<section class="panel">
    <h2 class="panel__title">🏗️ Montage</h2>
    
    <div class="field">
        <label for="mountingTypeSelect">Montageart</label>
        <select id="mountingTypeSelect">
            <option value="freestanding">Freistehend (4 Pfosten)</option>
            <option value="wall">Wandanschluss (2 Pfosten)</option>
        </select>
    </div>
    
    <div class="info-box" id="mountingInfo">
        <strong>Freistehend:</strong> Komplett unabhängige Konstruktion mit 4 Eckpfosten.
    </div>
</section>