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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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.page-header {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    width: 100%;
    max-width: 860px; /* Match main content max-width */
}

.page-header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    color: #2c3e50;
}

.page-header p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
}

.main-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 25px;
    width: 100%;
    max-width: 860px; /* Adjusted max-width */
    align-items: flex-start;
}

.aroma-info-panel {
    flex-basis: 280px; /* Increased width for perfume details */
    flex-shrink: 0;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.perfume-details {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}
.perfume-details h2 {
    font-size: 1.6em;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 5px;
}
.perfume-details p {
    font-size: 1em;
    color: #666;
    font-style: italic;
    margin-top: 0;
}


.aroma-legend h3 { /* Changed from h2 */
    font-size: 1.2em; /* Adjusted size */
    color: #34495e;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.aroma-legend table {
    width: 100%;
    border-collapse: collapse;
}

.aroma-legend th, .aroma-legend td {
    text-align: left;
    padding: 8px 5px;
    font-size: 0.9em; /* Slightly smaller for compactness */
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.aroma-legend th {
    color: #555;
    font-weight: 600;
}
.aroma-legend tr:last-child td {
    border-bottom: none;
}
.aroma-legend td:nth-child(1), .aroma-legend th:nth-child(1) { /* # column */
    text-align: center;
    width: 20px;
}
.aroma-legend td:nth-child(4), .aroma-legend th:nth-child(4) { /* Dose column */
    text-align: right;
    width: 40px;
    font-weight: bold;
}


.color-swatch {
    display: inline-block;
    width: 16px; /* Adjusted size */
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
    margin-right: 6px;
    vertical-align: middle;
}

.app-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0; /* Important for flex item to shrink properly */
}

/* Image Upload Section */
.image-upload-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px; /* Match dispenser width */
}

.image-upload-label {
    display: block;
    width: 100%;
    height: 200px; /* Adjust as needed */
    border: 2px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    overflow: hidden; /* To contain the image */
}
.image-upload-label:hover {
    border-color: #999;
}
.image-upload-label img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Changed from cover to contain for placeholder */
}
.image-upload-label span {
    margin-top: 10px;
    color: #777;
    font-size: 0.9em;
}
.image-upload-section button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.image-upload-section button:hover {
    background-color: #4cae4c;
}
.image-upload-section button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
#loadingIndicator {
    margin-top: 10px;
    color: #337ab7;
}
.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 10px;
}


.dispenser-area {
    position: relative;
    width: 100%; /* Make it responsive within its container */
    max-width: 400px; /* Max size of the dispenser visuals */
    aspect-ratio: 400 / 450; /* Maintain aspect ratio */
    height: auto; /* Let aspect-ratio define height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Aligns drum to top */
    margin-bottom: 20px;
    border: 2px solid #b0b0b0;
    padding: 5%; /* Use percentage padding */
    background-color: #fdfdfd;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.motor-base {
    width: 15%; /* Relative width */
    height: 7.5%; /* Relative height */
    background-color: #6c757d;
    border-radius: 5px;
    position: absolute;
    /* Position relative to drum */
    top: calc(7.5% + 31.25% - 3.75%); /* drum.marginTop + drum.height/2 - motor.height/2 */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1;
}

.drum {
    width: 62.5%; /* 250px / 400px */
    height: 62.5%; /* 250px / 400px */
    background-image: radial-gradient(circle, #e0e0e0, #c0c0c0 60%, #a0a0a0);
    border-radius: 50%;
    position: relative;
    margin-top: 7.5%; /* 30px / 400px */
    border: 1%; /* 4px / 400px */
    border-style: solid;
    border-color: #555;
    box-shadow: 0 1% 3% rgba(0,0,0,0.25), inset 0 0 4.5% rgba(0,0,0,0.1);
    transition: transform 0.7s ease-in-out;
    transform-style: preserve-3d;
    z-index: 2;
    box-sizing: border-box;
}

.drum::before {
    content: '';
    position: absolute;
    width: 14%; /* 35px / 250px drum width */
    height: 14%;
    background-color: #4a4a4a;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1.2%; /* 3px / 250px */
    border-style: solid;
    border-color: #333;
    box-shadow: inset 0 0 3.2% rgba(0,0,0,0.6);
    z-index: 3;
}

.bottle-slot {
    position: absolute;
    width: 9.6%; /* 24px / 250px drum width */
    height: 50%; /* Drum radius */
    left: calc(50% - 4.8%); /* 50% - (width/2) */
    top: 50%;
    transform-origin: center top;
    z-index: 4;
}

.base-aroma-bottle {
    width: 100%; /* Full width of slot */
    height: 36%; /* 45px / 125px slot height */
    border: 0.8%; /* 1px / 125px slot height */
    border-style: solid;
    border-color: #4a2d0a;
    border-radius: 5px 5px 3px 3px; /* Keep somewhat fixed for shape */
    position: absolute;
    bottom: -4%; /* -5px / 125px */
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em; /* Make font responsive */
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.9);
    box-shadow: 1px 2px 5px rgba(0,0,0,0.3);
    cursor: default;
    box-sizing: border-box;
}

.base-aroma-bottle::before {
    content: '';
    position: absolute;
    top: -15.5%; /* -7px / 45px bottle height */
    left: 50%;
    transform: translateX(-50%);
    width: 66.6%; /* 16px / 24px bottle width */
    height: 15.5%; /* 7px / 45px bottle height */
    background-color: #282828;
    border-radius: 3px 3px 0 0;
    border: 0.4%; /* 1px / 250px drum width (approx for small elements) */
    border-style: solid;
    border-color: #111;
}

.perfume-flask {
    width: 13.75%; /* 55px / 400px */
    height: 20%;    /* 90px / 450px */
    background-color: rgba(200, 225, 255, 0.75);
    border: 0.5%; /* 2px / 400px */
    border-style: solid;
    border-color: #adcdea;
    border-radius: 6px 6px 25px 25px;
    position: absolute;
    bottom: 5.5%; /* 25px / 450px */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0.8% 1.6% rgba(0,0,0,0.1);
    z-index: 3;
    box-sizing: border-box;
}
.perfume-flask::before {
    content: '';
    position: absolute;
    top: -20%; /* -18px / 90px flask height */
    left: 50%;
    transform: translateX(-50%);
    width: 40%; /* 22px / 55px flask width */
    height: 20%; /* 18px / 90px flask height */
    background-color: rgba(200, 225, 255, 0.75);
    border: 0.5%; /* 2px / 400px */
    border-style: solid;
    border-color: #adcdea;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom: none;
}
.perfume-liquid {
    width: 100%;
    height: 0%;
    position: absolute;
    bottom: 0;
    border-radius: 0 0 23px 23px;
    transition: height 0.5s ease-out, background-color 0.5s ease;
}

.dispensing-stream {
    position: absolute;
    width: 0.75%; /* 3px / 400px */
    height: 0px;
    left: 50%;
    transform: translateX(-50%);
    transition: height 0.25s ease-out;
    z-index: 1; /* Behind drum */
    border-radius: 2px;
}

.controls {
    display: flex; /* Will be shown by JS */
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px; /* Match dispenser max width */
    margin-top: 10px; /* Space from dispenser if it's visible */
}
.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}
 .control-group label, .control-group > span:not(#aromaNumberDisplay):not(#doseDisplay) {
    flex-shrink: 0;
}
#doseSlider {
    flex-grow: 1;
}

.controls button {
    padding: 10px 18px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    color: #343a40;
    border-radius: 5px;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.controls button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}
.controls button:active {
    background-color: #dee2e6;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.controls button:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}
.display { /* This is for the animation controls display */
    padding: 10px 15px;
    background-color: #343a40;
    color: #90ee90;
    border-radius: 4px;
    width: calc(100% - 30px); /* Full width minus padding */
    text-align: center;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1em;
    border: 1px solid #495057;
    margin-bottom: 5px;
}

/* Adaptive Design */
@media (max-width: 880px) { /* Slightly wider than main content for smoother transition */
    .main-content-wrapper {
        flex-direction: column;
        align-items: center; /* Center items when stacked */
        gap: 20px;
    }
    .aroma-info-panel {
        flex-basis: auto; /* Allow it to take full width */
        width: 100%;
        max-width: 450px; /* Limit width when stacked */
    }
    .app-area {
        width: 100%;
        align-items: center; /* Ensure app area children are centered */
    }
    .image-upload-section, .dispenser-area, .controls {
        max-width: 450px; /* Allow them to be a bit wider if info panel is full width */
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8em;
    }
    .page-header p {
        font-size: 1em;
    }
    .aroma-info-panel, .image-upload-section, .dispenser-area, .controls {
        padding: 15px;
    }
    .controls button, .display, .image-upload-section button {
        font-size: 0.9em;
    }
    .aroma-legend th, .aroma-legend td {
        font-size: 0.85em;
        padding: 6px 3px;
    }
    .base-aroma-bottle {
        font-size: 0.6em; /* Further reduce for very small screens */
    }
}