-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
128 lines (108 loc) · 1.87 KB
/
styles.css
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
/* General calculator styles */
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f6a955;
font-family: 'Arial', sans-serif;
position: relative;
}
.calculator {
width: 300px;
padding: 20px;
border-radius: 20px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.display {
height: 100px;
text-align: right;
margin-bottom: 20px;
color: white;
}
.display .operation {
font-size: 20px;
opacity: 0.6;
}
.display .result {
font-size: 40px;
font-weight: bold;
}
.buttons {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
}
.button {
font-size: 18px;
padding: 20px;
border-radius: 10px;
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
/* Button colors */
.button:active {
background-color: rgba(255, 255, 255, 0.2);
}
.equals {
background-color: #f68c1f;
color: white;
}
.operator {
background-color: #4d4d4d;
color: white;
}
/* Light mode */
.light-mode {
background-color: #f4f4f4;
}
.light-mode .display {
color: black;
}
.light-mode .button {
background-color: #ffffff;
color: black;
}
.light-mode .equals {
background-color: #f68c1f;
color: white;
}
.light-mode .operator {
background-color: #dddddd;
color: black;
}
/* Dark mode */
.dark-mode {
background-color: #2d2d2d;
}
.dark-mode .button {
background-color: #333333;
color: white;
}
.dark-mode .operator {
background-color: #444444;
color: white;
}
.dark-mode .equals {
background-color: #f68c1f;
color: white;
}
/* Theme toggle button styles */
.theme-toggle {
position: absolute;
bottom: 20px;
right: 20px;
padding: 10px;
font-size: 20px;
border: none;
background-color: #f68c1f;
color: white;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.3s;
}
.theme-toggle:hover {
background-color: #f69039;
}