:root {
    /* Светлая тема */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #333;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --border-focus: #667eea;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --task-bg: white;
    --task-border: #f7fafc;
    --priority-high: #f56565;
    --priority-medium: #ed8936;
    --priority-low: #48bb78;
    --overdue-color: #e53e3e;
    --due-soon-color: #ed8936;
}

[data-theme="dark"] {
    /* Темная тема */
    --bg-gradient: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    --bg-card: rgba(45, 55, 72, 0.95);
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
    --text-muted: #718096;
    --border-color: #4a5568;
    --border-focus: #63b3ed;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --task-bg: #2d3748;
    --task-border: #4a5568;
    --priority-high: #fc8181;
    --priority-medium: #f6ad55;
    --priority-low: #68d391;
    --overdue-color: #fc8181;
    --due-soon-color: #f6ad55;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px var(--shadow);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    gap: 20px;
    transition: all 0.3s ease;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: space-between;
    flex-wrap: wrap;
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #a0aec0;
    font-size: 14px;
}

.search-box input {
    padding: 10px 15px 10px 35px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    width: 250px;
    background: var(--task-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-controls select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--task-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: 600;
}

.header h1 i {
    margin-right: 10px;
    color: var(--border-focus);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.column {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px var(--shadow);
    backdrop-filter: blur(10px);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

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

.column-header h3 {
    color: #4a5568;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-count {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.task-list {
    flex: 1;
    min-height: 200px;
    padding: 10px 0;
}

.task {
    background: var(--task-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 4px solid var(--task-border);
    position: relative;
    color: var(--text-primary);
}

.task:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.task.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

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

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

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

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.task-due-date i {
    font-size: 11px;
}

.task-due-date.overdue {
    background: rgba(229, 62, 62, 0.1);
    color: var(--overdue-color);
}

.task-due-date.due-soon {
    background: rgba(237, 137, 54, 0.1);
    color: var(--due-soon-color);
}

/* Стили для тэгов */
.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.task-tag {
    background: var(--border-color);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.task-tag:hover {
    background: var(--border-focus);
    color: white;
}

.task.overdue {
    border-left-color: var(--overdue-color) !important;
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.05), rgba(229, 62, 62, 0.02));
}

.task.overdue .task-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.task.due-soon {
    border-left-color: var(--due-soon-color) !important;
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.05), rgba(237, 137, 54, 0.02));
}

.task-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
    margin-right: 10px;
}

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

.task-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #718096;
    transition: color 0.3s ease;
}

.task-action-btn:hover {
    color: #4a5568;
    background: #f7fafc;
}

.task-description {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.task-priority {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #fed7d7;
    color: #c53030;
}

.priority-medium {
    background: #feebc8;
    color: #c05621;
}

.priority-low {
    background: #c6f6d5;
    color: #2f855a;
}

.add-task-btn {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    color: #718096;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.add-task-btn:hover {
    background: #edf2f7;
    border-color: #a0aec0;
    color: #4a5568;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: #a0aec0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

#taskForm {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Drag and drop стили */
.task-list.drag-over {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border: 2px dashed #667eea;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .column {
        min-height: 400px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Анимации для задач */
.task {
    animation: taskSlideIn 0.3s ease;
}

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

/* Стили для пустого состояния */
.task-list:empty::after {
    content: "Перетащите задачи сюда";
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    margin: 20px 0;
}

/* Стили для архива */
.archive-modal .modal-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.archive-content h2 {
    color: var(--text-secondary);
    margin: 0;
}

.archive-list {
    margin-top: 20px;
}

.archive-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: var(--task-bg);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    border-left: 4px solid var(--task-border);
    transition: all 0.3s ease;
}

.archive-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.archive-task-info h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.archive-task-info p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.archive-task-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.archive-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

/* Адаптивность для архива */
@media (max-width: 768px) {
    .archive-item {
        flex-direction: column;
        gap: 15px;
    }

    .archive-actions {
        margin-left: 0;
        justify-content: flex-end;
    }
} 