-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.css
More file actions
204 lines (171 loc) · 3.75 KB
/
test.css
File metadata and controls
204 lines (171 loc) · 3.75 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
padding: 20px;
background: #f0f4f8;
display: flex;
flex-direction: column;
gap: 30px;
}
.text-container {
padding: 25px;
border-radius: 15px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
background: white;
}
:root {
--cell-size: 50px;
--state-0: #FFF;
--state-1: #000;
--iterations: 0;
}
.turing-machine {
display: grid;
grid-template-columns: repeat(3, var(--cell-size));
gap: 5px;
position: relative;
margin: 100px auto;
width: calc(3 * var(--cell-size) + 10px);
}
/* Tape cells as checkboxes */
.cell {
width: var(--cell-size);
height: var(--cell-size);
border: 2px solid #333;
appearance: none;
position: relative;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
/* State representation */
.cell:checked {
background: var(--state-1);
transform: rotate(calc(var(--iterations) * 1deg));
}
.cell:not(:checked) {
background: var(--state-0);
transform: rotate(calc(var(--iterations) * -1deg));
}
/* Universal transition rule using adjacent sibling combinator */
#cell-1:checked ~ #cell-2,
#cell-2:checked ~ #cell-3,
#cell-4:checked ~ #cell-5,
#cell-5:checked ~ #cell-6,
#cell-7:checked ~ #cell-8,
#cell-8:checked ~ #cell-9 {
filter: invert(1);
}
/* Infinite loop animation */
@keyframes computation {
0% { --iterations: 0; }
100% { --iterations: 360; }
}
body {
animation: computation 10s infinite linear;
}
/* Hover effects with complex calc() */
.cell:hover {
transform:
scale(1.2)
translateX(calc(sin(var(--iterations)) * 10px))
translateY(calc(cos(var(--iterations)) * 10px));
z-index: 1;
box-shadow: 0 0 15px rgba(0,0,0,0.3);
}
/* Hidden counter */
#counter {
counter-reset: computation-step;
}
.cell:checked {
counter-increment: computation-step;
}
#counter::after {
content: counter(computation-step);
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
font-size: 2em;
}
.text-container:hover {
transform: translateY(-5px);
}
.text-container1 {
background: linear-gradient(145deg, #e3f2fd, #bbdefb);
border-left: 5px solid #2196f3;
}
.text-container2 {
background: linear-gradient(145deg, #fbe9e7, #ffccbc);
border-left: 5px solid #ff5722;
}
.text-container3 {
background: linear-gradient(145deg, #f1f8e9, #dcedc8);
border-left: 5px solid #8bc34a;
}
.text-container4 {
background: linear-gradient(145deg, #fff3e0, #ffe0b2);
border-left: 5px solid #ff9800;
}
.text-container5 {
background: linear-gradient(145deg, #ede7f6, #d1c4e9);
border-left: 5px solid #673ab7;
}
.sub-container {
margin: 15px 0;
padding: 15px;
background: rgba(255, 255, 255, 0.9);
border-radius: 8px;
}
h1, h2, h3 {
color: #2d3436;
margin-bottom: 15px;
}
h1 {
font-size: 2.5em;
text-align: center;
}
h2 {
font-size: 1.8em;
color: #34495e;
}
h3 {
font-size: 1.4em;
color: #2c3e50;
}
code {
display: block;
padding: 10px;
margin: 10px 0;
background: #1e1e1e;
color: #dcdcdc;
border-radius: 5px;
font-family: 'Courier New', Courier, monospace;
}
ul, ol {
margin-left: 25px;
}
.future-list li {
padding: 8px;
margin: 5px 0;
background: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
.equation-box {
padding: 20px;
text-align: center;
background: #ffffff;
border-radius: 10px;
margin: 15px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
body {
padding: 10px;
}
.text-container {
padding: 15px;
}
h1 {
font-size: 2em;
}
}