|
78 | 78 | min-width: var(--unit-select-min-width, auto); /* Placeholder variable for dynamic width */
|
79 | 79 | }
|
80 | 80 |
|
| 81 | + #phenoAgeResult { |
| 82 | + max-width: 580px; /* Set max width to match the form */ |
| 83 | + padding: 1.5rem; |
| 84 | + color: var(--dark-text-color); /* Standard dark gray */ |
| 85 | + box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); /* Faint dark shadow for emphasis */ |
| 86 | + |
| 87 | + border-radius: 8px; |
| 88 | + font-size: 1.5rem; |
| 89 | + opacity: 0; |
| 90 | + transition: opacity 1s; |
| 91 | + } |
| 92 | + |
81 | 93 | @media (max-width: 768px) {
|
82 | 94 | /* Must use important because back button styles applied later. Without important it doesn't overwrite it. */
|
83 | 95 | .back-button {
|
@@ -410,25 +422,13 @@ <h2 data-aos="fade" data-aos-duration="700" data-aos-delay="250">The Blood Pact
|
410 | 422 | // Display the result
|
411 | 423 | const resultElement = document.getElementById('phenoAgeResult');
|
412 | 424 |
|
413 |
| - // Initial setup for styling |
414 |
| - resultElement.style.maxWidth = '580px'; // Set max width to match the form |
415 |
| - resultElement.style.padding = '1.5rem'; |
416 |
| - |
417 |
| - resultElement.style.color = 'var(--dark-text-color)'; // Standard dark gray |
418 |
| - resultElement.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.15)'; // Faint dark shadow for emphasis |
419 |
| - |
420 |
| - resultElement.style.borderRadius = '8px'; |
421 |
| - resultElement.style.fontSize = '1.5rem'; |
422 |
| - resultElement.style.opacity = 0; |
423 |
| - resultElement.style.transition = 'opacity 1s'; |
424 |
| - |
425 | 425 | // Setting up the animated counter effect
|
426 | 426 | let displayAge = 0;
|
427 | 427 | resultElement.innerHTML = `
|
428 |
| - <div style="font-size: 1rem; color: #2c3e50; text-align: center;">Your biological age is:</div> |
429 |
| - <div style="font-size: 2.5rem; color: #4CAF50; font-weight: bold; text-align: center;"><span id="animatedAge">0</span></div> |
430 |
| - <div id="yearsText" style="font-size: 1rem; color: #2c3e50; text-align: center;">years</div> |
431 |
| - `; |
| 428 | + <div style="font-size: 1rem; color: #2c3e50; text-align: center;">Your biological age is:</div> |
| 429 | + <div style="font-size: 2.5rem; color: #4CAF50; font-weight: bold; text-align: center;"><span id="animatedAge">0</span></div> |
| 430 | + <div id="yearsText" style="font-size: 1rem; color: #2c3e50; text-align: center;">years</div> |
| 431 | + `; |
432 | 432 |
|
433 | 433 | if (isFirstTimeAnimation) {
|
434 | 434 | // Set the flag to false after the first run
|
|
0 commit comments