body {
    font-family: sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

h1 {
    margin: 32px 0px;
    font-size: 48px;
}

h2 {
    margin: 16px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
    padding: 0px 0px 16px 0px;
}


/* === Login-Seite === */

/* Top-Bar oben */
.topbar {
    position: fixed;
    width: 100vw;
    background-color: rgb(22, 38, 46);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4em;
    font-weight: bold;
}

.topbar-left {
    color: #f5f5f5;
    padding: 16px;
    padding-left: 32px;

}

.topbar-center {
    font-family: 'Courier New', Courier, monospace;
    color: #f5f5f5;
    font-size: 1.2em;
    letter-spacing: 8px;
    padding: 16px;
}

.topbar-right form {
    padding: 16px;
}

/* Zugangscode-Eingabe */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 196px;
}

.login-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-container input[name="password"] {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.5em;
    letter-spacing: 8px;
    text-align: center;
    padding: 16px 32px;
    margin: 32px 0px;
    border: 2px solid rgb(22, 38, 46);
    border-radius: 16px;
    outline: none;
}

.login-container button[type="submit"] {
    background-color: rgb(22, 38, 46, 0.5);
    color: #f5f5f5;
    font-size: 1.3em;
    font-weight: bold;
    padding: 16px 32px;
    margin: 32px 0px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
}

.login-container button[type="submit"]:hover {
    background-color: rgb(22, 38, 46, 1);
}

/* Login */
.teacher-btn {
    background-color: rgb(22, 38, 46, 0.75);
    color: #f5f5f5;
    font-size: 0.8em;
    padding: 8px 14px;
    font-weight: lighter;
    cursor: pointer;
    border: 1px solid #f5f5f5;
    border-radius: 8px;
}



#votingContainer {
    display: flex;
    flex-direction: column;
    align-items: left;
    padding: 32px 128px;
    padding-top: 112px;
    box-sizing: border-box;
}

#timer,
#teacherTimer {
    font-weight: bold;
    font-size: 1.5em;
    color: #cc0000;
    margin: 16px 16px 16px 16px;
    text-align: left;
}


/* Meldungen */
#message {
    margin: 16px 0px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: lighter;
    display: none;
}

#message.success {
    background-color: rgba(40, 167, 69, 0.5);
    color: black;
    padding: 16px 16px 14px 16px;
}

#message.error {
    background-color: rgba(220, 53, 69, 0.5);
    color: black;
    padding: 16px 16px 14px 16px;
}



/* ABstimmungsoptionen */
.option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 24px;
    margin: 32px 0px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 2em;
}

.option label {
    padding: 0px 16px;
}

.option input[type="checkbox"] {
    transform: scale(1.5);
    margin-right: 16px;
}

.option#a {
    background-color: rgba(220, 53, 69, 0.5);
}

.option#b {
    background-color: rgba(0, 123, 255, 0.5);
}

.option#c {
    background-color: rgba(255, 193, 7, 0.5);
}

.option#d {
    background-color: rgba(40, 167, 69, 0.5);
}

.option#a,
.option#b,
.option#c,
.option#d {
    color: black;
    padding: 32px 32px 32px 32px;
    align-items: center;
}

#voteBtn {
    color: black;
    margin-top: 10px;
    padding: 12px 20px;
    font-size: 1.3em;
    cursor: pointer;
    text-align: left;
    background-color: rgba(28, 84, 45, 0.5);
    border: none;
    border-radius: 10px;
}




/* ============================== */
/* ----- Dashboard ----- */
/* ============================== */

.settings-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.number-box,
.voting-box {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 12px;
    margin-top: 64px;
    padding: 20px;
    width: 40vw;
    max-width: 500px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inline-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.button-group {
    display: flex;
    gap: 12px;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-group input,
.inline-group select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #aaa;
}

.inline-group button {
    background-color: rgb(22, 38, 46, 0.5);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: 0.2s;
}

.inline-group button:hover {
    background-color: rgb(22, 38, 46);
}


.teacher-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
}

.code-display {
    font-family: monospace;
    font-weight: bold;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 8px;
}

/* Container für den Chart */
.chart-container {
    width: 80%;
    display: flex;
    justify-content: center;
}

.chart-box {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 20px;
    width: 60vw;
    /* so breit wie die beiden oberen Boxen zusammen */
    max-width: 1064px;
    min-height: 400px;
    /* feste Höhe */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertikal mittig */
    align-items: center;
    /* horizontal mittig */
}

.vote-stats-container {
    width: 100%;
}

.chart-box canvas {
    width: 100%;
    /* Canvas nimmt volle Box-Breite ein */
    height: auto;
    /* Höhe proportional */
    max-height: 300px;
    /* optional, Höhe begrenzen */
}


.vote-stats {
    text-align: left;
    font-weight: normal;
    line-height: 1.5;
    padding: 0px 16px 16px 16px;
}


/* ============================== */
/* Responsivität */
/* ============================== */
@media (max-width: 768px) {

    h1 {
        font-size: 32px;
    }

    h3 {
        font-size: 20px;
    }

    .teacher-btn {
        font-size: 12px;
    }

    .login-container input[name="password"] {
        font-size: 1em;
        letter-spacing: 4px;
    }

    .login-container button[type="submit"] {
        font-size: 1.5em;
    }

    .topbar-center {
        font-size: 12px;
    }

    .topbar-left {
        display: none;
    }

    #votingContainer {
        padding: 16px 32px;
        padding-top: 96px;
        box-sizing: border-box;
    }

    .option {
        margin: 24px 0px;
    }

    .option#a,
    .option#b,
    .option#c,
    .option#d {
        padding: 24px 32px;
    }

    #timer,
    #teacherTimer {
        margin: 16px 0px;
    }

}