/*
 * Todo App 스타일
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.app {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.header .date {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Input Section */
.input-section {
    display: flex;
    padding: 20px;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.input-section input {
    flex: 1;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.input-section input:focus {
    outline: none;
    border-color: #667eea;
}

.input-section button {
    padding: 15px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.input-section button:hover {
    background: #5a67d8;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Todo List */
.todo-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.todo-item:hover {
    background: #f8f9fa;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #999;
}

.todo-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #667eea;
}

.todo-text {
    flex: 1;
    font-size: 1rem;
}

.todo-item .edit-input {
    flex: 1;
    padding: 8px;
    font-size: 1rem;
    border: 2px solid #667eea;
    border-radius: 4px;
    margin-right: 10px;
}

.todo-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.todo-item:hover .todo-actions {
    opacity: 1;
}

.todo-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.edit-btn {
    background: #ffc107;
    color: #333;
}

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

.save-btn {
    background: #28a745;
    color: white;
}

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

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    font-size: 0.9rem;
    color: #666;
}

.footer button {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.85rem;
}

.footer button:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.todo-item {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar */
.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.todo-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.todo-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}
