Spaces:
Running
Running
| /* Base Reset and Typography */ | |
| :root { | |
| --primary-color: #007bff; | |
| --secondary-color: #6c757d; | |
| --success-color: #28a745; | |
| --danger-color: #dc3545; | |
| --bg-color: #f8f9fa; | |
| --card-bg: #ffffff; | |
| --border-color: #e9ecef; | |
| --text-color: #343a40; | |
| --font-family: 'Roboto', sans-serif; | |
| } | |
| *, *::before, *::after { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| body { | |
| font-family: var(--font-family); | |
| background-color: var(--bg-color); | |
| color: var(--text-color); | |
| line-height: 1.6; | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* Header */ | |
| .site-header { | |
| background-color: var(--primary-color); | |
| color: white; | |
| padding: 1rem 0; | |
| text-align: center; | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | |
| } | |
| .site-header h1 { | |
| margin-bottom: 0.25rem; | |
| font-size: 1.8rem; | |
| } | |
| .branding { | |
| font-size: 0.9rem; | |
| margin-top: 0.5rem; | |
| } | |
| .branding a { | |
| color: #ffd700; /* Gold color for contrast */ | |
| text-decoration: none; | |
| font-weight: bold; | |
| } | |
| .branding a:hover { | |
| text-decoration: underline; | |
| } | |
| /* Main Container (Mobile-first) */ | |
| .container { | |
| max-width: 90%; | |
| margin: 20px auto; | |
| padding: 15px; | |
| flex-grow: 1; | |
| } | |
| /* Input Form Styling */ | |
| .todo-input { | |
| margin-bottom: 30px; | |
| background: var(--card-bg); | |
| padding: 15px; | |
| border-radius: 8px; | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); | |
| } | |
| #todo-form { | |
| display: flex; | |
| gap: 10px; | |
| } | |
| #todo-input { | |
| flex-grow: 1; | |
| padding: 10px; | |
| border: 2px solid var(--border-color); | |
| border-radius: 4px; | |
| font-size: 1rem; | |
| transition: border-color 0.2s; | |
| } | |
| #todo-input:focus { | |
| outline: none; | |
| border-color: var(--primary-color); | |
| box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); | |
| } | |
| #add-button { | |
| /* Ensure the button doesn't shrink too much on mobile */ | |
| min-width: 90px; | |
| padding: 10px 15px; | |
| background-color: var(--primary-color); | |
| color: white; | |
| border: none; | |
| border-radius: 4px; | |
| cursor: pointer; | |
| font-size: 1rem; | |
| font-weight: 700; | |
| transition: background-color 0.2s; | |
| } | |
| #add-button:hover { | |
| background-color: #0056b3; | |
| } | |
| /* Todo List Styling */ | |
| .todo-list-container h2 { | |
| font-size: 1.5rem; | |
| margin-bottom: 10px; | |
| border-bottom: 2px solid var(--border-color); | |
| padding-bottom: 5px; | |
| } | |
| #todo-list { | |
| list-style: none; | |
| padding: 0; | |
| } | |
| .todo-item { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 12px 15px; | |
| margin-bottom: 8px; | |
| background-color: var(--card-bg); | |
| border: 1px solid var(--border-color); | |
| border-radius: 4px; | |
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); | |
| transition: background-color 0.3s, opacity 0.3s; | |
| } | |
| .todo-item .task-text { | |
| flex-grow: 1; | |
| margin-right: 15px; | |
| word-break: break-word; | |
| cursor: pointer; | |
| } | |
| /* Completed State */ | |
| .todo-item.completed { | |
| background-color: #e9ffed; /* Light green background */ | |
| border-left: 5px solid var(--success-color); | |
| opacity: 0.7; | |
| } | |
| .todo-item.completed .task-text { | |
| text-decoration: line-through; | |
| color: var(--secondary-color); | |
| } | |
| /* Actions (Buttons) */ | |
| .todo-actions { | |
| display: flex; | |
| gap: 8px; | |
| } | |
| .todo-actions button { | |
| padding: 8px 12px; | |
| border: none; | |
| border-radius: 4px; | |
| cursor: pointer; | |
| font-size: 0.9rem; | |
| transition: opacity 0.2s; | |
| } | |
| .todo-actions button:hover { | |
| opacity: 0.8; | |
| } | |
| .delete-btn { | |
| background-color: var(--danger-color); | |
| color: white; | |
| } | |
| /* Empty State Styling */ | |
| .empty-state { | |
| text-align: center; | |
| color: var(--secondary-color); | |
| font-style: italic; | |
| border: none; | |
| box-shadow: none; | |
| padding: 20px; | |
| } | |
| /* Footer */ | |
| .site-footer { | |
| padding: 10px; | |
| text-align: center; | |
| font-size: 0.8rem; | |
| color: var(--secondary-color); | |
| border-top: 1px solid var(--border-color); | |
| margin-top: auto; /* Push footer to the bottom */ | |
| } | |
| /* Responsive adjustments for larger screens */ | |
| @media (min-width: 600px) { | |
| .container { | |
| max-width: 600px; | |
| } | |
| .site-header h1 { | |
| font-size: 2.5rem; | |
| } | |
| #todo-form { | |
| flex-direction: row; | |
| } | |
| #todo-input { | |
| padding: 12px; | |
| font-size: 1.1rem; | |
| } | |
| #add-button { | |
| padding: 12px 20px; | |
| } | |
| .todo-item { | |
| padding: 15px 20px; | |
| } | |
| } |