:root {
  --primary: #47F138;
  --bg: #05070a;
  --text: #e5e5e5;
  --muted: #9a9a9a;
  --border: rgba(255,255,255,0.1);
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 22px 60px rgba(0,0,0,0.7);
  --font-weight: 500;
}

/* FONT */
@font-face {
  font-family: 'StackSansNotch';
  src: url('/assets/font/StackSansNotch-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}


html, body, button, input, textarea, select, label, a, p, span, div,
h1, h2, h3, h4, h5, h6 {
  font-family: 'StackSansNotch' !important;
}


body {
  background: var(--bg);
  color: var(--text);
  font-family: 'StackSansNotch', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}


/* ======================
   HERO
====================== */

.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  left: 8%;
  bottom: 18%;
  max-width: 520px;
  text-shadow: 0 12px 40px rgba(0,0,0,0.9);
}

.hero-title {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-sub {
  margin-top: 18px;
  font-size: 20px;
}

.hero-btn {
  margin-top: 30px;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #05070a;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 26px rgba(71,241,56,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.hero-btn:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.06);
  box-shadow: 0 0 36px rgba(71,241,56,0.75);
}

/* ======================
   BUILDER WRAPPER
====================== */

/* BUILDER SECTION — Background Image */
/* BUILDER SECTION — CLEAR BACKGROUND IMAGE */
.builder-container {
  position: relative;
  padding: 110px 8% 100px;

  background: 
      url('/assets/images/gemälde.jpeg') center/cover no-repeat;

  display: flex;
  gap: 40px;
  align-items: flex-start;
}


/* LEFT PANEL – TOOLS */

.builder-tools {
  flex: 0 0 360px;
  max-width: 360px;
}

.tools-title {
  font-size: 26px;
  margin-bottom: 14px;
}

.tool-section {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(5,7,10,0.95);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.6);
}

.tool-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.85;
  margin-bottom: 10px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.hint span {
  color: var(--primary);
}

/* Block Auswahl */

.block-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.block-btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #05070a;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.block-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.block-btn.active {
  border-color: var(--primary);
  background: rgba(71,241,56,0.16);
  color: var(--primary);
}

/* Style-Panel Inputs */

.tool-section label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
  gap: 6px;
  margin-bottom: 8px;
}

.tool-section input[type="color"] {
  width: 100%;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.tool-section input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* Actions */

.action-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: 0.16s;
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Block Settings */

#blockSettings {
  min-height: 120px;
}

#settingsContent {
  font-size: 12px;
  color: var(--muted);
}

#settingsContent label {
  font-size: 12px;
  color: var(--muted);
}

#settingsContent input[type="text"],
#settingsContent textarea,
#settingsContent select {
  margin-top: 4px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #05070a;
  color: var(--text);
  font-size: 12px;
  padding: 6px 8px;
  resize: vertical;
}

#settingsContent textarea {
  min-height: 60px;
}

/* ======================
   PREVIEW
====================== */

.builder-preview {
  flex: 1;
  min-width: 0;
}

/* Device Switch */

.device-switch {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}

.device-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: 0.16s;
}

.device-btn.active {
  background: rgba(71,241,56,0.16);
  border-color: var(--primary);
  color: var(--primary);
}

.device-btn:hover {
  border-color: var(--primary);
}

/* Preview Window */

.preview-window {
  border-radius: 26px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 0 0, rgba(71,241,56,0.22), transparent 60%),
              #05070a;
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: width 0.2s ease, max-width 0.2s ease, transform 0.2s ease;
}

/* Device Sizes: JS setzt Klassen .device-desktop/tablet/mobile auf .preview-window */

.preview-window.device-desktop {
  max-width: 100%;
  min-height: 520px;
}

.preview-window.device-tablet {
  max-width: 840px;
  min-height: 520px;
  margin: 0 auto;
  transform: scale(0.96);
}

.preview-window.device-mobile {
  max-width: 420px;
  min-height: 640px;
  margin: 0 auto;
  transform: scale(0.94);
}

/* Inner Page */

.preview-body {
  width: 100%;
  border-radius: 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), #05070a);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 18px 18px 24px;
  overflow: hidden;
}

/* Page Blocks (werden per JS erzeugt) */

.page-block {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(5,7,10,0.95);
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  position: relative;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease, background 0.16s ease;
}

.page-block:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.page-block.selected {
  border-color: var(--primary);
  box-shadow: 0 0 26px rgba(71,241,56,0.5);
  background: radial-gradient(circle at 0 0, rgba(71,241,56,0.25), rgba(5,7,10,0.98));
}

.block-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 6px;
}

.block-inner {
  font-size: 12px;
}

/* Spezifische Blocktypen (optional, für Optik) */

.page-block.block-header .block-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.block-header-logo {
  font-weight: 700;
}

.block-header-nav {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.block-header-nav span {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
}

.page-block.block-hero .block-inner-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-block.block-hero .block-inner-sub {
  font-size: 12px;
  color: var(--muted);
}

.page-block.block-content .block-inner-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.page-block.block-services .services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
}

.page-block.block-services .service-card {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 6px 7px;
  font-size: 11px;
}

.page-block.block-services .service-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.page-block.block-services .service-meta {
  font-size: 10px;
  color: var(--muted);
}

.page-block.block-footer .footer-text {
  font-size: 11px;
  color: var(--muted);
}

/* Animation – Blockeinblendung */

.page-block.animate-in {
  animation: fadeInUp 0.2s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shake für Fehlinteraktion */

.page-block.shake,
.preview-window.shake {
  animation: shake 0.18s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

/* ======================
   EXPORT POPUP
====================== */

.export-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.export-popup.active {
  display: flex;
}

.export-inner {
  width: min(900px, 90%);
  max-height: 80vh;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #05070a;
  box-shadow: 0 22px 70px rgba(0,0,0,0.8);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
}

.export-inner h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

#exportOutput {
  flex: 1;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #020305;
  color: var(--text);
  font-family: "Menlo", "Fira Code", monospace;
  font-size: 12px;
  padding: 10px 12px;
  resize: none;
  margin-bottom: 10px;
}

/* ======================
   RESPONSIVE
====================== */

@media (max-width: 1100px) {
  .builder-container {
    flex-direction: column;
  }

  .builder-tools {
    max-width: 100%;
    flex: 1;
  }

  .builder-preview {
    width: 100%;
  }

  .preview-window {
    margin-top: 10px;
  }
}

@media (max-width: 900px) {
  .hero-title {
    font-size: 46px;
  }

  .hero-sub {
    font-size: 16px;
  }

  .hero-content {
    left: 6%;
    right: 6%;
    bottom: 16%;
  }

  .builder-container {
    padding: 80px 6% 70px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 36px;
  }

  .tools-title {
    font-size: 22px;
  }

  .preview-window.device-desktop,
  .preview-window.device-tablet,
  .preview-window.device-mobile {
    max-width: 100%;
    transform: scale(1);
  }

  .preview-body {
    padding: 14px 14px 18px;
  }

  .page-block.block-services .services-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}
/* ======================
   TAB SYSTEM
====================== */

.tool-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.tool-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: 0.16s;
}

.tool-tab.active {
  background: rgba(71,241,56,0.16);
  border-color: var(--primary);
  color: var(--primary);
}

.tool-tab:hover {
  border-color: var(--primary);
}

/* Panels */

.tool-panel {
  display: none;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(5,7,10,0.95);
  padding: 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.6);
  margin-bottom: 14px;
}

.tool-panel.active {
  display: block;
}

/* ======================
   STYLE PANEL – FINAL FIX
====================== */

#tab-style {
  /* NICHT mehr display:grid → sonst immer sichtbar */
}

#tab-style h3 {
  margin-bottom: 10px;
}

/* Grid sitzt INNEN */
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.style-grid .span-2 {
  grid-column: span 2;
}

.style-field {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.style-field label {
  flex: 1;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.style-field input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.style-field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

#fontWeight {
  margin-top: 6px;
}
