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

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    min-height: 100vh;
    background: #0d1117;
    padding: 40px 20px;
    line-height: 1.7;
    color: #e6edf3;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #161b22;
    padding: 40px;
    border: 1px solid #30363d;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #58a6ff;
}

h1 {
    color: #58a6ff;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

h1::before {
    content: '> ';
    color: #8b949e;
}

.add-form {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border: 1px solid #30363d;
}

.add-form input[type="text"] {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-size: 14px;
    font-family: inherit;
    background: #0d1117;
    color: #e6edf3;
}

.add-form input[type="text"]:focus {
    outline: none;
    background: #161b22;
}

.add-form input[type="text"]::placeholder {
    color: #8b949e;
}

.add-form button {
    padding: 14px 24px;
    background: #58a6ff;
    color: #0d1117;
    border: none;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.15s ease;
}

.add-form button:hover {
    background: #79b8ff;
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-bottom: none;
    gap: 14px;
    transition: border-color 0.15s ease;
}

.task-item:last-child {
    border-bottom: 1px solid #30363d;
}

.task-item:hover {
    border-color: #58a6ff;
    z-index: 1;
    position: relative;
}

.task-item:hover + .task-item {
    border-top-color: #58a6ff;
}

/* Custom checkbox */
.task-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #8b949e;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.task-item input[type="checkbox"]:hover {
    border-color: #58a6ff;
}

.task-item input[type="checkbox"]:checked {
    background: #58a6ff;
    border-color: #58a6ff;
}

.task-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #0d1117;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.task-item .task-title {
    flex: 1;
    font-size: 15px;
    color: #e6edf3;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #8b949e;
}

.task-item .edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #58a6ff;
    background: #0d1117;
    color: #e6edf3;
    font-size: 15px;
    font-family: inherit;
}

.task-item .edit-input:focus {
    outline: none;
}

.task-item button {
    padding: 6px 12px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
}

.task-item .edit-btn {
    color: #e6edf3;
    border-color: #8b949e;
}

.task-item .edit-btn:hover {
    background: #8b949e;
    color: #0d1117;
}

.task-item .delete-btn {
    color: #e6edf3;
    border-color: #8b949e;
}

.task-item .delete-btn:hover {
    background: #f85149;
    border-color: #f85149;
    color: #ffffff;
}

.task-item .save-btn {
    color: #e6edf3;
    border-color: #58a6ff;
}

.task-item .save-btn:hover {
    background: #58a6ff;
    color: #0d1117;
}

.task-item .cancel-btn {
    color: #e6edf3;
    border-color: #8b949e;
}

.task-item .cancel-btn:hover {
    background: #8b949e;
    color: #0d1117;
}

.empty-message {
    text-align: center;
    color: #8b949e;
    padding: 40px 20px;
    font-size: 14px;
    border: 1px dashed #30363d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.empty-message::before {
    content: '// ';
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 20px 15px;
    }

    .container {
        padding: 25px;
    }

    h1 {
        font-size: 18px;
    }

    .add-form {
        flex-direction: column;
    }

    .add-form input[type="text"] {
        border-bottom: 1px solid #30363d;
    }

    .task-item {
        flex-wrap: wrap;
    }

    .task-item .task-title {
        width: calc(100% - 40px);
    }

    .task-item button {
        flex: 1;
        margin-top: 10px;
    }
}
