/* =========================
   Allgemein
========================= */

@font-face {
    font-family: "Poppins";
    src: url("../assets/fonts/Poppins-Regular.ttf");
    font-weight: 400;
}

@font-face {
    font-family: "Poppins";
    src: url("../assets/fonts/Poppins-Medium.ttf");
    font-weight: 500;
}

@font-face {
    font-family: "Poppins";
    src: url("../assets/fonts/Poppins-SemiBold.ttf");
    font-weight: 600;
}

@font-face {
    font-family: "Poppins";
    src: url("../assets/fonts/Poppins-Bold.ttf");
    font-weight: 700;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f4f4f4;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* =========================
   Hauptbereich
========================= */

main {
    width: 90%;
    max-width: 400px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

/* =========================
   Überschrift
========================= */

h1 {
    margin-bottom: 15px;
    font-size: 2rem;
}

p {
    margin-bottom: 25px;
    font-size: 1rem;
}

/* =========================
   Eingabefeld
========================= */

input {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #ccc;
    border-radius: 10px;
    outline: none;
    margin-bottom: 20px;
    transition: 0.3s;
}

input:focus {
    border-color: #4CAF50;
}

/* =========================
   Button
========================= */

button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #4CAF50;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #43a047;
}

button:active {
    transform: scale(0.98);
}

/* =========================
   Fehlermeldung
========================= */

.errorMessage {

    color: #e53935;

    font-size: 0.9rem;

    margin-top: 10px;

    margin-bottom: 15px;

    min-height: 20px;
}

.nameError {
    margin-top: -15px;
}

.quizError {
    margin-top: 10px;
}

/* =========================
   Bestätigungsfenster
========================= */

#confirmBox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}


#confirmBox.hidden {
    display: none;
}


.confirmContent {
    background: white;
    width: 90%;
    max-width: 350px;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.confirmContent h2 {
    margin-bottom: 15px;
}


.confirmContent p {
    margin-bottom: 25px;
}


.confirmContent button {
    margin-top: 10px;
}


.confirmButtons {
    display: flex;
    gap: 10px;
}

.confirmButtons button {
    width: 50%;
}

/* =========================
   Frage Bereich
========================= */

#questionText {

    background: white;

    padding: 25px;

    border-radius: 15px;

    margin-bottom: 25px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);

    font-size: 1.2rem;

    line-height: 1.5;
}

/* =========================
   Quiz Antworten
========================= */

#answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.answer {
    background: white;
    color: #333;
    border: 2px solid #ddd;
    min-height: 80px;
    padding: 15px;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;

}

.answer.selected {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    transform: scale(1.03);
}

/* =========================
   Ergebnis Seite
========================= */


#resultBox {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}


#resultBox h2 {
    margin-bottom: 20px;
}


#score {
    font-size: 2rem;
    font-weight: bold;
    color: #4CAF50;
    margin: 15px 0;
}

#resultMessage {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    line-height: 1.5;

}

/* =========================
   Ranking Seite
========================= */

#rankingList {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.rankingCard {
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.rankingPlace {
    font-size: 1.3rem;
    font-weight: bold;
}

.rankingScore {
    font-weight: bold;
    color: #4CAF50;
}

.firstPlace {
    transform: scale(1.05);
}