body { font-family: 'Roboto', sans-serif; background-image: url('2.jpg'); /* Change this to the correct path */ background-size: cover; background-position: center; margin: 0; color: #333; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; } .welcome-page, .todo-page { position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; transition: opacity 1s, transform 1s; } .welcome-page { background: rgba(255, 255, 255, 0.5); opacity: 1; transform: translateX(0); } .todo-page { opacity: 0; transform: translateX(100%); overflow-y: auto; } .hidden { display: none; } .heading { text-align: center; } .heading h1 { font-size: 36px; margin: 0; color: #007BFF; animation: fadeIn 1s ease-in-out; } .heading h2 { font-size: 18px; margin: 5px 0 20px; color: #555; animation: fadeIn 1.5s ease-in-out; } #start-button { padding: 12px 20px; background: #007BFF; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background 0.3s, transform 0.3s; animation: fadeIn 2s ease-in-out; } #start-button:hover { background: #0056b3; transform: scale(1.05); } .container { padding: 30px; border-radius: 10px; box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); width: 100%; max-width: 800px; animation: slideIn 1s forwards; overflow-y: auto; max-height: 80vh; background: #474545; /* Added background color for the container */ } h1 { font-size: 24px; text-align: center; margin-bottom: 20px; color: #007BFF; } .input-section { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; } #task-input, #priority, #due-date { padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px; width: 100%; } #add-task-btn { padding: 12px; background: #007BFF; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background 0.3s, transform 0.3s; } #add-task-btn:hover { background: #0056b3; transform: scale(1.05); } .boxes { display: flex; flex-wrap: wrap; gap: 20px; } .task-box { background: #fff; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); padding: 20px; width: 100%; /* Ensure task box takes full width */ box-sizing: border-box; margin-bottom: 20px; } .task-list { list-style: none; padding: 0; margin: 0; } .task-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: #f9f9f9; border-bottom: 1px solid #ddd; transition: background 0.3s, transform 0.3s; opacity: 0; animation: slideIn 0.5s forwards; word-wrap: break-word; /* Ensure text wraps inside the task item */ } .task-item span { max-width: 70%; /* Ensure task text does not take more than 70% of the width */ } .task-item:hover { background: #f1f1f1; transform: translateX(10px); } .task-item.completed { text-decoration: line-through; color: #888; } .task-item button { margin-left: 10px; padding: 5px 10px; border: none; cursor: pointer; border-radius: 5px; } .task-item .delete-btn { background: #dc3545; color: white; } .task-item .complete-btn { background: #28a745; color: white; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }