/* === HEGEMONITOR STYLES - BEREINIGT === */

/* Grundlayout */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  background-color: #7b9277;
  color: white;
  box-sizing: border-box;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%; /* Prevents text scaling on iOS */
  -ms-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::before,
body::after {
  display: none !important;
}

/* Universal box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Kopfzeile */
header.topbar {
  min-height: 100px;
  height: auto;
  padding: 10px 20px;
  box-sizing: border-box;
  background-color: #647762;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-container img {
  height: 65px;
}

.logo-container span {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Buttons oben rechts */
.auth-buttons {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.auth-buttons .button {
  padding: 8px 16px;
  background-color: #8a9c88;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.3s;
}

.auth-buttons .button:hover {
  background-color: #a2b5a0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: #647762;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #8a9c88;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  color: white;
}

.modal-header {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 15px;
}

.modal-footer {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  background-color: #8a9c88;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}

/* Responsive Header */
@media (max-width: 767px) {
  header.topbar {
    min-height: 80px;
    height: auto;
    padding: 10px 12px;
  }

  .logo-container img {
    height: 50px;
  }

  .logo-container span {
    font-size: 18px;
  }

  .auth-buttons .button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Layout unter der Kopfzeile */
.container {
  display: flex;
  flex: 1;
  height: auto;
  overflow: visible;
  min-height: 0;
}

/* Navigation */
nav.sidebar {
  width: 220px;
  flex-shrink: 0;
  background-color: #40503d;
  color: white;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

nav.sidebar a {
  color: white;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav.sidebar a:hover {
  background-color: #6f7e6c;
}

nav.sidebar a.active {
  font-weight: bold;
  color: #fffead;
  text-decoration: underline;
}

/* Responsive Navigation für Mobile */
@media (max-width: 767px) {
  .container {
    flex-direction: column;
  }

  nav.sidebar {
    width: 100%;
    flex-shrink: 1;
    padding: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }

  nav.sidebar::-webkit-scrollbar {
    height: 4px;
    display: block;
  }

  nav.sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  nav.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  nav.sidebar a {
    padding: 12px 16px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
  }

  nav.sidebar a:last-child {
    border-right: none;
  }

  nav.sidebar a.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid #fffead;
  }
}

/* Hauptinhalt */
main.content {
  background-color: #7c9279;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex-grow: 1;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

main.content::-webkit-scrollbar {
  display: none;
}

/* Specific Mobile Fixes for AGB Page */
@media (max-width: 767px) {
  .container-agb main.content {
    padding: 15px;
  }

  .container-agb main.content h1 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .container-agb main.content h2 {
    font-size: 1.25rem;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .container-agb main.content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
  }

  .container-agb main.content ol, 
  .container-agb main.content ul {
    padding-left: 20px;
  }

  .container-agb main.content li {
    font-size: 14px;
    margin-bottom: 8px;
  }
}

/* === BILDERDATEN SPEZIFISCHE STYLES === */

/* File Input und Buttons */
input[type="file"], 
button {
  margin-bottom: 0px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  box-sizing: border-box;
}

input[type="file"], 
button#readButton {
  width: 100%;
  max-width: 320px;
  display: block;
  background-color: #8a9c88;
  color: white;
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.3s;
}

button, .button {
  background-color: #42693d;
  color: white;
  cursor: pointer;
  width: 200px;
  max-width: 100%;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  padding: 10px;
  border-radius: 5px;
  border: none;
  box-sizing: border-box;
}

button:hover, .button:hover {
  background-color: #45a049;
}

/* Massenauswahl */
.massenauswahl {
  display: none;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 5px;
  gap: 15px;
  width: 100%;
  max-width: none;
}

.massenauswahl.visible {
  display: flex;
}

.massenauswahl .auth-buttons {
  margin-left: 0;
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  flex-wrap: nowrap;
}

.massenauswahl .auth-buttons label {
  display: inline;
  margin: 0;
  margin-right: 5px;
  font-weight: bold;
}

.massenauswahl .auth-buttons select {
  width: 250px;
  margin: 0;
}

.massenauswahl button {
  width: auto;
  margin-right: 20px;
  margin-bottom: 10px;
  min-width: 120px;
}

.massenauswahl label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
}

.massenauswahl select {
  width: 100%;
  max-width: 250px;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

/* Kamera für Massenauswahl */
.kamera-label {
  color: white !important;
  font-weight: bold;
}

/* Kamera für Massenauswahl */
.kamera_e-label {
  color: #333 !important;
  font-weight: bold;
  font-size: 14px;
}

/* Ausgabefenster Bild */
.file-output {
  background-color: #e8f0e8;
  width: 100%;
  color: black;
  margin-bottom: 15px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  /* overflow: hidden; */
  position: relative;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

.file-output:hover {
  z-index: 50;
}

.file-output.complete {
  background-color: #d3d3d3;
}

@media (min-width: 768px) {
  .file-output {
    width: 100%;
    max-width: 1200px;
  }
}

.file-output input[type="checkbox"] {
  margin-right: 15px;
  margin-top: 5px;
  transform: scale(1.2);
}

.file-output img {
  width: 220px;
  height: auto;
  margin-right: 20px;
  border-radius: 5px;
  transition: transform 0.3s ease, z-index 0.3s ease;
  z-index: 1;
  flex-shrink: 0;
}

.file-output img:hover {
  transform: scale(2);
  transform-origin: top left;
  z-index: 10;
  position: relative;
}

.file-output div {
  flex-grow: 1;
}

.file-output p {
  margin: 5px 0;
  font-weight: bold;
}

.file-output label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
  color: black;
}

.file-output select {
  width: 100%;
  max-width: 200px;
  padding: 5px;
  border-radius: 3px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

.delete-btn {
  width: 35px;
  height: 35px;
  padding: 0;
  background-color: #d32f2f;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: 15px;
  margin-top: 0;
}

.delete-btn:hover {
  background-color: #b71c1c;
}

/* Save Message */
#saveMessage {
  display: none;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 15px;
  border-radius: 5px;
  margin: 20px 0;
  font-weight: bold;
}

/* === AUSWERTUNG SPEZIFISCHE STYLES === */

.hegemonitor-wrapper {
  background-color: #7b9277;
  color: #fff;
  box-sizing: border-box;
  width: 100%;
}

.hegemonitor-wrapper h3 {
  margin-bottom: 20px;
  text-align: center;
}

.filter-container {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-container > div {
  display: flex;
  flex-direction: column;
}

.filter-container label,
.filter-container select {
  font-size: 16px;
  padding: 6px 10px;
}

.filter-container select {
  max-width: 200px;
}

#infoBar {
  color: white;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

#chartWrapper {
  width: 100%;
  height: 450px;
  background-color: #fff;
  border-radius: 5px;
  padding: 20px;
  box-sizing: border-box;
}

canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
}

/* === TABLE RESPONSIVE DESIGN === */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

table thead,
table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

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

/* === SCROLL IMPROVEMENTS === */
.container {
  overflow-x: hidden; /* Prevent horizontal scroll on container */
}

nav.sidebar {
  scrollbar-width: thin;
  scrollbar-color: #8a9c88 #40503d;
}

nav.sidebar::-webkit-scrollbar {
  height: 6px;
}

nav.sidebar::-webkit-scrollbar-track {
  background: #40503d;
}

nav.sidebar::-webkit-scrollbar-thumb {
  background: #8a9c88;
  border-radius: 3px;
}

nav.sidebar::-webkit-scrollbar-thumb:hover {
  background: #a2b5a0;
}

/* === INDEX SPEZIFISCHE STYLES === */

/* Bild-Container für Index-Seite */
.bild-container {
  text-align: center;
  margin-top: 20px;
  padding: 0 20px; /* Add padding for mobile */
}

/* Bild-Größe Logo auf Index-Seite */
.bild-container img {
  max-width: 65%;
  height: auto;
  max-height: 400px; /* Prevent overly large images */
}

/* Styling für das Login-Formular */
.login-container {
    padding: 0px; /* Erhöhe den padding-Wert, um den Abstand vom Rand zu vergrößern */
    margin: 0px; /* Optional: Füge margin hinzu, um den Abstand vom äußeren Rand zu vergrößern */
    color: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.login-container input {
    padding: 10px;
    margin: 15px 0; /* Erhöhe den margin-Wert, um den Abstand zwischen den Eingabefeldern zu vergrößern */
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Responsive Eingabefelder für E-Mail und Passwort auf allen Seiten */
input[type="email"], 
input[type="password"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    margin: 15px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Registrierung - Datenschutz Checkbox */
input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px !important;
    transform: scale(1.2);
}

.content label[for="datenschutz_akzeptiert"] {
    color: white;
    font-size: 14px;
    line-height: 1.4;
    display: inline;
    margin: 0;
}

.content form > div {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px; /* Abstand zwischen den Kästen hinzugefügt */
}

/* Nachrichten-Styling für Registrierung */
.message {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    font-weight: bold;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* === MESSAGE TYPES === */
.meldung, .success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: bold;
}

.fehler, .error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: bold;
}

.warning-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: bold;
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: bold;
}

/* === RESPONSIVE MESSAGE STYLING === */
@media (max-width: 768px) {
    .message, .meldung, .fehler, .success-message, .error-message, .warning-message, .info-message {
        padding: 12px;
        margin: 10px 0;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .message, .meldung, .fehler, .success-message, .error-message, .warning-message, .info-message {
        padding: 10px;
        margin: 8px 0;
        font-size: 13px;
        border-radius: 3px;
    }
}


/* Footer */
.content-footer {
  width: 100%;
  background-color: #40503d;
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.3);
  border-top: 1px solid #ccc;
  flex-shrink: 0;
  margin-top: auto;
}

.content-footer a {
  color: white;
  text-decoration: none;
  margin: 0 8px;
}

.content-footer a:hover {
  text-decoration: underline;
  color: #ddd;
}

@media (max-width: 767px) {
  .content-footer {
    padding: 8px 10px;
    font-size: 12px;
  }

  .content-footer a {
    margin: 0 4px;
  }
}

/* === RESPONSIVE DESIGN === */

/* Large Desktop */
@media (min-width: 1200px) {
  .container {
    max-width: 100%;
  }
  
  main.content {
    padding: 30px;
  }
  
  .filter-container {
    gap: 20px;
  }
}

/* Desktop */
@media (max-width: 1199px) and (min-width: 992px) {
  main.content {
    padding: 25px;
  }
}

/* Tablet Landscape */
@media (max-width: 991px) and (min-width: 769px) {
  nav.sidebar {
    width: 180px;
  }
  
  main.content {
    padding: 20px;
  }
  
  .filter-container {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .filter-container > div {
    flex: 1 1 200px;
    min-width: 150px;
  }
  
  .file-output {
    margin-right: 20px;
  }
  
  .massenauswahl button {
    margin-right: 20px;
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  nav.sidebar {
    width: 180px;
    flex-shrink: 0;
  }

  nav.sidebar a {
    padding: 8px 0;
    font-size: 14px;
  }

  main.content {
    padding: 15px;
  }

  .logo-container span {
    font-size: 20px;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .filter-container > div {
    width: 100%;
  }

  .filter-container select {
    width: 100%;
    max-width: none;
  }

  .file-output {
    flex-direction: column;
    align-items: flex-start;
    margin-right: 0;
    width: 100%;
  }

  .file-output img {
    width: 100%;
    max-width: 250px;
    margin-bottom: 15px;
    margin-right: 0;
  }
  
  .massenauswahl {
    margin-right: 0;
  }
  
  .massenauswahl button {
    margin-right: 10px;
    margin-bottom: 15px;
    width: auto;
    min-width: 120px;
  }
  
  .login-container input,
  input[type="email"], 
  input[type="password"] {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
  }
  
  /* Auswertung spezifisch */
  #infoBar {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .export-container {
    width: 100%;
    justify-content: stretch;
  }
  
  .export-container form {
    flex: 1;
  }
  
  #chartWrapper {
    height: 350px;
    padding: 15px;
  }

  .massenauswahl .auth-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }

  .massenauswahl .auth-buttons label {
    display: block;
    margin-bottom: 5px;
  }

  .massenauswahl .auth-buttons select {
    width: 100%;
    max-width: 100%;
  }
}

/* Mobile Large */
@media (max-width: 576px) {
  header.topbar {
    flex-direction: column;
    height: auto;
    padding: 15px;
    align-items: stretch;
    gap: 15px;
  }
  
  .logo-container {
    justify-content: center;
  }

  .auth-buttons {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    gap: 10px;
  }
  
  .auth-buttons .button {
    flex: 1;
    text-align: center;
    max-width: 150px;
  }

  .logo-container img {
    height: 50px;
  }

  .logo-container span {
    font-size: 18px;
  }

  nav.sidebar {
    width: 160px;
  }

  nav.sidebar a {
    font-size: 13px;
    padding: 8px 0;
  }

  main.content {
    padding: 15px 10px;
  }

  input[type="file"],
  button#readButton,
  #saveToDB {
    width: 100%;
    max-width: none;
  }
  
  button {
    width: 100%;
    max-width: none;
    margin-bottom: 10px;
  }

  .file-output img {
    width: 100%;
    max-width: 200px;
  }

  .file-output img:hover {
    transform: scale(2.5);
  }

  .massenauswahl select,
  .file-output select {
    width: 100%;
    max-width: none;
  }
  
  .massenauswahl button {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .login-container {
    width: 100%;
    max-width: none;
    padding: 0;
  }
  
  .login-container input,
  input[type="email"], 
  input[type="password"] {
    width: 100%;
    max-width: none;
    padding: 8px;
    margin: 10px 0;
  }

  /* Index-Bild auf Mobile */
  .bild-container img {
    max-width: 80%;
  }
  
  /* Filter Container Mobile */
  .filter-container button {
    width: 100%;
    padding: 12px;
  }
  
  /* Info Bar Mobile */
  #infoBar {
    font-size: 14px;
  }
  
  #infoBar > div:first-child {
    width: 100%;
  }
  
  .export-container {
    flex-direction: column;
    gap: 5px;
  }
  
  .export-container button {
    padding: 12px;
    font-size: 16px;
    margin-bottom: 0;
  }
  
  #chartWrapper {
    height: 300px;
    padding: 10px;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  header.topbar {
    padding: 10px;
  }
  
  .logo-container img {
    height: 45px;
  }

  .logo-container span {
    font-size: 16px;
  }

  nav.sidebar {
    width: 140px;
  }

  nav.sidebar a {
    font-size: 12px;
    padding: 6px 0;
  }

  main.content {
    padding: 10px;
  }

  .file-output img:hover {
    transform: scale(2);
  }

  .bild-container img {
    max-width: 90%;
  }
  
  #chartWrapper {
    height: 250px;
    padding: 8px;
  }
  
  .filter-container label {
    font-size: 14px;
  }
  
  .filter-container select {
    font-size: 14px;
    padding: 8px;
  }
}

/* Mobile Extra Small */
@media (max-width: 400px) {
  .file-output img:hover {
    transform: scale(1.8);
  }
  
  .massenauswahl {
    padding: 8px;
  }
  
  .file-output {
    padding: 8px;
  }

  .bild-container img {
    max-width: 95%;
  }
  
  .logo-container span {
    font-size: 14px;
  }
  
  nav.sidebar a {
    font-size: 11px;
    padding: 6px 3px;
    min-width: 50px;
  }
  
  #chartWrapper {
    height: 200px;
    padding: 5px;
  }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  header.topbar {
    min-height: 60px;
    height: 60px;
    padding: 5px 15px;
  }
  
  .logo-container img {
    height: 35px;
  }
  
  .logo-container span {
    font-size: 14px;
  }
  
  nav.sidebar {
    padding: 5px;
  }
  
  nav.sidebar a {
    padding: 8px 6px;
    font-size: 12px;
  }
  
  main.content {
    padding: 10px;
  }
  
  #chartWrapper {
    height: 250px;
  }
}

/* === FORM STYLING === */
form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: white;
}

form input {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px; /* Prevents zoom on iOS */
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: #8a9c88;
  box-shadow: 0 0 5px rgba(138, 156, 136, 0.5);
}

form textarea {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  resize: vertical;
  min-height: 120px;
}

form select {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  background-color: white;
  cursor: pointer;
}

form button {
  width: 100%;
  max-width: 200px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  background-color: #42693d;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

form button:hover {
  background-color: #45a049;
}

.inline-label {
  display: inline-block;
  font-weight: bold;
  margin-right: 0.5em;
}

.password-hint {
  display: inline-block;
  font-size: 0.9em;
  color: #ffffff;
  white-space: nowrap;
}

/* === RESPONSIVE FORM ADJUSTMENTS === */
@media (max-width: 768px) {
  form input,
  form textarea,
  form select {
    font-size: 16px; /* Prevents zoom on mobile */
    padding: 14px;
  }
  
  form textarea {
    min-height: 100px;
  }
  
  form button {
    width: 100%;
    max-width: none;
    padding: 14px;
    font-size: 16px;
  }
  
  .login-container {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .password-hint {
    display: block;
    margin-left: 0;
    margin-top: 5px;
    white-space: normal;
  }
  
  .inline-label {
    display: block;
    margin-bottom: 5px;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  form input,
  form textarea,
  form select {
    padding: 16px;
    font-size: 16px;
  }
  
  form textarea {
    min-height: 80px;
  }
  
  form button {
    padding: 16px;
    font-size: 18px;
  }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  button, .button, input[type="submit"] {
    min-height: 44px; /* Apple's recommended touch target size */
    min-width: 44px;
  }
  
  nav.sidebar a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .file-output img:hover {
    transform: none; /* Disable hover effects on touch devices */
  }
  
  /* Add tap highlight for better touch feedback */
  button, .button, nav.sidebar a, .file-output img {
    -webkit-tap-highlight-color: rgba(138, 156, 136, 0.3);
  }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .file-output img:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .file-output {
    border: 2px solid #000;
  }
  
  button, .button {
    border: 2px solid #000;
  }
  
  nav.sidebar a {
    border: 1px solid rgba(255, 255, 255, 0.5);
  }
}

/* === PRINT STYLES === */
@media print {
  header.topbar,
  nav.sidebar,
  .content-footer,
  .auth-buttons,
  button,
  .button {
    display: none !important;
  }
  
  .container {
    flex-direction: column;
  }
  
  main.content {
    width: 100% !important;
    padding: 0 !important;
    background: white !important;
    color: black !important;
  }
  
  .file-output {
    break-inside: avoid;
    margin-right: 0 !important;
  }
  
  .file-output img {
    max-width: 200px !important;
    height: auto !important;
  }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
  /* The site already uses a dark theme, but we can enhance it */
  .file-output {
    background-color: #2a3a2a;
    color: white;
  }
  
  .file-output label {
    color: white !important;
  }
  
  .file-output select {
    background-color: #40503d;
    color: white;
    border-color: #8a9c88;
  }
}

/* === CONTENT TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: white;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

ol, ul {
  padding-left: 2rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* === RESPONSIVE TYPOGRAPHY === */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  h5 { font-size: 1.1rem; }
  h6 { font-size: 1rem; }
  
  p, li {
    font-size: 16px; /* Ensure readable text on mobile */
  }
  
  ol, ul {
    padding-left: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
  
  ol, ul {
    padding-left: 1rem;
  }
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { display: block !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === LOADING STATES === */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #8a9c88;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === VIDEO TUTORIALS === */
.videos-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 30px 0;
  width: 100%;
}

.video-card {
  background-color: #5a6d57;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

/* Specific AGB Grid */
.agb-videos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 30px 0;
}

.agb-video-card {
  background-color: #5a6d57;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}


.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.video-card h3 {
  margin: 0 0 10px 0;
  color: white;
  font-size: 18px;
}

.video-card p {
  margin: 0 0 15px 0;
  color: #e0e0e0;
  font-size: 14px;
  flex-grow: 1;
}

/* AGB Form Lines */
.form-line {
  display: inline-block;
  border-bottom: 1px solid #ccc;
  width: 100%;
  max-width: 500px;
  height: 18px;
  vertical-align: bottom;
  margin-top: 5px;
}

.form-line-short {
  display: inline-block;
  border-bottom: 1px solid #ccc;
  width: 100%;
  max-width: 200px;
  height: 18px;
  vertical-align: bottom;
  margin-top: 5px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 15px;
  background-color: #000;
}

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

/* Mobile Anpassung für Videos */
@media (max-width: 800px) {
  .agb-videos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .video-card, .agb-video-card {
    padding: 15px;
    max-width: 100%;
  }
  
  .video-card h3, .agb-video-card h3 {
    font-size: 16px;
  }
}

/* Footer Mobile Fixes */
@media (max-width: 768px) {
  .content-footer {
    padding: 15px 10px;
    font-size: 12px;
  }
}

/* === CAMERA MANAGEMENT STYLES === */
#old_camera_name,
#new_camera_name {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  margin: 15px 0;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 16px;
}

#old_camera_name {
  background-color: white;
  color: #333;
}

#new_camera_name {
  background-color: white;
  color: #333;
}

#old_camera_name option,
#new_camera_name option {
  color: #333;
  background-color: white;
}

/* Responsive Camera Management */
@media (max-width: 768px) {
  #old_camera_name,
  #new_camera_name {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin: 10px 0;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #old_camera_name,
  #new_camera_name {
    width: 100%;
    max-width: none;
    padding: 12px;
    margin: 8px 0;
    font-size: 14px;
  }
}

/* === ADMIN PANEL TABLE STYLES === */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: #e8f0e8;
  color: #333;
}

table th,
table td {
  padding: 12px;
  text-align: left;
  border: 1px solid #ccc;
}

table th {
  background-color: #6f8b6f;
  color: white;
  font-weight: bold;
}

table tr:nth-child(even) {
  background-color: #f5f5f5;
}

table button {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
  min-width: 80px;
}

/* Responsive Table for Tablets */
@media (max-width: 768px) {
  table {
    font-size: 13px;
    margin: 15px 0;
  }

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

  table button {
    padding: 5px 10px;
    font-size: 11px;
    min-width: 70px;
  }
}

/* Responsive Table for Mobile */
@media (max-width: 480px) {
  table {
    font-size: 11px;
    margin: 10px 0;
  }

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

  table button {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 60px;
  }
}

/* Mobile Card Layout for Admin Table */
@media (max-width: 768px) {
  #admin-table,
  #admin-table thead,
  #admin-table tbody,
  #admin-table th,
  #admin-table tr,
  #admin-table td {
    display: block;
    width: 100%;
  }

  #admin-table thead {
    display: none;
  }

  #admin-table tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
  }

  #admin-table tr:nth-child(even) {
    background-color: #f5f5f5;
  }

  #admin-table td {
    padding: 10px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    position: relative;
    padding-left: 40%;
  }

  #admin-table td:last-child {
    border-bottom: none;
  }

  #admin-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: bold;
    color: #333;
    width: 35%;
  }

  #admin-table button {
    width: 100%;
    padding: 8px;
    font-size: 12px;
  }
}

/* === LANDING PAGE STYLES === */

.landing-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero-content h2 {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.2;
}

.tagline {
  font-size: 24px;
  color: #fffead;
  font-style: italic;
  margin-top: 20px;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  max-height: 320px;
  border-radius: 10px;
  object-fit: contain;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-bottom: 50px;
}

.feature-card {
  flex: 1 1 300px;
  max-width: 350px;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 10px;
  border-left: 6px solid #d4af7a;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.feature-card h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #f5e6d3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-card h3 .icon {
  font-size: 28px;
  display: inline-flex;
  align-items: center;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #fff;
  margin: 0;
}

.cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.button-primary,
.button-secondary {
  padding: 14px 35px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

.button-primary {
  background-color: #fffead;
  color: #647762;
}

.button-primary:hover {
  background-color: #fff9d6;
  transform: scale(1.05);
}

.button-secondary {
  background-color: transparent;
  color: #fffead;
  border: 2px solid #fffead;
}

.button-secondary:hover {
  background-color: #fffead;
  color: #647762;
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }

  nav.sidebar {
    width: 100%;
    flex-direction: row;
    padding: 10px;
    gap: 15px;
    overflow-x: auto;
  }

  nav.sidebar a {
    white-space: nowrap;
    padding: 8px 15px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav.sidebar a:last-child {
    border-right: none;
  }
}

@media (max-width: 768px) {
  header.topbar {
    flex-direction: column;
    gap: 15px;
    min-height: auto;
    height: auto;
  }

  .logo-container {
    width: 100%;
    justify-content: center;
  }

  .auth-buttons {
    width: 100%;
    margin-left: 0;
  }

  .auth-buttons .button {
    flex: 1;
  }

  .hero {
    flex-direction: column;
    gap: 30px;
  }

  .hero-content h2 {
    font-size: 32px;
  }

  .tagline {
    font-size: 18px;
  }

  .hero-image img {
    max-height: 250px;
  }

  .features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .feature-card {
    flex: none;
    width: 100%;
    max-width: 500px;
    padding: 20px;
  }

  .feature-card h3 {
    font-size: 18px;
  }

  .feature-card p {
    font-size: 14px;
  }

  .cta {
    flex-direction: column;
    align-items: center;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
    max-width: 300px;
  }

  main.content {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  header.topbar {
    padding: 10px;
  }

  .logo-container img {
    height: 50px;
  }

  .logo-container span {
    font-size: 18px;
  }

  .auth-buttons .button {
    padding: 6px 12px;
    font-size: 12px;
  }

  nav.sidebar {
    padding: 8px;
    gap: 10px;
  }

  nav.sidebar a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .hero-content h2 {
    font-size: 24px;
    margin-bottom: 5px;
  }

  .tagline {
    font-size: 14px;
    margin-top: 10px;
  }

  .hero-image img {
    max-height: 200px;
  }

  .feature-card {
    padding: 15px;
    border-left-width: 4px;
  }

  .feature-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .feature-card h3 .icon {
    font-size: 22px;
  }

  .feature-card p {
    font-size: 13px;
    line-height: 1.5;
  }

  .landing-page {
    padding: 10px;
  }
}

/* === FAQ STYLES === */

main.content::after {
  display: none !important;
}

main.content::before {
  display: none !important;
}

.faq-container {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
}

.faq-item {
  margin-bottom: 2.5rem;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  background-color: #5a6d57;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.faq-item.active {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  background: #5a6d57;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background-color 0.2s ease;
}

.faq-item.active .faq-question {
  background: #4d5a48;
}

.faq-question:hover {
  background: #4d5a48;
}

.faq-toggle {
  display: inline-flex;
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #4d5a48;
}

.faq-content {
  padding: 1.5rem;
  color: #e0e0e0;
  line-height: 1.8;
}

.faq-content h4 {
  margin: 1.5rem 0 0.75rem 0;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.faq-content p {
  margin: 0.75rem 0;
}

.faq-content ul, .faq-content ol {
  margin: 1rem 0 1rem 2rem;
}

.faq-content li {
  margin: 0.5rem 0;
}

.faq-content a {
  color: #a8c5a3;
  text-decoration: none;
}

.faq-content a:hover {
  text-decoration: underline;
}

.faq-warning {
  background: linear-gradient(135deg, #5a4a2f 0%, #6b5a3d 100%);
  border-left: 6px solid #ff9800;
  border-top: 2px solid #ff9800;
  border-right: 2px solid rgba(255, 152, 0, 0.3);
  border-bottom: 2px solid rgba(255, 152, 0, 0.3);
  padding: 1.25rem;
  margin-top: 1.5rem;
  border-radius: 6px;
  color: #e0e0e0;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.2);
}

.faq-warning strong {
  color: #ffb84d;
}

.faq-tip {
  background: linear-gradient(135deg, #3d4d3a 0%, #4a5d47 100%);
  border-left: 6px solid #7fb069;
  border-top: 2px solid #7fb069;
  border-right: 2px solid rgba(127, 176, 105, 0.3);
  border-bottom: 2px solid rgba(127, 176, 105, 0.3);
  padding: 1.25rem;
  margin-top: 1.5rem;
  border-radius: 6px;
  color: #e0e0e0;
  box-shadow: 0 2px 6px rgba(127, 176, 105, 0.2);
}

.faq-tip strong {
  color: #a8d58f;
}

@media (max-width: 767px) {
  .faq-container {
    margin: 1rem 0;
  }

  .faq-item {
    margin-bottom: 0.75rem;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
    gap: 0.75rem;
  }

  .faq-toggle {
    width: 18px;
  }

  .faq-content {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .faq-content h4 {
    font-size: 0.95rem;
    margin: 1rem 0 0.75rem 0;
  }

  .faq-content ul, .faq-content ol {
    margin: 0.75rem 0 0.75rem 1.5rem;
  }

  .faq-content li {
    margin: 0.25rem 0;
  }

  .faq-tip {
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .video-card {
    padding: 15px;
  }
}

/* === REGISTRATION FORM STYLES === */
.compact-container {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

.compact-card {
  padding: 15px !important;
}

.compact-card h3 {
  margin-bottom: 8px !important;
  font-size: 1.1em;
}

.compact-card p {
  margin-bottom: 8px !important;
  line-height: 1.4;
  font-size: 0.95em;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.registration-form-input {
  margin-bottom: 10px !important;
  padding: 10px !important;
  width: 100%;
  box-sizing: border-box;
  border-radius: 5px;
  border: 1px solid #555;
  background: #333;
  color: #fff;
  font-size: 16px;
}

#paypal-button-container {
  margin-top: 15px !important;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 3px 0;
  width: 100%;
}

.checkbox-wrapper input[type="checkbox"] {
  width: auto;
  margin: 0;
  margin-top: 4px;
  flex-shrink: 0;
}

.checkbox-wrapper label {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  font-weight: normal;
  font-family: Arial, sans-serif; /* Explizit gesetzt für Konsistenz */
}

/* Kündigen Button */
.btn-cancel {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  width: auto;
  min-width: 150px;
}

.btn-cancel:hover {
  background-color: #c82333;
}

/* === ACCESSIBILITY STYLES === */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #42693d;
  color: white;
  padding: 8px;
  z-index: 2000;
  transition: top 0.3s;
  text-decoration: none;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === FORM GROUP STYLES === */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: white;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: white;
  color: #333;
  font-size: 16px;
}

.form-group textarea {
  min-height: 120px;
  font-family: Arial, sans-serif;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #8a9c88;
  box-shadow: 0 0 5px rgba(138, 156, 136, 0.5);
}

/* Responsive Form Group */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 12px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group textarea,
  .form-group select {
    padding: 12px;
    font-size: 16px;
  }
  
  .form-group textarea {
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .form-group {
    margin-bottom: 10px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group textarea,
  .form-group select {
    padding: 14px;
    font-size: 16px;
  }
  
  .form-group textarea {
    min-height: 80px;
  }
}

/* Responsive YouTube Video */
.video-section {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 40px 0;
    padding: 0;
}

.video-section .video-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* --- ADMIN PANEL SPEZIFISCHE STYLES --- */
.admin-panel-page { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #7d927b; margin: 0; padding: 0; }

/* Responsive Tabelle (Desktop) */
.admin-panel-page .table-container { overflow-x: auto; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border-radius: 8px; background: white; margin: 20px 0; }
.admin-panel-page table { width: 100%; border-collapse: collapse; min-width: 900px; } 
.admin-panel-page th, .admin-panel-page td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; vertical-align: middle; }
.admin-panel-page th { background-color: #5d7b6f; color: white; white-space: nowrap; } 
.admin-panel-page th a { color: white; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.admin-panel-page tr:hover { background-color: #f1f1f1; }

/* Badges & Status */
.admin-panel-page .badge { padding: 4px 8px; border-radius: 12px; font-size: 0.85em; font-weight: bold; text-transform: uppercase; display: inline-block; }
.admin-panel-page .badge-active { background: #d4edda; color: #155724; }
.admin-panel-page .badge-inactive { background: #f8d7da; color: #721c24; }
.admin-panel-page .badge-past_due { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.admin-panel-page .badge-canceled { background: #e2e3e5; color: #383d41; }

.admin-panel-page .sub-text { font-size: 0.85em; color: #666; margin-top: 4px; display: block; }
.admin-panel-page .verified-icon { color: #28a745; margin-left: 5px; }
.admin-panel-page .unverified-icon { color: #ffc107; margin-left: 5px; cursor: help; }

/* Buttons */
.admin-panel-page .btn-action { padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 0.9em; transition: 0.2s; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.admin-panel-page .btn-approve { background: #28a745; color: white; }
.admin-panel-page .btn-details { background: #17a2b8; color: white; text-decoration: none; display: inline-flex;}
.admin-panel-page .btn-approve:hover { background: #218838; }

/* Admin Container */
.admin-panel-page .admin-container {
    padding: 20px !important;
}

.admin-panel-page .admin-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* --- TABLET & MOBILE HEADER --- */
@media screen and (max-width: 768px) {
    .admin-panel-page .admin-container {
        padding: 15px !important;
    }

    .admin-panel-page .admin-container h2 {
        font-size: 1.75rem;
        margin-bottom: 15px;
    }

    .admin-panel-page .table-container {
        margin: 15px 0;
    }

    .admin-panel-page table {
        min-width: auto;
    }
}

@media screen and (max-width: 576px) {
    .admin-panel-page .admin-container {
        padding: 10px !important;
    }

    .admin-panel-page .admin-container h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .admin-panel-page .table-container {
        margin: 10px 0;
        border-radius: 4px;
    }

    .admin-panel-page th, .admin-panel-page td {
        padding: 8px 10px;
        font-size: 0.85em;
    }
}

/* Modal Styling */
.admin-panel-page .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); color: #333; }
.admin-panel-page .modal-content { background-color: #fefefe; margin: 5% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 600px; border-radius: 8px; color: #333; box-sizing: border-box; }
.admin-panel-page .modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ddd; padding-bottom: 10px; color: #333; flex-wrap: wrap; gap: 10px; }
.admin-panel-page .modal-header h3 { margin: 0; color: #333; flex: 1; min-width: 200px; }
.admin-panel-page .close { color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; line-height: 1; }
.admin-panel-page .close:hover { color: black; }
.admin-panel-page .form-group { margin-bottom: 15px; }
.admin-panel-page .form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; }
.admin-panel-page .form-group input[type="text"], .admin-panel-page .form-group input[type="email"], .admin-panel-page .form-group input[type="date"], .admin-panel-page .form-group select, .admin-panel-page .form-group textarea { width: 100%; padding: 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; background: white; color: #333; font-size: 16px; }
.admin-panel-page .form-group input[type="checkbox"] { margin-right: 10px; width: auto; }
.admin-panel-page .btn-save { background: #28a745; color: white; border: none; padding: 12px 24px; border-radius: 4px; cursor: pointer; font-size: 1em; min-height: 44px; }
.admin-panel-page .btn-save:hover { background: #218838; }

@media screen and (max-width: 768px) {
    .admin-panel-page .modal-content { width: 95%; margin: 10% auto; padding: 15px; }
    .admin-panel-page .form-group input[type="text"], .admin-panel-page .form-group input[type="email"], .admin-panel-page .form-group input[type="date"], .admin-panel-page .form-group select, .admin-panel-page .form-group textarea { padding: 12px; font-size: 16px; }
    .admin-panel-page .btn-save { width: 100%; }
}

/* --- MOBILE VIEW --- */
@media screen and (max-width: 900px) {
    .admin-panel-page table, .admin-panel-page thead, .admin-panel-page tbody, .admin-panel-page th, .admin-panel-page td, .admin-panel-page tr { display: block; }
    .admin-panel-page thead tr { position: absolute; top: -9999px; left: -9999px; } 
    .admin-panel-page tr { margin: 0 0 12px 0; border: 1px solid #ddd; border-radius: 6px; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
    .admin-panel-page td { border: none; border-bottom: 1px solid #f0f0f0; position: relative; padding-left: 45%; padding-top: 10px; padding-bottom: 10px; text-align: right; }
    .admin-panel-page td:last-child { border-bottom: none; padding-top: 8px; padding-bottom: 8px; }
    .admin-panel-page td:before { position: absolute; top: 10px; left: 10px; width: 40%; padding-right: 8px; white-space: nowrap; content: attr(data-label); font-weight: bold; color: #333; text-align: left; font-size: 0.85em; }
}

@media screen and (max-width: 576px) {
    .admin-panel-page tr { margin: 0 0 10px 0; }
    .admin-panel-page td { padding-left: 45%; padding-top: 8px; padding-bottom: 8px; font-size: 0.8em; }
    .admin-panel-page td:before { top: 8px; left: 8px; width: 40%; font-size: 0.75em; }
    .admin-panel-page th, .admin-panel-page td { padding: 6px 8px; }

    /* Buttons in Aktion-Spalte vertikal anordnen */
    .admin-panel-page td[data-label="Aktion"] {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding-left: 10px;
    }

    .admin-panel-page td[data-label="Aktion"]::before {
        position: absolute;
        left: 10px;
        top: 8px;
    }

    .admin-panel-page td[data-label="Aktion"] form,
    .admin-panel-page td[data-label="Aktion"] button {
        width: auto;
    }

    /* Kleinere Buttons in Aktion-Spalte */
    .admin-panel-page td[data-label="Aktion"] .btn-action {
        width: auto !important;
        padding: 5px 8px !important;
        min-height: 32px !important;
        font-size: 0.7em !important;
    }

    .admin-panel-page td[data-label="Aktion"] form {
        display: inline;
    }
}

.admin-panel-page .admin-header {
    flex-direction: row !important;
    gap: 10px !important;
}

@media screen and (max-width: 768px) {
    .admin-panel-page .admin-header {
        flex-wrap: wrap;
        min-height: auto !important;
        height: auto !important;
        padding: 12px 15px !important;
    }

    .admin-panel-page .admin-header .logo-container span {
        font-size: 1.1em !important;
    }

    .admin-panel-page .admin-buttons {
        width: 100%;
        margin-top: 8px !important;
        gap: 8px !important;
    }

    .admin-panel-page .admin-buttons .btn-action {
        flex: 1;
        min-width: 80px;
        font-size: 0.85em;
        padding: 8px 10px;
    }
}

@media screen and (max-width: 576px) {
    .admin-panel-page .admin-header {
        padding: 10px !important;
    }

    .admin-panel-page .admin-header .logo-container span {
        font-size: 1em !important;
    }

    .admin-panel-page .admin-buttons {
        gap: 6px !important;
    }

    .admin-panel-page .admin-buttons .btn-action {
        flex: 1;
        min-width: 70px;
        font-size: 0.75em;
        padding: 6px 8px;
        min-height: 38px;
    }
}

/* --- AUSWERTUNG SPEZIFISCHE STYLES --- */
.auswertung-page .hegemonitor-wrapper { max-width:100%; }
.auswertung-page .filter-container { display:flex; gap:15px; flex-wrap:wrap; margin-bottom:15px; }
.auswertung-page #infoBar { display:flex; justify-content:space-between; align-items:center; margin:1em 0; }
.auswertung-page .export-container { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.auswertung-page .export-container form { margin:0; flex:0 0 auto; min-width:120px; }
.auswertung-page .export-container button { width:100%; white-space:nowrap; padding:0.5em 1em; font-size:1em; cursor:pointer; }
.auswertung-page #chartWrapper { width:100%; height:500px; }

@media (max-width: 576px) {
    .auswertung-page #infoBar { margin: 0.3em 0; gap: 5px; }
}

/* --- BILDERDATEN SPEZIFISCHE STYLES --- */
.bilderdaten-page .loader,
.demo-page .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #42693d;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bilderdaten-page .loading-overlay,
.demo-page .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    z-index: 10;
}

/* --- DEMO SPEZIFISCHE STYLES --- */
.demo-page .video-card { max-width: 100%; }

/* --- REGISTER FORM SPEZIFISCHE STYLES --- */
.register-page .payment-methods {
    display: flex;
    gap: 10px;
    margin: 18px 0 10px;
}
.register-page .payment-methods input[type="radio"] { display: none; }
.register-page .payment-method-label {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85em;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
    box-sizing: border-box;
}
.register-page .payment-method-label:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}
.register-page .payment-methods input[type="radio"]:checked + .payment-method-label {
    background: rgba(40,167,69,0.2);
    border-color: #28a745;
    color: #fff;
    font-weight: bold;
}
.register-page .payment-method-icon { 
    font-size: 1.6em; 
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .register-page .payment-methods {
        flex-wrap: wrap;
        gap: 8px;
    }
    .register-page .payment-method-label {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 8px 10px;
        font-size: 0.82em;
    }
    .register-page .payment-method-icon {
        font-size: 1.4em;
    }
    .register-page .payment-method-label img {
        height: 22px !important;
        width: auto !important;
    }
}

@media (max-width: 480px) {
    .register-page .payment-methods {
        flex-direction: column;
        gap: 6px;
    }
    .register-page .payment-method-label {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        padding: 10px 12px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        text-align: left;
        font-size: 0.9em;
    }
    .register-page .payment-method-icon {
        font-size: 1.5em;
        flex-shrink: 0;
    }
    .register-page .payment-method-label img {
        height: 22px !important;
        width: auto !important;
        flex-shrink: 0;
    }
}

.register-page .btn-pay {
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.2s;
    box-sizing: border-box;
}
.register-page .btn-pay:hover  { background: #218838; }
.register-page .btn-pay:active { background: #1e7e34; }
.register-page .mollie-badge {
    text-align: center;
    font-size: 0.78em;
    color: white;
    margin-top: 10px;
}
.register-page .error-box {
    background: rgba(220,53,69,0.2);
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 12px 16px;
    color: #f8d7da;
    margin-bottom: 18px;
    font-size: 0.95em;
}
.register-page .price-highlight {
    color: #a3ffac;
    font-weight: bold;
}

/* --- KUENDIGUNG SPEZIFISCHE STYLES --- */
.kuendigung-page .popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.kuendigung-page .popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.kuendigung-page .popup-title {
    color: #dc3545;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.kuendigung-page .popup-message {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #333;
}

.kuendigung-page .popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.kuendigung-page .popup-button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.3s ease;
}

.kuendigung-page .popup-button-cancel {
    background-color: #28a745;
    color: white;
}

.kuendigung-page .popup-button-cancel:hover {
    background-color: #218838;
}

.kuendigung-page .popup-button-confirm {
    background-color: #dc3545;
    color: white;
}

.kuendigung-page .popup-button-confirm:hover {
    background-color: #c82333;
}

.kuendigung-page .package-name {
    font-weight: bold;
    color: #dc3545;
}

.kuendigung-page .end-date {
    font-weight: bold;
    color: #007bff;
}

@media (max-width: 600px) {
    .kuendigung-page .popup-buttons {
        flex-direction: column;
    }
    
    .kuendigung-page .popup-button {
        width: 100%;
    }
}

/* --- SYNC ICUSERVER SPEZIFISCHE STYLES --- */
.sync-page { margin:0; font-family: Arial, sans-serif; }
.sync-page .topbar { display:flex; justify-content:space-between; align-items:center; padding:10px; background:#004080; color:#fff; }
.sync-page .logo-container img { height:40px; margin-right:10px; vertical-align:middle; }
.sync-page .logo-container span { font-size:1.2em; font-weight:bold; }
.sync-page .container { display:flex; }
.sync-page .sidebar { width:200px; background:#f0f0f0; padding:10px; }
.sync-page .sidebar a { display:block; padding:5px 0; color:#004080; text-decoration:none; }
.sync-page .sidebar a.active { font-weight:bold; }
.sync-page .content { flex:1; padding:20px; }
.sync-page .sync-wrapper { max-width:1000px; }
.sync-page .sync-section { margin-bottom:30px; padding:15px; border:1px solid #ddd; border-radius:5px; background:#f9f9f9; }
.sync-page .sync-section h3 { margin-top:0; color:#004080; }
.sync-page .sync-controls { display:flex; gap:15px; flex-wrap:wrap; margin-bottom:15px; }
.sync-page .sync-controls label { display:flex; flex-direction:column; gap:5px; }
.sync-page .sync-controls select, .sync-page .sync-controls input { padding:8px; border:1px solid #ccc; border-radius:4px; }
.sync-page .button { padding:10px 20px; background:#004080; color:white; border:none; border-radius:4px; cursor:pointer; font-weight:bold; }
.sync-page .button:hover { background:#003366; }
.sync-page .button:disabled { background:#ccc; cursor:not-allowed; }
.sync-page .button-danger { background:#d9534f; }
.sync-page .button-danger:hover { background:#c9302c; }
.sync-page .images-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:15px; margin-top:15px; }
.sync-page .image-card { border:1px solid #ddd; border-radius:5px; overflow:hidden; background:white; }
.sync-page .image-card img { width:100%; height:150px; object-fit:cover; cursor:pointer; }
.sync-page .image-info { padding:10px; font-size:12px; }
.sync-page .image-info p { margin:5px 0; }
.sync-page .loading { text-align:center; padding:20px; }
.sync-page .spinner { display:inline-block; width:30px; height:30px; border:3px solid #f3f3f3; border-top:3px solid #004080; border-radius:50%; animation:spin 1s linear infinite; }
.sync-page .error { padding:15px; background:#f8d7da; border:1px solid #f5c6cb; color:#721c24; border-radius:4px; margin-bottom:15px; }
.sync-page .success { padding:15px; background:#d4edda; border:1px solid #c3e6cb; color:#155724; border-radius:4px; margin-bottom:15px; }
.sync-page .image-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:10000; justify-content:center; align-items:center; }
.sync-page .image-modal.active { display:flex; }
.sync-page .image-modal-content { max-width:90%; max-height:90%; }
.sync-page .image-modal img { max-width:100%; max-height:100%; }
