/* ----------------------------------------------
   Global Styles & Google-Font (Poppins)
---------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(120deg, #f0f0f0, #dfeef4 60%, #f0f0f0);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  color: #333;
}

.container {
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.08);
  width: 90%;
  max-width: 1200px;
  padding: 20px 30px;
  margin: 40px 0;
}

header {
  text-align: center;
  margin-bottom: 20px;
}
header h1 {
  font-weight: 600;
  color: #008afc;
  margin-bottom: 10px;
}
header p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Anleitung (Details) */
.instructions-details {
  margin: 10px auto;
  max-width: 600px;
  text-align: left;
}
.instructions-details summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  outline: none;
}
.instructions-details p {
  margin: 10px 0 0 15px;
}

/* Abschnittstitel */
h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 600;
  color: #008afc;
}
h3 {
  font-weight: 500;
  margin-bottom: 10px;
}

hr {
  margin: 30px 0;
  border: none;
  border-top: 2px solid #eaeaea;
}

/* Upload-Sektion */
.upload-section {
  margin-bottom: 20px;
}

/* Drag & Drop */
.drag-drop-zone {
  border: 3px dashed #1fb070;
  padding: 30px;
  text-align: center;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 20px;
}
.drag-drop-zone p {
  color: #777;
  font-weight: 500;
}
.drag-drop-zone.drag-over {
  background: #e0ffe0;
  border-color: #1fb070;
}

/* Produkt-Form */
.products-section {
  margin-bottom: 30px;
}
.toggle-all-btn {
  margin-bottom: 10px;
}

/* Produkt-Block */
.product-block {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin: 20px 0;
  padding: 20px;
  position: relative;
}
.use-product-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  margin-top: 5px;
}
label {
  display: block;
  margin-top: 12px;
  font-weight: 500;
}

/* Inputs */
input[type="text"],
textarea {
  width: 100%;
  padding: 10px;
  margin: 5px 0 15px 0;
  border: 2px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.3s;
}
input[type="text"]:focus,
textarea:focus {
  border-color: #008afc;
}
.input-error {
  border-color: #d8000c !important;
  background-color: #fff1f1;
}
textarea {
  resize: vertical;
}

/* Drei Uploadboxen */
.dropzone-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.upload-box {
  flex: 1;
  color: #fff;
  padding: 10px;
  margin: 10px 0;
  border-radius: 10px;
  transition: transform 0.3s, background-color 0.3s;
  display: flex;
  flex-direction: column;
}
.upload-box h4 {
  margin-top: 0;
  font-weight: 500;
  margin-bottom: 10px;
}
.upload-box:hover {
  transform: translateY(-3px);
}
.box-transparent {
  background: #e21c21;
}
.box-resize {
  background: #555;
}
.box-videos {
  background: #008afc;
}
/* Neue Video Links Box */
.box-video-links {
  background: #ff9800;
}
.sortable-list {
  border: 2px dashed rgba(255,255,255,0.7);
  border-radius: 10px;
  min-height: 60px;
  padding: 10px;
  background: rgba(255,255,255,0.2);
  width: 100%;
}
.preview-img {
  max-width: 80px;
  display: block;
  margin-bottom: 5px;
}
.sortable-item {
  background: #fff;
  color: #333;
  padding: 5px 10px;
  margin: 5px 0;
  border-radius: 5px;
  cursor: move;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Download Icon */
.download-icon {
  margin-left: 8px;
  text-decoration: none;
  font-size: 1.2em;
  color: #fff;
  background: rgba(0,0,0,0.3);
  padding: 2px 5px;
  border-radius: 4px;
  transition: background-color 0.3s;
}
.download-icon:hover {
  background-color: rgba(0,0,0,0.6);
}

/* Buttons */
button {
  background: #008afc;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.3s, transform 0.3s;
  display: inline-block;
}
button:hover {
  background-color: #1fb070;
  transform: translateY(-2px);
}

/* Reset Form Button (zusätzlich) */
#reset-form-btn {
  background: #e21c21;
}
#reset-form-btn:hover {
  background-color: #c00;
}

/* Meldungen */
#zip-messages,
#prod-messages {
  color: #e21c21;
  margin: 10px 0;
  font-weight: 500;
}

/* Overlay */
#wait-overlay {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  transition: 0.3s;
}
#wait-overlay.active {
  display: flex;
}
#progress-container {
  width: 300px;
  text-align: center;
}
#progress-bar {
  width: 100%;
  height: 30px;
  background: #ccc;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}
#progress-fill {
  background: #1fb070;
  width: 0%;
  height: 100%;
  position: absolute;
  top: 0; 
  left: 0;
  transition: width 0.3s;
}

/* Dark Mode Toggle Panel (links) */
#side-panel {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #fff;
  border: 2px solid #008afc;
  border-radius: 10px;
  padding: 10px 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
  z-index: 999;
}
#side-panel .toggle-label {
  font-weight: 600;
  color: #008afc;
  cursor: pointer;
}

/* Sticky Keyboard (rechts) */
#sticky-keyboard {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 2px solid #008afc;
  border-radius: 10px;
  padding: 10px 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
  z-index: 999;
}
#sticky-keyboard h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
  color: #008afc;
  font-size: 1rem;
}
.symbol-btn {
  background: #008afc;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 6px 10px;
  margin: 5px 5px 0 0;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}
.symbol-btn:hover {
  background: #1fb070;
}

/* Dark Mode Styles */
.dark-mode {
  background: #1f1f1f;
  color: #ccc;
}
.dark-mode .container {
  background: #2b2b2b;
}
.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4 {
  color: #93c2ff;
}
.dark-mode .instructions-details summary {
  color: #93c2ff;
}
.dark-mode .instructions-details p {
  color: #ccc;
}
.dark-mode hr {
  border-top-color: #333;
}
.dark-mode input[type="text"],
.dark-mode textarea {
  background: #444;
  color: #fff;
  border-color: #666;
}
.dark-mode input[type="text"]:focus,
.dark-mode textarea:focus {
  border-color: #008afc;
}
.dark-mode .product-block {
  background: #3a3a3a;
  border-color: #555;
}
.dark-mode .upload-box {
  background: #5f5f5f !important;
  color: #eaeaea;
  border-color: #777;
}
.dark-mode .sortable-list {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
}
.dark-mode .sortable-item {
  background: #4c4c4c;
  border-color: #666;
  color: #e0e0e0;
}
.dark-mode button {
  background: #0070c0;
}
.dark-mode button:hover {
  background: #0a995e;
}
.dark-mode #zip-messages,
.dark-mode #prod-messages {
  color: #ffa8a8;
}
.dark-mode #side-panel {
  background: #333;
  border-color: #0070c0;
  color: #fff;
}
.dark-mode #side-panel .toggle-label {
  color: #93c2ff;
}
.dark-mode #sticky-keyboard {
  background: #333;
  border-color: #0070c0;
  color: #fff;
}
.dark-mode #sticky-keyboard h4 {
  color: #93c2ff;
}
.dark-mode .symbol-btn {
  background: #0070c0;
  color: #fff;
}
.dark-mode .symbol-btn:hover {
  background: #1fb070;
}
.dark-mode #side-panel {
  background: #333;
  border-color: #0070c0;
  color: #fff;
}

/* Hauptmenü */
.menu-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.menu-card {
  background: #ffffff;
  width: min(720px, 100%);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  padding: 32px;
  text-align: center;
}

.menu-card h1 {
  margin-top: 0;
  color: #008afc;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.category-btn {
  background: linear-gradient(135deg, #008afc, #1fb070);
  font-size: 1rem;
  font-weight: 600;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selected-category {
  margin-top: 0;
  color: #4f5d75;
}

.secondary-btn {
  background: #4f5d75;
}

@media (max-width: 720px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  .header-top-row {
    flex-direction: column;
  }
}
