body {
    font-family: 'Roboto', sans-serif;
    text-align: center;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.game-container {
    margin-top: 50px;
}

.card {
    position: relative;
    background: linear-gradient(145deg, rgba(208, 187, 187, 0.1) 0%, rgba(240, 236, 236, 0.3) 100%);
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 330px;
    height: auto;
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 0 8px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease-out, opacity 0.5s;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-height: 225px; /* Feste Mindesthöhe, sodass Platz für die Lösung bleibt */
    overflow: hidden;  /* Verhindert plötzliche Höhenänderungen */
    transform-style: preserve-3d;
}

input {
    width: 80%;
    padding: 8px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    outline: none; /* Standard-Fokus entfernen */
    transition: border 0.2s ease-in-out; /* Sanfte Animation */
    margin-bottom: 10px;
}

/* Dezenter Fokus-Effekt */
input:focus {
    border: 1px solid #E0C9A6; /* Sehr sanftes Beige statt kräftigem Orange */
    box-shadow: 0 0 1px rgba(224, 201, 166, 0.2); /* Fast unsichtbarer Glanz */
}



button {
    padding: 10px 12px;
    width: auto;
    margin: 10px 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 10px;
}

#check-btn {
    background-color: #F4A460;
    color: white;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

#check-btn:hover {
    background-color: #E89B50; /* Etwas helleres Orange */
    transform: scale(1.02); /* Minimale Vergrößerung */
}

#skip-btn {
    background-color: #5D6D7E;
    color: white;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

#skip-btn:hover {
    background-color: #6C7A89; /* Etwas helleres Grau */
    transform: scale(1.02); /* Minimale Vergrößerung */
}


.card.correct {
    border: 5px solid #5ac57a;
}

.card.wrong {
    border: 5px solid #fa8e8e;
}

.card.fade-right {
    transform: translateX(100%) rotate(15deg);
    opacity: 0;
}

.card.fade-left {
    transform: translateX(-100%) rotate(-15deg);
    opacity: 0;
}

.card {
    opacity: 1;
    transition: transform 0.5s ease-out, opacity 0.5s;
}

.card.fade-right {
    transform: translateX(100%) rotate(15deg);
    opacity: 0;
}

.card.fade-left {
    transform: translateX(-100%) rotate(-15deg);
    opacity: 0;
}

#vocab-word {
    font-size: 28px; /* Größere Schrift für bessere Sichtbarkeit */
    font-weight: bold; /* Fettgedruckt */
    font-style: italic; /* Kursiv */
    color: #1b1b1b; /* Dunkles Grün für mehr Kontrast */
    text-align: center; /* Bleibt zentriert */
    margin-bottom: 15px; /* Etwas Abstand nach unten */
    display: block;
}


/* Styling für Button 1 (restart-btn-1) */
#restart-btn-1 {
    background-color: transparent !important; /* Kein Hintergrund, nur der Rand */
    color: #5f6368 !important;
    border: 1px solid #279348 !important;
    padding: 10px 20px !important; /* Abstände rund um den Text */
    border-radius: 15px !important; /* Abgerundete Ecken */
    font-size: 14px !important; /* Textgröße */
    cursor: pointer !important; /* Hand-Symbol bei Hover */
    transition: all 0.3s ease !important; /* Sanfte Übergänge bei Hover */
    text-decoration: none !important; /* Keine Unterstreichung */
    text-align: center !important;
    width: 200px !important;
    display: block; 
    margin: 10px auto; /* Zentriert unterhalb des Spiels */
}

/* Hover-Effekt für Button 1 */
#restart-btn-1:hover {
    background-color: #279348 !important; /* Heller Hintergrund bei Hover */
    color: #eaecea !important; /* Textfarbe ändert sich */
    border-color: #eaecea !important; /* Randfarbe bei Hover ändert sich */
}

/* Styling für Button 2 (restart-btn-2) */
#restart-btn-2 {
    background-color: transparent; /* Kein Hintergrund, nur der Rand */
    color: #5f6368; /* Textfarbe (Grauton) */
    border: 1px solid #da3e3e; /* Roter Rand */
    padding: 10px 20px; /* Abstände rund um den Text */
    border-radius: 15px; /* Abgerundete Ecken */
    font-size: 14px; /* Textgröße */
    cursor: pointer; /* Hand-Symbol bei Hover */
    transition: all 0.3s ease; /* Sanfte Übergänge bei Hover */
    text-decoration: none; /* Keine Unterstreichung */
    text-align: center;
    width: 200px;
    display: block;
    margin: 10px auto; /* Zentriert unterhalb des Spiels */
}

/* Hover-Effekt für Button 2 */
#restart-btn-2:hover {
    background-color: #da3e3e; /* Roter Hintergrund bei Hover */
    color: #eaecea; /* Textfarbe ändert sich */
    border-color: #eaecea; /* Randfarbe bei Hover ändert sich */
}

.counter {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Back-Arrow */
#back-arrow {
    position: absolute;
    top: 40px;
    left: 15px;
    font-size: clamp(40px, 5vw, 40px);
    color: #da3e3e;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
  }
  
  #back-arrow:hover {
    color: #ffd8d8c0;
    transform: translateX(-5px);
  }
  
  input {
    font-size: 16px !important; /* Mindestens 16px, um das Zoomen zu verhindern */
    width: 80%;
    padding: 8px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
#cookie-banner {
    position: fixed;
    top: 50%; /* Zentriert vertikal */
    left: 50%; /* Zentriert horizontal */
    transform: translate(-50%, -50%);
    width: 75%;
    max-width: 500px;
    min-width: 250px;
    background-color: #f1f1f1; /* Dezente graue Hintergrundfarbe */
    color: #333333; /* Dunkelgraue Textfarbe */
    border: 1px solid #dcdcdc; /* Heller Grauton für den Rand */
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    font-size: 1em;
    font-weight: normal; /* Weniger auffälliger Text */
    z-index: 1001;
    display: none; /* Banner wird erst durch JavaScript eingeblendet */
  }
  
  #cookie-banner p {
    margin: 0;
    padding-bottom: 10px;
  }
  
  #cookie-banner a {
    color: #cecece;
    text-decoration: underline;
  }
  
  .cookie-buttons {
    display: inline-flex;
    justify-content: center;
    gap: 10px;
  }
  #cookie-banner button {
    background-color: #cecece; /* Dezentes Grau für Standard-Buttons */
    color: #ffffff; /* Weißer Text */
    border: none;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px; /* Korrektur: Hinzufügen des 'border' Präfix */
    font-size: 0.9em;
  }
  
  #cookie-banner button:hover {
    background-color: #bdbdbd; /* Etwas dunkleres Grau bei Hover */
  }
  
  #cookie-banner button#accept-cookies {
    background-color: #4caf50; /* Grüne Farbe für den Akzeptieren-Button */
  }
  
  #cookie-banner button#accept-cookies:hover {
    background-color: #45a049; /* Dunkleres Grün bei Hover */
  }
  
  #cookie-banner button#decline-cookies {
    background-color: #cecece; /* Dezentes Grau für den Ablehnen-Button */
  }
  
  #cookie-banner button#decline-cookies:hover {
    background-color: #bdbdbd; /* Etwas dunkleres Grau bei Hover */
  }
  
/* iPad Hochformat (Portrait) */
@media screen and (min-width: 768px) {
    .card {
        max-width: 350px; /* Etwas breiter */
        padding: 30px; /* Mehr Innenabstand */
        min-height: 250px; /* Mehr Platz für Inhalte */
    }

    input {
        width: 85%; /* Mehr Platz für Eingabe */
        padding: 12px; /* Größere Touchfläche */
        font-size: 18px; /* Bessere Lesbarkeit */
    }

    button {
        padding: 12px 16px; /* Größerer Button */
        font-size: 16px; /* Bessere Erkennbarkeit */
    }
}

/* iPad Querformat (Landscape) */
@media screen and (min-width: 1024px) {
    .card {
        max-width: 350px; /* Noch großzügiger */
    }

    input {
        width: 90%;
        padding: 14px;
        font-size: 20px;
    }

    button {
        padding: 14px 18px;
        font-size: 18px;
        border-radius: 12px; /* Noch weicher */
    }

    #check-btn:hover, #skip-btn:hover {
        transform: scale(1.03); /* Sanfte, aber spürbare Interaktion */
    }
}

/* iPhone SE (2. Gen) & ältere iPhones mit kleinerem Bildschirm (320px-375px Breite) */
@media screen and (max-width: 375px) {
    .card {
        max-width: 280px; /* Kleinere Breite für kleine iPhones */
        padding: 20px; /* Weniger Innenabstand, damit mehr Inhalt passt */
        min-height: 220px; /* Leicht reduziert, damit nichts abgeschnitten wird */
    }

    input {
        width: 90%; /* Fast volle Breite */
        padding: 10px;
        font-size: 16px; /* Etwas kleiner für mehr Platz */
    }

    button {
        padding: 10px 14px; /* Kleinere Touchflächen */
        font-size: 14px; /* Etwas kleiner für kompaktere Darstellung */
    }
}

/* iPhone 12, 13, 14 & größere iPhones (Breite 390px-430px) */
@media screen and (max-width: 430px) {
    .card {
        max-width: 300px; /* Etwas breiter als bei SE */
        padding: 25px; /* Mehr Innenabstand */
        min-height: 230px; /* Genügend Platz */
    }

    input {
        width: 92%; /* Nahezu volle Breite */
        padding: 12px;
        font-size: 17px; /* Gut lesbare Größe */
    }

    button {
        padding: 12px 16px;
        font-size: 16px; /* Angenehm für größere iPhones */
        border-radius: 10px;
    }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #1c1c1c;
    color: #eaeaea;
  }

  .card {
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.3), rgba(40, 40, 40, 0.5));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  #vocab-word {
    color: #f0f0f0;
  }

  .counter {
    color: #cccccc;
  }

  input {
    background-color: #2e2e2e;
    color: #f5f5f5;
    border: 1px solid #555;
  }

  input::placeholder {
    color: #999;
  }

  input:focus {
    border: 1px solid #E0C9A6;
    box-shadow: 0 0 1px rgba(224, 201, 166, 0.3);
  }

  button {
    color: #eaeaea;
  }

  #check-btn {
    background-color: #d98c3f;
    color: #fff;
  }

  #check-btn:hover {
    background-color: #b86e2b;
  }

  #skip-btn {
    background-color: #4a5a6a;
    color: #fff;
  }

  #skip-btn:hover {
    background-color: #5a6b7c;
  }

  #restart-btn-1 {
    color: #f0f0f0 !important;
    border-color: #88eaa7 !important;
  }

  #restart-btn-1:hover {
    background-color: #88eaa7 !important;
    color: #1a1a1a !important;
    border-color: #1a1a1a !important;
  }

  #restart-btn-2 {
    color: #f0f0f0;
    border-color: #ff7b7b;
  }

  #restart-btn-2:hover {
    background-color: #ff7b7b;
    color: #1a1a1a;
    border-color: #1a1a1a;
  }

  #back-arrow {
    color: #f38e8e;
  }

  #back-arrow:hover {
    color: #ffd8d8;
  }

  #cookie-banner {
    background-color: #2a2a2a;
    color: #f1f1f1;
    border: 1px solid #555;
  }

  #cookie-banner a {
    color: #a9c7ff;
  }

  #cookie-banner button {
    background-color: #444;
    color: #fff;
  }

  #cookie-banner button:hover {
    background-color: #555;
  }

  #cookie-banner button#accept-cookies {
    background-color: #4caf50;
  }

  #cookie-banner button#accept-cookies:hover {
    background-color: #45a049;
  }

  #cookie-banner button#decline-cookies {
    background-color: #777;
  }

  #cookie-banner button#decline-cookies:hover {
    background-color: #888;
  }
}
