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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background-color: white;
    border-right: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

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

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

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 3px;
}

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

/* Projects List */
.projects-list {
    margin-top: 10px;
}

.project-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    min-height: 60px;
    gap: 2px;
}

.project-header:hover {
    background-color: #f0f0f0;
}

.project-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 2px;
}

.project-name {
    font-weight: 500;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
    max-width: 100%;
    flex: 1;
    padding-right: 1px;
    line-height: 1.2;
}

.project-progress {
    color: #666;
    font-size: 12px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.tasks-list {
    padding: 0 15px 10px;
    border-top: 1px solid #e0e0e0;
}

.task-item {
    padding: 8px 12px;
    margin: 5px 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.task-item:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.task-name {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
    font-weight: 500;
    max-width: 100%;
    flex: 1;
    display: block;
}

.task-content {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.task-weight {
    color: #666;
    font-size: 11px;
}

.task-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
    min-width: 100px;
    justify-content: flex-end;
}

.project-actions {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
    min-width: 65px;
    justify-content: flex-end;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    position: absolute;
    top: 20px;
    right: 20px;
    left: 20px;
    max-width: calc(100% - 40px);
}

.form-container.show {
    transform: translateX(0);
}

.welcome-message {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
}

.welcome-message.hide {
    transform: translateX(-100%);
}

.welcome-message h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.welcome-message p {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
}

.form-container h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Hide/Show form fields */
.task-fields {
    display: none;
}

.project-fields {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .sidebar-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .sidebar-header .btn {
        width: 100%;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .form-container {
        padding: 20px;
        width: 95%;
        right: 0;
        left: 0;
        margin: 0 auto;
    }
    
    .project-item {
        margin-bottom: 10px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .project-info {
        width: 100%;
    }
    
    .project-name {
        font-size: 16px;
        word-break: break-word;
    }
    
    .task-item {
        padding: 8px;
        margin-bottom: 5px;
    }
    
    .task-name {
        font-size: 14px;
        word-break: break-word;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .btn-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* Animation for expand/collapse */
.tasks-list {
    transition: all 0.3s ease;
}

.expand-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #6c757d;
}

.expand-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: scale(1.1);
}

.expand-btn.expanded {
    transform: rotate(180deg);
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Status badges */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-draft {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-in_progress {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-done {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
}

.text-muted {
    color: #6c757d !important;
}