

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--text-color); /* Use text-color variable */
    font-weight: 700; /* Bold */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h1 {
    font-size: 2.2em;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 15px;
    margin-bottom: 30px;
    margin-top: 0; /* No top margin for main page title */
    color: var(--primary-color);
}

h2 { font-size: 1.8em; }
h3 { font-size: 1.5em; color: var(--secondary-color); }
h4 { font-size: 1.2em; color: var(--text-color); }

p {
    margin-bottom: 1em;
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: #0056b3; /* Darker blue on hover */
    text-decoration: underline;
}

hr {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid var(--card-border);
}

hr.progress-separator {
    margin-top: 30px;
    margin-bottom: 30px;
    border: 0;
    border-top: 1px solid var(--medium-gray);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px; /* Slightly larger padding */
    font-size: 1em;
    font-weight: 700;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: var(--shadow-sm);
}
.btn:hover {
    transform: scale(1.03); /* Slight grow effect */
    box-shadow: var(--shadow-md); /* Enhanced shadow */
    text-decoration: none; /* Remove underline on button hover */
}
.btn:focus {
    outline: 2px solid var(--primary-color); /* Accessibility focus */
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.btn-primary:hover {
    background-color: #0056b3; /* Darker blue */
    color: var(--text-light);
}

.btn-secondary {
    background-color: #6c757d; /* Standard gray */
    color: var(--text-light);
}
.btn-secondary:hover {
    background-color: #5a6268;
    color: var(--text-light);
}

.start-btn, .pdf-btn {
    font-size: 1.1em;
}

.navigation-buttons {
    margin-top: 40px; /* More space */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-border);
    padding-top: 30px;
}

/* --- Forms & Questions --- */
.question {
    margin-bottom: 30px; /* More space between questions */
    padding: 25px; /* More padding inside card */
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    background-color: var(--card-bg); /* White background */
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}
.question:hover {
     box-shadow: var(--shadow-md); /* Subtle lift on hover */
}

.question p strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em; /* Slightly larger question text */
    color: var(--text-color);
}

.explanation-toggle-icon {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px; /* Slightly larger */
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    line-height: 24px; /* Center vertically */
    text-align: center;
    cursor: pointer;
    margin-left: 10px;
    padding: 0;
    vertical-align: middle;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.explanation-toggle-icon:hover {
    background-color: #138496; /* Darker teal */
    transform: scale(1.1);
}

.info-toggle-icon {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
    vertical-align: middle;
}
.info-toggle-icon:hover {
    background-color: #138496;
}

.form-check {
    font-size: 18px;
}

.explanation {
    background-color: var(--card-bg); /* Light teal background */
    border-left: 4px solid var(--secondary-color);
    color: var(--text-color); /* Darker text for better contrast */
    font-size: 0.95em; /* Slightly larger explanation text */
    white-space: pre-line;

    /* Transitions */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-in-out, margin-top 0.4s ease-out, margin-bottom 0.4s ease-out, padding 0.4s ease-out;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 15px; /* Horizontal padding only during transition */
    border-radius: 0 4px 4px 0; /* Match border */
}
.explanation:not(.hidden) {
    max-height: 600px; /* Adjust if explanations are very long */
    opacity: 1;
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 15px; /* Full padding when open */
}
.explanation ul {
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 5px;
}
.explanation hr {
    margin: 15px 0;
    border-top: 1px solid var(--card-border); /* Lighter teal border */
}

.hidden {
    display: none; /* Still needed as fallback / initial state */
}

.options {
    margin-top: 15px;
}
.options label {
    display: block;
    margin: 8px 0;
    cursor: pointer;
    padding: 12px 15px; /* More padding */
    border-radius: var(--border-radius);
    border: 2px solid var(--card-border); /* Use gray border initially */
    transition: background-color 0.2s ease, border-color 0.2s ease;
    color: var(--text-color);
}
.options label:hover {
    background-color: var(--bg-color); /* Subtle hover */
    border-color: #adb5bd; /* Darker gray border */
}
.options input[type="radio"] {
    margin-right: 12px;
    vertical-align: middle;
    /* Consider custom radio styles later if desired */
}
/* Style for selected option */
.options input[type="radio"]:checked + label { /* Target label immediately after checked radio */
   background-color: #e7f3ff; /* Light blue background */
   border-color: var(--primary-color); /* Blue border */
   font-weight: 700; /* Make selected text bold */
}
/* Focus style for accessibility on radio itself */
.options input[type="radio"]:focus + label {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}


/* --- Progress Bar --- */
.progress-section {
    margin-bottom: 30px;
    padding: 20px; /* More padding */
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.progress-section h4 {
    margin-top: 0;
    margin-bottom: 20px; /* More space */
    text-align: center;
    color: var(--text-color);
    font-weight: 700;
}
.progress-container {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}
.progress-bar {
    width: 100%;
    height: 28px; /* Slightly taller */
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--card-border);
}


.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-color); /* Use primary-color for fill */
    border-radius: var(--border-radius);
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    min-width: 30px;
}

#progressBar {
    background-color: var(--progress-bar-fill-color);
}

.current-score-label {
    color: var(--text-light);
    font-weight: bold;
    font-size: 0.85em; /* Slightly larger */
    padding: 0 10px;
    white-space: nowrap;
    position: absolute;
    right: 8px; /* More space from edge */
    top: 50%;
    transform: translateY(-50%);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}
/* Adjust label position if bar is very small */
.progress-bar-fill[style*="width: 0%;"] .current-score-label,
.progress-bar-fill[style*="width: 1%;"] .current-score-label,
.progress-bar-fill[style*="width: 2%;"] .current-score-label,
.progress-bar-fill[style*="width: 3%;"] .current-score-label,
.progress-bar-fill[style*="width: 4%;"] .current-score-label,
.progress-bar-fill[style*="width: 5%;"] .current-score-label {
   justify-content: center;
   right: auto;
   left: 50%;
   transform: translate(-50%, -50%);
}
.progress-bar-markers {
    position: relative;
    height: 35px; /* Taller to fit text better */
    margin-bottom: 8px;
    width: 100%;
}
.marker {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    font-size: 0.8em; /* Slightly larger marker text */
    font-weight: bold;
    color: var(--text-color); /* Gray marker text */
    text-align: center;
    white-space: nowrap;
    cursor: default;
}
.marker::before {
    content: '';
    position: absolute;
    bottom: 18px; /* Adjust line start */
    left: 50%;
    transform: translateX(-50%);
    width: 2px; /* Thicker line */
    height: 12px;
    background-color: var(--card-border); /* Use medium gray */
    border-radius: 1px;
}
.marker .marker-value {
    display: block;
    font-size: 0.9em;
    font-weight: normal;
    color: var(--text-color);
    margin-top: 2px; /* Space between PG label and value */
}
.progress-note {
    text-align: center;
    font-size: 0.85em; /* Slightly larger note */
    color: var(--text-color);
    margin-top: 15px;
    margin-bottom: 0;
}

/* --- Alerts --- */
.alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.95em;
}
.alert-error, .alert-danger { /* Treat error and danger similarly */
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}


/* --- Result Page Specifics --- */
.summary {
    background-color: var(--card-bg); /* Light blue background */
    border-left: 5px solid var(--primary-color);
    padding: 25px; /* More padding */
    margin-bottom: 35px;
    border-radius: var(--border-radius);
}
.summary h2 {
    margin-top: 0;
    color: var(--primary-color);
}
.summary p {
    margin: 8px 0;
    font-size: 1.1em;
}
.summary p strong {
    color: var(--text-color);
}
.summary p em { /* Style for the thresholds note */
    font-size: 0.9em;
    color: var(--text-color);
}

.details h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}
.module-result {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    background-color: var(--card-bg); /* Slightly off-white */
}
.module-result h3 {
    margin-top: 0;
    margin-bottom: 15px;
}
.module-result h4 { /* "Ihre Antworten:" */
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1em;
}
.module-result ul {
    list-style: none;
    padding-left: 0;
}
.module-result li {
    background-color: var(--bg-color); /* Light gray list items */
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    font-size: 0.95em;
}
.module-result li strong {
    color: var(--text-color);
}
.contribution-note { /* Style from previous step */
    font-style: italic;
    color: var(--text-color);
    font-size: 0.9em;
    margin-top: -5px;
    margin-bottom: 10px;
}
.actions {
     border-top: 1px solid var(--card-border);
     padding-top: 30px;
     margin-top: 30px;
     display: flex;
     justify-content: space-between;
     align-items: center;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Utility --- */
.hidden {
    display: none;
}

.option-info,
.notes-field {
    background-color: var(--card-bg);
    border-left: 4px solid var(--secondary-color);
    padding: 10px;
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 0.9em;
    white-space: pre-line;

}


/* Logo on intro page */
.logo {
    max-width: 180px;
    margin: 0 auto 20px auto;
    display: block;
}
