/* Importiere die Schriftart Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Variablen für das Farbschema */
:root {
    --primary-color: #fb8500;         /* Lebendiges Violett */
    --secondary-color: #FF6B6B;       /* Kräftiges Rot-Orange */
    --accent-color: #F7D794;          /* Helles Gelb */
    --text-color: #333;
    --background-color: #f9f9f9;
    --card-background: #fff;
    --border-color: #ddd;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
    --transition-speed: 0.2s;
    --dark-mode-text: #eee;
    --dark-mode-background: #333;
    --dark-mode-card: #444;
}

/* Grundlegende Stile */
body {
    font-family: 'Montserrat', sans-serif !important;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--background-color);
    font-weight: 400;
    line-height: 1.6;
}

/* Container-Stile */
.containerFlex {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 25px;
    justify-content: space-between;
}

.flex {
    display: flex;
    flex-direction: row;
    gap: 25px;
    margin-top: 50px; /* Reduzierter Abstand oben */
    justify-content: center;
    flex-wrap: wrap; /* Für bessere Responsivität */
}

.containerKanBan {
    width: 45%;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.subContainer2 {
    width: 50%;
}

/* Header und Footer */
header, footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 20px 0; /* Mehr Platz */
    text-align: center;
}
nav a {
    color: white !important;
}
/* Kanban-Board */
#kanban-board {
    display: flex;
    justify-content: space-evenly;
    gap: 6px;
    flex-wrap: nowrap; /* Für Responsivität */
}

.kanban-column {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px 10px;
    transition: background-color var(--transition-speed) ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f9f9f9; /* Neutralerer Hintergrund */
}

.kanban-column[data-status="open"] {
    background-color: #ffebee;  /* Zartes Rot */
}

.kanban-column[data-status="in_progress"] {
    background-color: #fff8e1;  /* Helles Gelb */
}

.kanban-column[data-status="done"] {
    background-color: #e8f5e9;  /* Zartes Grün */
}

/* Typografie */
h1 {
    text-align: center;
    margin: 0;
    font-size: 2.5em; /* Größere Überschrift */
    font-weight: 700;
    letter-spacing: -1px;
}

p {
    margin: 0;
    font-size: 1.1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

/* Titel-Gradient */
.titleGradient {
    font-weight: 900;
    text-align: center;
    font-size: 60px; /* Noch größer */
    background: linear-gradient(to right, var(--accent-color), var(--primary-color));
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    margin-bottom: 0px;
}

/* Logo */
#Logo {
    cursor: pointer;
}

/* Formulare */
.formFlex {
    display: flex;
    flex-direction: column;
}

.containerMain {
    display: flex;
    justify-content: center;
    border-radius: var(--border-radius);
    width: 85%;
    margin: 25px auto;
    max-width: 600px;
    flex-direction: column;
    padding: 25px; /* Mehr Platz */
    gap: 20px; /* Mehr Abstand */
    background-color: var(--card-background);
    box-shadow: var(--box-shadow);
}

.stretchMaxWidth {
    display: flex;
    justify-content: space-between;
}

label.requiredForm {
    position: relative;
    display: inline-block;
}

label.requiredForm::after {
    content: " *";
    color: var(--secondary-color);
    font-weight: 700;
}

label {
    padding-bottom: 5px;
    margin-top: 15px;
    font-weight: 500;
}

input, select {
    height: 45px; /* Größere Felder */
    border-radius: 10px;
    border: 1px solid var(--border-color) !important;
    padding-left: 10px;
    font-size: 1em;
    transition: border-color var(--transition-speed);
}

input:focus, select:focus {
    border-color: var(--primary-color) !important;
    outline: none;
}

.formHalbieren {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}

.formHalbieren div {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.error-message {
    color: #e63946;
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
}

input.error, select.error {
    border-color: #e63946;
}

select option:checked {
    background-color: var(--primary-color);
    color: #fff;
}

/* Task-Karten */
.task-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: grab;
    transition: all var(--transition-speed);
    user-select: none;
    min-height: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.task-card h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

/* Vertikaler Teiler */
.verticalDivider {
    height: 100%;
    width: 1px;
    background-color: var(--border-color);
}

/* Buttons */
button {
    margin-top: 15px;
    height: 45px;
    background-color: var(--accent-color);
    border-radius: 10px;
    border: none;
    box-sizing: border-box;
    color: var(--text-color);
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    text-shadow: none;
    transition: all var(--transition-speed);
    user-select: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Modale */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--card-background);
    padding: 30px;
    max-width: 1100px;
    width: 90%;
    border-radius: var(--border-radius);
    z-index: 1001;
    box-shadow: var(--box-shadow);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2em;
    cursor: pointer;
    color: #777;
}

/* Popup-Grid */
.popup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
}

.popup-grid .cell {
    overflow-y: auto;
    max-height: 400px;
}

.cell {
    min-height: 200px;
}

/* Mobil: 1x4 */
@media (max-width: 600px) {
    .popup-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
    }
}

#popup-time {
    padding-bottom: 30px;
    margin-top: 50px;
}

/* Benachrichtigungen */
#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 350px;
}

.notification {
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: default;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

textarea {
    height: 30px;
    margin-top: 15px;
    border-radius: 10px;
    padding: 8px;
    font-size: 1em;
}

.notification.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

#commentsScrollBottom {
    padding-right: 10px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-y: auto;
    max-height: 350px;
    min-height: 250px;
}

#popup-comments {
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

#popup-comment-input {
    display: flex;
    gap: 10px;
}

#popup-comment-input textarea {
    flex: 1;
    resize: vertical;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

#popup-comment-input button {
    flex-shrink: 0;
    padding: 10px 15px;
}

#popup-history {
    display: flex;
    flex-direction: column;
}

#popup-history h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #fafafa;
}

.history-list .history-entry, #commentsScrollBottom div p {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#popup-description h3 {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 5px;
}

.flexleftRight {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
}

/* Task-Erstellung */
#task-creation input[type="date"],
#task-creation input[type="time"] {
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-color);
    outline: none;
    transition: border-color var(--transition-speed);
}

#task-creation input[type="date"]:focus,
#task-creation input[type="time"]:focus {
    border-color: var(--primary-color);
}

#task-creation label {
    margin-top: 1em;
}

#task-recurrence,
#task-category {
    padding: 5px 10px;
    height: 45px;
    font-size: 1em;
}

/* Farb-Picker */
.color-suggestions {
    display: flex;
    gap: 10px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.color-swatch:hover,
.color-swatch.selected {
    border-color: var(--primary-color);
}

input[type="color" i] {
    padding: 0;
    height: 40px;
    width: 40px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Profilseiten */
.container-profiles {
    width: 45%;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.profile-filter {
    margin-bottom: 25px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

#filter-role {
    height: 45px;
    padding: 5px 10px;
    font-size: 1em;
}

.filter-controls input,
.filter-controls select {
    flex: 1;
    min-width: 200px;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.profile-card {
    display: flex;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-image {
    width: 70px;
    height: 70px;
    margin-right: 20px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.3em;
}

.profile-info {
    flex: 1;
}

.profile-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    font-weight: 500;
}

.profile-role {
    color: #777;
    margin: 0 0 8px 0;
    font-size: 0.9em;
}

.profile-class,
.profile-subjects {
    font-size: 0.9em;
    margin: 3px 0;
}

/* Profil-Popup */
.profile-modal-content {
    max-width: 900px;
}

.profile-detail {
    padding: 30px;
}

.profile-header {
    display: flex;
    margin-bottom: 40px;
}

.profile-image-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 40px;
}

.profile-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 2.5em;
}

.profile-header-info h2 {
    margin: 0 0 15px 0;
    font-size: 2em;
    font-weight: 600;
}

.profile-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .profile-body {
        grid-template-columns: 1fr;
    }
}

.profile-bio,
.profile-contact,
.profile-badges {
    margin-bottom: 30px;
}

.profile-bio h4,
.profile-contact h4,
.profile-badges h4 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 500;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.badge-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.badge-icon {
    font-size: 2em;
    margin-right: 20px;
    color: var(--primary-color);
}

.badge-name {
    font-weight: bold;
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.badge-date {
    font-size: 0.9em;
    color: #777;
    margin: 0;
}

.profile-actions {
    margin-top: 40px;
    text-align: center;
}

/* Profilbearbeitungs-Formular */
.profile-edit-form {
    margin: 0 auto;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 500;
}

.form-group {
    margin-bottom: 25px;
}

.form-group small {
    display: block;
    color: #777;
    margin-top: 8px;
    font-size: 0.9em;
}

.profile-image-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.radio-group {
    display: flex;
    flex-direction: column;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 15px;
    height: auto;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: all var(--transition-speed);
}

.btn.primary {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn.primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background-color: #f1f1f1;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    text-decoration: none;
}

.btn.secondary:hover {
    background-color: #e5e5e5;
}

.alert {
    padding: 18px;
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Chat-Stile */
.chat-container {
    display: flex;
    height: calc(100vh - 150px);
    margin: 30px auto;
    max-width: 1200px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.chat-sidebar {
    width: 350px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 500;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    transition: background-color var(--transition-speed);
}

.chat-item:hover {
    background-color: #f9f9f9;
}

.chat-item.active {
    background-color: #f0f0f0;
}

.chat-item-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 20px;
    overflow: hidden;
}

.chat-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.3em;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-name {
    font-weight: 500;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1em;
}

.chat-item-preview {
    font-size: 0.9em;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-unread-badge {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    min-width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 10px;
}

/* Hauptbereich mit Nachrichten */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.chat-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 20px;
    overflow: hidden;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-no-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #777;
    text-align: center;
    padding: 30px;
}

.chat-message {
    display: flex;
    margin-bottom: 20px;
    max-width: 75%;
}

.chat-message.own {
    margin-left: auto;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    overflow: hidden;
}

.chat-message.own .chat-message-avatar {
    margin-right: 0;
    margin-left: 15px;
}

.message-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

.chat-message-content {
    background-color: #fff;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.chat-message.own .chat-message-content {
    background-color: #e1f5fe; /* Hellblau */
}

.chat-message-text {
    margin-bottom: 8px;
    word-wrap: break-word;
    font-size: 1.1em;
}

.chat-message-time {
    font-size: 0.8em;
    color: #999;
    text-align: right;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-background);
}

#chat-form {
    display: flex;
    gap: 15px;
}

#chat-message {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    resize: none;
    max-height: 150px;
    overflow-y: auto;
    font-size: 1em;
}

#send-message {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0 25px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#send-message:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Leerer Zustand */
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px;
    text-align: center;
    color: #777;
}

.chat-empty-icon {
    font-size: 5em;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.chat-empty-state h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 500;
}

.chat-empty-state p {
    max-width: 450px;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: calc(100vh - 120px);
    }

    .chat-sidebar {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .chat-message {
        max-width: 85%;
    }
}

.chat-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    margin-right: 15px;
    border-radius: 30px;
    padding: 12px 25px;
}

.chat-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Gruppenstyles */
.container-groups {
    width: 45%;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Gruppeneinladungen */
.group-invitations {
    margin-bottom: 35px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--accent-color);
}

.invitation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.invitation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.invitation-info p {
    margin: 0;
    font-size: 1.1em;
}

.invitation-date {
    font-size: 0.9em;
    color: #777;
    margin-top: 8px;
}

.invitation-actions {
    display: flex;
    gap: 15px;
}

.btn.accept {
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 30px;
    padding: 10px 20px;
    transition: all var(--transition-speed);
}

.btn.accept:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn.decline {
    background-color: #f8f8f8;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 20px;
    transition: all var(--transition-speed);
}

.btn.decline:hover {
    background-color: #e5e5e5;
}

/* Gruppenkarten */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.group-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.group-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.group-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.8em;
    border-radius: var(--border-radius);
}

#edit-group-form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

#edit-group-form .form-group {
    display: flex;
    flex-direction: column;
}

.group-image-preview img {
    width: 100px;
    border-radius: 12px;
}

.group-info h3 {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    font-weight: 500;
}

.group-members, .group-role {
    margin: 8px 0;
    font-size: 1em;
    color: #777;
}

.group-actions {
    margin-top: auto;
    padding-top: 20px;
}

/* Karten zum Erstellen/Beitreten */
.create-group, .join-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed #ddd;
    background-color: #f9f9f9;
    transition: all var(--transition-speed);
}

.create-group:hover, .join-group:hover {
    border-color: var(--primary-color);
    background-color: #f5f5f5;
}

.create-group-icon, .join-group-icon {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Gruppendetailseite */
.container-group {
    width: 95%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.group-header-info {
    display: flex;
    align-items: flex-start;
}

.group-header-image, .group-header-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    margin-right: 30px;
}

.group-header-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 2.2em;
}

.group-meta {
    color: #777;
    margin: 8px 0 20px 0;
    font-size: 1.1em;
}

.group-description {
    max-width: 800px;
    line-height: 1.6;
    font-size: 1.1em;
}

.group-header-actions {
    display: flex;
    gap: 15px;
}

/* Tabs */
.group-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab {
    padding: 15px 25px;
    margin-right: 8px;
    border-radius: 10px 10px 0 0;
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed);
    font-weight: 500;
    white-space: nowrap;
}

.tab:hover {
    background-color: #f5f5f5;
}

.tab.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* Aufgaben-Tab */
.group-tasks-container {
    padding: 25px 0;
}

.group-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.group-tasks-filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

#category-filter, #assignee-filter {
    padding: 10px 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--card-background);
    font-size: 1em;
}

#group-kanban-board {
    display: flex;
    justify-content: space-evenly;
    gap: 6px;
    flex-wrap: nowrap;
}

.kanban-column {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    min-height: 350px;
    width: 100%;
}

.kanban-column h4 {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.1em;
    font-weight: 500;
    text-align: center;
}

.task-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: grab;  /* Zurück zu grab statt pointer */
    transition: all var(--transition-speed);
    user-select: none; /* Wichtig für Drag-and-Drop */
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.task-card h5 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 500;
}

.task-category {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    color: white;
    margin-bottom: 10px;
    font-weight: 500;
}

.task-due-date, .task-assignee {
    font-size: 0.9em;
    color: #777;
}

#popup-time-stop, #popup-time-start {
    padding: 10px 15px;
}

#edit-private-task-form {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

#edit-private-task-form .form-group {
    width: 30%;
}
#edit-private-task-form .form-group input, #edit-private-task-form .form-group select, #edit-private-task-form .form-group textarea {
 width: 80%;
}

#edit-private-task-form .form-group input {
    padding: 0px 15px !important;
}
.group-categories-section {
    margin-top: 40px;
}
#edit-private-task-Description, #edit-private-task-Title {
    width: 50% !important;
}

.invite-tabs button {
    padding: 1px 15px;
}

.group-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.group-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

#categories-list div p {
    font-weight: 900;
}

.category-item {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-name {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.category-creator {
    font-size: 0.9em;
    color: #777;
}

/* Mitglieder-Tab */
.group-members-container {
    padding: 25px 0;
}

.group-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.group-members-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.group-invite-code {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-color);
}

.invite-code-help {
    font-size: 1em;
    color: #777;
    margin-top: 8px;
}

.group-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.member-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.member-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.3em;
}

.member-info {
    flex: 1;
}

.member-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 500;
}

.member-role, .member-joined {
    font-size: 0.9em;
    color: #777;
    margin: 5px 0;
}

.member-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Dateien-Tab */
.group-files-container {
    padding: 25px 0;
}

.group-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.files-table th, .files-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.files-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    font-size: 1.1em;
}

.files-table tr:hover {
    background-color: #f9f9f9;
}

.download-file, .upload-version, .view-versions {
    padding: 8px 15px;
    font-size: 0.9em;
    margin-right: 8px;
    border-radius: 20px;
}

/* Chat-Tab */
.group-chat-container {
    padding: 25px 0;
}

.group-chat {
    display: flex;
    flex-direction: column;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #777;
    text-align: center;
    font-size: 1.1em;
}

.chat-message {
    display: flex;
    margin-bottom: 20px;
    max-width: 75%;
}

.chat-message.own {
    margin-left: auto;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    overflow: hidden;
}

.chat-message.own .chat-message-avatar {
    margin-right: 0;
    margin-left: 15px;
}

.chat-message-content {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-message.own .chat-message-content {
    background-color: #e1f5fe; /* Hellblau */
}

.chat-message-author {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1em;
}

.chat-message-text {
    margin-bottom: 8px;
    word-wrap: break-word;
    font-size: 1.1em;
}

.chat-message-time {
    font-size: 0.8em;
    color: #999;
    text-align: right;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-background);
}

#group-chat-form {
    display: flex;
    gap: 15px;
}

#group-chat-message {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    resize: none;
    height: 50px;
    font-size: 1em;
}

#send-group-message {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0 25px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#send-group-message:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Statistiken-Tab */
.group-stats-container {
    padding: 25px 0;
}

.stats-section {
    margin-bottom: 40px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stats-card {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stats-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stats-label {
    color: #777;
    font-size: 1.1em;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-table th, .stats-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    font-size: 1.1em;
}

/* Aktivitäten-Tab */
.group-activity-container {
    padding: 25px 0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
}

.activity-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.activity-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 20px;
    overflow: hidden;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.2em;
}

.activity-content {
    flex: 1;
}

.activity-header {
    margin-bottom: 8px;
}

.activity-user {
    font-weight: 500;
    margin-right: 8px;
    font-size: 1.1em;
}

.activity-time {
    font-size: 0.9em;
    color: #777;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8em;
    cursor: pointer;
    color: #777;
    transition: color var(--transition-speed);
}

.close-btn:hover {
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 25px;
}

#edit-private-task-form .form-group label {
    display: block;
    font-weight: 500;
    font-size: 1.1em;
}

.form-group input, .form-group textarea, .form-group select {
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1em;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

#task-description {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: all var(--transition-speed);
}

.btn.primary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.btn.primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background-color: #f1f1f1;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn.secondary:hover {
    background-color: #e5e5e5;
}

.btn.danger {
    background-color: #ff6b6b;
    color: white;
}

.btn.danger:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Aufgabendetails */
.task-detail-content {
    max-width: 900px;
}

.task-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.task-meta {
    color: #777;
    font-size: 1em;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.task-description {
    grid-column: 1 / -1;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    line-height: 1.6;
}

.task-attributes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.task-attribute {
    display: flex;
    flex-direction: column;
}

.attribute-label {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 8px;
}

.attribute-value {
    font-weight: 500;
    font-size: 1.1em;
}

.task-time-tracking {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    grid-column: 1 / -1;
}

#edit-private-task-description, #edit-group-task-description {
    height: 120px;
    resize: vertical;
    margin-top: 0;
}

.time-tracking-controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#start-time-tracking, #stop-time-tracking {
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    font-weight: 500;
    font-size: 1em;
}

#start-time-tracking {
    background-color: var(--accent-color);
    color: var(--text-color);
}

#start-time-tracking:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#stop-time-tracking {
    background-color: #ff6b6b;
    color: white;
}

#stop-time-tracking:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#live-timer-container {
    margin-top: 15px;
    padding: 15px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-comments {
    grid-column: 1 / -1;
}

.comments-list {
    margin-bottom: 25px;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.comment-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 500;
    font-size: 1.1em;
}

.comment-time {
    font-size: 0.9em;
    color: #777;
}

.comment-text {
    line-height: 1.5;
    font-size: 1.1em;
}

#add-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#comment-text {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    resize: vertical;
    height: 100px;
    font-size: 1em;
}

#add-comment-form button {
    align-self: flex-end;
    padding: 10px 20px;
    border-radius: 10px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#add-comment-form button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .flex {
        flex-direction: column;
        align-items: center;
    }

    .containerKanBan, .container-profiles, .container-groups {
        width: 90%;
    }

    .task-detail-grid {
        grid-template-columns: 1fr;
    }

    .task-attributes {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image-large {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .group-header-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .group-header-image, .group-header-placeholder {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .group-header {
        flex-direction: column;
        align-items: center;
    }

    .group-header-actions {
        margin-top: 20px;
    }

    .task-attributes {
        grid-template-columns: 1fr;
    }

    .flexleftRight {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .containerFlex {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .chat-item {
        padding: 15px 10px;
    }

    .chat-item-avatar {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .chat-message {
        max-width: 90%;
    }
}

/* Dark Mode (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: var(--dark-mode-text);
        --background-color: var(--dark-mode-background);
        --card-background: var(--dark-mode-card);
        --border-color: #555;
    }

    .kanban-column[data-status="open"] {
        background-color: rgba(255, 235, 238, 0.1);
    }

    .kanban-column[data-status="in_progress"] {
        background-color: rgba(255, 248, 225, 0.1);
    }

    .kanban-column[data-status="done"] {
        background-color: rgba(232, 245, 233, 0.1);
    }

    .task-card, .profile-card, .group-card, .member-card {
        background-color: var(--dark-mode-card);
        border-color: #555;
    }

    .chat-message-content {
        background-color: #555;
    }

    .chat-message.own .chat-message-content {
        background-color: #2c3e50;
    }

    .history-list, .comments-list, .task-description, .task-time-tracking {
        background-color: #444;
    }

    input, select, textarea {
        background-color: #444;
        color: var(--dark-mode-text);
        border-color: #555 !important;
    }

    .btn.secondary {
        background-color: #555;
        color: var(--dark-mode-text);
        border-color: #666;
    }

    .btn.secondary:hover {
        background-color: #666;
    }

    .notification.success {
        background-color: rgba(212, 237, 218, 0.2);
        color: #d4edda;
    }

    .notification.error {
        background-color: rgba(248, 215, 218, 0.2);
        color: #f8d7da;
    }

    .files-table th, .stats-table th {
        background-color: #444;
    }

    .files-table tr:hover, .stats-table tr:hover {
        background-color: #555;
    }
}

/* Grundzustand für alle Elemente ohne Animation */
.task-card, .profile-card, .group-card, .member-card, .stats-card, .activity-item {
    opacity: 1;
    transform: translateY(0);
}


/* Hover-Effekte für Buttons */
button, .btn {
    position: relative;
    overflow: hidden;
}

button::after, .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

button:focus:not(:active)::after, .btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* Zusätzliche Verbesserungen */

/* Scrollbar-Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Focus-Styles für bessere Accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.3);
}

/* Verbesserte Checkbox- und Radio-Styles */
input[type="checkbox"], input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Placeholder-Styling */
::placeholder {
    color: #aaa;
    opacity: 1;
}

/* Verbesserte Tabellen-Styles */
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th, td {
    padding: 15px;
    text-align: left;
}

th {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* Tooltip-Styling */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: #333;
    color: white;
    border-radius: 6px;
    font-size: 0.9em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Badge-Styling */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-accent {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* Verbesserte Formular-Styles */
fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
}

legend {
    padding: 0 10px;
    font-weight: 500;
    font-size: 1.1em;
}

/* Verbesserte Listen-Styles */
ul, ol {
    padding-left: 25px;
}

li {
    margin-bottom: 10px;
}

/* Code-Block-Styling */
code {
    background-color: #f5f5f5;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: var(--border-radius);
    overflow-x: auto;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Blockquote-Styling */
blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    background-color: #f9f9f9;
    font-style: italic;
}

/* Verbesserte Link-Styles */
a {
    position: relative;
    text-decoration: none;
    color: var(--primary-color);
}

a:not(.btn):not(.tab):not(.chat-item):not(.group-card):after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: white;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s;
}

a:not(.btn):not(.tab):not(.chat-item):hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}