/* 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%;
  }
}

/* Container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background-color: transparent;
  padding: 0 15px;
}

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

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

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

/* User Controls */
.user-controls {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 10px;
}

.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);
}

/* Formulare */
.upload-section {
  background: rgba(0, 0, 0, 0.3);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

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

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

input:focus,
textarea:focus {
  border-color: #2a9d8f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.3);
}

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

.upload-btn {
  background-color: #2a9d8f;
  background-image: linear-gradient(to bottom, #2a9d8f, #218879);
  margin-top: 15px;
}

.upload-btn:hover {
  background-color: #218879;
  transform: translateY(-2px);
}

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

.download-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.delete-btn {
  background-color: #e76f51;
  background-image: linear-gradient(to bottom, #e76f51, #d65f41);
  padding: 6px 10px;
  font-size: 14px;
}

.delete-btn:hover {
  background-color: #d65f41;
  transform: translateY(-2px);
}

/* 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;
}

/* Info-Text */
.info-text {
  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;
  text-align: center;
}

/* Added Barcamp info section styles */
.barcamp-info {
  background: rgba(42, 157, 143, 0.15);
  padding: 0;
  border-radius: 12px;
  margin-bottom: 40px;
  border: 2px solid rgba(42, 157, 143, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.barcamp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  cursor: pointer;
  transition: background 0.3s ease;
  user-select: none;
}

.barcamp-header:hover {
  background: rgba(42, 157, 143, 0.1);
}

.barcamp-header h2 {
  margin: 0;
  color: #e9c46a;
  font-size: 1.8rem;
}

.toggle-icon {
  font-size: 1.5rem;
  color: #e9c46a;
  transition: transform 0.3s ease;
  font-weight: bold;
}

.barcamp-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  padding: 0 30px;
}

.barcamp-content > *:first-child {
  margin-top: 20px;
}

.barcamp-content > *:last-child {
  margin-bottom: 30px;
}

/* Added responsive YouTube video container */
.video-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 30px;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.info-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #e9c46a;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.info-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  border-left-color: #2a9d8f;
  background: rgba(0, 0, 0, 0.5);
}

.info-box h3 {
  color: #e9c46a;
  font-size: 1.2rem;
  margin-bottom: 12px;
  margin-top: 0;
}

.info-box p {
  margin: 8px 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.info-box ul {
  margin: 10px 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.info-box li {
  margin: 6px 0;
  line-height: 1.5;
}

.info-box strong {
  color: #2a9d8f;
  font-weight: bold;
}

/* Themen-Liste */
.topics-section {
  margin-top: 40px;
}

.topics-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.topic-card {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #2a9d8f;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.topic-header {
  margin-bottom: 10px;
}

.topic-number {
  background-color: #2a9d8f;
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: bold;
}

.topic-title {
  font-size: 1.1rem;
  margin: 15px 0;
  line-height: 1.5;
  min-height: 60px;
}

.topic-moderator {
  color: #e9c46a;
  margin: 10px 0;
  font-size: 0.95rem;
}

.topic-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* Backlog-Bereich */
.backlog-actions {
  background: rgba(0, 0, 0, 0.3);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
  text-align: center;
}

.topics-management {
  margin-top: 40px;
}

.topics-table {
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
}

.topics-table table {
  width: 100%;
  border-collapse: collapse;
}

.topics-table th,
.topics-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topics-table th {
  background: rgba(0, 0, 0, 0.3);
  color: #e9c46a;
  font-weight: bold;
}

.topics-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Druckbare Karten (versteckt auf Bildschirm) */
.print-cards {
  display: none;
}

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

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

  /* Improved mobile header styling */
  h1 {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.2rem;
  }

  /* Mobile styles for Barcamp info section */
  .barcamp-header {
    padding: 15px 20px;
  }

  .barcamp-header h2 {
    font-size: 1.4rem;
  }

  .toggle-icon {
    font-size: 1.2rem;
  }

  .barcamp-content {
    padding: 0 15px;
  }

  .barcamp-content > *:first-child {
    margin-top: 15px;
  }

  .barcamp-content > *:last-child {
    margin-bottom: 20px;
  }

  /* Mobile video container adjustments */
  .video-container {
    margin-bottom: 20px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .info-box {
    padding: 15px;
  }

  .info-box h3 {
    font-size: 1.1rem;
  }

  /* Better mobile form styling */
  .upload-section {
    padding: 15px;
  }

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

  input[type="text"],
  input[type="password"],
  textarea.form-control,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .btn {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
  }

  /* Mobile-optimized topic cards */
  .topics-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .topic-card {
    padding: 15px;
  }

  /* Mobile-friendly backlog controls */
  .user-controls {
    position: static;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
  }

  .user-controls .btn,
  .user-controls .logout-btn {
    margin: 5px;
  }

  /* Mobile table improvements */
  .action-buttons {
    flex-direction: column;
    gap: 5px;
  }

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

  .topics-table {
    font-size: 0.85rem;
    overflow-x: auto;
  }

  .topics-table table {
    min-width: 600px;
  }

  .topics-table th,
  .topics-table td {
    padding: 8px;
  }

  /* Mobile backlog actions */
  .backlog-actions {
    padding: 15px;
  }

  .backlog-actions .btn {
    width: 100%;
    margin: 5px 0;
  }

  .backlog-actions form {
    width: 100%;
    margin: 5px 0 !important;
  }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  h1 {
    font-size: 1.2rem;
  }

  /* Extra small screen adjustments for info boxes */
  .info-box h3 {
    font-size: 1rem;
  }

  .info-box {
    padding: 12px;
  }

  .topic-number {
    font-size: 0.8rem;
    padding: 2px 8px;
  }

  .topic-title {
    font-size: 1rem;
  }
}
