/* Farbdefinitionen */
:root {
  --color-wide-bg: #000;
  --color-bg: #021015;
  --color-box: #061822;
  --color-header-footer: #20414A;
  --color-highlight: #99B9C3;
  --color-highlight-hover: #7caeb7;
  --color-input-bg: #232629;
  --color-input-focus: #27323c;
  --color-input-border: #2f4851;
  --color-text: #e3e7ea;
  --color-text-secondary: #99b9c3;
  --color-success: #81e672;
  --color-error: #ff8888;
  --color-disabled: #1a1f22;
}

/* Grundlegende Layout-Elemente */
body {
  background: var(--color-wide-bg);
  color: var(--color-text);
  font-family: system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
}

#container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--color-bg);
  border-radius: 0;
  padding: 0;
  min-height: 100vh;
}

.nowrap {
  white-space: nowrap;
}

/* Header und Footer */
header, footer {
  background: var(--color-header-footer);
  border-radius: 0;
  text-align: center;
  padding: 0.5rem 0;
  margin: 0;
  color: var(--color-text);
  letter-spacing: 0.5px;
}

footer {
  font-size: 0.95em;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Boxen und Tabellen-Container */
.box,
.tablebox {
  background: var(--color-box);
  border: 1px solid var(--color-header-footer);
  border-radius: 0.4rem;
  padding: 0.5rem;
  margin: 0.5rem;
  max-width: 440px;
  text-align: center;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-box);
  color: var(--color-text);
  margin: 0;
}

th, td {
  border: 1px solid var(--color-header-footer);
  padding: 0.45em 0.3em;
  text-align: left;
}

th {
  border: 1px solid var(--color-box);
  background: var(--color-header-footer);
  color: var(--color-text);
  font-weight: 600;
}

th[colspan="2"] {
  text-align: center;
}

/* Formulare */
form {
  text-align: center;
  margin: 0;
  padding: 0;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
select,
textarea {
  background: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  color: var(--color-text);
  border-radius: 4px;
  padding: 0.23rem 0.5rem;
  margin: 0.22em 0;
  font-size: 1em;
  outline: none;
  transition: border 0.13s;
  width: 50%;
  box-sizing: border-box;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus {
  border: 1.5px solid var(--color-highlight);
  background: var(--color-input-focus);
}

textarea {
  width: 95%;
}

label {
  color: var(--color-text);
  font-size: 0.98em;
  margin: 0;
  padding: 0;
  display: block;
  text-align: left;
}

input:disabled {
  color: #999;
  background: var(--color-disabled);
}

/* Buttons und Links */
button, .button-link {
  min-width: 100px;
  background: var(--color-highlight);
  color: var(--color-box);
  border: none;
  border-radius: 3px;
  padding: 0.33rem 1.1rem;
  font-size: 1em;
  margin: 0.7em 0 0 0;
  cursor: pointer;
  letter-spacing: 0.2px;
  font-weight: 500;
  transition: background 0.11s, color 0.11s;
  vertical-align: middle;
}

button:hover, .button-link:hover {
  background: var(--color-highlight-hover);
  color: var(--color-text);
}

.button-link {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  margin: 0;
}

a {
  color: var(--color-highlight);
  text-decoration: underline;
  transition: color 0.11s;
}

a:hover {
  color: var(--color-highlight-hover);
  text-decoration: none;
}

/* Navigation Menü */
#nav-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 24, 34, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  flex-direction: column;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 1;
  visibility: visible;
}

#nav-menu.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

#nav-menu ul li {
  margin: 1rem 0;
}

#nav-menu ul li a {
  font-size: 1.8rem;
  color: #99b9c3;
  text-decoration: none;
  transition: color 0.2s ease;
}

#nav-menu ul li a:hover {
  color: #7caeb7;
}

#nav-menu .close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  color: #99b9c3;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2100;
}

#nav-menu .close-btn:hover {
  color: #7caeb7;
}

/* Modalfenster */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--color-box);
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  color: var(--color-text);
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.9);
  text-align: center;
}

#modal-close {
  position: absolute;
  top: 0.3rem;
  right: 0.6rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text);
  cursor: pointer;
}

.modal-success .modal-content {
  background-color: var(--color-success);
  color: #000;
}

.modal-error .modal-content {
  background-color: var(--color-error);
  color: #000;
}
.modal-error #modal-close, .modal-success #modal-close{
  color: #000;
}

/* Modal für Übungseintrag */
#exercise-log-modal.modal {
  /* Gleiche Basiseigenschaften wie dein bestehendes Modal */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

#exercise-log-modal.modal.hidden {
  display: none;
}

#exercise-log-modal .modal-content {
  background: var(--color-box);
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  color: var(--color-text);
  width: 90%;
  max-width: 450px;
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.9);
  text-align: left;
  max-height: 80vh;
  overflow-y: auto;
}

/* Close Button */
#exercise-log-modal #modal-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--color-text);
  cursor: pointer;
}

/* Formular und Tabelle spezifisch für dieses Modal */
#exercise-log-modal #log-form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

#exercise-log-modal #log-form input[type=number],
#exercise-log-modal #log-form textarea {
  width: 100%;
  padding: 0.4rem 0.6rem;
  margin-top: 0.3rem;
  border-radius: 5px;
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  font-size: 1rem;
  box-sizing: border-box;
}

#exercise-log-modal #log-form textarea {
  resize: vertical;
  min-height: 60px;
}

#exercise-log-modal #log-form button {
  margin-top: 1.5rem;
  background: var(--color-highlight);
  border: none;
  color: var(--color-box);
  font-size: 1.1rem;
  padding: 0.6rem 1.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#exercise-log-modal #log-form button:hover {
  background: var(--color-highlight-hover);
}

/* Tabelle der vorherigen Logs im Modal */
#exercise-log-modal #previous-logs table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1rem;
}

#exercise-log-modal #previous-logs th, 
#exercise-log-modal #previous-logs td {
  border: 1px solid var(--color-header-footer);
  padding: 0.5rem;
  text-align: left;
}

#exercise-log-modal #previous-logs th {
  background: var(--color-header-footer);
  font-weight: 600;
}

#exercise-log-modal #previous-logs p {
  margin-top: 1rem;
  color: var(--color-text-secondary);
}

/* Definitionsliste Übungen */
/* styling für details erste ebene (.box) */
details.box {
  background: var(--color-box);
  border: 1px solid var(--color-header-footer);
  border-radius: 0.4rem;
  padding: 0.5rem;
  margin: 0.5rem 0;
}

/* styling für details zweite ebene (.box), mit anderen hintergrund */
details.box > details {
  background: var(--color-header-footer);
  border: 1px solid var(--color-box);
  border-radius: 0.3rem;
  padding: 0.5rem;
  margin: 0.3rem 0;
}

/* details summary - dreieck entfernen */
details.box > summary {
  list-style: none;
}
details.box > summary::-webkit-details-marker {
  display: none;
}
details.box > summary::marker {
  content: none;
}

/* details zweite ebene summary - dreieck entfernen */
details.box > details > summary {
  list-style: none;
}
details.box > details > summary::-webkit-details-marker {
  display: none;
}
details.box > details > summary::marker {
  content: none;
}

/* ul - listenpunkte entfernen */
details.box ul {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Nachrichtentexte */
.msg-success {
  color: var(--color-success) !important;
}

.msg-error {
  color: var(--color-error) !important;
}

/* Hervorhebung */
.highlight {
  color: var(--color-highlight);
  font-weight: bold;
}

