:root {
  --presentation-scale: 1;
  --study-button-turn: rgb(64, 64, 0);
  --study-button-neutral: rgb(64, 64, 64);
  --study-button-negative: rgb(64, 0, 0);
  --study-button-positive: rgb(0, 64, 0);
}

body {
  background-color: #111111;
  position: relative;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: calc(var(--app-vh, 1vh) * 100);
  width: 100vw;
}

html {
  height: calc(var(--app-vh, 1vh) * 100);
}

/* Bevorzugt die "kleine" Viewport-Höhe (mit sichtbarer Browser-UI) auf Mobilgeräten */
@supports (height: 100svh) {
  body {
    height: 100svh;
  }

  html {
    height: 100svh;
  }
}

.container-border {
  position: absolute;
  overflow: auto;
  margin: 2px;
  border: 1px solid #777777;
}

.container-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  width: 100%;
}

.container-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
  width: auto;
}

.container-text {
  color: #fffff0;
  text-align: left;
  /* font-size: 5vw; */
  /* padding: 10px; */
  /* margin-bottom: 10px; */
}

.container-button {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

#container10 {
  --ps: var(--presentation-scale, 1);
  left: 0;
  top: 0;
  right: 20%;
  bottom: 50%;
}

#container20 {
  --ps: var(--presentation-scale, 1);
  left: 0;
  top: 50%;
  right: 20%;
  bottom: 0;
}

#container30 {
  left: 80%;
  top: 0;
  right: 0;
  bottom: 0;
}

#container310 {
  left: 0;
  top: 0;
  right: 0;
  bottom: 67%;
}

#container320 {
  left: 0;
  top: 33%;
  right: 0;
  bottom: 33%;
}

#container340 {
  left: 0;
  top: 67%;
  right: 0;
  bottom: 0;
}

#conbutton3210 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  /* Stellt sicher, dass der Container die gesamte Höhe einnimmt */
}

#conbutton3310 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  /* Stellt sicher, dass der Container die gesamte Höhe einnimmt */
}

/* Die Styles ändern sich, wenn die Höhe größer als die Breite ist */
@media screen and (aspect-ratio: 1/1),
screen and (orientation: portrait) {
  #container10 {
    left: 0%;
    top: 0%;
    right: 0%;
    bottom: 60%;
  }

  #container20 {
    left: 0%;
    top: 40%;
    right: 0%;
    bottom: 20%;
  }

  #container30 {
    left: 0%;
    top: 80%;
    right: 0%;
    bottom: 0%;
  }

  #container310 {
    left: 0%;
    top: 0%;
    right: 67%;
    bottom: 0%;
  }

  #container320 {
    left: 33%;
    top: 0%;
    right: 33%;
    bottom: 0%;
  }

  #container340 {
    left: 67%;
    top: 0%;
    right: 0%;
    bottom: 0%;
  }
}

#text11 {
  /*font-size: 3vw;*/
  font-size: calc(4vh * var(--ps, 1));
}

#text12 {
  font-size: calc(2vh * var(--ps, 1));
}

#text21 {
  font-size: calc(4vh * var(--ps, 1));
}

#text22 {
  font-size: calc(2vh * var(--ps, 1));
}

/* Markdown-Inhalte in Karten: Tabellen, Listen, Absätze */
.container-text table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.4em 0;
  font-size: 0.9em;
}
.container-text th,
.container-text td {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35em 0.5em;
  text-align: left;
}
.container-text th {
  background: rgba(255, 255, 255, 0.1);
}
.container-text ul,
.container-text ol {
  margin: 0.4em 0;
  padding-left: 1.4em;
}
.container-text p {
  margin: 0.4em 0;
}
.container-text p:first-child {
  margin-top: 0;
}
.container-text p:last-child {
  margin-bottom: 0;
}
.container-text strong {
  font-weight: bold;
}
.container-text em {
  font-style: italic;
}
.container-text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}

.buttonMenu {
  flex-grow: 1;
  border: 1;
  font-size: 1rem;
  background-color: #dddddd;
  cursor: pointer;
  transition: background-color 0.2s;
}

.buttonMenu:hover {
  background-color: #777;
  color: white;
}

.buttonMenu:active {
  background-color: #555;
  color: red;
  transform: scale(0.95);
}

/* Vollbildmodus-Schalter */
.fullscreen-button {
  float: right;
  margin-left: 10px;
  border: 1px solid #777777;
  background-color: #dddddd;
  color: #333;
  font-size: 1rem;
  padding: 0;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 1.2em;
  line-height: 1.2;
}

.fullscreen-button:hover {
  background-color: #777;
  color: white;
}

.fullscreen-button:active {
  background-color: #555;
  color: red;
  transform: scale(0.95);
}

/* Vollbild-Button wie gnauk.es: kein grüner Aktiv-Zustand */

/* Oben rechts: unsichtbare Trigger-Zone für den Menübutton */
.top-actions-zone {
  position: fixed;
  top: 0;
  right: 0;
  width: 70px;
  height: 80px;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 12px 16px;
  pointer-events: auto;
}

.top-left-actions {
  position: relative;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.top-left-actions.visible {
  opacity: 1;
  pointer-events: auto;
}

.top-actions-zone:hover .top-left-actions {
  opacity: 1;
  pointer-events: auto;
}

.icon-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #d4d4d4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.icon-button:focus-visible {
  outline: 2px solid var(--primary-color, #667eea);
  outline-offset: 2px;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.icon-button .icon {
  font-size: 1.2rem;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button svg.icon {
  width: 22px;
  height: 22px;
}

html.light .icon-button {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.2);
}

html.light .icon-button:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.fullscreen-button svg.icon {
  width: 22px;
  height: 22px;
}

/* Menü-Titelzeile exakt wie gnauk.es Vorlage */
.side-menu-header {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color, #444);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  flex-shrink: 0;
}

.side-menu-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary, #fff);
  margin: 0;
}

.side-menu-header .header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Vollbild- und Menü-Buttons ausblenden, wenn das Menü offen ist */
body.menu-open .top-left-actions {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Dark/Light-Mode: Light-Theme (wie gnauk.es Vorlage) */
html.light body {
  background-color: #f8fafc;
}

html.light {
  --study-button-turn: #fef3c7;
  --study-button-neutral: #e2e8f0;
  --study-button-negative: #fee2e2;
  --study-button-positive: #dcfce7;
}

html.light .container-border {
  border-color: #94a3b8;
}

html.light #container10,
html.light #container20 {
  background-color: #ffffff;
}

html.light .container-text {
  color: #0f172a;
}

html.light .display {
  color: #0f172a;
  background-color: #ffffff;
}

html.light .buttonMenu {
  background-color: #e2e8f0;
  color: #0f172a;
}

html.light .buttonMenu:hover {
  background-color: #64748b;
  color: #fff;
}

html.light .fullscreen-button {
  background-color: #e2e8f0;
  color: #0f172a;
}

html.light .fullscreen-button:hover {
  background-color: #64748b;
  color: #fff;
}

html.light .buttonStudy {
  background-color: var(--study-button-neutral);
  color: #0f172a;
  border: 1px solid #94a3b8;
}

html.light .buttonStudy:hover {
  filter: brightness(0.95);
  color: #0f172a;
}

html.light #versionDisplay {
  color: #64748b;
}

html.light .pauk-amount-control {
  background-color: #fff;
  border-color: #e2e8f0;
}

html.light .pauk-amount-btn {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .pauk-amount-btn:hover {
  background-color: #cbd5e1 !important;
}

html.light .pauk-amount-display {
  background-color: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}

html.light .learn-repeat-control {
  background-color: #fff;
  border-color: #e2e8f0;
}

html.light .learn-repeat-btn {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .learn-repeat-btn:hover {
  background-color: #cbd5e1 !important;
}

html.light .learn-repeat-display {
  background-color: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.buttonStudy {
  flex-grow: 1;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
  padding: 0 4px;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.buttonStudy:hover {
  background-color: #777;
  color: white;
  transform: scale(0.98);
}

.buttonStudy:active {
  /*background-color: #555;*/
  color: red;
  transform: scale(0.95);
}

#conbutton3110,
#conbutton3210 {
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  grid-template-columns: 1fr;
  height: 100%;
  width: 100%;
  align-content: stretch;
  justify-items: stretch;
}

.display {
  color: #eeeeee;
  background-color: #111111;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
  padding: 0 2px;
  min-height: 0;
  min-width: 0;
  flex: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

#conbutton3410 {
  display: none;
  /*   display: flex / none   */
}

#conbutton3420 {
  display: none;
  /*   display: flex / none   */
}

#conbutton3430 {
  display: none;
  /*   display: flex / none   */
}

#menu {
  position: fixed;
  right: 0;
  top: 0;
  width: 320px;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-left: 2px solid #667eea;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.3rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1100;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

#menu.open {
  transform: translateX(0%);
}

/* Nur Menü-Inhalt-Buttons (nicht die Icon-Buttons in der Titelzeile – die bleiben rund wie in der Vorlage) */
#menu button:not(.icon-button) {
  height: 2.8rem;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  flex: 0 0 auto;
  font-size: 1rem;
  background: linear-gradient(135deg,
      #2a2a2a 0%,
      #3a3a3a 100%) !important;
  color: #ffffff !important;
  border: 1px solid #444 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  cursor: pointer;
}

/* Menü-Titelzeile: Icon-Buttons exakt wie Vorlage (rund, 42px, gleiche Farben) */
#menu .side-menu-header .icon-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #d4d4d4);
  flex: none;
}

#menu .side-menu-header .icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

#menu .side-menu-header .icon-button .icon,
#menu .side-menu-header .icon-button svg.icon {
  width: 22px;
  height: 22px;
}

html.light #menu .side-menu-header .icon-button {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f8fafc;
}

html.light #menu .side-menu-header .icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Menü-Kategorie Styles */
.menu-category {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.2rem;
  flex: 0 0 auto;
}

.menu-category-header {
  background: linear-gradient(135deg,
      #ff6b6b 0%,
      #ee5a24 100%) !important;
  color: #ffffff !important;
  font-weight: bold;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  border: 1px solid #ff6b6b !important;
  border-radius: 8px !important;
  width: 100%;
  padding: 0.8rem !important;
  font-size: 1rem;
  text-align: left;
  transition: all 0.3s ease;
  height: 2.8rem;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.menu-category-header:hover {
  background: linear-gradient(135deg,
      #ee5a24 0%,
      #c44569 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.menu-category-header.active {
  background-color: #333333 !important;
}

.menu-category-arrow {
  font-size: 1rem;
  transition: transform 0.2s ease;
  color: #fffff0;
  margin-left: auto;
  padding-left: 0.5rem;
}

.menu-category-arrow.expanded {
  transform: rotate(90deg);
}

.menu-submenu {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1e1e 100%);
  border-left: 3px solid #ff6b6b;
  border-radius: 0 8px 8px 0;
  margin-left: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  flex: 0 0 auto;
  box-shadow: inset 0 0 10px rgba(255, 107, 107, 0.1);
}

.menu-submenu.open {
  display: flex;
}

.menu-submenu button {
  background: linear-gradient(135deg,
      #1e1e1e 0%,
      #2a1e1e 100%) !important;
  color: #e0e0e0 !important;
  border: 1px solid #444 !important;
  border-radius: 6px !important;
  font-size: 1rem;
  padding: 0.6rem 1rem !important;
  text-align: left;
  height: 2.6rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(255, 107, 107, 0.1);
}

.menu-submenu button:hover {
  background: linear-gradient(135deg,
      #2a2a2a 0%,
      #3a2424 100%) !important;
  color: #ffffff !important;
  transform: translateX(4px);
  border: 1px solid #ff6b6b !important;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.2);
}

.menu-scale {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: linear-gradient(135deg, #1e1e1e 0%, #2a1e1e 100%);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.menu-scale-label {
  display: block;
  margin-bottom: 0.5em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scale-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.menu-scale .scale-step {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  flex: 0 0 2rem !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 6px !important;
  border: 1px solid #555 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  transform: none !important;
  box-shadow: none !important;
}

.menu-scale .scale-step:hover {
  background: rgba(255, 107, 107, 0.25) !important;
  border-color: #ff6b6b !important;
  transform: none !important;
}

.menu-scale .scale-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#scale-slider {
  flex: 1;
  min-width: 0;
  accent-color: #667eea;
  cursor: pointer;
}

.scale-value {
  display: block;
  margin-top: 0.4em;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 700;
  color: #667eea;
  text-align: center;
}

.scale-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.2rem;
  margin-top: 0.45rem;
  width: 100%;
}

.menu-scale .scale-preset {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 1.75rem !important;
  padding: 0.3em 0 !important;
  margin: 0 !important;
  border-radius: 5px !important;
  border: 1px solid #555 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #bbb !important;
  font: inherit;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.1 !important;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  transform: none !important;
  box-shadow: none !important;
  text-align: center !important;
}

.menu-scale .scale-preset:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  transform: none !important;
}

.menu-submenu .menu-scale .scale-preset.active,
.menu-submenu .menu-scale .scale-preset.active:hover {
  background: linear-gradient(
      180deg,
      rgba(102, 126, 234, 0.55) 0%,
      rgba(102, 126, 234, 0.38) 100%
    ) !important;
  border-color: #8fa4ff !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow:
    0 0 0 1px rgba(143, 164, 255, 0.7),
    0 0 10px rgba(102, 126, 234, 0.45) !important;
  transform: none !important;
}

html.light .menu-scale {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #e2e8f0;
}

html.light .menu-scale-label {
  color: #64748b;
}

html.light .menu-scale .scale-step {
  background: rgba(15, 23, 42, 0.06) !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .menu-scale .scale-preset {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

html.light .menu-submenu .menu-scale .scale-preset.active,
html.light .menu-submenu .menu-scale .scale-preset.active:hover {
  background: linear-gradient(
      180deg,
      rgba(37, 99, 235, 0.28) 0%,
      rgba(37, 99, 235, 0.16) 100%
    ) !important;
  border-color: #2563eb !important;
  color: #1e40af !important;
  font-weight: 800 !important;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.55),
    0 0 8px rgba(37, 99, 235, 0.25) !important;
}

/* Standalone Menu Items */
.menu-standalone {
  background: linear-gradient(135deg,
      #1e1e1e 0%,
      #2a2a2a 100%) !important;
  color: #cccccc !important;
  font-weight: normal;
  margin-bottom: 0.3rem;
  height: 2.8rem;
  flex: 0 0 auto;
  font-size: 1rem;
  border-radius: 8px !important;
  border: 1px solid #444 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease !important;
}

.menu-standalone:hover {
  background: linear-gradient(135deg,
      #2a2a2a 0%,
      #363636 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Shortcut-Anzeige */
.menu-shortcut {
  color: #888888;
  font-size: 0.85rem;
  font-weight: normal;
  margin-left: auto;
  padding-left: 1rem;
  opacity: 0.8;
}

/* Pauk-Amount-Control Styles */
.pauk-amount-control {
  display: flex;
  height: 2.5rem;
  margin: 0;
  border: 1px solid #777777;
  border-radius: 0;
  background-color: #111111;
  flex: 0 0 auto;
}

.pauk-amount-btn {
  flex: 1;
  background-color: #111111 !important;
  color: #fffff0 !important;
  border: none !important;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pauk-amount-btn:hover {
  background-color: #333333 !important;
}

.pauk-decrease {
  border-right: 1px solid #777777 !important;
}

.pauk-increase {
  border-left: 1px solid #777777 !important;
}

.pauk-amount-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111111;
  color: #fffff0;
  font-size: 1rem;
  font-weight: bold;
  border-left: 1px solid #777777;
  border-right: 1px solid #777777;
}

/* Learn-Modus Wiederholungseinstellung - gleiches Layout wie pauk */
.learn-repeat-control {
  display: flex;
  height: 2.5rem;
  margin: 0;
  border: 1px solid #777777;
  border-radius: 0;
  background-color: #111111;
  flex: 0 0 auto;
}

.learn-repeat-btn {
  flex: 1;
  background-color: #111111 !important;
  color: #fffff0 !important;
  border: none !important;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.learn-repeat-btn:hover {
  background-color: #333333 !important;
}

.learn-repeat-decrease {
  border-right: 1px solid #777777 !important;
}

.learn-repeat-increase {
  border-left: 1px solid #777777 !important;
}

.learn-repeat-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111111;
  color: #fffff0;
  font-size: 1rem;
  font-weight: bold;
  border-left: 1px solid #777777;
  border-right: 1px solid #777777;
}

.mode-learn-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  gap: 0;
}

.mode-learn-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem;
  width: 100%;
}

#menu .menu-submenu .mode-learn-buttons > .buttonMenu {
  flex: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mode-learn-group .learn-repeat-control {
  width: 100%;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1050;
}

.card-editor-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1200;
  /* display: flex; /* Diese Zeile löschen oder kommentieren */
  justify-content: center;
  align-items: center;
}

.card-editor-content {
  display: flex;
  width: 95%;
  height: 90%;
  background-color: #1e1e1e;
  border: 2px solid #555;
  border-radius: 8px;
  overflow: hidden;
}

.card-editor-fields {
  display: flex;
  flex-direction: column;
  width: 80%;
  height: 100%;
}

.card-editor-field-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 10px;
  box-sizing: border-box;
}

.card-editor-field-container label {
  color: #ddd;
  margin-bottom: 5px;
  font-size: 14px;
}

.card-editor-markdown-hint {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: #999;
  margin: 0.5em 0 0;
}
.card-editor-markdown-hint code {
  background: rgba(255,255,255,0.1);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.card-editor-field {
  flex: 1;
  background-color: #2a2a2a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 8px;
  font-size: 16px;
  resize: none;
}

.card-editor-options {
  width: 20%;
  height: 100%;
  background-color: #2a2a2a;
  padding: 15px;
  box-sizing: border-box;
  overflow-y: auto;
}

.card-editor-options h3 {
  color: #ddd;
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
}

.editor-button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #3a3a3a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
}

.editor-button:hover {
  background-color: #4a4a4a;
}

.editor-option {
  margin-bottom: 12px;
}

.editor-option label {
  display: block;
  color: #ccc;
  margin-bottom: 5px;
  font-size: 14px;
}

.editor-option input {
  width: 100%;
  padding: 6px;
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
}

hr {
  border: none;
  border-top: 1px solid #444;
  margin: 15px 0;
}

/* Sprach-Einstellungen Overlay Styles */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1300;
  display: flex;
  justify-content: center;
  align-items: center;
}

.settings-overlay[hidden] {
  display: none !important;
}

.settings-content {
  background-color: #1e1e1e;
  border: 2px solid #555;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-header {
  background-color: #2a2a2a;
  padding: 15px 20px;
  border-bottom: 1px solid #555;
}

.settings-header h2 {
  color: #fff;
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.settings-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.language-section {
  margin-bottom: 20px;
}

.language-section h3 {
  color: #ddd;
  margin: 0 0 15px 0;
  font-size: 16px;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.setting-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  min-height: 35px;
}

.setting-row label {
  color: #ccc;
  min-width: 180px;
  margin-right: 15px;
  font-size: 14px;
}

.setting-row input[type="text"],
.setting-row select {
  flex: 1;
  padding: 6px 10px;
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 14px;
}

.setting-row input[type="range"] {
  flex: 1;
  margin-right: 10px;
}

.speed-control {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 10px;
}

.speed-control input[type="range"] {
  flex: 1;
  margin-right: 0;
}

.speed-value {
  background-color: #444;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 45px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
}

.speed-value-input {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
  width: 50px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
}

.speed-value-input:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.speed-percent {
  color: #ffffff;
  font-weight: bold;
  margin-left: 2px;
  font-size: 12px;
}

.combo-container {
  display: flex;
  flex: 1;
  gap: 10px;
}

.combo-container select {
  flex: 2;
}

.combo-container input[type="text"] {
  flex: 1;
}

.radio-group {
  display: flex;
  gap: 15px;
}

.radio-group input[type="radio"] {
  margin: 0 5px 0 0;
}

.radio-group label {
  color: #ccc;
  font-size: 14px;
  min-width: auto;
  margin-right: 0;
  cursor: pointer;
}

.section-divider {
  border: none;
  border-top: 2px solid #444;
  margin: 25px 0;
}

.settings-footer {
  background-color: #2a2a2a;
  padding: 15px 20px;
  border-top: 1px solid #555;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.settings-button {
  padding: 8px 20px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

.settings-button-primary {
  background-color: #0066cc;
  border-color: #0066cc;
}

.settings-button-primary:hover {
  background-color: #0052a3;
}

/* Responsive Design für kleinere Bildschirme */
@media screen and (max-width: 600px) {
  .settings-content {
    width: 95%;
    height: 95%;
  }

  .setting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .setting-row label {
    min-width: auto;
    margin-right: 0;
  }

  .setting-row input[type="text"],
  .setting-row select,
  .combo-container {
    width: 100%;
  }
}

/* About Modal Styles */
.about-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px);
}

.about-modal-content {
  background-color: #2c3e50;
  margin: 10% auto;
  padding: 30px;
  border: 2px solid #34495e;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  color: #ecf0f1;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: aboutModalSlideIn 0.3s ease-out;
}

@keyframes aboutModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.about-modal h2 {
  color: #3498db;
  margin-bottom: 20px;
  font-size: 2em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.about-modal .version {
  color: #95a5a6;
  font-size: 1.1em;
  margin: 15px 0;
}

.about-modal .author {
  color: #e74c3c;
  font-size: 1.2em;
  margin: 15px 0;
  font-weight: bold;
}

.about-modal .info-link {
  margin-top: 20px;
}

.about-modal .info-link a {
  color: #3498db;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid #3498db;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-block;
}

.about-modal .info-link a:hover {
  background-color: #3498db;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.about-close {
  color: #bdc3c7;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
  margin-top: -10px;
  margin-right: -10px;
}

.about-close:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

/* Modulare, eingebettete Hilfeseite */
.about-modal .info-link button {
  margin: 10px 4px;
  padding: 10px 20px;
  border: 1px solid #3498db;
  border-radius: 5px;
  background: #3498db;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.about-modal .info-link button:hover {
  background: #217dbb;
  transform: translateY(-2px);
}

.about-close {
  border: 0;
  background: transparent;
}

.info-dialog {
  width: min(1100px, calc(100vw - 24px));
  height: min(900px, calc(100vh - 24px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #586774;
  border-radius: 12px;
  background: #eef3f7;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.info-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.info-dialog[open] {
  display: grid;
  grid-template-rows: auto 1fr;
}

.info-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #20374a;
  color: white;
}

.info-dialog-header button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.info-dialog-header button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.info-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #eef3f7;
}
