Enhance: Conceal closed letter sheet, enrich Hogwarts lore story, and allow calm reading before boarding Hogwarts Express
This commit is contained in:
+141
-24
@@ -245,11 +245,17 @@ body {
|
||||
|
||||
.antique-envelope-scene {
|
||||
position: relative;
|
||||
width: min(440px, 92vw);
|
||||
height: min(260px, 58vw);
|
||||
width: min(480px, 94vw);
|
||||
height: min(280px, 60vw);
|
||||
margin: 25px auto 35px;
|
||||
perspective: 1200px;
|
||||
perspective-origin: center top;
|
||||
transition: margin-top 0.8s cubic-bezier(0.25, 1, 0.5, 1);
|
||||
}
|
||||
|
||||
.antique-envelope-scene.envelope-opened {
|
||||
margin-top: 155px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.envelope-base {
|
||||
@@ -280,26 +286,43 @@ body {
|
||||
/* The Letter inside the envelope (slides up when opened) */
|
||||
.letter-sheet {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
top: 15px;
|
||||
left: 4%;
|
||||
width: 92%;
|
||||
height: 92%;
|
||||
height: 440px;
|
||||
max-height: 75vh;
|
||||
background-color: #f7f0df;
|
||||
background-image:
|
||||
radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.5) 0%, rgba(140, 100, 50, 0.15) 100%),
|
||||
radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.6) 0%, rgba(140, 100, 50, 0.15) 100%),
|
||||
url('/static/img/parchment_texture.jpg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border-radius: 4px;
|
||||
border: 1.5px solid #8e6c43;
|
||||
padding: 16px 18px;
|
||||
padding: 16px 20px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
|
||||
z-index: 2;
|
||||
transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.25, 1) 0.35s, box-shadow 0.8s ease, z-index 0.2s 0.35s;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
transform: translateY(40px) scale(0.92);
|
||||
pointer-events: none;
|
||||
transition: transform 0.9s cubic-bezier(0.2, 0.85, 0.25, 1) 0.35s,
|
||||
opacity 0.6s ease 0.35s,
|
||||
box-shadow 0.8s ease;
|
||||
overflow-y: auto;
|
||||
text-align: center;
|
||||
outline: 1px dashed rgba(130, 95, 55, 0.45);
|
||||
outline-offset: -5px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #8c6838 transparent;
|
||||
}
|
||||
|
||||
.letter-sheet::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.letter-sheet::-webkit-scrollbar-thumb {
|
||||
background-color: #8c6838;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Front Pocket of envelope (covers the lower portion of the letter) */
|
||||
@@ -312,14 +335,14 @@ body {
|
||||
radial-gradient(ellipse at 50% 65%, rgba(255, 255, 255, 0.25) 0%, rgba(130, 95, 45, 0.2) 100%),
|
||||
url('/static/img/parchment_texture.jpg');
|
||||
background-size: cover;
|
||||
clip-path: polygon(0 32%, 50% 54%, 100% 32%, 100% 100%, 0 100%);
|
||||
clip-path: polygon(0 16%, 50% 50%, 100% 16%, 100% 100%, 0 100%);
|
||||
z-index: 4;
|
||||
border: 2px solid #8e6c43;
|
||||
filter: drop-shadow(0 -3px 6px rgba(60, 40, 15, 0.3));
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
padding-bottom: 20px;
|
||||
padding-bottom: 22px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -397,11 +420,11 @@ body {
|
||||
/* Sketched Wax Seal placed right over the flap tip */
|
||||
.sketched-wax-seal {
|
||||
position: absolute;
|
||||
top: 56%;
|
||||
top: 55%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) rotate(-3deg);
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 7;
|
||||
@@ -454,6 +477,7 @@ body {
|
||||
/* Open state: Flap opens, seal dissolves, letter slides out */
|
||||
.envelope-opened .sketched-wax-seal {
|
||||
animation: breakSealAnim 0.7s forwards;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.envelope-opened .envelope-closing-flap {
|
||||
@@ -463,11 +487,13 @@ body {
|
||||
}
|
||||
|
||||
.envelope-opened .letter-sheet {
|
||||
transform: translateY(-135px) scale(1.06);
|
||||
z-index: 10;
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translateY(-145px) scale(1.02);
|
||||
z-index: 25;
|
||||
box-shadow:
|
||||
0 20px 48px rgba(0, 0, 0, 0.85),
|
||||
0 0 25px rgba(201, 168, 106, 0.35);
|
||||
0 24px 60px rgba(0, 0, 0, 0.85),
|
||||
0 0 35px rgba(201, 168, 106, 0.4);
|
||||
}
|
||||
|
||||
@keyframes breakSealAnim {
|
||||
@@ -561,9 +587,10 @@ body {
|
||||
}
|
||||
|
||||
.letter-paragraph {
|
||||
font-size: clamp(1.02rem, 3.0vw, 1.2rem);
|
||||
font-size: clamp(1.0rem, 2.9vw, 1.16rem);
|
||||
margin-bottom: 8px;
|
||||
text-indent: 1.2em;
|
||||
line-height: 1.48;
|
||||
}
|
||||
|
||||
.letter-paragraph strong {
|
||||
@@ -615,6 +642,30 @@ body {
|
||||
color: var(--text-muted);
|
||||
line-height: 1.5;
|
||||
margin-bottom: 14px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.intro-action-container {
|
||||
margin-top: 14px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.letter-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fade-in-action {
|
||||
animation: fadeInActionAnim 0.5s ease forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeInActionAnim {
|
||||
0% { opacity: 0; transform: translateY(12px); }
|
||||
100% { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.btn-break-seal {
|
||||
@@ -629,23 +680,89 @@ body {
|
||||
box-shadow: 0 10px 28px rgba(201, 168, 106, 0.6);
|
||||
}
|
||||
|
||||
.btn-launch-quiz {
|
||||
font-size: clamp(1.05rem, 3.4vw, 1.22rem);
|
||||
padding: 14px 28px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.5px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
background: linear-gradient(135deg, #e6c564 0%, #c9a86a 50%, #8c6838 100%);
|
||||
color: #1a0f05;
|
||||
border: 1px solid #ffd700;
|
||||
box-shadow: 0 6px 25px rgba(201, 168, 106, 0.5), 0 0 15px rgba(255, 215, 0, 0.35);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.btn-launch-quiz:hover {
|
||||
transform: translateY(-2px) scale(1.02);
|
||||
box-shadow: 0 10px 32px rgba(201, 168, 106, 0.75), 0 0 25px rgba(255, 215, 0, 0.6);
|
||||
}
|
||||
|
||||
.glow-pulse {
|
||||
animation: glowPulseAnim 2.6s infinite alternate ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes glowPulseAnim {
|
||||
0% { box-shadow: 0 6px 20px rgba(201, 168, 106, 0.45); }
|
||||
100% { box-shadow: 0 10px 32px rgba(201, 168, 106, 0.8), 0 0 25px rgba(255, 215, 0, 0.6); }
|
||||
}
|
||||
|
||||
.btn-close-letter {
|
||||
font-size: 0.92rem;
|
||||
color: var(--text-muted);
|
||||
background: transparent;
|
||||
border: 1px solid rgba(201, 168, 106, 0.25);
|
||||
padding: 8px 18px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.btn-close-letter:hover {
|
||||
color: var(--gold-bright);
|
||||
border-color: var(--gold);
|
||||
background: rgba(201, 168, 106, 0.1);
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.antique-envelope-scene {
|
||||
width: min(320px, 92vw);
|
||||
height: min(205px, 58vw);
|
||||
width: min(340px, 94vw);
|
||||
height: min(215px, 60vw);
|
||||
margin: 15px auto 25px;
|
||||
}
|
||||
.antique-envelope-scene.envelope-opened {
|
||||
margin-top: 135px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.sketched-wax-seal {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
top: 56%;
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
top: 55%;
|
||||
}
|
||||
.letter-sheet {
|
||||
top: 10px;
|
||||
left: 2%;
|
||||
width: 96%;
|
||||
height: 400px;
|
||||
max-height: 72vh;
|
||||
padding: 12px 14px;
|
||||
}
|
||||
.envelope-opened .letter-sheet {
|
||||
transform: translateY(-100px) scale(1.04);
|
||||
transform: translateY(-120px) scale(1.01);
|
||||
}
|
||||
.letter-paragraph {
|
||||
font-size: 0.96rem;
|
||||
line-height: 1.42;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.envelope-front-pocket {
|
||||
padding-bottom: 14px;
|
||||
}
|
||||
.btn-launch-quiz {
|
||||
padding: 12px 20px;
|
||||
font-size: 1.0rem;
|
||||
}
|
||||
}
|
||||
|
||||
.difficulty-selection {
|
||||
|
||||
Reference in New Issue
Block a user