-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
171 lines (152 loc) · 2.94 KB
/
style.css
File metadata and controls
171 lines (152 loc) · 2.94 KB
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
/* General Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body {
background: linear-gradient(135deg, #667eea, #764ba2);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: start;
padding-top: 80px;
color: #333;
}
/* Title and Subtitle */
h1 {
font-size: 2.5rem;
color: #fff;
margin-bottom: 10px;
letter-spacing: 1px;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
p {
color: #e0e0e0;
margin-bottom: 25px;
font-size: 1rem;
}
/* Input & Button Container */
#todo-input {
width: 320px;
padding: 10px 14px;
margin: 20px 0;
border-radius: 8px;
border: none;
outline: none;
font-size: 1rem;
transition: all 0.3s ease;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}
#todo-input:focus {
box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
transform: scale(1.02);
}
/* Add Button */
#add-btn {
margin-left: 10px;
padding: 10px 20px;
background: #4e54c8;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
#add-btn:hover {
background: #8f94fb;
transform: translateY(-2px);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}
/* Todo List Container */
#todo-list {
list-style: none;
margin-top: 30px;
padding: 0;
width: 360px;
background: rgba(255, 255, 255, 0.15);
border-radius: 16px;
backdrop-filter: blur(12px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
overflow: hidden;
}
/* Each Todo Item */
#todo-list li {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
color: #fff;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
transition: background 0.3s ease;
}
#todo-list li:hover {
background: rgba(255, 255, 255, 0.1);
}
/* Checkbox styling */
#todo-list input[type="checkbox"] {
accent-color: #50fa7b;
transform: scale(1.3);
margin-right: 10px;
}
/* Todo Text */
#todo-list span {
flex: 1;
cursor: pointer;
font-size: 1rem;
transition: color 0.3s ease;
}
#todo-list span:hover {
color: #a3ffea;
}
/* Delete Button */
#todo-list button {
background: #ff4b5c;
color: #fff;
border: none;
border-radius: 6px;
padding: 6px 12px;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.3s ease;
}
#todo-list button:hover {
background: #ff6b81;
transform: scale(1.05);
}
/* Completed Todo Animation */
#todo-list li input[type="checkbox"]:checked + span {
text-decoration: line-through;
color: #b0b0b0;
transition: all 0.3s ease;
}
/* Smooth fade-in for new todos */
#todo-list li {
animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Responsive */
@media (max-width: 480px) {
body {
padding-top: 50px;
}
#todo-input {
width: 200px;
}
#todo-list {
width: 300px;
}
}