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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fdba74 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

h1 {
    color: #333;
    font-size: 2rem;
    margin: 0;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username-display {
    color: #666;
    font-size: 0.95rem;
}

.username-display strong {
    color: #f97316;
}

.logout-btn {
    padding: 8px 16px;
    background: transparent;
    color: #f97316;
    border: 2px solid #f97316;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #f97316;
    color: white;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#todoInput {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#todoInput:focus {
    border-color: #f97316;
}

#dateInput {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    cursor: pointer;
}

#dateInput:focus {
    border-color: #f97316;
}

#addBtn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

#addBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.filter-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #e0e0e0;
}

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

.todo-list {
    list-style: none;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.todo-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.todo-item.completed {
    opacity: 0.6;
}

.todo-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.todo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.todo-text {
    font-size: 16px;
    color: #333;
}

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

.todo-date {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.todo-date.overdue {
    color: #ff6b6b;
    font-weight: 600;
}

.todo-date.today {
    color: #f59e0b;
    font-weight: 600;
}

.todo-date.upcoming {
    color: #f97316;
}

.delete-btn {
    padding: 6px 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #ee5a52;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

#clearCompleted {
    padding: 8px 16px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

#clearCompleted:hover {
    background: #f5f5f5;
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}
