/* 全体のスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* ヘッダー */
header {
    margin-bottom: 2rem;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

h1 {
    color: #4a89dc;
}

h2 {
    color: #5e6977;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* フォーム */
.task-form {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    background-color: #4a89dc;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3d7acb;
}

.btn-primary {
    background-color: #4a89dc;
}

/* タスク一覧 */
.task-list {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.task-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#task-sort {
    padding: 0.5rem;
    max-width: 150px;
}

.task-filter {
    display: flex;
    align-items: center;
}

.task-filter input[type="checkbox"] {
    margin-right: 0.5rem;
}

ul#tasks {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.task-item:last-child {
    border-bottom: none;
}

.task-completed {
    text-decoration: line-through;
    color: #aaa;
}

.task-checkbox {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.task-content {
    flex-grow: 1;
}

.task-title {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.task-due-date {
    font-size: 0.8rem;
    color: #888;
}

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

.task-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #4a89dc;
    font-size: 0.9rem;
}

.task-actions button:hover {
    text-decoration: underline;
}

.delete-btn {
    color: #e74c3c !important;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .task-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    #task-sort {
        max-width: 100%;
        width: 100%;
    }
    
    .task-item {
        flex-wrap: wrap;
    }
    
    .task-actions {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }
}