/* Globalt */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    position: relative;
    padding-bottom: 50px;
}

h1 {
    font-size: min(2.5em, 5vw);
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

/* Hovedkategori knapper */
#categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 10px;
}

/* Footer */
#footer {
    background: linear-gradient(135deg, #ff6a00, #ee0979);
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 15px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#footer p {
    margin: 5px 0;
}

#footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
}

#footer a:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

/* Ensartet styling for alle knapper */
button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    width: min(95%, 320px); 
    height: auto;
    background: linear-gradient(135deg, #ff6a00, #ee0979);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: min(1.2em, 4vw);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    white-space: nowrap;
    text-overflow: clip;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

button:focus {
    outline: none;
}

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

/* Specifik styling til "Tilbage til fagvalg" knappen */
.back-to-start {
    background: linear-gradient(135deg, #2c3e50, #4ca1af) !important;
    width: min(95%, 350px) !important;
    margin: 30px auto 10px auto !important; /* Centrerer i faget */
    font-size: 1em;
}

.back-to-start:hover {
    background: linear-gradient(135deg, #4ca1af, #2c3e50) !important;
}

/* Quiz sektionen */
#quiz {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: min(90%, 400px);
    margin: 20px auto; /* Centrerer selve quiz-boksen */
    text-align: center;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrerer alt indhold i quiz-boksen */
}

#question {
    font-size: min(1.5em, 4vw);
    margin-bottom: 20px;
    color: #333;
    word-break: break-word;
    white-space: normal;
}

/* Svar-knapper inde i quizzen */
#answers {
    width: 100%;
}

#answers button {
    display: flex;
    width: 100% !important; /* Fylder hele quiz-boksens bredde */
    max-width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: linear-gradient(135deg, #ff6a00, #ee0979);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: min(1.1em, 3vw);
    cursor: pointer;
    white-space: normal; 
}

#answers button.correct {
    background: linear-gradient(135deg, #1fa53a, #45d845);
}

#answers button.incorrect {
    background: linear-gradient(135deg, #d32f2f, #ff3d3d);
}

/* Resultat sektion */
#result {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: min(90%, 400px);
    text-align: center;
    margin: 20px auto;
    color: #333;
    display: none; /* Styrer visning via JS */
    flex-direction: column;
    align-items: center;
}

#result h2, #scoreTitle {
    font-size: min(2em, 5vw);
    color: #ff6a00;
    margin-bottom: 20px;
}

/* NAVIGATION KNAPPER (Tilbage / Næste / Prøv igen) */
#backButton, #nextQuestionButton, #result button {
    display: flex !important;
    margin: 20px auto !important; /* Tvinger centrering */
    width: min(100%, 250px) !important;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    justify-content: center;
}

#result button {
    background: linear-gradient(135deg, #ff6a00, #ee0979);
}

/* Score besked farver */
#scoreMessage {
    font-size: min(1.5em, 4vw);
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    color: #ff6a00;
}