File size: 2,581 Bytes
ea88a15
150e09e
ea88a15
 
 
 
 
 
 
 
 
 
 
 
 
 
150e09e
 
ea88a15
 
 
 
150e09e
 
 
ea88a15
 
150e09e
ea88a15
 
150e09e
ea88a15
150e09e
 
ea88a15
 
 
 
 
 
 
150e09e
 
ea88a15
 
 
 
 
 
 
 
 
 
 
 
150e09e
 
ea88a15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150e09e
 
 
ea88a15
 
 
 
 
 
150e09e
ea88a15
 
150e09e
ea88a15
150e09e
ea88a15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150e09e
ea88a15
 
 
150e09e
 
ea88a15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150e09e
ea88a15
 
 
150e09e
ea88a15
150e09e
ea88a15
 
150e09e
ea88a15
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
/* src/app.css */
:root {
  --bg-color: #f5f5f5;
  --calculator-bg: #1a1a1a;
  --display-bg: #2a2a2a;
  --button-bg: #3a3a3a;
  --button-hover: #4a4a4a;
  --operator-bg: #ff9500;
  --operator-hover: #ffaa33;
  --function-bg: #505050;
  --function-hover: #606060;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --border-radius: 12px;
  --button-radius: 8px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.calculator {
  background-color: var(--calculator-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 340px;
}

.display {
  background-color: var(--display-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  text-align: right;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  word-wrap: break-word;
  word-break: break-all;
}

.display-text {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--text-color);
  line-height: 1.2;
}

.error {
  font-size: 0.875rem;
  color: #ff6b6b;
  margin-top: 5px;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

button {
  background-color: var(--button-bg);
  color: var(--text-color);
  border: none;
  border-radius: var(--button-radius);
  font-size: 1.5rem;
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 300;
}

button:hover {
  background-color: var(--button-hover);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button.function {
  background-color: var(--function-bg);
}

button.function:hover {
  background-color: var(--function-hover);
}

button.operator {
  background-color: var(--operator-bg);
  font-size: 1.75rem;
  font-weight: 400;
}

button.operator:hover {
  background-color: var(--operator-hover);
}

button.equals {
  background-color: var(--operator-bg);
  grid-column: 3 / 5;
}

button.equals:hover {
  background-color: var(--operator-hover);
}

button.zero {
  grid-column: 1 / 3;
}

@media (max-width: 480px) {
  .calculator {
    padding: 15px;
  }
  
  .display {
    padding: 15px;
    min-height: 70px;
  }
  
  .display-text {
    font-size: 2rem;
  }
  
  button {
    font-size: 1.25rem;
    padding: 15px;
  }
}