/*
 * Mandarinen: Erinnerungen im Gepäck
 * Vollständige CSS mit Cover-Integration
 */

/* Erzwinge dunkles Farbschema für alle Browser */
:root {
  color-scheme: dark only;
  
  /* Verhindere automatische Farbanpassungen */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Spezifische Safari/WebKit Anpassungen */
@supports (-webkit-appearance: none) {
  html {
    color-scheme: dark only;
    background-color: #1c0f21 !important;
  }
  
  body {
    background-color: #1c0f21 !important;
    /* Überschreibe jegliche automatische Farbanpassungen */
    background: linear-gradient(135deg, #191919, #282828) !important;
    background-attachment: fixed !important;
  }
}

/* Verhindere helle Anpassungen in iOS Safari */
@media (prefers-color-scheme: light) {
  html, body {
    background-color: #1c0f21 !important;
    color: #fff !important;
  }
  
  /* Erzwinge dunkles Farbschema auch bei hellem System-Setting */
  body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end)) !important;
    color: var(--cell-text) !important;
  }
}

/* Zusätzliche Sicherheit für iOS Safari */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
  body {
    background-color: #1c0f21 !important;
  }
}

/* ==== GRUNDLEGENDE CSS-VARIABLEN ==== */
:root {
  /* Original-Farbpalette */
  --color-violet: #631D76;
  --color-pink: #F7C1BB;
  --color-red: #D62941;
  --color-yellow: #FDC840;
  --color-green: #99B9AB;

  /* Dunklere Varianten */
  --color-violet-dark: #4a1659;
  --color-pink-dark: #e59f99;
  --color-red-dark: #a01f31;
  --color-yellow-dark: #e0a912;
  --color-green-dark: #6d8b7e;

  /* Hellere Varianten */
  --color-violet-light: #9b4dba;
  --color-pink-light: #ffdad6;
  --color-red-light: #e8667a;
  --color-yellow-light: #fed77d;
  --color-green-light: #bdd4ca;

  /* Neue Farben vom Cover */
  --color-mandarin-bright: #FF8C00;
  --color-mandarin-dark: #E67300;
  --color-turquoise: #A0D8EF;
  --color-dark-turquoise: #69B3CB;
  --color-cover-black: #191919;
  --color-cover-gold: #FFF0AC;

  /* UI-Farben */
  --bg-color: #1c0f21;
  --bg-gradient-start: var(--color-cover-black);
  --bg-gradient-end: #282828;
  --cell-bg: #3a1142;
  --cell-border: #631D76;
  --cell-text: #fff;
  --cell-selected: #631D76;
  --cell-found: #9b4dba;
  --text-shadow: 0 0 5px rgba(155, 77, 186, 0.8);
  --title-shadow: 0 0 10px rgba(99, 29, 118, 0.9);
  --overlay-bg: rgba(41, 15, 48, 0.95);
  --btn-hover: rgba(99, 29, 118, 0.3);

  /* Übergänge und Schriften */
  --transition-speed: 0.3s;
  --main-font: 'Press Start 2P', cursive;
  --lyric-font: 'Source Sans Pro', sans-serif;
}

/* ==== GRUNDLEGENDE ELEMENTE ==== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-attachment: fixed;
  color: var(--cell-text);
  font-family: var(--main-font);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  position: relative;
  line-height: 1.4;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Filmkorn-Overlay für das gesamte Spiel */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.03; /* Sehr subtil */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

h1 {
  margin: 20px 0 10px;
  text-shadow: var(--title-shadow);
  font-size: 1.3rem;
  letter-spacing: 1px;
  text-align: center;
  animation: glow 2s infinite alternate;
  padding: 15px;
  color: var(--color-cover-gold);
}

h2 {
  color: var(--color-cover-gold);
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 240, 172, 0.5);
}

p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* ==== ANIMATIONEN ==== */
@keyframes glow {
  from { text-shadow: 0 0 5px var(--color-violet); }
  to { text-shadow: 0 0 15px var(--color-violet), 0 0 20px var(--color-violet); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); box-shadow: 0 0 20px var(--color-violet); }
  100% { transform: scale(1); }
}

@keyframes borderGlow {
  0% { opacity: 0.1; }
  100% { opacity: 0.4; }
}

@keyframes shine {
  to { left: 100%; }
}

@keyframes pulse-word {
  0% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(var(--pulse-color, 99, 29, 118), 0.5);
  }
  100% {
    transform: scale(1.07);
    box-shadow: 0 0 15px rgba(var(--pulse-color, 99, 29, 118), 0.8);
  }
}


/* ==== FONT SIZE ADJUSTMENTS FOR COMPLEX CHARACTER LANGUAGES (MOVED HERE FOR SPECIFICITY) ==== */

/* Larger font size for complex scripts like Hindi, Chinese, etc. */
body.lang-complex-chars .cell {
    font-size: 1.3em; /* Further increased size, using em */
    /* Ensure text fits vertically */
    line-height: 1.1;
    /* Prevent overflow if characters are very wide */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.lang-complex-chars .word {
    font-size: 1.25em; /* Further increased size, using em */
    font-weight: 600; /* Make words more visible */
}

/* Specific adjustments for Arabic */
html[lang="ar"] .cell {
    font-size: 1.3em !important; /* Force larger size for Arabic */
    font-family: 'Amiri', sans-serif; /* Use Arabic font */
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[lang="ar"] .word {
    font-size: 1.25em !important; /* Force larger size for Arabic */
    font-family: 'Amiri', sans-serif; /* Use Arabic font */
    font-weight: 600; /* Make words more visible */
}

/* Specific adjustments for Hindi */
html[lang="hi"] .cell {
    font-size: 1.3em !important; /* Force larger size for Hindi */
    font-family: 'Noto Sans Devanagari', sans-serif; /* Use Hindi font */
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[lang="hi"] .word {
    font-size: 1.25em !important; /* Force larger size for Hindi */
    font-family: 'Noto Sans Devanagari', sans-serif; /* Use Hindi font */
    font-weight: 600; /* Make words more visible */
}

/* Adjustments within media queries */
@media (max-width: 800px) {
  body.lang-complex-chars .cell {
    font-size: 1.1rem; /* Increased from 0.7rem */
  }
  /* .word size doesn't change at this breakpoint in original */
}

@media (max-width: 600px) {
  body.lang-complex-chars .cell {
    font-size: 1.0rem; /* Increased from 0.65rem */
  }
  body.lang-complex-chars .word {
    font-size: 0.9rem; /* Increased from 0.55rem */
  }

  html[lang="ar"] .cell,
  html[lang="hi"] .cell {
    font-size: 1.0rem !important;
  }

  html[lang="ar"] .word,
  html[lang="hi"] .word {
    font-size: 0.9rem !important;
  }
}

@media (max-width: 360px) {
  body.lang-complex-chars .cell {
    font-size: 0.9rem; /* Increased from 0.6rem */
  }
  /* .word size doesn't change at this breakpoint in original */

  html[lang="ar"] .cell,
  html[lang="hi"] .cell {
    font-size: 0.9rem !important;
  }

  html[lang="ar"] .word,
  html[lang="hi"] .word {
    font-size: 0.8rem !important;
  }
}


@keyframes pulse-icon {
  0% { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes progressShine {
  to { left: 150%; }
}

@keyframes word-found-effect {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.15); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(1080deg); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes float-left {
  0% { transform: translateY(0) rotate(-5deg); }
  100% { transform: translateY(-8px) rotate(5deg); }
}

@keyframes float-right {
  0% { transform: translateY(-8px) rotate(5deg); }
  100% { transform: translateY(0) rotate(-5deg); }
}

@keyframes move-towards-right {
  0% { transform: translateY(0) rotate(-5deg); left: 10px; }
  100% { transform: translateY(0) rotate(0deg); left: 30px; }
}

@keyframes move-towards-left {
  0% { transform: translateY(-8px) rotate(5deg); right: 10px; }
  100% { transform: translateY(0) rotate(0deg); right: 30px; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes moveGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-text {
  from { text-shadow: 0 0 2px var(--color-red); }
  to { text-shadow: 0 0 8px var(--color-red), 0 0 10px var(--color-red); }
}

@keyframes lineSweep {
  0% { opacity: 0.2; }
  100% { opacity: 1; }
}

@keyframes cell-glow {
  0% { box-shadow: 0 0 5px rgba(var(--cell-color, 255, 255, 255), 0.5); }
  100% { box-shadow: 0 0 10px rgba(var(--cell-color, 255, 255, 255), 0.8); }
}

@keyframes flash {
  0% { opacity: 0; }
  10% { opacity: 0.7; }
  100% { opacity: 0; }
}

@keyframes glow-ping {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.5); }
}

@keyframes mandarin-shine {
  from {
    opacity: 0.4;
    transform: rotate(-30deg) scale(1);
  }
  to {
    opacity: 0.7;
    transform: rotate(-25deg) scale(1.1);
  }
}

@keyframes highlight-pulse {
  from { box-shadow: 0 0 8px rgba(255, 140, 0, 0.4); }
  to { box-shadow: 0 0 15px rgba(255, 140, 0, 0.7); }
}

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

@keyframes pulse-bg {
  from { opacity: 0.1; filter: blur(8px) grayscale(30%); }
  to { opacity: 0.2; filter: blur(6px) grayscale(10%); }
}

@keyframes end-screen-reveal {
  0% { opacity: 0.1; filter: blur(8px) grayscale(50%); }
  50% { opacity: 0.25; filter: blur(3px) grayscale(20%); }
  100% { opacity: 0.2; filter: blur(5px) grayscale(30%); }
}

@keyframes image-zoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* ==== STERN HINTERGRUND ==== */
#star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: twinkle var(--twinkle-duration, 4s) infinite ease-in-out;
}

/* ==== CONTAINER & LAYOUT ==== */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  position: relative;
  width: 100%;
  max-width: 550px;
}

/* ==== SPIELRASTER & ZELLEN ==== */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  margin: 20px 0 0 0; /* Oberer Abstand beibehalten, unteren auf 0 setzen */
  user-select: none;
  touch-action: none;
  box-shadow: 0 6px 22px rgba(0,0,0,0.7);
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-speed);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0; /* Kein Abstand nach unten, da Untertitel folgen */
}

.grid::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  border-radius: 12px;
  background: linear-gradient(45deg,
    var(--color-mandarin-bright),
    transparent,
    var(--color-turquoise));
  opacity: 0.2;
  animation: borderGlow 4s infinite alternate;
}

.grid:hover {
  transform: translateY(-3px);
}

.cell {
  width: 36px;
  height: 36px;
  background: rgba(25, 25, 25, 0.8);
  border: 1px solid rgba(255, 140, 0, 0.3);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--cell-text);
  text-shadow: var(--text-shadow);
  cursor: pointer;
  transition: all var(--transition-speed);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.cell::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.cell:hover {
  transform: scale(1.05);
  z-index: 2;
}

.cell:hover::after {
  opacity: 1;
}

.cell.selected {
  background: rgba(255, 140, 0, 0.7);
  border-color: var(--color-mandarin-bright);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
  transform: scale(1.1);
  z-index: 3;
}

.cell.found {
  position: relative;
  overflow: hidden;
  z-index: 1;
  animation: pulse 1s ease-in-out, cell-glow 1.5s infinite alternate;
  border-color: var(--color-cover-gold) !important;
  box-shadow: 0 0 12px rgba(255, 240, 172, 0.4) !important;
}

/* ==== ZELL-FARBEN FÜR VERSCHIEDENE STEMS ==== */
.cell.found[data-stem="1"] {
  border-color: var(--color-violet) !important;
  box-shadow: 0 0 8px rgba(99, 29, 118, 0.6) !important;
  color: var(--color-violet-dark) !important;
  font-weight: bold !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
}

.cell.found[data-stem="2"] {
  border-color: var(--color-red) !important;
  box-shadow: 0 0 8px rgba(214, 41, 65, 0.6) !important;
  color: var(--color-red-dark) !important;
  font-weight: bold !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
}

.cell.found[data-stem="3"] {
  border-color: var(--color-yellow) !important;
  box-shadow: 0 0 8px rgba(253, 200, 64, 0.6) !important;
  color: var(--color-yellow-dark) !important;
  font-weight: bold !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
}

.cell.found[data-stem="4"] {
  border-color: var(--color-green) !important;
  box-shadow: 0 0 8px rgba(153, 185, 171, 0.6) !important;
  color: var(--color-green-dark) !important;
  font-weight: bold !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
}

.cell.found[data-stem="5"] {
  border-color: var(--color-pink) !important;
  box-shadow: 0 0 8px rgba(247, 193, 187, 0.6) !important;
  color: var(--color-pink-dark) !important;
  font-weight: bold !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
}

.cell.found::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0.15; /* Sehr subtil */
  transition: all 0.3s ease;
}

.cell.found[data-stem="1"]::after {
  background-color: var(--color-violet);
}

.cell.found[data-stem="2"]::after {
  background-color: var(--color-red);
}

.cell.found[data-stem="3"]::after {
  background-color: var(--color-yellow);
}

.cell.found[data-stem="4"]::after {
  background-color: var(--color-green);
}

.cell.found[data-stem="5"]::after {
  background-color: var(--color-pink);
}

.cell.found:hover {
  transform: scale(1.1) !important;
  z-index: 10 !important;
}

.cell.found:hover::after {
  opacity: 0.4;
}

.cell.found.multi-word {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.1) 3px,
    rgba(255, 255, 255, 0.2) 3px,
    rgba(255, 255, 255, 0.2) 6px
  ) !important;
}

/* ==== WORTLISTE & WORT-STYLING ==== */
.word-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 90%;
  margin-top: 25px; /* Etwas mehr Abstand zum Grid */
}

.word {
  padding: 8px 12px;
  background: rgba(25, 25, 25, 0.7);
  border: 1px solid rgba(160, 216, 239, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  text-shadow: var(--text-shadow);
  font-size: 0.7rem;
  transition: all var(--transition-speed);
  padding-right: 30px; /* Mehr Platz für das Icon */
  position: relative;
}

.word:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

.word.found {
  text-decoration: none !important;
  position: relative;
  opacity: 1;
  transform-origin: center;
  transition: all 0.3s ease;
  background: linear-gradient(to right,
    rgba(255, 140, 0, 0.7),
    rgba(255, 165, 0, 0.7)) !important;
  border-color: var(--color-mandarin-dark) !important;
  box-shadow: 0 0 12px rgba(255, 140, 0, 0.5) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.word-just-found {
  animation: word-found-effect 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==== STEM-SPEZIFISCHE WORTGESTALTUNG ==== */
/* Bass (Stem 1) - Violett */
[data-stem="1"].word {
  background: rgba(99, 29, 118, 0.05);
  border-color: rgba(99, 29, 118, 0.4);
}
[data-stem="1"].word.found {
  background: rgba(99, 29, 118, 0.7) !important;
  border-color: var(--color-violet-dark) !important;
  box-shadow: 0 0 12px rgba(99, 29, 118, 0.7) !important;
  color: white !important;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5) !important;
  animation: pulse-word 2s infinite alternate !important;
}

/* Drums (Stem 2) - Rot */
[data-stem="2"].word {
  background: rgba(214, 41, 65, 0.05);
  border-color: rgba(214, 41, 65, 0.4);
}
[data-stem="2"].word.found {
  background: rgba(214, 41, 65, 0.7) !important;
  border-color: var(--color-red-dark) !important;
  box-shadow: 0 0 12px rgba(214, 41, 65, 0.7) !important;
  color: white !important;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5) !important;
  animation: pulse-word 2s infinite alternate !important;
}

/* Guitars (Stem 3) - Gelb */
[data-stem="3"].word {
  background: rgba(253, 200, 64, 0.05);
  border-color: rgba(253, 200, 64, 0.4);
}
[data-stem="3"].word.found {
  background: rgba(253, 200, 64, 0.7) !important;
  border-color: var(--color-yellow-dark) !important;
  box-shadow: 0 0 12px rgba(253, 200, 64, 0.7) !important;
  color: black !important; /* Dunkle Schrift auf hell-gelbem Hintergrund */
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5) !important;
  animation: pulse-word 2s infinite alternate !important;
}

/* Others (Stem 4) - Grün */
[data-stem="4"].word {
  background: rgba(153, 185, 171, 0.05);
  border-color: rgba(153, 185, 171, 0.4);
}
[data-stem="4"].word.found {
  background: rgba(153, 185, 171, 0.7) !important;
  border-color: var(--color-green-dark) !important;
  box-shadow: 0 0 12px rgba(153, 185, 171, 0.7) !important;
  color: black !important; /* Dunkle Schrift auf hellem Hintergrund */
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5) !important;
  animation: pulse-word 2s infinite alternate !important;
}

/* Vocals (Stem 5) - Rosa */
[data-stem="5"].word {
  background: rgba(247, 193, 187, 0.05);
  border-color: rgba(247, 193, 187, 0.4);
}
[data-stem="5"].word.found {
  background: rgba(247, 193, 187, 0.7) !important;
  border-color: var(--color-pink-dark) !important;
  box-shadow: 0 0 12px rgba(247, 193, 187, 0.7) !important;
  color: black !important; /* Dunkle Schrift auf hell-rosa Hintergrund */
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5) !important;
  animation: pulse-word 2s infinite alternate !important;
}

/* ==== STEM-ICONS ==== */
.stem-icon-container {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.word.stem-active .stem-icon-container {
  opacity: 1;
  animation: icon-pulse 1.5s infinite alternate;
}

.stem-icon {
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke-width: 2;
}

.stem-icon-base, .stem-icon-detail {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.3s ease;
}

/* Icon-Farben nach Stem-Typ */
[data-stem="1"] .stem-icon-base {
  stroke: var(--color-violet);
  fill: rgba(99, 29, 118, 0.3);
}
[data-stem="1"] .stem-icon-detail {
  stroke: var(--color-violet-dark);
}

[data-stem="2"] .stem-icon-base {
  stroke: var(--color-red);
  fill: rgba(214, 41, 65, 0.3);
}
[data-stem="2"] .stem-icon-detail {
  stroke: var(--color-red-dark);
}

[data-stem="3"] .stem-icon-base {
  stroke: var(--color-yellow);
  fill: rgba(253, 200, 64, 0.3);
}
[data-stem="3"] .stem-icon-detail {
  stroke: var(--color-yellow-dark);
}

[data-stem="4"] .stem-icon-base {
  stroke: var(--color-green);
  fill: rgba(153, 185, 171, 0.3);
}
[data-stem="4"] .stem-icon-detail {
  stroke: var(--color-green-dark);
}

[data-stem="5"] .stem-icon-base {
  stroke: var(--color-pink);
  fill: rgba(247, 193, 187, 0.3);
}
[data-stem="5"] .stem-icon-detail {
  stroke: var(--color-pink-dark);
}

.word.found .stem-icon-container {
  opacity: 1;
}

.word.found .stem-icon-base,
.word.found .stem-icon-detail {
  stroke: white !important;
}

.word[data-stem]:hover::after {
  content: attr(title);
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  white-space: nowrap;
  z-index: 100;
  opacity: 0;
  animation: fade-in 0.3s forwards;
}

/* ==== STEM-BENACHRICHTIGUNGEN ==== */
.stem-notification {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  box-shadow: 0 0 20px rgba(99, 29, 118, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.stem-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.stem-notification.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-30px);
}

.stem-notification-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background: radial-gradient(circle, var(--color-violet), transparent 70%);
  border-radius: 50%;
  animation: pulse-icon 1s infinite alternate;
}

/* Farbvariationen der Benachrichtigungen */
.stem-notification[data-stem="1"] {
  border-color: var(--color-violet);
  background: linear-gradient(to bottom, rgba(99, 29, 118, 0.9) 0%, rgba(74, 22, 89, 0.8) 100%);
  color: white;
  box-shadow: 0 0 15px rgba(99, 29, 118, 0.7);
}

.stem-notification[data-stem="2"] {
  border-color: var(--color-red);
  background: linear-gradient(to bottom, rgba(214, 41, 65, 0.9) 0%, rgba(160, 31, 49, 0.8) 100%);
  color: white;
  box-shadow: 0 0 15px rgba(214, 41, 65, 0.7);
}

.stem-notification[data-stem="3"] {
  border-color: var(--color-yellow);
  background: linear-gradient(to bottom, rgba(253, 200, 64, 0.9) 0%, rgba(224, 169, 18, 0.8) 100%);
  color: black;
  box-shadow: 0 0 15px rgba(253, 200, 64, 0.7);
}

.stem-notification[data-stem="4"] {
  border-color: var(--color-green);
  background: linear-gradient(to bottom, rgba(153, 185, 171, 0.9) 0%, rgba(109, 139, 126, 0.8) 100%);
  color: black;
  box-shadow: 0 0 15px rgba(153, 185, 171, 0.7);
}

.stem-notification[data-stem="5"] {
  border-color: var(--color-pink);
  background: linear-gradient(to bottom, rgba(247, 193, 187, 0.9) 0%, rgba(229, 159, 153, 0.8) 100%);
  color: black;
  box-shadow: 0 0 15px rgba(247, 193, 187, 0.7);
}

.stem-notification[data-stem="1"] .stem-notification-icon {
  background: radial-gradient(circle, var(--color-violet-light), var(--color-violet));
}

.stem-notification[data-stem="2"] .stem-notification-icon {
  background: radial-gradient(circle, var(--color-red-light), var(--color-red));
}

.stem-notification[data-stem="3"] .stem-notification-icon {
  background: radial-gradient(circle, var(--color-yellow-light), var(--color-yellow));
}

.stem-notification[data-stem="4"] .stem-notification-icon {
  background: radial-gradient(circle, var(--color-green-light), var(--color-green));
}

.stem-notification[data-stem="5"] .stem-notification-icon {
  background: radial-gradient(circle, var(--color-pink-light), var(--color-pink));
}

/* ==== UI-ELEMENTE ==== */
/* Timer-Anzeige */
#timer {
  font-size: 0.9rem;
  margin-bottom: 15px;
  color: #fff;
  background: linear-gradient(to right,
    rgba(160, 216, 239, 0.2),
    rgba(105, 179, 203, 0.3));
  padding: 8px 15px;
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(160, 216, 239, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#timer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 3s infinite linear;
}

/* Level-Anzeige */
#levelIndicator {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 0.7rem;
  background: linear-gradient(to right,
    rgba(160, 216, 239, 0.2),
    rgba(105, 179, 203, 0.3));
  padding: 7px 12px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(160, 216, 239, 0.3);
  border: 1px solid rgba(247, 193, 187, 0.3);
}

/* Fortschrittsanzeige */
#progress {
  /* Verstecke diesen Container, da er durch die Untertitel ersetzt wird */
  display: none;
}

#progressBar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-violet), var(--color-red));
  transition: width 0.5s ease;
  width: 0;
  box-shadow: 0 0 10px var(--color-red);
  position: relative;
  overflow: hidden;
}

#progressBar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 2s infinite;
}

/* Musik- und Sound-Buttons */
#musicToggle {
  position: absolute;
  bottom: -50px;
  right: 15px;
  z-index: 101;
  padding: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

#musicToggle:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 8px var(--color-violet));
  background: rgba(99, 29, 118, 0.2);
}

#musicToggle svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 5px var(--color-violet));
}

#soundToggle {
  position: absolute;
  bottom: -50px;
  right: 70px;
  z-index: 101;
  padding: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

#soundToggle:hover {
  transform: scale(1.1) rotate(-5deg);
  filter: drop-shadow(0 0 8px var(--color-violet));
  background: rgba(99, 29, 118, 0.2);
}

#soundToggle svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 5px var(--color-violet));
}

/* Tipp-Button */
#hintButton {
  position: absolute;
  bottom: -50px;
  left: 15px;
  border: none;
  background: rgba(253, 200, 64, 0.3);
  color: white;
  font-family: var(--main-font);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 5px 10px;
  z-index: 101;
  text-shadow: 0 0 5px rgba(253, 200, 64, 0.8);
  transition: all 0.3s ease;
  border-radius: 4px;
  border: 1px solid rgba(253, 200, 64, 0.7);
  white-space: nowrap;
}

#hintButton:hover {
  transform: scale(1.1);
  text-shadow: 0 0 8px rgba(253, 200, 64, 1);
  background: rgba(253, 200, 64, 0.5);
  box-shadow: 0 0 15px rgba(253, 200, 64, 0.6);
}

/* Epic Badge */
.epic-badge {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 0.6rem;
  background: linear-gradient(45deg, var(--color-red), var(--color-violet));
  padding: 5px 10px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(214, 41, 65, 0.6);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.epic-badge.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mandarin Icon */
.mandarin-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  z-index: 105;
  top: -15px;
  right: -15px;
  transform: rotate(-10deg);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;

  /* Schatten für Tiefenwirkung */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);

  /* 3D-Effekt durch Gradienten */
  background: radial-gradient(circle at 35% 35%,
    #FFA500 5%,
    #FF8C00 45%,
    #FF7800 85%);
}

/* Glanzeffekt wie bei einer echten Mandarine */
.mandarin-icon::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 120%;
  top: -40%;
  left: -40%;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0) 70%);
  transform: rotate(-30deg);
  opacity: 0.5;
}

/* Stängel und Blatt */
.mandarin-icon::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 8px;
  background: #006400;
  border-radius: 40% 40% 0 0;
  clip-path: polygon(
    20% 0%,
    80% 0%,
    100% 50%,
    80% 100%,
    20% 100%,
    0% 50%
  );
}

/* Hover-Animation */
.mandarin-icon:hover {
  transform: rotate(10deg) scale(1.15);
  box-shadow: 0 8px 25px rgba(255, 140, 0, 0.6);
}

/* Pulsierender Schimmer beim Hover */
.mandarin-icon:hover::before {
  animation: mandarin-shine 2s infinite alternate;
}

/* Reward Box */
.reward-box {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--color-yellow), var(--color-violet));
  border-radius: 10px;
  margin: 20px auto;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 30px rgba(253, 200, 64, 0.7);
  transition: all 0.3s ease;
  animation: float 3s infinite ease-in-out;
  transform-style: preserve-3d;
}

.reward-box:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 40px rgba(99, 29, 118, 0.9);
}

.reward-box::before,
.reward-box::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
}

.reward-box::before {
  width: 20px;
  height: 100%;
  left: 40px;
  top: 0;
}

.reward-box::after {
  width: 100%;
  height: 20px;
  left: 0;
  top: 40px;
}

/* ==== DOPPELTE MANDARINEN ANIMATION ==== */
.double-mandarins {
  position: relative;
  width: 120px;
  height: 70px;
  margin: 30px auto;
}

.double-mandarins .mandarin-left,
.double-mandarins .mandarin-right {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #FFA500 5%,
    #FF8C00 45%,
    #FF7800 85%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  top: 0;
}

.double-mandarins .mandarin-left {
  left: 10px;
  z-index: 1;
  animation: float-left 3s infinite alternate ease-in-out;
}

.double-mandarins .mandarin-right {
  right: 10px;
  z-index: 2;
  animation: float-right 3s infinite alternate ease-in-out;
}

/* Glanzeffekt auf den Mandarinen */
.double-mandarins .mandarin-left::before,
.double-mandarins .mandarin-right::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 120%;
  top: -40%;
  left: -40%;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0) 70%);
  transform: rotate(-30deg);
  opacity: 0.5;
}

/* Stängel */
.double-mandarins .mandarin-left::after,
.double-mandarins .mandarin-right::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 7px;
  background: #006400;
  border-radius: 40% 40% 0 0;
  clip-path: polygon(
    20% 0%,
    80% 0%,
    100% 50%,
    80% 100%,
    20% 100%,
    0% 50%
  );
}

/* Kleinere Version für den Badge */
.double-mandarins.small {
  margin: 0;
  width: 60px;
  height: 35px;
}

.double-mandarins.small .mandarin-left,
.double-mandarins.small .mandarin-right {
  width: 30px;
  height: 30px;
}

/* ==== OVERLAYS & DIALOGE ==== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: #fff;
  text-align: center;
  padding: 20px;
  line-height: 1.5;
  border-radius: 8px;
  animation: fadeIn 0.6s ease-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.overlay.hidden {
  display: none !important;
}

/* Vintage-Overlay */
.vintage-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: overlay;
  background: radial-gradient(
    circle at center,
    transparent 40%,
    rgba(46, 49, 65, 0.1) 100%
  );
}

/* Startbildschirm mit Cover als Hintergrund */
#startScreen {
  position: fixed;
  background: #000;
}

#startScreen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/mandarinen_cover.jpg') center center/cover no-repeat;
  opacity: 0.25; /* Abgedunkelt für bessere Lesbarkeit */
  z-index: -1;
  filter: blur(3px); /* Leichter Blur für atmosphärischen Effekt */
  transition: all 1s ease;
}

#startScreen:hover::before {
  opacity: 0.3; /* Leicht heller beim Hover */
  filter: blur(2px); /* Etwas weniger Blur beim Hover */
}

/* Cover als Hintergrund für Level-Übergänge */
#levelOverlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/mandarinen_cover.jpg') center center/cover no-repeat;
  opacity: 0;
  z-index: -1;
  filter: blur(8px) grayscale(30%);
  transition: opacity 1s ease;
}

#levelOverlay.show-cover::before {
  opacity: 0.15;
  animation: pulse-bg 5s infinite alternate;
}

/* Animiertes Cover auf dem End-Screen */
#endScreen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/mandarinen_cover.jpg') center center/cover no-repeat;
  opacity: 0.2;
  z-index: -1;
  filter: blur(5px);
  animation: end-screen-reveal 10s infinite alternate;
}

/* Hilfe-Dialog */
#helpOverlay {
  background: var(--overlay-bg);
  z-index: 102;
}

.help-container {
  max-width: 500px;
  width: 90%;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  border: 2px solid var(--color-violet);
  position: relative;
  overflow: auto;
  max-height: 60vh;
  scrollbar-width: thin;
  scrollbar-color: var(--color-violet) rgba(0,0,0,0.3);
}

.help-container::-webkit-scrollbar {
  width: 6px;
}

.help-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
}

.help-container::-webkit-scrollbar-thumb {
  background-color: var(--color-violet);
  border-radius: 10px;
}

.help-container::before,
.help-container::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--color-violet), transparent 70%);
  border-radius: 50%;
  opacity: 0.1;
  animation: moveGlow 10s infinite alternate ease-in-out;
}

.help-container::before {
  top: -50px;
  left: -50px;
  animation-delay: 0s;
}

.help-container::after {
  bottom: -50px;
  right: -50px;
  animation-delay: 5s;
}

.help-title {
  color: var(--color-violet);
  margin-bottom: 20px;
  font-size: 1.1rem;
  text-shadow: 0 0 5px rgba(99, 29, 118, 0.5);
}

.help-section {
  margin-bottom: 20px;
  text-align: left;
  position: relative;
  padding-left: 15px;
}

.help-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--color-violet), transparent);
  opacity: 0.5;
}

.help-section h3 {
  color: var(--color-violet);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.help-section p {
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ==== COVER-FRAME STYLING ==== */
.cover-frame {
  max-width: 600px;
  width: 90%;
  padding: 30px;
  background-color: rgba(25, 25, 25, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

/* Cover-Schattierung verstärken */
#startScreen .cover-frame {
  background: rgba(25, 25, 25, 0.85); /* Etwas transparenter */
  backdrop-filter: blur(8px); /* Zusätzlicher Blur für bessere Lesbarkeit */
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Cover-Titel-Styling */
.cover-title {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--color-cover-gold);
  font-size: 1rem;
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 240, 172, 0.3);
}

.artist-name {
  text-align: left;
}

.song-title {
  text-align: right;
}

/* Cover-Footer mit goldenem Dreieck */
.cover-footer {
  position: absolute;
  bottom: 20px;
  right: 25px;
  display: flex;
  align-items: center;
  color: var(--color-cover-gold);
}

/* Spezielle Überschrift für den Startbildschirm */
#startScreen h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--color-cover-gold);
  text-shadow: 0 0 10px rgba(255, 240, 172, 0.4);
}

/* ==== LEVEL-OVERLAY STYLES ==== */
.level-frame {
  max-width: 800px;
  width: 94%;
  padding: 40px 30px;
  transition: all 0.5s ease-out;
  position: relative;
}

/* Level-Badge mit Cover-Stil */
.level-badge {
  display: flex;
  align-items: center;
  margin: 0 auto 30px;
  background: rgba(255, 140, 0, 0.2);
  padding: 10px 20px;
  border-radius: 30px;
  width: fit-content;
  border: 1px solid rgba(255, 140, 0, 0.3);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.2);
}

.level-number {
  color: var(--color-cover-gold);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-left: 10px;
}

/* Lyrics-Container mit verbessertem Styling */
.lyrics-container {
  position: relative;
  margin: 20px 0 40px;
  padding: 20px 0;
}

.lyrics-container::before,
.lyrics-container::after {
  content: '';
  position: absolute;
  height: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  background: linear-gradient(90deg,
    transparent,
    var(--color-mandarin-bright),
    transparent);
}

.lyrics-container::before {
  top: 0;
}

.lyrics-container::after {
  bottom: 0;
}

/* Lyric Display */
#lyricDisplay {
  background: rgba(25, 25, 25, 0.5);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 140, 0, 0.2);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
  font-family: var(--lyric-font);
  line-height: 1.7;
  font-size: 1.2rem;
  font-weight: 300;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  margin-right: 100px; /* Platz schaffen für den Plattenspieler */
  max-width: calc(100% - 120px); /* Breite anpassen */
}

/* Bessere Hervorhebung in Lyrics */
.highlight {
  color: var(--color-mandarin-bright);
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.4);
  display: inline-block;
  animation: highlight-pulse 1.5s infinite alternate;
}

/* Level-Zitate */
.level-quote {
  font-family: var(--lyric-font);
  font-size: 1.1rem;
  font-style: italic;
  margin: 15px auto 0;
  max-width: 80%;
  line-height: 1.5;
  color: var(--color-turquoise);
  padding: 15px;
  position: relative;
  text-align: center;
}

.level-quote::before,
.level-quote::after {
  content: '"';
  font-size: 1.5rem;
  font-family: serif;
  position: absolute;
  color: var(--color-cover-gold);
  opacity: 0.7;
}

.level-quote::before {
  top: 0;
  left: 0;
}

.level-quote::after {
  bottom: 0;
  right: 0;
}

/* Memory Flash */
.memory-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  z-index: 200;
  pointer-events: none;
}

/* ==== VINYL-PLAYER STYLES ==== */
/* Großer Plattenspieler neben dem Songtext */
.vinyl-player {
  position: absolute;
  top: 50%;         /* Vertikal zentriert */
  transform: translateY(-50%) rotate(-5deg);
  right: -110px;    /* Nach rechts versetzt, neben dem Text */
  width: 100px;     /* Viel größer */
  height: 100px;    /* Viel größer */
  z-index: 20;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  opacity: 0.9;
}

.vinyl-player:hover {
  transform: translateY(-50%) rotate(0) scale(1.1);
  opacity: 1;
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(30deg,
    #111 0%,
    #333 30%,
    #111 40%,
    #333 50%,
    #111 60%,
    #333 80%,
    #111 100%
  );
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.5s ease;
}

.vinyl-disc.spinning {
  animation: spin 8s linear infinite;
}

.vinyl-disc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 50%,
    transparent 0px,
    transparent 3px,
    rgba(255, 255, 255, 0.04) 4px,
    rgba(255, 255, 255, 0.04) 5px
  );
}

.vinyl-label {
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
}

.vinyl-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15%;
  height: 15%;
  border-radius: 50%;
  background: #111;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Cover-Fragmente für Split-Effekt */
.cover-fragments {
  pointer-events: none;
  transition: opacity 1s ease;
}

/* ==== COVER-REVEAL BUTTON & MODAL ==== */
.cover-reveal-button {
  position: fixed;
  bottom: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: rgba(25, 25, 25, 0.7);
  border: 1px solid var(--color-mandarin-bright);
  border-radius: 50%;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
  transition: all 0.3s ease;
}

.cover-reveal-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.cover-reveal-button::before {
  content: '';
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23FF8C00" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 8v8"/><path d="M8 12h8"/></svg>') center/contain no-repeat;
}

/* Cover-Modal für Ansicht des vollen Covers */
.cover-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.cover-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.cover-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  border: 1px solid var(--color-mandarin-bright);
  box-shadow: 0 0 30px rgba(255, 140, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cover-modal.active .cover-container {
  transform: scale(1);
}

.cover-container img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
}

#fullCoverImage {
  transition: transform 0.5s ease;
}

#fullCoverImage:hover {
  transform: scale(1.05);
}

.cover-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transform: scale(0);
  transition: all 0.3s ease;
}

.cover-modal.active .cover-close {
  transform: scale(1);
}

.cover-close:hover {
  background: rgba(214, 41, 65, 0.7);
  transform: scale(1.1);
}

/* Cover-Info */
.cover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.8),
    transparent);
  padding: 15px;
  color: var(--color-cover-gold);
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.cover-container:hover .cover-info {
  transform: translateY(0);
}

/* Cover-Partikel */
.cover-particle {
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
  z-index: 10;
  transition: all 0.5s ease;
}

.cover-particle:hover {
  transform: scale(1.2) !important;
  filter: drop-shadow(0 0 10px rgba(255,140,0,0.7));
}

/* ==== BUTTONS & CONTROLS ==== */
.btn {
  margin-top: 25px;
  padding: 12px 24px;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--main-font);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  margin-left: 5px;
  margin-right: 5px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--btn-hover);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

.btn:hover::before {
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

/* Button-Varianten */
.btn.primary {
  background: linear-gradient(to bottom,
    rgba(255, 140, 0, 0.3),
    rgba(230, 115, 0, 0.4));
  border-color: var(--color-mandarin-bright);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

.btn.primary:hover {
  background: linear-gradient(to bottom,
    rgba(255, 140, 0, 0.5),
    rgba(230, 115, 0, 0.6));
  box-shadow: 0 5px 20px rgba(255, 140, 0, 0.5);
  transform: translateY(-3px);
}

.btn.secondary {
  background: linear-gradient(to bottom,
    rgba(160, 216, 239, 0.3),
    rgba(105, 179, 203, 0.4));
  border-color: var(--color-turquoise);
  box-shadow: 0 0 15px rgba(160, 216, 239, 0.3);
}

.btn.secondary:hover {
  background: linear-gradient(to bottom,
    rgba(160, 216, 239, 0.5),
    rgba(105, 179, 203, 0.6));
  box-shadow: 0 5px 20px rgba(160, 216, 239, 0.5);
  transform: translateY(-3px);
}

/* Button-Container */
.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

/* Goldene Dreiecke */
.gold-triangle {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid var(--color-cover-gold);
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
  filter: drop-shadow(0 0 5px rgba(255, 240, 172, 0.5));
}

/* Select-Styles */
label, select {
  font-family: var(--main-font);
  color: #fff;
  margin-top: 15px;
  font-size: 0.8rem;
}

select {
  background-color: rgba(153, 185, 171, 0.8); /* Grün für einfach (default) */
  color: #000;
  padding: 8px 12px;
  border: 2px solid #fff;
  border-radius: 5px;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  margin: 15px 0;
  position: relative;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Verbesserte Darstellung der Optionen im Dropdown */
select option {
  padding: 10px;
  font-size: 0.9rem;
}

select:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Schwierigkeitsgrad-Optionen */
#difficultySelect option[value="easy"] {
  background-color: rgba(153, 185, 171, 0.8); /* Grün für leicht */
}

#difficultySelect option[value="hard"] {
  background-color: rgba(214, 41, 65, 0.8); /* Rot für schwer */
}

#difficultySelect option[value="loose"] {
  background-color: rgba(253, 200, 64, 0.8); /* Gelb für locker */
}

#difficultySelect option[value="babel"] {
  background-color: #000000 !important; /* Schwarzer Hintergrund für Babel */
  color: white !important;
  font-weight: bold !important;
}

/* Spezielle Markierung für Babel-Option */
#difficultySelect option[value="babel"]::before {
  content: '\1F308 '; /* Regenbogen-Emoji */
  display: inline-block;
  margin-right: 5px;
}

/* Select-Pfeil */
.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.7rem;
  color: #000;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Shop-Link-Style */
.shop-link {
  display: inline-block;
  padding: 12px 24px;
  margin-top: 20px;
  background-color: var(--color-violet);
  color: #FFF;
  text-decoration: none;
  border-radius: 5px;
  font-family: var(--main-font);
  transition: background-color 0.3s ease;
}

.shop-link:hover {
  background-color: var(--color-violet-light);
}

/* Gutscheincode */
#couponCode {
  display: none;
  margin-top: 20px;
  font-size: 0.9rem;
}

/* Speicherungshinweis */
.save-notice {
  font-size: 0.6rem;
  opacity: 0.7;
  margin-top: 15px;
  max-width: 400px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 5px;
}

/* Konfetti-Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: #f00;
  opacity: 0;
  z-index: 99;
  animation: confetti 5s ease-in forwards;
  pointer-events: none;
}

/* ==== MOBILE OPTIMIERUNGEN ==== */
@media (max-width: 800px) {
  .vinyl-player {
    right: 20px;
    width: 60px;
    height: 60px;
    opacity: 0.8;
  }

  #lyricDisplay {
    margin-right: 70px;
    max-width: calc(100% - 80px);
  }

  .cell {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
  }

  h1 {
    font-size: 1.1rem;
    padding: 0 15px;
  }

  .cover-title {
    font-size: 0.8rem;
    margin-bottom: 20px;
  }

  .double-mandarins {
    transform: scale(0.8);
    margin: 15px auto;
  }

  .level-frame {
    padding: 30px 15px;
  }

  .level-badge {
    padding: 8px 15px;
  }

  .level-number {
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .cell {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
  }

  h1 {
    font-size: 0.85rem;
    padding: 0 10px;
    margin-bottom: 30px;
  }

  .cover-frame {
    padding: 20px 15px;
  }

  #timer {
    font-size: 0.75rem;
    margin-bottom: 10px;
    position: absolute;
    left: 10px;
    top: 10px;
    width: auto;
    min-width: 80px;
    text-align: left;
    padding: 4px 10px;
  }

  #levelIndicator {
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    padding: 4px 8px;
    margin-bottom: 15px;
  }

  .word {
    padding: 4px 6px;
    font-size: 0.55rem;
  }

  .overlay {
    padding: 12px;
  }

  p {
    font-size: 0.65rem;
  }

  /* Anpassung der Button-Positionen im Spielbereich */
  #musicToggle, #soundToggle, #hintButton {
    position: fixed !important;
    bottom: 15px !important;
  }

  #musicToggle {
    right: 20px !important;
  }

  #soundToggle {
    right: 70px !important;
  }

  #hintButton {
    left: 20px !important;
  }

  .vinyl-player {
    top: auto;
    bottom: 20px;
    right: 20px;
    transform: rotate(-5deg);
    width: 50px;
    height: 50px;
  }

  .vinyl-player:hover {
    transform: rotate(0) scale(1.1);
  }

  #lyricDisplay {
    margin-right: 0;
    max-width: 100%;
    padding: 20px;
    font-size: 1rem;
  }

  .level-quote {
    font-size: 0.9rem;
    max-width: 95%;
  }

  /* Abstand zwischen Spielfeld und Level-Anzeige */
  .grid {
    margin-top: 35px;
  }

  /* Stem-Icon-Größe */
  .stem-icon-container {
    width: 16px;
    height: 16px;
    margin-left: 4px;
  }

  .word[data-stem] {
    padding-right: 24px;
  }

  .word[data-stem]:hover::after {
    top: -20px;
    font-size: 0.5rem;
    padding: 1px 4px;
  }

  /* Benachrichtigungen */
  .stem-notification {
    font-size: 0.7rem;
    padding: 8px 15px;
    top: 30px;
  }

  .stem-notification-icon {
    width: 15px;
    height: 15px;
    margin-right: 8px;
  }

  /* Cover-Reveal-Button */
  .cover-reveal-button {
    bottom: 70px;
  }

  /* Hilfe-Container */
  .help-container {
    padding: 15px;
    max-height: 70vh;
    width: 90%;
    max-width: 300px;
  }

  .help-title {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .help-section {
    margin-bottom: 12px;
  }

  .help-section h3 {
    font-size: 0.7rem;
    margin-bottom: 5px;
  }

  .help-section p {
    font-size: 0.65rem;
    margin: 0;
  }

  /* Epic Badge */
  .epic-badge {
    top: auto;
    bottom: 100px;
    left: 10px;
    font-size: 0.55rem;
  }
}

/* Sehr kleine Geräte */
@media (max-width: 360px) {
  .cell {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }

  .word-list {
    gap: 6px;
  }

  .vinyl-player {
    width: 40px;
    height: 40px;
  }
}


/* ==== VINYL-PLAYER STYLES ==== */
/* Großer Plattenspieler neben dem Songtext */
.vinyl-player {
  position: absolute;
  top: 50%;         /* Vertikal zentriert */
  right: 3%;    /* Nach rechts versetzt, neben dem Text */
  width: 100px;     /* Größe */
  height: 100px;    /* Größe */
  z-index: 20;
  transition: opacity 0.5s ease; /* NUR opacity-Transition */
  cursor: pointer;
  opacity: 0.9;
  /* Wichtig: transform MUSS entfernt werden, da es von JavaScript gesetzt wird */
}

.vinyl-player:hover {
  opacity: 1;
  /* Keine transform-Eigenschaft mehr hier */
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(30deg,
    #111 0%,
    #333 30%,
    #111 40%,
    #333 50%,
    #111 60%,
    #333 80%,
    #111 100%
  );
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* WICHTIG: Keine transition oder animation Eigenschaften hier */
}

/* Wir entfernen die spinning Klasse und Animation komplett, da wir jetzt JavaScript verwenden */
/* .vinyl-disc.spinning { ... } wird nicht mehr benötigt */

.vinyl-label {
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
  /* Keine Transformationen oder Transitionen hier */
}

.vinyl-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15%;
  height: 15%;
  border-radius: 50%;
  background: #111;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Wir entfernen die CSS-Animation, da wir jetzt JavaScript verwenden */
/* @keyframes continuous-spin { ... } wird nicht mehr benötigt */

/* Plattenspieler für die mobile Ansicht */
@media (max-width: 800px) {
  .vinyl-player {
    right: 20px;
    width: 60px;
    height: 60px;
    opacity: 0.8;
    /* Keine transform-Eigenschaft */
  }

  #lyricDisplay {
    margin-right: 70px;
    max-width: calc(100% - 80px);
  }
}

/* Sehr kleine Geräte */
@media (max-width: 600px) {
  .vinyl-player {
    top: auto;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    /* Keine transform-Eigenschaft */
  }

  #lyricDisplay {
    margin-right: 0;
    max-width: 100%;
  }
}

/* Noch kleinere Geräte */
@media (max-width: 360px) {
  .vinyl-player {
    width: 40px;
    height: 40px;
  }
}

/* Das Lyric-Display mit Z-Index über dem Plattenspieler */
#lyricDisplay {
  position: relative;
  z-index: 10;       /* Über dem Plattenspieler */
  background: rgba(25, 25, 25, 0.5); /* Leicht transparent */
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8); /* Text-Schatten für bessere Lesbarkeit */
}

/* Verbessertes Vinyl-Label */
.vinyl-label {
  width: 45%;        /* Größer für bessere Sichtbarkeit */
  height: 45%;       /* Größer für bessere Sichtbarkeit */
}

/* Z-Index-Fixes für korrekte Schichtung aller Elemente */
.overlay {
  z-index: 1200; /* Höher als alle anderen UI-Elemente */
}

#musicToggle,
#soundToggle,
#hintButton,
.cover-reveal-button {
  z-index: 1000; /* Niedriger als Overlays */
}

body::after {
  z-index: 900; /* Niedriger als UI-Elemente */
}

.memory-flash {
  z-index: 2000; /* Höchster z-index */
}

#helpOverlay {
  z-index: 1300;
}

.cover-modal {
  z-index: 1500;
}

.stem-notification {
  z-index: 1400;
}

/* Admin-Panel */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-panel {
  background: #222;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid var(--color-violet);
  max-width: 400px;
  width: 90%;
}

.admin-panel h3 {
  color: var(--color-violet);
  margin-bottom: 20px;
  text-align: center;
}

.admin-panel label {
  display: block;
  margin-bottom: 15px;
}

.admin-panel select {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.admin-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.admin-buttons button {
  padding: 8px 15px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-buttons button:hover {
  background: rgba(99, 29, 118, 0.3);

.reward-box {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--color-yellow), var(--color-violet));
  border-radius: 10px;
  margin: 20px auto;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 30px rgba(253, 200, 64, 0.7);
  transition: all 0.3s ease;
  animation: float 3s infinite ease-in-out;
  transform-style: preserve-3d;
}

.reward-box:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 40px rgba(99, 29, 118, 0.9);
}

#couponCode {
  display: none;
  margin-top: 20px;
  font-size: 0.9rem;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  border: 1px solid var(--color-mandarin-bright);
  text-shadow: 0 0 5px rgba(255, 140, 0, 0.4);
  position: relative;
  z-index: 10;
}
}

/* Ladebildschirm */
.loading-indicator {
  margin-top: 20px;
  text-align: center;
  width: 100%;
  max-width: 300px;
  animation: fadeIn 0.5s ease;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border: 3px solid rgba(255, 140, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-mandarin-bright);
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--color-cover-gold);
}

.loading-progress-container {
  height: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid rgba(255, 140, 0, 0.3);
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-mandarin-dark), var(--color-mandarin-bright));
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.loading-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 2s infinite;
}



/* Fullscreen-Button */
.fullscreen-btn {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--color-turquoise);
  display: none; /* Standard ausgeblendet, nur auf Mobilgeräten anzeigen */
  margin-top: 10px;
  position: relative;
  padding-left: 35px;
}

.fullscreen-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-radius: 1px;
}

.fullscreen-icon::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

body.fullscreen .fullscreen-btn {
  display: none;
}

/* Verbesserte Mobile-Ansicht */
@media (max-height: 700px), (max-width: 600px) {
  .fullscreen-btn {
    display: block; /* auf kleineren Bildschirmen anzeigen */
  }

  /* Bessere Platzausnutzung auf kleinen Bildschirmen */
  .cover-frame {
    padding: 15px;
    max-height: 90vh;
    overflow-y: auto; /* Scrollbar bei Bedarf */
    margin: 5vh auto;
  }

  /* Mehr Platz durch verkleinerte Elemente */
  .double-mandarins {
    transform: scale(0.8);
    margin: 10px auto;
  }

  /* Kleinere Überschriften */
  h1 {
    font-size: 1rem;
    margin: 10px 0;
  }

  h2 {
    font-size: 1.1rem;
    margin: 10px 0;
  }

  /* Kleinere Abstände */
  p {
    margin: 0.3rem 0;
  }

  /* Version-Badge im Mobilmodus etwas besser platzieren */
  .mode-badge {
    top: 5px;
    left: 5px;
    font-size: 0.5rem;
    padding: 3px 8px;
    z-index: 1050;
  }

  /* Lyrics-Container im Level-Overlay */
  .lyrics-container {
    margin: 10px 0;
    padding: 10px 0;
    max-height: 40vh;
    overflow-y: auto;
  }

  #lyricDisplay {
    padding: 20px;
    font-size: 1rem;
  }

  /* Vinyl-Player im Mobilmodus besser platzieren */
  .vinyl-player {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 10px;
    top: 10px;
    transform: none !important;
  }

  /* Admin-Panel anpassen */
  .admin-panel {
    max-height: 80vh;
    overflow-y: auto;
    padding: 15px;
  }

  /* Level-Badge kleiner machen */
  .level-badge {
    padding: 5px 10px;
    margin: 10px auto;
  }

  /* Buttons im Mobilmodus */
  .btn {
    padding: 8px 16px;
    margin-top: 15px;
    font-size: 0.7rem;
  }
}

/* Extra kleine Geräte */
@media (max-height: 500px) {
  .cover-frame {
    padding: 10px;
  }

  /* Extrem platzeffiziente Darstellung */
  .double-mandarins {
    transform: scale(0.6);
    margin: 5px auto;
  }

  h1 { font-size: 0.9rem; margin: 5px 0; }
  h2 { font-size: 1rem; margin: 5px 0; }

  .btn {
    padding: 6px 12px;
    margin-top: 10px;
    font-size: 0.65rem;
  }

  /* Mehr Platz durch flexible Buttons */
  .button-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}


/* Anpassungen für den Startbildschirm im Vollbildmodus */
@media (max-height: 800px) {
  /* Titelzeile etwas nach unten verschieben und verkleinern */
  .cover-title {
    margin-top: 30px; /* Mehr Platz oben */
    font-size: 0.9rem;
  }

  /* Mandarinen-Animation oben mehr Platz geben */
  .cover-frame {
    padding-top: 40px; /* Mehr Platz oben */
  }

  /* Im Fullscreen zusätzlichen Platz */
  body.fullscreen .cover-frame {
    padding-top: 50px;
  }
}

/* Anpassungen für sehr kleine Höhen */
@media (max-height: 600px) {
  .cover-title {
    margin-top: 40px;
    font-size: 0.8rem;
  }

  .cover-frame {
    padding-top: 50px;
  }
}

/* Versions-Badge im Spielfeld deutlich dezenter machen */
.release-countdown {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px; /* Kleineres Padding */
  background-color: rgba(255, 140, 0, 0.5); /* Transparenter */
  color: white;
  font-size: 0.6rem; /* Kleinere Schrift */
  border-radius: 12px;
  z-index: 800; /* Niedriger als andere wichtige Elemente */
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.3); /* Weniger Schatten */
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 150px; /* Begrenzte Breite */
  opacity: 0.8; /* Leicht transparent */
}

/* PRE-RELEASE Badge kleiner und dezenter */
.release-countdown::after {
  content: attr(data-mode); /* Dynamischer Modus */
  display: block;
  font-size: 0.55rem;
  padding: 2px 6px;
  background-color: rgba(255, 140, 0, 0.8);
  border-radius: 8px;
  margin-top: 2px;
  letter-spacing: 0.5px;
  transform: scale(0.9); /* Leicht verkleinert */
}

/* Bei sehr kleinen Bildschirmen noch dezenter */
@media (max-height: 600px), (max-width: 350px) {
  .release-countdown {
    bottom: 5px;
    font-size: 0.5rem;
    padding: 3px 8px;
    opacity: 0.7;
  }

  .release-countdown::after {
    font-size: 0.45rem;
    padding: 1px 5px;
  }
}

/* Button für Admin-Panel besser platzieren */
.mode-badge {
  top: auto; /* Nicht oben */
  bottom: 10px; /* Unten */
  left: 10px;
  font-size: 0.5rem;
  padding: 3px 8px;
  opacity: 0.7; /* Transparenter */
  z-index: 800;
  border-radius: 10px;
}

/* Kleine Geräte in Landscape-Modus */
@media (max-height: 500px) and (orientation: landscape) {
  /* Spielfeld besser nutzen */
  #gameContainer {
    padding: 5px;
  }

  /* Timer und Level-Indicator kleiner */
  #timer, #levelIndicator {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* Wortliste näher am Spielfeld */
  .word-list {
    margin-top: 10px;
  }

  /* Kleinere Wort-Badges */
  .word {
    padding: 4px 8px;
    font-size: 0.6rem;
  }
}

/* Anpassungen für Titel und Countdown (März 2025 - Final Fix) */

/* Titel-Änderungen */
.cover-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 35px;
}

.artist-name {
  margin-bottom: 8px;
}

.song-title {
  text-align: center;
  letter-spacing: 3px;
}

/* Countdown unter dem Titel positionieren - KORRIGIERT */
.release-countdown {
  position: absolute;
  top: 70px; /* Position unter dem Titel */
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background-color: rgba(255, 140, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  border-radius: 12px;
  z-index: 100;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
  max-width: 160px;
  width: auto;
  height: auto; /* Wichtig: Automatische Höhe basierend auf Inhalt */
  opacity: 0.85;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  /* Entfernen aller Eigenschaften, die die Höhe beeinflussen könnten */
  bottom: auto;
  min-height: 0;
  max-height: none;
  display: inline-block; /* Statt block oder flex */
}

.release-countdown::after {
  content: attr(data-mode);
  display: block;
  font-size: 0.55rem;
  padding: 2px 6px;
  margin-top: 3px;
  margin-bottom: 2px; /* Kleiner Abstand nach unten hinzugefügt */
  background-color: rgba(255, 140, 0, 0.8);
  border-radius: 8px;
  letter-spacing: 0.5px;
}

/* Angepasstes Layout mit Timer links und Levelindikator rechts */
#timer {
  position: absolute;
  top: 15px;
  left: 15px;
  margin: 0;
  font-size: 0.85rem;
  padding: 6px 12px;
  box-shadow: 0 0 12px rgba(160, 216, 239, 0.4);
  z-index: 90;
}

#levelIndicator {
  position: absolute;
  top: 15px;
  right: 15px;
  margin: 0;
  z-index: 90;
}

/* Mehr Platz für das Grid */
.grid {
  margin-top: 60px;
}

/* Anpassungen für verschiedene Bildschirmgrößen */
@media (max-width: 800px) {
  .grid {
    margin-top: 55px;
  }
}

@media (max-width: 600px) {
  #timer {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  #levelIndicator {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  /* Name und Titel besser trennen */
  .cover-title {
    gap: 15px;
  }

  .artist-name {
    margin-bottom: 10px;
  }
}

/* Spezifische Anpassung für den Startbildschirm */
#startScreen .cover-title {
  margin-top: 15px;
  margin-bottom: 40px;
}

/* Im Startbildschirm anders positionieren */
#startScreen .release-countdown {
  position: absolute;
  top: auto;
  bottom: 80px;
  max-width: 140px;
  font-size: 0.65rem;
  height: auto;
  display: inline-block;
}


/* Anpassungen für Titel und Countdown (März 2025 - Mobile Fix) */

/* Titel-Änderungen */
.cover-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 35px;
}

.artist-name {
  margin-bottom: 8px;
}

.song-title {
  text-align: center;
  letter-spacing: 3px;
}

/* Countdown unter dem Titel positionieren - KORRIGIERT */
.release-countdown {
  position: absolute;
  top: 70px; /* Position unter dem Titel */
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background-color: rgba(255, 140, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  border-radius: 12px;
  z-index: 100;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
  max-width: 160px;
  width: auto;
  height: auto; /* Automatische Höhe basierend auf Inhalt */
  opacity: 0.85;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  display: inline-block;
  line-height: 1.2;
}

.release-countdown::after {
  content: attr(data-mode);
  display: block;
  font-size: 0.55rem;
  padding: 2px 6px;
  margin-top: 3px;
  margin-bottom: 2px;
  background-color: rgba(255, 140, 0, 0.8);
  border-radius: 8px;
  letter-spacing: 0.5px;
}

/* Angepasstes Layout mit Timer links und Levelindikator rechts */
#timer {
  position: absolute;
  top: 15px;
  left: 15px;
  margin: 0;
  font-size: 0.85rem;
  padding: 6px 12px;
  box-shadow: 0 0 12px rgba(160, 216, 239, 0.4);
  z-index: 90;
}

#levelIndicator {
  position: absolute;
  top: 15px;
  right: 15px;
  margin: 0;
  z-index: 90;
}

/* Mehr Platz für das Grid */
.grid {
  margin-top: 60px;
}

/* Mobile Anpassungen */
@media (max-width: 800px) {
  .grid {
    margin-top: 55px;
  }

  /* Countdown für Tablets anpassen */
  .release-countdown {
    font-size: 0.65rem;
    padding: 3px 10px;
    max-width: 140px;
    top: 65px;
  }

  .release-countdown::after {
    font-size: 0.5rem;
    padding: 2px 5px;
  }
}

/* Smartphone-Ansicht */
@media (max-width: 600px) {
  .release-countdown {
    font-size: 0.55rem;
    padding: 2px 8px;
    max-width: 120px;
    top: 60px;
    border-radius: 10px;
  }

  .release-countdown::after {
    font-size: 0.45rem;
    padding: 1px 4px;
    margin-top: 2px;
    border-radius: 6px;
  }

  #timer {
    font-size: 0.7rem;
    padding: 4px 8px;
    top: 10px;
    left: 10px;
  }

  #levelIndicator {
    font-size: 0.65rem;
    padding: 4px 8px;
    top: 10px;
    right: 10px;
  }

  /* Name und Titel besser trennen */
  .cover-title {
    gap: 15px;
  }

  .artist-name {
    margin-bottom: 10px;
  }
}

/* Sehr kleine Geräte */
@media (max-width: 400px) {
  .release-countdown {
    font-size: 0.5rem;
    padding: 2px 6px;
    max-width: 100px;
    top: 55px;
  }

  .release-countdown::after {
    font-size: 0.4rem;
    padding: 1px 3px;
    margin-top: 1px;
  }
}

/* Spezifische Anpassung für den Startbildschirm */
#startScreen .cover-title {
  margin-top: 15px;
  margin-bottom: 40px;
}

/* Im Startbildschirm anders positionieren */
#startScreen .release-countdown {
  position: absolute;
  top: auto;
  bottom: 80px;
  max-width: 140px;
  font-size: 0.65rem;
  height: auto;
  display: inline-block;
}

/* Startbildschirm auf kleinen Geräten */
@media (max-width: 600px) {
  #startScreen .release-countdown {
    bottom: 60px;
    max-width: 120px;
    font-size: 0.55rem;
  }
}

/* Credits-Bereich im Endscreen */
.mandarin-credits {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 140, 0, 0.15);
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: 10px;
  max-width: 85%;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.mandarin-credits::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  top: -15px;
  right: -15px;
  background: radial-gradient(circle, rgba(255, 140, 0, 0.3), transparent 70%);
  border-radius: 50%;
}

.mandarin-credits h3 {
  font-size: 0.9rem;
  color: var(--color-cover-gold);
  margin-bottom: 10px;
  text-align: center;
}

.mandarin-credits .credit-line {
  margin-bottom: 5px;
  display: flex;
  align-items: flex-start;
}

.mandarin-credits .credit-label {
  font-weight: bold;
  min-width: 80px;
  color: var(--color-mandarin-bright);
}

.mandarin-credits .credit-names {
  flex: 1;
}

.mandarin-credits .special-thanks {
  font-style: italic;
  margin-top: 8px;
  text-align: center;
  color: var(--color-turquoise);
}

@media (max-width: 600px) {
  .mandarin-credits {
    font-size: 0.65rem;
    padding: 10px;
  }

  .mandarin-credits h3 {
    font-size: 0.8rem;
  }

  .mandarin-credits .credit-label {
    min-width: 70px;
  }
}

/* Easter Egg Credits */
.mandarin-star {
  position: absolute;
  bottom: 15px;
  left: 15px;
  width: 20px;
  height: 20px;
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 50;
}

.mandarin-star::before {
  content: "★";
  color: var(--color-mandarin-bright);
  font-size: 20px;
  animation: pulse-star 3s infinite alternate ease-in-out;
}

@keyframes pulse-star {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 0.8; transform: scale(1.1); }
}

.mandarin-star:hover {
  opacity: 1;
  transform: rotate(72deg) scale(1.2);
}

.credits-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.credits-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.credits-content {
  background: rgba(25, 25, 25, 0.9);
  padding: 25px;
  border-radius: 15px;
  max-width: 85%;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--color-mandarin-bright);
  box-shadow: 0 0 30px rgba(255, 140, 0, 0.4);
}

.credits-modal.active .credits-content {
  transform: translateY(0);
}

.credits-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: var(--color-mandarin-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.credits-close:hover {
  background: rgba(255, 140, 0, 0.2);
  transform: rotate(90deg);
}

.credits-title {
  color: var(--color-cover-gold);
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.credits-section {
  margin-bottom: 15px;
}

.credits-section h3 {
  color: var(--color-mandarin-bright);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.credits-section p {
  font-size: 0.8rem;
  line-height: 1.4;
}

.credits-footer {
  text-align: center;
  margin-top: 20px;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--color-turquoise);
}

@media (max-width: 600px) {
  .credits-content {
    padding: 15px;
  }

  .credits-title {
    font-size: 0.9rem;
  }

  .credits-section h3 {
    font-size: 0.8rem;
  }

  .credits-section p {
    font-size: 0.7rem;
  }
}

/* Verbesserter Endscreen mit Scroll-Funktion */
#endScreen .cover-frame {
  max-height: 90vh;
  overflow-y: auto;
  padding-right: 10px; /* Mehr Platz für Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--color-mandarin-bright) rgba(0, 0, 0, 0.2);
}

/* Scrollbar für Webkit-Browser (Chrome, Safari, etc.) anpassen */
#endScreen .cover-frame::-webkit-scrollbar {
  width: 6px;
}

#endScreen .cover-frame::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

#endScreen .cover-frame::-webkit-scrollbar-thumb {
  background-color: var(--color-mandarin-bright);
  border-radius: 10px;
}

/* Credits-Box etwas kompakter */
.mandarin-credits {
  margin-top: 15px;
  padding: 12px;
  font-size: 0.7rem;
}

.mandarin-credits h3 {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* Für kleinere Bildschirme noch kompakter */
@media (max-width: 600px) {
  .mandarin-credits {
    padding: 8px;
    font-size: 0.65rem;
    margin-bottom: 10px;
  }

  .mandarin-credits h3 {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  .mandarin-credits .special-thanks {
    font-size: 0.6rem;
  }

  #endScreen .cover-frame {
    padding: 15px 10px 15px 15px;
  }
}

/* ==== SUBTITLES STYLING ==== */
#subtitlesContainer {
  position: relative;
  margin: 10px auto;
  width: 90%;
  max-width: 600px;
  min-height: 40px; /* Minimale Höhe sicherstellen */
  height: 40px; /* Fixe Höhe statt auto */
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  transition: opacity 0.3s ease, background 0.3s ease;
  z-index: 90;
  opacity: 1;
  visibility: visible;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  box-sizing: border-box; /* Wichtig für konsistente Größe */
  overflow: hidden; /* Verhindert Überlauf */
}

/* Keine Platzhalter mehr */
#subtitlesContainer::after {
  display: none;
}

#subtitlesContainer.hidden {
  opacity: 0.3; /* Leicht sichtbar halten statt komplett ausblenden */
  background: rgba(0, 0, 0, 0.3); /* Hellerer Hintergrund wenn ausgeblendet */
  visibility: visible; /* Immer sichtbar halten */
}

#subtitlesText {
  font-family: 'Source Sans Pro', Arial, sans-serif;
  font-size: 18px;
  text-align: center;
  color: white;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
  flex-grow: 1;
  margin: 0;
  font-weight: 400;
  min-height: 20px; /* Minimale Texthöhe */
  transition: opacity 0.2s ease; /* Sanfte Ein-/Ausblendung des Texts */
}

.subtitles-toggle {
  position: absolute;
  right: 10px;
  background-color: transparent;
  border: none;
  color: white;
  cursor: pointer;
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"/><path d="M6,10h2v2H6V10z M6,14h8v2H6V14z M16,14h2v2h-2V14z M10,10h8v2h-8V10z"/></svg>');
  background-size: contain;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.subtitles-toggle:hover {
  opacity: 1;
}

.subtitles-toggle.disabled {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"/><path d="M6,10h2v2H6V10z M6,14h8v2H6V14z M16,14h2v2h-2V14z M10,10h8v2h-8V10z"/><line stroke="white" stroke-width="2" x1="4" y1="4" x2="20" y2="20"/></svg>');
  opacity: 0.5;
}

.word-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px auto;
  width: 95%;
  max-width: 1000px;
  z-index: 100; /* Höherer z-index als die Untertitel */
}

/* Loading indicator */
.loading-indicator {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  padding: 10px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 215, 0, 0.2);
  border-radius: 50%;
  border-top-color: #ffd700;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 10px;
}

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

.loading-text {
  margin: 5px 0;
  font-size: 14px;
  color: #ffd700;
  text-align: center;
}

.loading-progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 215, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  background-color: #ffd700;
  transition: width 0.3s ease;
}

.loading-progress-bar.error {
  background-color: #e74c3c;
}

/* Startbutton Disabled-Zustand */
#startButton.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  #subtitlesContainer {
    padding: 6px 8px;
    margin: 5px auto;
    width: 95%;
    max-width: 420px;
    height: 35px; /* Fixe Höhe für mobile Geräte */
    min-height: 35px;
    font-size: 14px;
  }

  #subtitlesText {
    font-size: 14px;
  }

  .grid {
    padding: 10px;
    margin-bottom: 0;
  }

  .word-list {
    margin-top: 5px;
  }
}

@media (max-width: 400px) {
  #subtitlesContainer {
    padding: 4px 6px;
    margin: 4px auto;
    height: 30px;
    min-height: 30px;
  }

  #subtitlesText {
    font-size: 13px;
  }

  .subtitles-toggle {
    width: 20px;
    height: 20px;
    right: 5px;
  }
}

@media (max-height: 600px) {
  #subtitlesContainer {
    padding: 4px 6px;
    margin: 2px auto;
    height: 30px;
    min-height: 30px;
  }

  #subtitlesText {
    font-size: 12px;
  }
}

/* Für Landscape-Modus auf mobilen Geräten */
@media (max-height: 450px) and (orientation: landscape) {
  #subtitlesContainer {
    margin: 2px auto;
    padding: 3px 5px;
    height: 25px;
    min-height: 25px;
  }

  #subtitlesText {
    font-size: 11px;
  }

  .subtitles-toggle {
    width: 18px;
    height: 18px;
  }
}

/* ==== LADEBILDSCHIRM ==== */
.loading-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95); /* Dunkler Hintergrund */
  z-index: 9999;
  color: white;
  flex-direction: column;
  font-family: var(--main-font);
  animation: fadeIn 0.5s ease-out;
}

.loading-overlay h2 {
  color: var(--color-cover-gold);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(255, 240, 172, 0.4);
}

.loading-overlay .loading-progress-container {
  width: 80%;
  max-width: 400px;
  background-color: #333; /* Dunklerer Hintergrund für den Container */
  border-radius: 5px;
  margin-top: 15px;
  border: 1px solid rgba(255, 215, 0, 0.3); /* Goldener Rand */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.loading-overlay #loadingProgressBar {
  width: 0%;
  height: 30px;
  background: linear-gradient(90deg, var(--color-mandarin-dark), var(--color-mandarin-bright)); /* Goldener Farbverlauf */
  border-radius: 5px;
  text-align: center;
  line-height: 30px;
  color: black;
  font-weight: bold;
  font-size: 0.9rem;
  transition: width 0.4s ease-out; /* Sanfter Übergang */
  position: relative;
  overflow: hidden;
}

/* Glanz-Effekt für den Ladebalken */
.loading-overlay #loadingProgressBar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 2s infinite linear;
}

.loading-overlay #loadingProgressText {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #ccc; /* Helleres Grau für den Text */
}


/* Spezielle Formatierung für Hindi-Zellen */
.hindi-cell {
  font-family: 'Noto Sans Devanagari', sans-serif;
  line-height: 1.2;
  font-size: 1.1rem; /* Größere Schriftgröße für bessere Lesbarkeit */
  padding: 2px; /* Zusätzlicher Padding für breite Zeichen */
}

/* Anpassungen für die Wortliste in Hindi */
html[lang="hi"] .word {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 0.85rem; /* Etwas größer für bessere Lesbarkeit */
  line-height: 1.5;
}

/* Optimierung für Hindi-Silben auf kleinen Bildschirmen */
@media (max-width: 600px) {
  .hindi-cell {
    font-size: 0.95rem;
    padding: 1px;
  }

  html[lang="hi"] .word {
    font-size: 0.75rem;
  }
}

/* Sehr kleine Geräte */
@media (max-width: 360px) {
  .hindi-cell {
    font-size: 0.85rem;
  }

  html[lang="hi"] .word {
    font-size: 0.7rem;
  }
}

/* Home-Button */
.home-button {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(25, 25, 25, 0.7);
  border: 1px solid var(--color-mandarin-bright);
  border-radius: 50%;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
  transition: all 0.3s ease;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FF8C00" stroke="%23FF8C00" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>');
  background-size: 20px;
  background-position: center;
  background-repeat: no-repeat;
}

.home-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

/* Anpassung für mobile Geräte */
@media (max-width: 600px) {
  .home-button {
    bottom: 70px;
    right: 15px;
  }
}
