/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 0rem 0rem 0.2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding: 0.5rem 1rem;
    border-radius: 0;
    background: linear-gradient(90deg, rgba(30,34,40,0.9) 0%, rgba(30,34,40,1) 100%);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    width: calc(100% + 0rem); /* Überdeckt Modal-Padding */
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
}

.modal-header h2 {
    color: #dddedd!important;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.ai-section {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ai-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.drag-over {
    background: rgba(0,0,0,0.15);
    border: 1px dashed #000000;
}

/* Export/Import Buttons */
.file-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

/* Utility-Klasse für position:relative */
.relative {
  position: relative;
}

#dashboard {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: #2c3e50;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.board-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.board-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.board-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.board-card-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.board-delete-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.board-card:hover .board-delete-btn {
    opacity: 1;
}

.board-delete-btn:hover {
    color: #c0392b;
}

.add-board-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e0;
    background: transparent;
    min-height: 150px;
}

.add-board-card:hover {
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
}

.add-board-btn {
    font-size: 3rem;
    color: #cbd5e0;
    background: none;
    border: none;
    cursor: pointer;
}

/* Board View Anpassungen */
#board-view {
    display: flex; /* Ermöglicht Flexbox-Layout für Header und Kanban-Board */
    flex-direction: column; /* Ordnet Header und Kanban-Board untereinander an */
    height: 100vh; /* Nimmt die volle Höhe des Ansichtsfensters ein */
    overflow: hidden; /* Verhindert vertikales Scrollen für die gesamte Board-Ansicht */
}

.board-header {
    /* Stellt sicher, dass der Header nicht schrumpft */
    flex-shrink: 0; 
}

.kanban-board {
    flex-grow: 1; /* Nimmt den verbleibenden Platz in #board-view ein */
    min-height: 0; /* Verhindert, dass der Inhalt das Element über den zugewiesenen Platz hinaus vergrößert */
    display: flex; /* Richtet Spalten als Flex-Items aus */
    align-items: stretch; /* Spalten dehnen sich auf die volle Höhe des .kanban-board Inhaltsbereichs aus */
    gap: 1rem; /* Abstand zwischen den Spalten */
    padding: 2rem; /* Innenabstand des Boards */
    overflow-x: auto; /* Ermöglicht horizontales Scrollen der Spalten */
    overflow-y: hidden; /* Verhindert vertikales Scrollen des Boards selbst */
    box-sizing: border-box; /* Padding und Border werden in die Gesamtbreite/-höhe einbezogen */
}

#board-view {
    display: none;
    height: 100vh;
    flex-direction: column;
}

.board-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: baseline ;
}

.board-header-left {
    flex: 1;
}

/* Grid-Layout für Summary und Authors */
.board-content-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    margin-top: 0.5rem;
    margin-right: 5rem;
}

.board-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.board-authors {
    font-size: 0.9rem;
    color: #7f8c8d;
    white-space: nowrap;
    text-align: left;
    min-width: 200px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    align-self: self-end; /* Positioniert die Autoren am unteren Rand */
}

.board-authors:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.board-summary {
    font-size: 0.9rem;
    color: #5a6c7d;
    max-width: none; /* Grid übernimmt die Breite */
}

/* Expandierbare Board Summary */
.summary-content {
    transition: all 0.3s ease;
}

.summary-content.collapsed {
    max-height: 5em;
    overflow: hidden;
}

.summary-content.expanded {
    max-height: none;
    overflow: visible;
}

.summary-toggle {
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.summary-toggle:hover {
    color: #357abd;
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

/* Markdown-Inhalt im Board Summary */
.board-summary .markdown-content {
    font-size: 0.9rem;
    line-height: 1.5;
}

.board-summary .markdown-content h1,
.board-summary .markdown-content h2,
.board-summary .markdown-content h3 {
    font-size: 1rem;
    margin: 0.5rem 0 0.25rem 0;
    color: #2d3748;
}

.board-summary .markdown-content p {
    margin: 0.25rem 0;
}

.board-summary .markdown-content ul,
.board-summary .markdown-content ol {
    margin: 0.25rem 0 0.25rem 1rem;
    padding-left: 0;
}

.board-summary .markdown-content li {
    margin: 0.1rem 0;
}

.board-summary .markdown-content code {
    background: rgba(0,0,0,0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    font-size: 0.85rem;
}

.board-summary .markdown-content .think-accordion {
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.board-summary .markdown-content .think-accordion summary {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

/* Responsives Design für Board Summary */
@media (max-width: 768px) {
    .board-summary {
        max-width: none;
    }
    
    .summary-content.collapsed {
        max-height: 4em;
    }
    
    .summary-toggle {
        font-size: 0.8rem;
    }
    
    /* Responsive Grid Layout */
    .board-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .board-authors {
        text-align: left;
        min-width: auto;
        white-space: normal;
    }
}

/* Animation für Summary Toggle */
.summary-content {
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease;
}

.summary-content.expanding {
    animation: expandSummary 0.3s ease-in-out;
}

@keyframes expandSummary {
    from {
        max-height: 3em;
        opacity: 0.8;
    }
    to {
        max-height: none;
        opacity: 1;
    }
}

.board-header-actions {
    display: flex;
    gap: 1rem;
}

