* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    color: #2c3e50;
    font-size: 2rem;
    background: linear-gradient(45deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-task {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

input[type="text"] {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

input[type="text"]:hover {
    border-color: #b3e0ff;
    background-color: #fff;
}

input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}

button {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 10px;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    font-weight: 500;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.weekly-table {
    background-color: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 1.2rem;
    text-align: center;
    border: 1px solid #e0e0e0;
    position: relative;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

th.task-name-header {
    width: 20%;
    text-align: left;
}

th.actions-header {
    width: 10%;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

.task-cell {
    position: relative;
    min-height: 45px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    padding: 1rem;
}

.task-cell:hover .edit-icon {
    display: inline-block;
}

.task-name:hover .edit-icon {
    display: inline-block;
}

.task-cell:hover {
    background-color: #f5f9ff;
}

.task-cell.has-content {
    background-color: #f0f9ff;
    color: #2c3e50;
    font-weight: 500;
    box-shadow: inset 0 0 0 1px #b3e0ff;
    padding: 0.8rem;
}

.task-cell.completed {
    background-color: #e8f5e9;
    position: relative;
    box-shadow: inset 0 0 0 1px #a5d6a7;
}

.task-cell.completed::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    color: #28a745;
    font-size: 12px;
}

.task-cell:empty {
    background-color: #fff;
}

.task-name {
    font-weight: 600;
    color: #1a365d;
    text-align: left;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.task-name:hover {
    background-color: #f5f9ff;
}

.task-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem;
    border-radius: 4px;
    background-color: transparent;
    box-shadow: none;
}

.edit-btn {
    color: #3498db;
}

.delete-btn {
    color: #e74c3c;
}

.edit-btn:hover, .delete-btn:hover {
    background-color: #f0f0f0;
    transform: none;
}

.cell-action {
    padding: 0.5rem;
    border-radius: 4px;
    background-color: #f0f0f0;
    margin: 0.25rem;
    display: inline-block;
    font-size: 0.9rem;
    color: #333;
}

.cell-action-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.no-tasks {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 992px) {
    .weekly-table {
        padding: 1rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .add-task {
        width: 100%;
    }
    
    input[type="text"] {
        flex: 1;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .task-actions {
        flex-direction: column;
    }
}

@media print {
    body {
        background-color: white;
    }

    .container {
        margin: 0;
        padding: 0;
        max-width: none;
    }

    .add-task, .edit-btn, .delete-btn {
        display: none;
    }

    .weekly-table {
        box-shadow: none;
        padding: 0;
    }

    table {
        border: 1px solid #000;
    }

    th, td {
        border: 1px solid #000;
        padding: 8px;
    }

    .task-cell.has-content {
        background-color: #fff;
        border: 1px solid #000;
    }

    .task-cell.completed {
        background-color: #fff;
    }

    .task-cell.completed::after {
        color: #000;
    }

    h1 {
        color: #000;
        -webkit-text-fill-color: #000;
        background: none;
    }
}