/* ==========================================
   Modal (Dialog) Basis-Styling
   ========================================== */
#myModal {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  color: #1f2937;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Sanfte Animation beim Öffnen */
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

#myModal[open] {
  opacity: 1;
  transform: scale(1);
}

/* Dunkler Hintergrund (Backdrop) */
#myModal::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease-out;
}

/* Innerer Container */
.modal-content {
  position: relative;
  padding: 24px;
}

/* ==========================================
   Header & Navigation
   ========================================== */
#modalTitle {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  padding-right: 30px; /* Platz für das 'X' */
}

/* Schließen-X oben rechts */
.close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.75rem;
  font-weight: bold;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.close-btn:hover {
  color: #111827;
}

/* ==========================================
   Inhalt & Code-Blöcke
   ========================================== */
.modal-area h3 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-top: 16px;
  margin-bottom: 6px;
}

pre {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 16px 0;
}

code {
  font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================
   Aktions-Buttons
   ========================================== */
#closeModalBtnBottom {
  display: block;
  margin-left: auto;
  margin-top: 20px;
  padding: 8px 16px;
  background-color: #e5e7eb;
  color: #374151;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#closeModalBtnBottom:hover {
  background-color: #d1d5db;
}




/* Code copy button */
.modal-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 6px;
}

.modal-area h3 {
  margin: 0;
}

/* Copy Button Styling */
.copy-btn {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background-color: #e5e7eb;
  color: #111827;
}

/* Feedback-Zustand nach dem Kopieren */
.copy-btn.copied {
  background-color: #10b981;
  color: #ffffff;
  border-color: #059669;
}