Spaces:
Running
Running
File size: 4,355 Bytes
57361f3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | /* 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;
}
} |