/* Grundlegende Stile */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  background-color: #0a1128;
  color: white;
  box-sizing: border-box;
  position: relative;
  overflow-x: hidden;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* Dynamischer Hintergrund */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a1128 0%, #1a2a6c 50%, #0a1128 100%);
  background-size: 400% 400%;
  z-index: -1;
  animation: gradientBG 150s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.page-container {
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #e9c46a;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #e9c46a;
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tab.active {
  border-bottom-color: #2a9d8f;
  background: rgba(255, 255, 255, 0.1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Formular-Stile */
.seminar-form,
.info-form,
.catalog-form,
.tips-form {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Import-Formular Stile */
.import-form {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

input[type="file"] {
  width: 100%;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 10px;
}

input[type="file"]::-webkit-file-upload-button {
  background-color: #2a9d8f;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
  transition: background-color 0.3s;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background-color: #218879;
}

.form-group {
  margin-bottom: 15px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #e9c46a;
}

input[type="text"],
input[type="date"],
textarea.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  max-width: 100%;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea.form-control:focus {
  border-color: #2a9d8f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.3);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.info-description {
  margin-bottom: 15px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 15px;
  border-radius: 6px;
  border-left: 3px solid #e9c46a;
}

/* Checkbox-Stile */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
}

/* Tipps-Vorschau und Fehler */
.tips-preview,
.tips-error {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.tips-preview h3 {
  margin-top: 0;
  color: #e9c46a;
}

.tips-preview ul {
  margin: 0;
  padding-left: 20px;
}

.tips-preview li {
  margin-bottom: 8px;
}

.tips-error {
  border-left: 4px solid #e74c3c;
}

.tips-error .error-message {
  color: #e74c3c;
  font-weight: bold;
  margin-top: 0;
}

/* Tabellen-Stile */
.seminar-table,
.catalog-table,
.info-table,
.tips-table {
  margin-bottom: 30px;
}

.table-container {
  overflow-x: auto;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 20px;
  table-layout: fixed;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

/* Spaltenbreiten definieren - einheitlich für alle Tabellen */
table th:nth-child(1) /* Raum */,
table td:nth-child(1) {
  width: 10%;
}

table th:nth-child(2) /* Seminarnr */,
table td:nth-child(2) {
  width: 15%;
}

table th:nth-child(3) /* Seminartitel */,
table td:nth-child(3) {
  width: 35%;
}

table th:nth-child(4) /* vom */,
table td:nth-child(4),
table th:nth-child(5) /* bis */,
table td:nth-child(5) {
  width: 12%;
}

table th:nth-child(6) /* Aktionen */,
table td:nth-child(6) {
  width: 16%;
}

/* Katalog-Tabelle */
.catalog-table table th:nth-child(1) /* Seminarnr */,
.catalog-table table td:nth-child(1) {
  width: 20%;
}

.catalog-table table th:nth-child(2) /* Seminartitel */,
.catalog-table table td:nth-child(2) {
  width: 60%;
}

.catalog-table table th:nth-child(3) /* Aktionen */,
.catalog-table table td:nth-child(3) {
  width: 20%;
}

/* Info-Text-Tabelle */
.info-table table th:nth-child(1) /* von */,
.info-table table td:nth-child(1),
.info-table table th:nth-child(2) /* bis */,
.info-table table td:nth-child(2) {
  width: 15%;
}

.info-table table th:nth-child(3) /* Text */,
.info-table table td:nth-child(3) {
  width: 40%;
}

.info-table table th:nth-child(4) /* Status */,
.info-table table td:nth-child(4) {
  width: 10%;
}

.info-table table th:nth-child(5) /* Aktionen */,
.info-table table td:nth-child(5) {
  width: 20%;
}

/* Tipps-Tabelle */
.tips-table table th:nth-child(1) /* Nr. */,
.tips-table table td:nth-child(1) {
  width: 10%;
}

.tips-table table th:nth-child(2) /* Text */,
.tips-table table td:nth-child(2) {
  width: 70%;
}

.tips-table table th:nth-child(3) /* Aktionen */,
.tips-table table td:nth-child(3) {
  width: 20%;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.2);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

th {
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: bold;
  color: #e9c46a;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Alternierende Zeilenfarben für bessere Lesbarkeit */
tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.2);
}

tr:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

.raum {
  text-align: center;
  font-weight: bold;
  background-color: #2a9d8f;
  color: white;
}

/* Verbesserte Stile für die Aktionsspalte */
td.actions {
  padding: 10px;
}

/* Verbesserte Stile für die Aktionsbuttons */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: space-between;
}

.action-buttons .btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 10px;
  font-size: 14px;
  margin: 0;
  text-align: center;
}

.delete-form {
  margin: 0;
  flex: 1;
  display: flex;
}

.delete-form .btn {
  width: 100%;
}

/* Button-Stile */
.btn {
  display: inline-block;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.add-btn {
  background-color: #2a9d8f;
  background-image: linear-gradient(to bottom, #2a9d8f, #218879);
}

.add-btn:hover {
  background-color: #218879;
  background-image: linear-gradient(to bottom, #218879, #1a7268);
  transform: translateY(-2px);
}

.add-btn:active {
  transform: translateY(1px);
}

.edit-btn {
  background-color: #f4a261;
  background-image: linear-gradient(to bottom, #f4a261, #e08e4b);
  padding: 6px 10px;
  font-size: 14px;
  min-width: 70px;
  text-align: center;
  white-space: nowrap;
}

.edit-btn:hover {
  background-color: #e08e4b;
  background-image: linear-gradient(to bottom, #e08e4b, #d17a37);
  transform: translateY(-2px);
}

.edit-btn:active {
  transform: translateY(1px);
}

.delete-btn {
  background-color: #e76f51;
  background-image: linear-gradient(to bottom, #e76f51, #d65f41);
  padding: 6px 10px;
  font-size: 14px;
  min-width: 70px;
  text-align: center;
  white-space: nowrap;
}

.delete-btn:hover {
  background-color: #d65f41;
  background-image: linear-gradient(to bottom, #d65f41, #c54e30);
  transform: translateY(-2px);
}

.delete-btn:active {
  transform: translateY(1px);
}

.cancel-btn {
  background-color: #6c757d;
  background-image: linear-gradient(to bottom, #6c757d, #5a6268);
  padding: 10px 15px;
}

.cancel-btn:hover {
  background-color: #5a6268;
  background-image: linear-gradient(to bottom, #5a6268, #495057);
  transform: translateY(-2px);
}

.cancel-btn:active {
  transform: translateY(1px);
}

.display-btn {
  background-color: #3498db;
  background-image: linear-gradient(to bottom, #3498db, #2980b9);
}

.display-btn:hover {
  background-color: #2980b9;
  background-image: linear-gradient(to bottom, #2980b9, #2471a3);
  transform: translateY(-2px);
}

.display-btn:active {
  transform: translateY(1px);
}

/* Meldungen */
.message {
  padding: 10px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.success {
  background-color: rgba(46, 204, 113, 0.3);
  border-left: 4px solid #2ecc71;
}

.message.error {
  background-color: rgba(231, 76, 60, 0.3);
  border-left: 4px solid #e74c3c;
}

.no-data {
  text-align: center;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Display-Ansicht */
.display-view {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  padding-bottom: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-container {
  position: absolute;
  bottom: 0;
  left: 0;
}

.footer-logo {
  max-width: 120px;
  max-height: 60px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  th,
  td {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 5px;
  }

  /* Verbesserte Tab-Darstellung für mobile Geräte */
  .tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: none;
    margin-bottom: 15px;
    gap: 5px;
  }

  .tab {
    flex: 1 0 auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    justify-content: center;
    border-left: none;
  }

  /* Galerie-Tab auf mobilen Geräten */
  .tab.tab-right {
    margin-left: 0; /* Zurücksetzen des auto-margin */
    flex: 1 0 100%; /* Volle Breite auf mobilen Geräten */
    background-color: rgba(42, 157, 143, 0.2); /* Etwas stärkerer Hintergrund für bessere Sichtbarkeit */
    border: 1px solid rgba(42, 157, 143, 0.3);
    order: 5; /* Stellt sicher, dass es immer als letztes angezeigt wird */
  }

  .tab.active {
    border-bottom: 1px solid #2a9d8f;
    border-left: 1px solid #2a9d8f;
    border-right: 1px solid #2a9d8f;
    border-top: 1px solid #2a9d8f;
    background: rgba(42, 157, 143, 0.2);
  }

  td.actions {
    padding: 10px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 5px;
  }

  .action-buttons .btn,
  .delete-form {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .seminar-form,
  .info-form,
  .catalog-form,
  .tips-form {
    padding: 15px;
  }

  input[type="text"],
  input[type="date"],
  textarea.form-control {
    font-size: 16px; /* Verhindert Zoom auf iOS */
  }

  .footer-logo {
    max-width: 100px;
    max-height: 50px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .table-container {
    margin: 0 -10px;
    width: calc(100% + 20px);
  }

  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 6px 8px;
  }

  .tab {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
}

/* Anpassungen für die Anzeigeseite */
.display-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.display-header {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px 10px 0 0;
}

.display-table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
}

.display-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

.display-table tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.2);
}

.display-table tr:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

.info-text {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.display-footer {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 0 10px 10px;
}

/* Entferne die zusätzlichen Stile für den Anzeige-Tab (ca. Zeilen 750-850) und behalte nur die grundlegenden Stile */

/* Entferne diese Stile */
.appearance-options,
.appearance-option,
.appearance-option h3,
.feature-list,
.feature-list li,
.feature-list li:before,
.display-appearance,
.display-preview,
.preview-container,
.preview-frame,
.preview-header,
.preview-header h3,
.preview-content,
.preview-image,
.preview-image:before,
.preview-image:after {
  /* Diese Stile werden nicht mehr benötigt */
}

/* Behalte nur die grundlegenden Stile für den Display-Tab */
.display-settings,
.display-view {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.field-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
  font-style: italic;
}

/* Stil für den rechten Tab (Galerie) */
.tab-right {
  margin-left: auto; /* Schiebt den Tab ganz nach rechts */
  background-color: rgba(42, 157, 143, 0.1); /* Leicht hervorgehobener Hintergrund */
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.tab-right:hover {
  background-color: rgba(42, 157, 143, 0.2); /* Etwas stärkerer Hintergrund beim Hover */
}

@media (max-width: 768px) {
  .tab-right {
    margin-left: 0; /* Auf mobilen Geräten nicht nach rechts schieben */
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 5px;
  }
}

/* Zentrierte Aktionen und großer Button */
.centered-actions {
  justify-content: center;
  margin: 30px 0;
}

.large-btn {
  font-size: 1rem;
  padding: 15px 30px;
  min-width: 250px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.large-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.large-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Anpassung für mobile Geräte */
@media (max-width: 768px) {
  .large-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px 20px;
  }
}

/* Stil für den Abmelde-Button */
.user-controls {
  position: absolute;
  top: 0;
  right: 0;
}

.logout-btn {
  display: inline-block;
  padding: 8px 15px;
  background-color: rgba(231, 76, 60, 0.8);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background-color: rgba(231, 76, 60, 1);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .user-controls {
    position: static;
    text-align: center;
    margin-top: 10px;
  }

  .logout-btn {
    display: inline-block;
    width: auto;
  }
}
