/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #172b4d;
}

.hidden {
    display: none !important;
}

/* Authentifizierung */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    color: #5e6c84;
    margin-bottom: 30px;
    font-size: 28px;
}

.auth-box h2 {
    color: #172b4d;
    margin-bottom: 20px;
    font-size: 20px;
}

.form-section input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #dfe1e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-section input:focus {
    outline: none;
    border-color: #0079bf;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #0079bf;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.btn-primary:hover {
    background: #026aa7;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 8px 16px;
    background: #f4f5f7;
    color: #172b4d;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #e4e6ea;
}

.form-section p {
    text-align: center;
    margin-top: 20px;
    color: #5e6c84;
}

.form-section a {
    color: #0079bf;
    text-decoration: none;
    font-weight: 600;
}

.form-section a:hover {
    text-decoration: underline;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.message.success {
    background: #61bd4f;
    color: white;
}

.message.error {
    background: #eb5a46;
    color: white;
}

/* Board Container */
.board-container {
    padding: 20px;
    min-height: 100vh;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
}

.board-header h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: white;
    font-weight: 600;
}

/* Board */
.board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

/* Spalten */
.column {
    background: #ebecf0;
    border-radius: 12px;
    padding: 15px;
    min-width: 300px;
    max-width: 300px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dfe1e6;
}

.column-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.column-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #172b4d;
}

.card-count {
    background: #dfe1e6;
    color: #5e6c84;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.list-actions {
    display: flex;
    gap: 5px;
}

.list-edit-btn,
.list-delete-btn {
    background: transparent;
    border: none;
    color: #5e6c84;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.2s;
}

.list-edit-btn:hover {
    background: #dfe1e6;
}

.list-delete-btn:hover {
    background: #eb5a46;
    color: white;
}

/* Karten Container */
.cards-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 600px;
    padding: 5px;
}

/* Karten */
.card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #172b4d;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.card-description {
    font-size: 13px;
    color: #5e6c84;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.card-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-btn {
    background: #0079bf;
    color: white;
}

.edit-btn:hover {
    background: #026aa7;
}

.delete-btn {
    background: #eb5a46;
    color: white;
}

.delete-btn:hover {
    background: #cf513d;
}

.move-btn {
    background: #61bd4f;
    color: white;
}

.move-btn:hover {
    background: #5aac44;
}

/* Karte hinzufügen Button */
.add-card-btn {
    margin-top: 10px;
    padding: 10px;
    background: rgba(9, 30, 66, 0.08);
    color: #5e6c84;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.add-card-btn:hover {
    background: rgba(9, 30, 66, 0.13);
}

/* Liste hinzufügen Container */
.add-list-container {
    display: inline-block;
    margin-left: 20px;
    vertical-align: top;
}

.add-list-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 300px;
}

.add-list-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #5e6c84;
    cursor: pointer;
}

.close:hover {
    color: #172b4d;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #172b4d;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #dfe1e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #0079bf;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .board {
        flex-direction: column;
    }

    .column {
        max-width: 100%;
    }

    .board-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .add-list-container {
        margin-left: 0;
        width: 100%;
    }

    .add-list-btn {
        width: 100%;
    }
}
