File size: 2,572 Bytes
4009be4
 
 
3c6b835
4009be4
 
 
3c6b835
 
 
4009be4
 
 
 
 
 
 
 
 
3c6b835
4009be4
 
 
3c6b835
 
 
 
 
 
 
 
 
 
 
 
4009be4
 
 
3c6b835
4009be4
3c6b835
 
4009be4
 
 
3c6b835
4009be4
3c6b835
4009be4
 
 
 
 
3c6b835
4009be4
 
 
 
3c6b835
4009be4
3c6b835
 
4009be4
3c6b835
4009be4
3c6b835
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4009be4
 
 
3c6b835
 
 
4009be4
 
 
 
3c6b835
4009be4
 
 
3c6b835
4009be4
 
 
3c6b835
4009be4
 
 
3c6b835
4009be4
 
 
3c6b835
94f0376
 
4009be4
3c6b835
94f0376
 
4009be4
3c6b835
94f0376
 
4009be4
 
94f0376
 
4009be4
 
 
3c6b835
4009be4
 
 
3c6b835
 
 
 
 
 
4009be4
94f0376
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

.calculator {
    width: 320px;
    background: rgba(30, 30, 40, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
    color: white;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(92, 108, 255, 0.5), transparent);
}

.previous-operand {
    font-size: 1.2rem;
    opacity: 0.7;
    min-height: 24px;
    word-break: break-all;
}

.current-operand {
    font-size: 2.5rem;
    font-weight: 500;
    word-break: break-all;
}

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

button {
    border: none;
    border-radius: 12px;
    height: 60px;
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

button:hover::before {
    opacity: 1;
}

button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

button[data-operation] {
    background: rgba(92, 108, 255, 0.3);
}

button[data-operation]:hover {
    background: rgba(92, 108, 255, 0.4);
}

button[data-equals] {
    background: rgba(0, 212, 166, 0.3);
}

button[data-equals]:hover {
    background: rgba(0, 212, 166, 0.4);
}

button[data-all-clear] {
    background: rgba(255, 99, 71, 0.3);
}

button[data-all-clear]:hover {
    background: rgba(255, 99, 71, 0.4);
}

.span-two {
    grid-column: span 2;
}

@media (max-width: 400px) {
    .calculator {
        width: 280px;
        padding: 20px;
    }
    
    button {
        height: 55px;
        font-size: 1.2rem;
    }
    
    .current-operand {
        font-size: 2rem;
    }
}