|
2 | 2 | box-sizing: border-box; |
3 | 3 | margin: 0; |
4 | 4 | padding: 0; |
5 | | - font-family: Arial, sans-serif; |
| 5 | + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
6 | 6 | } |
7 | 7 |
|
8 | 8 | body { |
9 | | - background-color: #f4f4f4; |
10 | | - padding: 40px; |
| 9 | + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| 10 | + min-height: 100vh; |
| 11 | + padding: 40px 20px; |
| 12 | + display: flex; |
| 13 | + align-items: center; |
| 14 | + justify-content: center; |
11 | 15 | } |
12 | 16 |
|
13 | 17 | .todo-container { |
14 | | - max-width: 500px; |
| 18 | + max-width: 650px; |
| 19 | + width: 100%; |
15 | 20 | margin: 0 auto; |
16 | | - background: white; |
17 | | - border-radius: 10px; |
18 | | - padding: 20px; |
19 | | - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); |
| 21 | + background: rgba(255, 255, 255, 0.98); |
| 22 | + border-radius: 32px; |
| 23 | + padding: 36px 32px 44px; |
| 24 | + box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset; |
| 25 | + transition: transform 0.2s ease; |
| 26 | +} |
| 27 | + |
| 28 | +.todo-container:hover { |
| 29 | + transform: scale(1.01); |
20 | 30 | } |
21 | 31 |
|
22 | 32 | h1 { |
23 | 33 | text-align: center; |
24 | | - margin-bottom: 20px; |
| 34 | + font-size: 2.2rem; |
| 35 | + font-weight: 700; |
| 36 | + background: linear-gradient(120deg, #2d3748, #4a5568); |
| 37 | + background-clip: text; |
| 38 | + -webkit-background-clip: text; |
| 39 | + color: transparent; |
| 40 | + margin-bottom: 32px; |
| 41 | + letter-spacing: -0.5px; |
25 | 42 | } |
26 | 43 |
|
| 44 | +/* Input area – both field and button fully inside the rounded container */ |
27 | 45 | .todo-input { |
28 | 46 | display: flex; |
29 | | - gap: 10px; |
30 | | - margin-bottom: 20px; |
| 47 | + gap: 14px; |
| 48 | + margin-bottom: 36px; |
| 49 | + background: #f8fafc; |
| 50 | + /* Extra right padding to give more space after the Add button */ |
| 51 | + padding: 10px 18px 10px 10px; |
| 52 | + border-radius: 80px; |
| 53 | + box-shadow: inset 0 1px 3px rgba(0,0,0,0.02), 0 2px 6px rgba(0,0,0,0.05); |
| 54 | + min-height: 70px; |
| 55 | + align-items: center; |
31 | 56 | } |
32 | 57 |
|
33 | 58 | .todo-input input { |
34 | 59 | flex: 1; |
35 | | - padding: 10px; |
36 | | - font-size: 16px; |
37 | | - border-radius: 6px; |
38 | | - border: 1px solid #ccc; |
| 60 | + padding: 16px 22px; |
| 61 | + font-size: 1rem; |
| 62 | + border: none; |
| 63 | + background: white; |
| 64 | + border-radius: 60px; |
| 65 | + outline: none; |
| 66 | + transition: all 0.2s; |
| 67 | + box-shadow: 0 1px 3px rgba(0,0,0,0.05); |
| 68 | + font-weight: 500; |
| 69 | + color: #1a202c; |
| 70 | +} |
| 71 | + |
| 72 | +.todo-input input:focus { |
| 73 | + box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2); |
| 74 | + background: #ffffff; |
39 | 75 | } |
40 | 76 |
|
41 | 77 | .todo-input button { |
42 | | - padding: 10px 20px; |
43 | | - font-size: 16px; |
44 | | - background-color: #4CAF50; |
| 78 | + padding: 14px 32px; |
| 79 | + font-size: 1rem; |
| 80 | + font-weight: 600; |
| 81 | + background: linear-gradient(95deg, #4c6ef5, #3b4fcf); |
45 | 82 | color: white; |
46 | 83 | border: none; |
47 | | - border-radius: 6px; |
| 84 | + border-radius: 60px; |
48 | 85 | cursor: pointer; |
| 86 | + transition: all 0.2s ease; |
| 87 | + box-shadow: 0 8px 18px rgba(60, 80, 200, 0.3); |
| 88 | + letter-spacing: 0.5px; |
| 89 | + white-space: nowrap; |
| 90 | + display: inline-flex; |
| 91 | + align-items: center; |
| 92 | + gap: 8px; |
| 93 | + /* No margin-right needed; the parent's padding-right provides the space */ |
49 | 94 | } |
50 | 95 |
|
51 | 96 | .todo-input button:hover { |
52 | | - background-color: #45a049; |
| 97 | + background: linear-gradient(95deg, #5f7cf5, #4a62e0); |
| 98 | + transform: translateY(-2px); |
| 99 | + box-shadow: 0 14px 24px -8px rgba(60, 80, 200, 0.5); |
| 100 | +} |
| 101 | + |
| 102 | +.todo-input button:active { |
| 103 | + transform: translateY(1px); |
| 104 | + box-shadow: 0 6px 12px rgba(60, 80, 200, 0.25); |
53 | 105 | } |
54 | 106 |
|
| 107 | +/* Todo list styling */ |
55 | 108 | .todo-list { |
56 | 109 | list-style-type: none; |
57 | 110 | padding-left: 0; |
| 111 | + margin-top: 10px; |
| 112 | + display: flex; |
| 113 | + flex-direction: column; |
| 114 | + gap: 12px; |
58 | 115 | } |
59 | 116 |
|
60 | 117 | .todo-item { |
61 | 118 | display: flex; |
62 | 119 | align-items: center; |
63 | 120 | justify-content: space-between; |
64 | | - padding: 12px 10px; |
65 | | - margin-bottom: 10px; |
66 | | - border: 1px solid #ddd; |
67 | | - border-radius: 6px; |
68 | | - background-color: #fff; |
| 121 | + padding: 14px 20px; |
| 122 | + background: #ffffff; |
| 123 | + border-radius: 80px; |
| 124 | + border: 1px solid #edf2f7; |
| 125 | + transition: all 0.2s; |
| 126 | + box-shadow: 0 1px 3px rgba(0,0,0,0.03); |
| 127 | +} |
| 128 | + |
| 129 | +.todo-item:hover { |
| 130 | + background: #fafcff; |
| 131 | + border-color: #cbd5e1; |
| 132 | + box-shadow: 0 6px 14px -8px rgba(0,0,0,0.12); |
69 | 133 | } |
70 | 134 |
|
71 | 135 | .description { |
72 | 136 | flex: 1; |
73 | | - margin-right: 10px; |
74 | | - white-space: nowrap; |
75 | | - overflow: hidden; |
76 | | - text-overflow: ellipsis; |
| 137 | + margin-right: 16px; |
| 138 | + font-size: 1rem; |
| 139 | + font-weight: 500; |
| 140 | + color: #2d3e50; |
| 141 | + word-break: break-word; |
| 142 | + white-space: normal; |
| 143 | + line-height: 1.4; |
| 144 | +} |
| 145 | + |
| 146 | +/* Completed tasks */ |
| 147 | +.todo-item.completed .description { |
| 148 | + text-decoration: line-through; |
| 149 | + color: #94a3b8; |
77 | 150 | } |
78 | 151 |
|
| 152 | +/* Action buttons */ |
79 | 153 | .actions { |
80 | 154 | display: flex; |
81 | | - gap: 10px; |
| 155 | + gap: 12px; |
82 | 156 | } |
83 | 157 |
|
84 | 158 | .actions button { |
85 | 159 | background: none; |
86 | 160 | border: none; |
87 | 161 | cursor: pointer; |
88 | | - font-size: 18px; |
89 | | - display: flex; |
| 162 | + font-size: 1.2rem; |
| 163 | + width: 40px; |
| 164 | + height: 40px; |
| 165 | + border-radius: 40px; |
| 166 | + display: inline-flex; |
90 | 167 | align-items: center; |
91 | 168 | justify-content: center; |
92 | | - width: 32px; |
93 | | - height: 32px; |
| 169 | + transition: all 0.2s; |
| 170 | + background: #f1f5f9; |
| 171 | + color: #475569; |
94 | 172 | } |
95 | 173 |
|
96 | | -.complete-btn i { |
97 | | - color: green; |
| 174 | +.actions button:hover { |
| 175 | + transform: scale(1.05); |
98 | 176 | } |
99 | 177 |
|
100 | | -.delete-btn i { |
101 | | - color: red; |
| 178 | +.complete-btn:hover { |
| 179 | + background: #e0f2fe; |
| 180 | + color: #0f6b3a; |
102 | 181 | } |
103 | 182 |
|
104 | | -.todo-item.completed .description { |
105 | | - text-decoration: line-through; |
106 | | - color: gray; |
| 183 | +.delete-btn:hover { |
| 184 | + background: #fee2e2; |
| 185 | + color: #c2410c; |
| 186 | +} |
| 187 | + |
| 188 | +/* Responsive */ |
| 189 | +@media (max-width: 550px) { |
| 190 | + .todo-container { |
| 191 | + padding: 24px 18px 32px; |
| 192 | + } |
| 193 | + .todo-input { |
| 194 | + flex-wrap: wrap; |
| 195 | + background: transparent; |
| 196 | + padding: 0; |
| 197 | + border-radius: 0; |
| 198 | + gap: 16px; |
| 199 | + min-height: auto; |
| 200 | + } |
| 201 | + .todo-input input, |
| 202 | + .todo-input button { |
| 203 | + width: 100%; |
| 204 | + border-radius: 60px; |
| 205 | + } |
| 206 | + .todo-item { |
| 207 | + flex-wrap: wrap; |
| 208 | + gap: 12px; |
| 209 | + border-radius: 32px; |
| 210 | + padding: 16px; |
| 211 | + } |
| 212 | + .actions { |
| 213 | + width: 100%; |
| 214 | + justify-content: flex-end; |
| 215 | + } |
107 | 216 | } |
0 commit comments