/* ================================
   Allgemeines Layout
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #121212;
  color: #f5f5f5;
}

/* ================================
   Light Mode
================================ */
body.light-mode {
  background-color: #f5f5f5;
  color: #121212;
}

body.light-mode header,
body.light-mode footer,
body.light-mode .menu,
body.light-mode .dropdown-content {
  background-color: #e0e0e0;
  color: #121212;
}

body.light-mode .menu a {
  color: #121212;
}

body.light-mode .menu a:hover {
  background-color: #c0c0c0;
}

body.light-mode form {
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 100, 150, 0.15);
}

body.light-mode .dashboard-card {
  background-color: #f0f0f0;
  border-color: #00baff;
  color: #121212;
}

/* ================================
   Header
================================ */
header {
  background-color: #1f1f1f;
  padding: 20px 40px;
  border-bottom: 3px solid #00baff;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-content h1 {
  margin: 0;
  font-size: 28px;
  color: #00baff;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-button {
  background-color: #00baff;
  color: white;
  padding: 6px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.auth-button:hover {
  background-color: #008ecf;
}

.user-info {
  font-size: 14px;
  color: #ccc;
}

#theme-toggle {
  background-color: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #fff;
}

/* ================================
   Navigation / Menü + Dropdowns
================================ */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #222;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.menu li {
  position: relative;
}

.menu a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #fff;
  background-color: #222;
  transition: background 0.2s;
}

.menu a:hover {
  background-color: #444;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
  top: 100%;
  left: 0;
}

.dropdown-content a {
  color: white;
  padding: 10px 16px;
  display: block;
  text-align: left;
  background-color: #333;
}

.dropdown-content a:hover {
  background-color: #555;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ================================
   Burger Menü (mobil)
================================ */
.burger {
  display: none;
  font-size: 28px;
  color: white;
  padding: 12px 16px;
  background-color: #222;
  cursor: pointer;
}

/* ================================
   Hauptinhalt
================================ */
main, .container {
  padding: 30px;
  max-width: 900px;
  margin: auto;
}

h2 {
  border-bottom: 2px solid #00baff;
  padding-bottom: 10px;
  margin-bottom: 20px;
  color: #00baff;
}

/* ================================
   Formulare
================================ */
form {
  background-color: #1c1c1c;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 186, 255, 0.3);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
button {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: none;
  border-radius: 6px;
  font-size: 16px;
}

input[type="password"],
textarea {
  background-color: #2a2a2a;
  color: #fff;
}

input:focus, textarea:focus {
  outline: 2px solid #00baff;
}

button {
  background-color: #00baff;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background-color: #008ecf;
}

/* ================================
   Tabellen
================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: #1e1e1e;
}

th, td {
  border: 1px solid #444;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #2a2a2a;
  color: #00baff;
}

tr:nth-child(even) {
  background-color: #2a2a2a;
}

/* ================================
   Dashboard
================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.dashboard-card {
  background-color: #1e1e1e;
  border: 2px solid #00baff;
  padding: 20px;
  border-radius: 10px;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(0, 186, 255, 0.4);
}

.dashboard-card h3 {
  margin-top: 0;
  font-size: 20px;
  color: #00baff;
}

.dash-link {
  display: inline-block;
  margin-top: 10px;
  color: #00baff;
  text-decoration: none;
  font-weight: bold;
}

.dash-link:hover {
  text-decoration: underline;
}

/* ================================
   Systemmeldungen
================================ */
.error {
  color: #ff5c5c;
  background-color: #2a0000;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}

.success {
  color: #00ffcc;
  background-color: #00332a;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}

/* ================================
   Tooltip
================================ */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 180px;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

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

.modal-content {
  background-color: #1c1c1c;
  margin: 10% auto;
  padding: 30px;
  border: 2px solid #00baff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  color: #fff;
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

/* ================================
   Ladeanimation
================================ */
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #00baff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: auto;
}

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

/* ================================
   Footer
================================ */
footer {
  text-align: center;
  padding: 20px;
  background-color: #1a1a1a;
  border-top: 2px solid #00baff;
  color: #888;
  font-size: 14px;
  margin-top: 30px;
}

footer a {
  color: #00baff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ================================
   Responsive Design
================================ */
@media screen and (max-width: 768px) {
  .burger {
    display: block;
  }

  .menu {
    flex-direction: column;
    display: none;
    width: 100%;
  }

  .menu li {
    width: 100%;
    text-align: center;
  }

  .menu.show {
    display: flex;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
  }

  .dropdown:hover .dropdown-content {
    display: block;
  }

  .header-controls {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

@media screen and (max-width: 600px) {
  header h1 {
    font-size: 22px;
  }

  form, .container {
    padding: 15px;
  }

  button, input {
    font-size: 15px;
  }
}