/* style.css */

/* Allgemeine Einstellungen */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --background-light: #f8f9fa;
    --background-dark: #e9ecef;
    --text-color: #343a40;
    --heading-color: #212529;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition-speed: 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-light);
    padding-top: 60px; /* Platz für fixierte Header */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header/Navigation */
.header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.header nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.header nav a:hover {
    color: var(--primary-color);
}

.header .user-info {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Container für Hauptinhalt */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    flex-grow: 1;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

/* Karten/Boxen */
.card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card.notification-unread {
    border-left: 5px solid var(--primary-color);
}

/* Buttons */
.button, input[type="submit"], button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color var(--transition-speed), transform 0.1s ease;
    margin-right: 10px; /* Standardabstand zwischen Buttons */
    margin-bottom: 10px;
}

.button:hover, input[type="submit"]:hover, button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.button-secondary {
    background: var(--secondary-color);
}
.button-secondary:hover {
    background: #5a6268;
}

.button-outline {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}
.button-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Formulare */
form {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--heading-color);
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="datetime-local"],
form input[type="file"],
form textarea,
form select {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

form input[type="text"]:focus,
form input[type="password"]:focus,
form input[type="email"]:focus,
form input[type="datetime-local"]:focus,
form textarea:focus,
form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Listen (z.B. Kurse, Aufgaben, Benachrichtigungen) */
ul {
    list-style: none;
    padding: 0;
}

ul li {
    background: white;
    padding: 15px;
    border-bottom: 1px solid var(--background-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-speed);
}

ul li:last-child {
    border-bottom: none;
}

ul li:hover {
    background: var(--background-dark);
}

ul li strong {
    color: var(--primary-color);
}

/* Spezifische Elemente */
.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
}

pre {
    background: var(--background-dark);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap; /* Wrap long lines */
    word-wrap: break-word;
}

/* Tabellen (z.B. Bewertungen) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden; /* Für abgerundete Ecken */
    box-shadow: var(--box-shadow);
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

table th {
    background: var(--background-dark);
    font-weight: 600;
    color: var(--heading-color);
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tr:hover {
    background-color: var(--background-dark);
}

/* FullCalendar Anpassungen (für Kalender.php) */
.fc .fc-toolbar-title {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--heading-color);
}

.fc-button {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    transition: background-color var(--transition-speed);
}

.fc-button:hover {
    background-color: var(--primary-dark) !important;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem;
    }
    .header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 10px;
    }
    .header nav li {
        width: 100%;
        text-align: center;
    }
    .container {
        margin: 1rem auto;
        padding: 0 10px;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .button, input[type="submit"], button {
        width: 100%;
        margin-right: 0;
    }
}

/* Footer (optional, aber gut für ein "perfektes" Design) */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: var(--secondary-color);
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 5px rgba(0,0,0,0.03);
}

/* Spezielle Stile für Kursverwaltung (course_manage.php) */
.course-info {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.assignment-item, .submission-item {
    background: white;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.2s ease;
}

.assignment-item:hover, .submission-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.assignment-item strong, .submission-item strong {
    color: var(--heading-color);
    font-size: 1.1em;
}

.assignment-item .actions, .submission-item .actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.assignment-item .actions a, .submission-item .actions a {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 5px;
}

.assignment-item .actions a.button {
    background-color: var(--primary-color);
    color: white;
}

.assignment-item .actions a.button-secondary {
    background-color: var(--secondary-color);
}

.submission-item .grade-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.submission-item .grade-form textarea {
    width: 100%;
    min-height: 60px;
}

.comment-list {
    margin-top: 20px;
}

.comment-item {
    background: var(--background-dark);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.comment-item strong {
    color: var(--primary-color);
}

.comment-item small {
    display: block;
    font-size: 0.8em;
    color: var(--secondary-color);
    margin-top: 5px;
}
/* Für zentrierte Formulare wie Login/Register */
.centered-form-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Mindesthöhe des Viewports */
    background: var(--background-light); /* Hintergrundfarbe wie der Rest der App */
    padding-top: 0; /* Kein Platz für Header hier */
}

.centered-form-page .card {
    max-width: 400px;
    width: 90%;
    text-align: center;
    padding: 30px;
}
/* Notification Badge */
.notification-badge {
    background-color: var(--error-color);
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 50%;
    position: relative;
    top: -8px; /* Adjust as needed */
    left: 5px; /* Adjust as needed */
    vertical-align: super;
    font-weight: bold;
}
/* Badge */
.badge {
    display: inline-block;
    padding: 0.3em 0.6em;
    font-size: 0.85em;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #28a745; /* Success color */
    color: white;
    margin-left: 5px;
}