body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: #fff;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: #2c3e50;
    text-align: center;
}

/* --- Besucher-Ansicht --- */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.option-btn {
    padding: 20px;
    font-size: 1.2em;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.option-btn:hover {
    background-color: #2980b9;
}

/* --- Admin-Ansicht --- */
.card {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

input[type="text"], input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
}

button {
    padding: 10px 15px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    opacity: 0.9;
}
button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.survey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #dcdcdc;
}
.survey-item.active {
    background-color: #d4edda;
}
.survey-item p {
    margin: 0;
    font-weight: bold;
}
.survey-item button {
    margin-left: 5px;
}

.btn-activate { background-color: #27ae60; }
.btn-deactivate { background-color: #e74c3c; }
.btn-reset { background-color: #f39c12; }
.btn-edit { background-color: #3498db; }
.btn-delete { background-color: #c0392b; }

.survey-display {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.survey-edit-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.survey-edit-form div { display: flex; gap: 10px; }
.btn-save { background-color: #27ae60; }
.btn-cancel { background-color: #7f8c8d; }
.error {
    color: #e74c3c;
    text-align: center;
}

/* Ergebnisse */
.results-grid {
    margin-top: 15px;
}
.result-bar-item {
    margin-bottom: 10px;
}
.result-label {
    margin-bottom: 5px;
    font-size: 0.9em;
}
.result-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.result-bar {
    height: 24px;
    line-height: 24px;
    background-color: #3498db;
    color: white;
    text-align: center;
    font-size: 0.8em;
    white-space: nowrap;
    transition: width 0.5s ease-in-out;
}


/* --- Vertikale Ergebnisbalken (nur für results.html) --- */
.vertical-results-grid {
    //margin-top: 30px;
    //display: flex;
    //justify-content: space-around;
    //align-items: flex-end; /* Bars grow from the bottom */
    gap: 20px;
    min-height: 300px; /* Give the container a height to fill */
    padding: 0 20px;
    //box-sizing: border-box;
	display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    justify-items: center;
}

.vertical-result-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column; /* Label on top, bar container below */
    align-items: center;
    text-align: center;
    max-width: 120px;
}

.vertical-result-label {
    order: 2; /* Puts it below the bar container */
    margin-top: 8px;
    font-size: 1em;
    font-weight: bold;
    word-break: break-word;
}

.vertical-result-bar-container {
    order: 1; /* Puts it above the label */
    width: 100%;
    height: 250px; /* Max height of the bar */
    background-color: #e0e0e0;
    border-radius: 4px 4px 0 0; /* Rounded top corners */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* This is the magic for bottom-up fill */
    overflow: hidden;
}

.vertical-result-bar {
    width: 100%;
    background-color: #3498db;
    color: white;
    text-align: center;
    font-size: 1em;
    white-space: nowrap;
    transition: height 0.5s ease-in-out; /* Animate height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

