File size: 7,034 Bytes
27be395
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --border: #334155;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    /* Reduced max-width for vertical layout readability */
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    /* margin-bottom handled by container gap */
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Dashboard Grid Layout (Controls + Charts) */
.dashboard {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .dashboard {
        grid-template-columns: 350px 1fr;
        /* Fixed width controls, flexible charts */
        grid-template-areas: "controls charts";
        align-items: start;
    }

    .controls-panel {
        grid-area: controls;
    }

    .charts-panel {
        grid-area: charts;
    }
}

/* Panels Common Styles */
.visual-panel,
.controls-panel,
.charts-panel,
.theory-panel {
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Visual Panel */
.diagram-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 250px;
    /* Fixed height */
}

.diagram-container svg {
    max-height: 100%;
    max-width: 100%;
}

/* Theory Panel */
.theory-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theory-panel h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.theory-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.theory-block h3 {
    font-size: 1rem;
    color: var(--accent-secondary);
    margin-bottom: 0.25rem;
}

.theory-block ul {
    list-style: none;
    padding: 0;
}

.theory-block li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.theory-block li strong {
    color: var(--text-primary);
}

.theory-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.math {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.theory-footer {
    margin-top: auto;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--success);
}

.theory-footer strong {
    color: var(--success);
}

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background-color: var(--accent-secondary);
}

.slider-value {
    font-family: 'Fira Code', monospace;
    min-width: 3.5rem;
    text-align: right;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Stats Panel (Inside Controls) */
.stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-card {
    background-color: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.highlight {
    color: var(--accent-primary);
}

/* Charts Panel */
.charts-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.equation-container {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
}

.equation-container h3 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#math-equation {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

#math-solution {
    font-family: 'Times New Roman', serif;
    font-size: 1.1rem;
    color: var(--accent-secondary);
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    /* Taller charts */
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 10px;
}

.chart-container h3 {
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
}

canvas {
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }
}