* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #7b68ee;
    --success-color: #5cb85c;
    --danger-color: #d9534f;
    --warning-color: #f0ad4e;
    --bg-color: #f5f7fa;
    --board-bg: #ebecf0;
    --card-bg: #ffffff;
    --text-color: #172b4d;
    --border-color: #dfe1e6;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #f0f0f0;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c9302c;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Kanban Container */
.kanban-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    min-height: calc(100vh - 120px);
}

/* Board */
.board {
    background-color: var(--board-bg);
    border-radius: 8px;
    min-width: 320px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.board-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.board-description {
    font-size: 12px;
    color: #5e6c84;
    margin-top: 5px;
}

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

.board-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    color: #5e6c84;
    font-size: 18px;
}

.board-actions button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.board-content {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}

.board-footer {
    padding: 10px;
    border-top: 1px solid var(--border-color);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card.dragging {
    opacity: 0.5;
}

.card.priority-high {
    border-left-color: var(--danger-color);
}

.card.priority-medium {
    border-left-color: var(--warning-color);
}

.card.priority-low {
    border-left-color: var(--success-color);
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #5e6c84;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: var(--board-bg);
}

.card-badge.status-done {
    background-color: #e3fcef;
    color: var(--success-color);
}

.card-badge.status-in-progress {
    background-color: #fff4e6;
    color: var(--warning-color);
}

.card-media {
    margin-top: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 700px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[type="file"] {
    padding: 5px;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Card Detail */
.card-detail-header {
    margin-bottom: 20px;
}

.card-detail-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-detail-section {
    margin-bottom: 20px;
}

.card-detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #5e6c84;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.card-detail-section p {
    font-size: 14px;
    line-height: 1.6;
}

.card-detail-media {
    margin-top: 10px;
}

.card-detail-media img,
.card-detail-media video {
    max-width: 100%;
    border-radius: 4px;
}

/* Media Preview */
#media-preview {
    margin-top: 10px;
}

#media-preview img,
#media-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

/* Drag and Drop */
.drag-over {
    background-color: #c5d9f1;
    border: 2px dashed var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--board-bg);
}

::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a5adba;
}

/* Responsive */
@media (max-width: 768px) {
    .kanban-container {
        flex-direction: column;
    }
    
    .board {
        min-width: 100%;
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

